@aws-sdk/client-payments 0.0.0-stage → 3.1175.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 (100) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +222 -2
  3. package/dist-cjs/index.js +972 -0
  4. package/dist-es/Payments.js +27 -0
  5. package/dist-es/PaymentsClient.js +47 -0
  6. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  7. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  8. package/dist-es/commandBuilder.js +6 -0
  9. package/dist-es/commands/BatchGetFinancialRecordCommand.js +4 -0
  10. package/dist-es/commands/GetAccountBalanceCommand.js +4 -0
  11. package/dist-es/commands/GetFinancialRecordCommand.js +4 -0
  12. package/dist-es/commands/GetPaymentInstrumentCommand.js +4 -0
  13. package/dist-es/commands/ListFinancialRecordsCommand.js +4 -0
  14. package/dist-es/commands/ListPaymentInstrumentsCommand.js +4 -0
  15. package/dist-es/commands/index.js +6 -0
  16. package/dist-es/endpoint/EndpointParameters.js +11 -0
  17. package/dist-es/endpoint/bdd.js +29 -0
  18. package/dist-es/endpoint/endpointResolver.js +14 -0
  19. package/dist-es/extensionConfiguration.js +1 -0
  20. package/dist-es/index.js +10 -0
  21. package/dist-es/models/PaymentsServiceException.js +9 -0
  22. package/dist-es/models/enums.js +89 -0
  23. package/dist-es/models/errors.js +84 -0
  24. package/dist-es/models/models_0.js +1 -0
  25. package/dist-es/pagination/GetAccountBalancePaginator.js +4 -0
  26. package/dist-es/pagination/Interfaces.js +1 -0
  27. package/dist-es/pagination/ListFinancialRecordsPaginator.js +4 -0
  28. package/dist-es/pagination/ListPaymentInstrumentsPaginator.js +4 -0
  29. package/dist-es/pagination/index.js +4 -0
  30. package/dist-es/runtimeConfig.browser.js +29 -0
  31. package/dist-es/runtimeConfig.js +44 -0
  32. package/dist-es/runtimeConfig.native.js +9 -0
  33. package/dist-es/runtimeConfig.shared.js +40 -0
  34. package/dist-es/runtimeExtensions.js +9 -0
  35. package/dist-es/schemas/schemas_0.js +406 -0
  36. package/dist-types/Payments.d.ts +81 -0
  37. package/dist-types/PaymentsClient.d.ts +193 -0
  38. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  39. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  40. package/dist-types/commandBuilder.d.ts +18 -0
  41. package/dist-types/commands/BatchGetFinancialRecordCommand.d.ts +231 -0
  42. package/dist-types/commands/GetAccountBalanceCommand.d.ts +124 -0
  43. package/dist-types/commands/GetFinancialRecordCommand.d.ts +200 -0
  44. package/dist-types/commands/GetPaymentInstrumentCommand.d.ts +163 -0
  45. package/dist-types/commands/ListFinancialRecordsCommand.d.ts +188 -0
  46. package/dist-types/commands/ListPaymentInstrumentsCommand.d.ts +126 -0
  47. package/dist-types/commands/index.d.ts +6 -0
  48. package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
  49. package/dist-types/endpoint/bdd.d.ts +2 -0
  50. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  51. package/dist-types/extensionConfiguration.d.ts +9 -0
  52. package/dist-types/index.d.ts +18 -0
  53. package/dist-types/models/PaymentsServiceException.d.ts +15 -0
  54. package/dist-types/models/enums.d.ts +225 -0
  55. package/dist-types/models/errors.d.ts +108 -0
  56. package/dist-types/models/models_0.d.ts +936 -0
  57. package/dist-types/pagination/GetAccountBalancePaginator.d.ts +7 -0
  58. package/dist-types/pagination/Interfaces.d.ts +8 -0
  59. package/dist-types/pagination/ListFinancialRecordsPaginator.d.ts +7 -0
  60. package/dist-types/pagination/ListPaymentInstrumentsPaginator.d.ts +7 -0
  61. package/dist-types/pagination/index.d.ts +4 -0
  62. package/dist-types/runtimeConfig.browser.d.ts +57 -0
  63. package/dist-types/runtimeConfig.d.ts +58 -0
  64. package/dist-types/runtimeConfig.native.d.ts +56 -0
  65. package/dist-types/runtimeConfig.shared.d.ts +28 -0
  66. package/dist-types/runtimeExtensions.d.ts +17 -0
  67. package/dist-types/schemas/schemas_0.d.ts +55 -0
  68. package/dist-types/ts3.4/Payments.d.ts +138 -0
  69. package/dist-types/ts3.4/PaymentsClient.d.ts +136 -0
  70. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +25 -0
  71. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
  72. package/dist-types/ts3.4/commandBuilder.d.ts +40 -0
  73. package/dist-types/ts3.4/commands/BatchGetFinancialRecordCommand.d.ts +42 -0
  74. package/dist-types/ts3.4/commands/GetAccountBalanceCommand.d.ts +39 -0
  75. package/dist-types/ts3.4/commands/GetFinancialRecordCommand.d.ts +39 -0
  76. package/dist-types/ts3.4/commands/GetPaymentInstrumentCommand.d.ts +39 -0
  77. package/dist-types/ts3.4/commands/ListFinancialRecordsCommand.d.ts +39 -0
  78. package/dist-types/ts3.4/commands/ListPaymentInstrumentsCommand.d.ts +39 -0
  79. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  80. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  81. package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
  82. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  83. package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
  84. package/dist-types/ts3.4/index.d.ts +13 -0
  85. package/dist-types/ts3.4/models/PaymentsServiceException.d.ts +10 -0
  86. package/dist-types/ts3.4/models/enums.d.ts +111 -0
  87. package/dist-types/ts3.4/models/errors.d.ts +45 -0
  88. package/dist-types/ts3.4/models/models_0.d.ts +340 -0
  89. package/dist-types/ts3.4/pagination/GetAccountBalancePaginator.d.ts +11 -0
  90. package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
  91. package/dist-types/ts3.4/pagination/ListFinancialRecordsPaginator.d.ts +11 -0
  92. package/dist-types/ts3.4/pagination/ListPaymentInstrumentsPaginator.d.ts +11 -0
  93. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  94. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  95. package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
  96. package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
  97. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +31 -0
  98. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  99. package/dist-types/ts3.4/schemas/schemas_0.d.ts +55 -0
  100. package/package.json +67 -4
@@ -0,0 +1,27 @@
1
+ import { createAggregatedClient } from "@smithy/core/client";
2
+ import { BatchGetFinancialRecordCommand, } from "./commands/BatchGetFinancialRecordCommand";
3
+ import { GetAccountBalanceCommand, } from "./commands/GetAccountBalanceCommand";
4
+ import { GetFinancialRecordCommand, } from "./commands/GetFinancialRecordCommand";
5
+ import { GetPaymentInstrumentCommand, } from "./commands/GetPaymentInstrumentCommand";
6
+ import { ListFinancialRecordsCommand, } from "./commands/ListFinancialRecordsCommand";
7
+ import { ListPaymentInstrumentsCommand, } from "./commands/ListPaymentInstrumentsCommand";
8
+ import { paginateGetAccountBalance } from "./pagination/GetAccountBalancePaginator";
9
+ import { paginateListFinancialRecords } from "./pagination/ListFinancialRecordsPaginator";
10
+ import { paginateListPaymentInstruments } from "./pagination/ListPaymentInstrumentsPaginator";
11
+ import { PaymentsClient } from "./PaymentsClient";
12
+ const commands = {
13
+ BatchGetFinancialRecordCommand,
14
+ GetAccountBalanceCommand,
15
+ GetFinancialRecordCommand,
16
+ GetPaymentInstrumentCommand,
17
+ ListFinancialRecordsCommand,
18
+ ListPaymentInstrumentsCommand,
19
+ };
20
+ const paginators = {
21
+ paginateGetAccountBalance,
22
+ paginateListFinancialRecords,
23
+ paginateListPaymentInstruments,
24
+ };
25
+ export class Payments extends PaymentsClient {
26
+ }
27
+ createAggregatedClient(commands, Payments, { paginators });
@@ -0,0 +1,47 @@
1
+ import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from "@aws-sdk/core/client";
2
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
3
+ import { Client as __Client, } from "@smithy/core/client";
4
+ import { resolveRegionConfig } from "@smithy/core/config";
5
+ import { resolveEndpointConfig } from "@smithy/core/endpoints";
6
+ import { getContentLengthPlugin } from "@smithy/core/protocols";
7
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/core/retry";
8
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
9
+ import { defaultPaymentsHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
10
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
11
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
13
+ export { __Client };
14
+ export class PaymentsClient extends __Client {
15
+ config;
16
+ constructor(...[configuration]) {
17
+ const _config_0 = __getRuntimeConfig(configuration || {});
18
+ super(_config_0);
19
+ this.initConfig = _config_0;
20
+ const _config_1 = resolveClientEndpointParameters(_config_0);
21
+ const _config_2 = resolveUserAgentConfig(_config_1);
22
+ const _config_3 = resolveRetryConfig(_config_2);
23
+ const _config_4 = resolveRegionConfig(_config_3);
24
+ const _config_5 = resolveHostHeaderConfig(_config_4);
25
+ const _config_6 = resolveEndpointConfig(_config_5);
26
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
27
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
28
+ this.config = _config_8;
29
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
30
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
31
+ this.middlewareStack.use(getRetryPlugin(this.config));
32
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
33
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
34
+ this.middlewareStack.use(getLoggerPlugin(this.config));
35
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
36
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
37
+ httpAuthSchemeParametersProvider: defaultPaymentsHttpAuthSchemeParametersProvider,
38
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
39
+ "aws.auth#sigv4": config.credentials,
40
+ }),
41
+ }));
42
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
43
+ }
44
+ destroy() {
45
+ super.destroy();
46
+ }
47
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,40 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core/httpAuthSchemes";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/core/client";
3
+ export const defaultPaymentsHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: await normalizeProvider(config.region)() || (() => {
7
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
+ })(),
9
+ };
10
+ };
11
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
+ return {
13
+ schemeId: "aws.auth#sigv4",
14
+ signingProperties: {
15
+ name: "payments",
16
+ region: authParameters.region,
17
+ },
18
+ propertiesExtractor: (config, context) => ({
19
+ signingProperties: {
20
+ config,
21
+ context,
22
+ },
23
+ }),
24
+ };
25
+ }
26
+ export const defaultPaymentsHttpAuthSchemeProvider = (authParameters) => {
27
+ const options = [];
28
+ switch (authParameters.operation) {
29
+ default: {
30
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
+ }
32
+ }
33
+ return options;
34
+ };
35
+ export const resolveHttpAuthSchemeConfig = (config) => {
36
+ const config_0 = resolveAwsSdkSigV4Config(config);
37
+ return Object.assign(config_0, {
38
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
+ });
40
+ };
@@ -0,0 +1,6 @@
1
+ import { makeBuilder } from "@smithy/core/client";
2
+ import { getEndpointPlugin } from "@smithy/core/endpoints";
3
+ import { commonParams } from "./endpoint/EndpointParameters";
4
+ export const command = makeBuilder(commonParams, "AWSPayments", "PaymentsClient", getEndpointPlugin);
5
+ export const _ep0 = {};
6
+ export const _mw0 = (Command, cs, config, o) => [];
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { BatchGetFinancialRecord$ } from "../schemas/schemas_0";
3
+ export class BatchGetFinancialRecordCommand extends command(_ep0, _mw0, "BatchGetFinancialRecord", BatchGetFinancialRecord$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { GetAccountBalance$ } from "../schemas/schemas_0";
3
+ export class GetAccountBalanceCommand extends command(_ep0, _mw0, "GetAccountBalance", GetAccountBalance$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { GetFinancialRecord$ } from "../schemas/schemas_0";
3
+ export class GetFinancialRecordCommand extends command(_ep0, _mw0, "GetFinancialRecord", GetFinancialRecord$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { GetPaymentInstrument$ } from "../schemas/schemas_0";
3
+ export class GetPaymentInstrumentCommand extends command(_ep0, _mw0, "GetPaymentInstrument", GetPaymentInstrument$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { ListFinancialRecords$ } from "../schemas/schemas_0";
3
+ export class ListFinancialRecordsCommand extends command(_ep0, _mw0, "ListFinancialRecords", ListFinancialRecords$) {
4
+ }
@@ -0,0 +1,4 @@
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
2
+ import { ListPaymentInstruments$ } from "../schemas/schemas_0";
3
+ export class ListPaymentInstrumentsCommand extends command(_ep0, _mw0, "ListPaymentInstruments", ListPaymentInstruments$) {
4
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./BatchGetFinancialRecordCommand";
2
+ export * from "./GetAccountBalanceCommand";
3
+ export * from "./GetFinancialRecordCommand";
4
+ export * from "./GetPaymentInstrumentCommand";
5
+ export * from "./ListFinancialRecordsCommand";
6
+ export * from "./ListPaymentInstrumentsCommand";
@@ -0,0 +1,11 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return Object.assign(options, {
3
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
4
+ defaultSigningName: "payments",
5
+ });
6
+ };
7
+ export const commonParams = {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ };
@@ -0,0 +1,29 @@
1
+ import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
2
+ const a = "isSet", b = { "ref": "Endpoint" }, c = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, d = [{ "ref": "Region" }];
3
+ const _data = {
4
+ conditions: [
5
+ [a, [b]],
6
+ [a, d],
7
+ ["aws.partition", d, "PartitionResult"],
8
+ ["booleanEquals", [{ ref: "UseFIPS" }, true]]
9
+ ],
10
+ results: [
11
+ [-1],
12
+ [-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
13
+ [b, {}],
14
+ ["https://payments-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", c],
15
+ ["https://payments.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", c],
16
+ [-1, "Invalid Configuration: Missing Region"]
17
+ ]
18
+ };
19
+ const root = 2;
20
+ const r = 100_000_000;
21
+ const nodes = new Int32Array([
22
+ -1, 1, -1,
23
+ 0, 6, 3,
24
+ 1, 4, r + 5,
25
+ 2, 5, r + 5,
26
+ 3, r + 3, r + 4,
27
+ 3, r + 1, r + 2,
28
+ ]);
29
+ export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -0,0 +1,14 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/core/client";
2
+ import { customEndpointFunctions, decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
3
+ import { bdd } from "./bdd";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseFIPS"],
7
+ });
8
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
+ endpointParams: endpointParams,
11
+ logger: context.logger,
12
+ }));
13
+ };
14
+ customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from "./PaymentsClient";
2
+ export * from "./Payments";
3
+ export * from "./commands";
4
+ export { Command as $Command } from "@smithy/core/client";
5
+ export * from "./pagination";
6
+ export * from "./schemas/schemas_0";
7
+ export * from "./models/enums";
8
+ export * from "./models/errors";
9
+ export * from "./models/models_0";
10
+ export { PaymentsServiceException } from "./models/PaymentsServiceException";
@@ -0,0 +1,9 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/core/client";
2
+ export { __ServiceException };
3
+ export class PaymentsServiceException extends __ServiceException {
4
+ static shapeId = "smithy.ts.sdk.synthetic.com.amazonaws.payments#PaymentsServiceException";
5
+ constructor(options) {
6
+ super(options);
7
+ Object.setPrototypeOf(this, PaymentsServiceException.prototype);
8
+ }
9
+ }
@@ -0,0 +1,89 @@
1
+ export const AccessDeniedExceptionReason = {
2
+ INVALID_ACCOUNT_STATE: "INVALID_ACCOUNT_STATE",
3
+ NOT_AUTHORIZED: "NOT_AUTHORIZED",
4
+ OTHER: "OTHER",
5
+ };
6
+ export const BatchErrorCode = {
7
+ INTERNAL_ERROR: "INTERNAL_ERROR",
8
+ NOT_FOUND: "NOT_FOUND",
9
+ };
10
+ export const LineOfBusiness = {
11
+ AWS_CLOUD_SERVICES: "AWS_CLOUD_SERVICES",
12
+ AWS_MARKETPLACE: "AWS_MARKETPLACE",
13
+ PROSERVE_MARKETING_AND_TRAINING: "PROSERVE_MARKETING_AND_TRAINING",
14
+ };
15
+ export const DueStatus = {
16
+ DUE: "DUE",
17
+ PAST_DUE: "PAST_DUE",
18
+ };
19
+ export const InvoiceFrequency = {
20
+ ONE_TIME: "ONE_TIME",
21
+ RECURRING: "RECURRING",
22
+ };
23
+ export const SettlementStatus = {
24
+ CLOSED: "CLOSED",
25
+ OPEN: "OPEN",
26
+ };
27
+ export const FinancialRecordStatus = {
28
+ CANCELED: "CANCELED",
29
+ OUTSTANDING: "OUTSTANDING",
30
+ PROCESSING: "PROCESSING",
31
+ SETTLED: "SETTLED",
32
+ };
33
+ export const FinancialRecordType = {
34
+ CREDIT_MEMO: "CREDIT_MEMO",
35
+ INVOICE: "INVOICE",
36
+ };
37
+ export const ValidationExceptionReason = {
38
+ CANNOT_PARSE: "CANNOT_PARSE",
39
+ FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
40
+ INVALID_PAGINATION_TOKEN: "INVALID_PAGINATION_TOKEN",
41
+ OTHER: "OTHER",
42
+ UNSUPPORTED_ACTION: "UNSUPPORTED_ACTION",
43
+ };
44
+ export const BalanceType = {
45
+ INVOICES_DUE: "INVOICES_DUE",
46
+ INVOICES_PAST_DUE: "INVOICES_PAST_DUE",
47
+ OUTSTANDING_CREDIT_MEMOS: "OUTSTANDING_CREDIT_MEMOS",
48
+ };
49
+ export const CardBrand = {
50
+ AMEX: "AMEX",
51
+ CHINA_UNIONPAY: "CHINA_UNIONPAY",
52
+ DISCOVER: "DISCOVER",
53
+ JCB: "JCB",
54
+ MASTERCARD: "MASTERCARD",
55
+ RUPAY: "RUPAY",
56
+ VISA: "VISA",
57
+ };
58
+ export const CardType = {
59
+ CREDIT: "CREDIT",
60
+ DEBIT: "DEBIT",
61
+ };
62
+ export const BankAccountType = {
63
+ CHECKING: "CHECKING",
64
+ SAVINGS: "SAVINGS",
65
+ };
66
+ export const PaymentMethod = {
67
+ CARD: "CARD",
68
+ CN_BANK_REDIRECT: "CN_BANK_REDIRECT",
69
+ IN_NET_BANKING: "IN_NET_BANKING",
70
+ PAY_BY_INVOICE: "PAY_BY_INVOICE",
71
+ PIX: "PIX",
72
+ SEPA_BANK_ACCOUNT: "SEPA_BANK_ACCOUNT",
73
+ UK_BACS_BANK_ACCOUNT: "UK_BACS_BANK_ACCOUNT",
74
+ UPI: "UPI",
75
+ US_ACH_BANK_ACCOUNT: "US_ACH_BANK_ACCOUNT",
76
+ };
77
+ export const PaymentInstrumentStatus = {
78
+ ACTIVE: "ACTIVE",
79
+ INVALID: "INVALID",
80
+ PENDING_SETUP: "PENDING_SETUP",
81
+ SETUP_IN_PROGRESS: "SETUP_IN_PROGRESS",
82
+ };
83
+ export const FinancialRecordSortField = {
84
+ ISSUED_AT: "ISSUED_AT",
85
+ };
86
+ export const SortOrder = {
87
+ ASCENDING: "ASCENDING",
88
+ DESCENDING: "DESCENDING",
89
+ };
@@ -0,0 +1,84 @@
1
+ import { PaymentsServiceException as __BaseException } from "./PaymentsServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ static shapeId = "com.amazonaws.payments#AccessDeniedException";
4
+ name = "AccessDeniedException";
5
+ $fault = "client";
6
+ reason;
7
+ constructor(opts) {
8
+ super({
9
+ name: "AccessDeniedException",
10
+ $fault: "client",
11
+ ...opts,
12
+ });
13
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
14
+ this.reason = opts.reason;
15
+ }
16
+ }
17
+ export class InternalServerException extends __BaseException {
18
+ static shapeId = "com.amazonaws.payments#InternalServerException";
19
+ name = "InternalServerException";
20
+ $fault = "server";
21
+ $retryable = {};
22
+ retryAfterSeconds;
23
+ constructor(opts) {
24
+ super({
25
+ name: "InternalServerException",
26
+ $fault: "server",
27
+ ...opts,
28
+ });
29
+ Object.setPrototypeOf(this, InternalServerException.prototype);
30
+ this.retryAfterSeconds = opts.retryAfterSeconds;
31
+ }
32
+ }
33
+ export class ThrottlingException extends __BaseException {
34
+ static shapeId = "com.amazonaws.payments#ThrottlingException";
35
+ name = "ThrottlingException";
36
+ $fault = "client";
37
+ $retryable = {
38
+ throttling: true,
39
+ };
40
+ retryAfterSeconds;
41
+ constructor(opts) {
42
+ super({
43
+ name: "ThrottlingException",
44
+ $fault: "client",
45
+ ...opts,
46
+ });
47
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
48
+ this.retryAfterSeconds = opts.retryAfterSeconds;
49
+ }
50
+ }
51
+ export class ValidationException extends __BaseException {
52
+ static shapeId = "com.amazonaws.payments#ValidationException";
53
+ name = "ValidationException";
54
+ $fault = "client";
55
+ reason;
56
+ fieldList;
57
+ constructor(opts) {
58
+ super({
59
+ name: "ValidationException",
60
+ $fault: "client",
61
+ ...opts,
62
+ });
63
+ Object.setPrototypeOf(this, ValidationException.prototype);
64
+ this.reason = opts.reason;
65
+ this.fieldList = opts.fieldList;
66
+ }
67
+ }
68
+ export class ResourceNotFoundException extends __BaseException {
69
+ static shapeId = "com.amazonaws.payments#ResourceNotFoundException";
70
+ name = "ResourceNotFoundException";
71
+ $fault = "client";
72
+ resourceId;
73
+ resourceType;
74
+ constructor(opts) {
75
+ super({
76
+ name: "ResourceNotFoundException",
77
+ $fault: "client",
78
+ ...opts,
79
+ });
80
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
81
+ this.resourceId = opts.resourceId;
82
+ this.resourceType = opts.resourceType;
83
+ }
84
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { GetAccountBalanceCommand, } from "../commands/GetAccountBalanceCommand";
3
+ import { PaymentsClient } from "../PaymentsClient";
4
+ export const paginateGetAccountBalance = createPaginator(PaymentsClient, GetAccountBalanceCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListFinancialRecordsCommand, } from "../commands/ListFinancialRecordsCommand";
3
+ import { PaymentsClient } from "../PaymentsClient";
4
+ export const paginateListFinancialRecords = createPaginator(PaymentsClient, ListFinancialRecordsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListPaymentInstrumentsCommand, } from "../commands/ListPaymentInstrumentsCommand";
3
+ import { PaymentsClient } from "../PaymentsClient";
4
+ export const paginateListPaymentInstruments = createPaginator(PaymentsClient, ListPaymentInstrumentsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,4 @@
1
+ export * from "./Interfaces";
2
+ export * from "./GetAccountBalancePaginator";
3
+ export * from "./ListFinancialRecordsPaginator";
4
+ export * from "./ListPaymentInstrumentsPaginator";
@@ -0,0 +1,29 @@
1
+ import packageInfo from "../package.json";
2
+ import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
3
+ import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
5
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
6
+ import { calculateBodyLength } from "@smithy/core/serde";
7
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
8
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
9
+ export const getRuntimeConfig = (config) => {
10
+ const defaultsMode = resolveDefaultsModeConfig(config);
11
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
12
+ const clientSharedValues = getSharedRuntimeConfig(config);
13
+ return {
14
+ ...clientSharedValues,
15
+ ...config,
16
+ runtime: "browser",
17
+ defaultsMode,
18
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
19
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
20
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
21
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
22
+ region: config?.region ?? invalidProvider("Region is missing"),
23
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
24
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
25
+ streamCollector: config?.streamCollector ?? streamCollector,
26
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
27
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
28
+ };
29
+ };
@@ -0,0 +1,44 @@
1
+ import packageInfo from "../package.json";
2
+ import { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, getDefaultSocketTimeout, NODE_APP_ID_CONFIG_OPTIONS, } from "@aws-sdk/core/client";
3
+ import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
4
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
5
+ import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
6
+ import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
8
+ import { calculateBodyLength } from "@smithy/core/serde";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
11
+ export const getRuntimeConfig = (config) => {
12
+ emitWarningIfUnsupportedVersion(process.version);
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ awsCheckVersion(process.version);
17
+ const loaderConfig = {
18
+ profile: config?.profile,
19
+ logger: clientSharedValues.logger,
20
+ };
21
+ return {
22
+ ...clientSharedValues,
23
+ ...config,
24
+ runtime: "node",
25
+ defaultsMode,
26
+ authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
+ defaultSocketTimeout: getDefaultSocketTimeout(config?.requestHandler, 300_000),
30
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
32
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
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
+ }, config),
39
+ streamCollector: config?.streamCollector ?? streamCollector,
40
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
+ };
44
+ };
@@ -0,0 +1,9 @@
1
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
2
+ export const getRuntimeConfig = (config) => {
3
+ const browserDefaults = getBrowserRuntimeConfig(config);
4
+ return {
5
+ ...browserDefaults,
6
+ ...config,
7
+ runtime: "react-native",
8
+ };
9
+ };
@@ -0,0 +1,40 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
+ import { AwsJson1_0Protocol } from "@aws-sdk/core/protocols";
3
+ import { Sha256 } from "@smithy/core/checksum";
4
+ import { NoOpLogger } from "@smithy/core/client";
5
+ import { parseUrl } from "@smithy/core/protocols";
6
+ import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
7
+ import { defaultPaymentsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
8
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
9
+ import { errorTypeRegistries } from "./schemas/schemas_0";
10
+ export const getRuntimeConfig = (config) => {
11
+ return {
12
+ apiVersion: "2026-09-23",
13
+ base64Decoder: config?.base64Decoder ?? fromBase64,
14
+ base64Encoder: config?.base64Encoder ?? toBase64,
15
+ disableHostPrefix: config?.disableHostPrefix ?? false,
16
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
17
+ extensions: config?.extensions ?? [],
18
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPaymentsHttpAuthSchemeProvider,
19
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
20
+ {
21
+ schemeId: "aws.auth#sigv4",
22
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
23
+ signer: new AwsSdkSigV4Signer(),
24
+ },
25
+ ],
26
+ logger: config?.logger ?? new NoOpLogger(),
27
+ protocol: config?.protocol ?? AwsJson1_0Protocol,
28
+ protocolSettings: config?.protocolSettings ?? {
29
+ defaultNamespace: "com.amazonaws.payments",
30
+ errorTypeRegistries,
31
+ version: "2026-09-23",
32
+ serviceTarget: "AWSPayments",
33
+ },
34
+ serviceId: config?.serviceId ?? "Payments",
35
+ sha256: config?.sha256 ?? Sha256,
36
+ urlParser: config?.urlParser ?? parseUrl,
37
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
39
+ };
40
+ };
@@ -0,0 +1,9 @@
1
+ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from "@aws-sdk/core/client";
2
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
3
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
5
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
6
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
7
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
8
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
9
+ };