@gr4vy/sdk 1.9.20 → 1.10.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 (106) hide show
  1. package/README.md +11 -0
  2. package/examples/package-lock.json +1 -1
  3. package/funcs/merchantAccountsThreeDsConfigurationCreate.d.ts +18 -0
  4. package/funcs/merchantAccountsThreeDsConfigurationCreate.d.ts.map +1 -0
  5. package/funcs/merchantAccountsThreeDsConfigurationCreate.js +141 -0
  6. package/funcs/merchantAccountsThreeDsConfigurationCreate.js.map +1 -0
  7. package/funcs/merchantAccountsThreeDsConfigurationDelete.d.ts +17 -0
  8. package/funcs/merchantAccountsThreeDsConfigurationDelete.d.ts.map +1 -0
  9. package/funcs/merchantAccountsThreeDsConfigurationDelete.js +141 -0
  10. package/funcs/merchantAccountsThreeDsConfigurationDelete.js.map +1 -0
  11. package/funcs/merchantAccountsThreeDsConfigurationList.d.ts +18 -0
  12. package/funcs/merchantAccountsThreeDsConfigurationList.d.ts.map +1 -0
  13. package/funcs/merchantAccountsThreeDsConfigurationList.js +154 -0
  14. package/funcs/merchantAccountsThreeDsConfigurationList.js.map +1 -0
  15. package/funcs/merchantAccountsThreeDsConfigurationUpdate.d.ts +18 -0
  16. package/funcs/merchantAccountsThreeDsConfigurationUpdate.d.ts.map +1 -0
  17. package/funcs/merchantAccountsThreeDsConfigurationUpdate.js +143 -0
  18. package/funcs/merchantAccountsThreeDsConfigurationUpdate.js.map +1 -0
  19. package/funcs/transactionsCapture.d.ts +1 -2
  20. package/funcs/transactionsCapture.d.ts.map +1 -1
  21. package/funcs/transactionsCapture.js +6 -11
  22. package/funcs/transactionsCapture.js.map +1 -1
  23. package/jsr.json +1 -1
  24. package/lib/config.d.ts +3 -3
  25. package/lib/config.js +3 -3
  26. package/models/components/index.d.ts +4 -0
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +4 -0
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/merchantaccountthreedsconfiguration.d.ts +62 -0
  31. package/models/components/merchantaccountthreedsconfiguration.d.ts.map +1 -0
  32. package/models/components/merchantaccountthreedsconfiguration.js +77 -0
  33. package/models/components/merchantaccountthreedsconfiguration.js.map +1 -0
  34. package/models/components/merchantaccountthreedsconfigurationcreate.d.ts +54 -0
  35. package/models/components/merchantaccountthreedsconfigurationcreate.d.ts.map +1 -0
  36. package/models/components/merchantaccountthreedsconfigurationcreate.js +68 -0
  37. package/models/components/merchantaccountthreedsconfigurationcreate.js.map +1 -0
  38. package/models/components/merchantaccountthreedsconfigurations.d.ts +14 -0
  39. package/models/components/merchantaccountthreedsconfigurations.d.ts.map +1 -0
  40. package/models/components/merchantaccountthreedsconfigurations.js +51 -0
  41. package/models/components/merchantaccountthreedsconfigurations.js.map +1 -0
  42. package/models/components/merchantaccountthreedsconfigurationupdate.d.ts +57 -0
  43. package/models/components/merchantaccountthreedsconfigurationupdate.d.ts.map +1 -0
  44. package/models/components/merchantaccountthreedsconfigurationupdate.js +68 -0
  45. package/models/components/merchantaccountthreedsconfigurationupdate.js.map +1 -0
  46. package/models/operations/capturetransaction.d.ts +8 -3
  47. package/models/operations/capturetransaction.d.ts.map +1 -1
  48. package/models/operations/capturetransaction.js +7 -5
  49. package/models/operations/capturetransaction.js.map +1 -1
  50. package/models/operations/createthreedsconfiguration.d.ts +18 -0
  51. package/models/operations/createthreedsconfiguration.d.ts.map +1 -0
  52. package/models/operations/createthreedsconfiguration.js +57 -0
  53. package/models/operations/createthreedsconfiguration.js.map +1 -0
  54. package/models/operations/deletethreedsconfiguration.d.ts +20 -0
  55. package/models/operations/deletethreedsconfiguration.d.ts.map +1 -0
  56. package/models/operations/deletethreedsconfiguration.js +56 -0
  57. package/models/operations/deletethreedsconfiguration.js.map +1 -0
  58. package/models/operations/editthreedsconfiguration.d.ts +23 -0
  59. package/models/operations/editthreedsconfiguration.d.ts.map +1 -0
  60. package/models/operations/editthreedsconfiguration.js +59 -0
  61. package/models/operations/editthreedsconfiguration.js.map +1 -0
  62. package/models/operations/getmerchantaccount.d.ts +1 -1
  63. package/models/operations/index.d.ts +4 -0
  64. package/models/operations/index.d.ts.map +1 -1
  65. package/models/operations/index.js +4 -0
  66. package/models/operations/index.js.map +1 -1
  67. package/models/operations/listthreedsconfigurations.d.ts +20 -0
  68. package/models/operations/listthreedsconfigurations.d.ts.map +1 -0
  69. package/models/operations/listthreedsconfigurations.js +55 -0
  70. package/models/operations/listthreedsconfigurations.js.map +1 -0
  71. package/models/operations/updatemerchantaccount.d.ts +1 -1
  72. package/package.json +1 -1
  73. package/sdk/merchantaccounts.d.ts +3 -0
  74. package/sdk/merchantaccounts.d.ts.map +1 -1
  75. package/sdk/merchantaccounts.js +4 -0
  76. package/sdk/merchantaccounts.js.map +1 -1
  77. package/sdk/threedsconfiguration.d.ts +33 -0
  78. package/sdk/threedsconfiguration.d.ts.map +1 -0
  79. package/sdk/threedsconfiguration.js +52 -0
  80. package/sdk/threedsconfiguration.js.map +1 -0
  81. package/sdk/transactions.d.ts +1 -1
  82. package/sdk/transactions.d.ts.map +1 -1
  83. package/sdk/transactions.js +2 -2
  84. package/sdk/transactions.js.map +1 -1
  85. package/src/funcs/merchantAccountsThreeDsConfigurationCreate.ts +255 -0
  86. package/src/funcs/merchantAccountsThreeDsConfigurationDelete.ts +252 -0
  87. package/src/funcs/merchantAccountsThreeDsConfigurationList.ts +262 -0
  88. package/src/funcs/merchantAccountsThreeDsConfigurationUpdate.ts +264 -0
  89. package/src/funcs/transactionsCapture.ts +13 -25
  90. package/src/lib/config.ts +3 -3
  91. package/src/models/components/index.ts +4 -0
  92. package/src/models/components/merchantaccountthreedsconfiguration.ts +110 -0
  93. package/src/models/components/merchantaccountthreedsconfigurationcreate.ts +91 -0
  94. package/src/models/components/merchantaccountthreedsconfigurations.ts +39 -0
  95. package/src/models/components/merchantaccountthreedsconfigurationupdate.ts +94 -0
  96. package/src/models/operations/capturetransaction.ts +14 -7
  97. package/src/models/operations/createthreedsconfiguration.ts +50 -0
  98. package/src/models/operations/deletethreedsconfiguration.ts +48 -0
  99. package/src/models/operations/editthreedsconfiguration.ts +57 -0
  100. package/src/models/operations/getmerchantaccount.ts +1 -1
  101. package/src/models/operations/index.ts +4 -0
  102. package/src/models/operations/listthreedsconfigurations.ts +47 -0
  103. package/src/models/operations/updatemerchantaccount.ts +1 -1
  104. package/src/sdk/merchantaccounts.ts +8 -0
  105. package/src/sdk/threedsconfiguration.ts +93 -0
  106. package/src/sdk/transactions.ts +3 -9
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { CardScheme, CardScheme$inboundSchema } from "./cardscheme.js";
11
+
12
+ export type MerchantAccountThreeDSConfiguration = {
13
+ /**
14
+ * Acquirer BIN to use when calling 3DS through this scheme.
15
+ */
16
+ merchantAcquirerBin: string;
17
+ /**
18
+ * Merchant ID to use when calling 3DS through this scheme.
19
+ */
20
+ merchantAcquirerId: string;
21
+ merchantName: string;
22
+ /**
23
+ * The merchant's ISO 3166-1 numeric country code.
24
+ */
25
+ merchantCountryCode: string;
26
+ /**
27
+ * Merchant category code to use when calling 3DS through this scheme.
28
+ */
29
+ merchantCategoryCode: string;
30
+ /**
31
+ * URL to send when calling 3DS through this scheme.
32
+ */
33
+ merchantUrl: string;
34
+ /**
35
+ * Always `merchant-account.three-ds-configuration`.
36
+ */
37
+ type: "merchant-account.three-ds-configuration";
38
+ /**
39
+ * Unique identifier for the 3DS configuration
40
+ */
41
+ id: string;
42
+ /**
43
+ * ID of the associated merchant account
44
+ */
45
+ merchantAccountId: string;
46
+ /**
47
+ * The date and time when this 3DS configuration was first created in our system.
48
+ */
49
+ createdAt: Date;
50
+ /**
51
+ * The date and time when this 3DS configuration was last updated in our system.
52
+ */
53
+ updatedAt: Date;
54
+ scheme: CardScheme;
55
+ /**
56
+ * ISO 4217 currency code (3 characters). If null, the configuration applies to all currencies.
57
+ */
58
+ currency: string | null;
59
+ /**
60
+ * Additional information about the 3DS configuration, stored as key-value pairs.
61
+ */
62
+ metadata: { [k: string]: string };
63
+ };
64
+
65
+ /** @internal */
66
+ export const MerchantAccountThreeDSConfiguration$inboundSchema: z.ZodType<
67
+ MerchantAccountThreeDSConfiguration,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({
71
+ merchant_acquirer_bin: z.string(),
72
+ merchant_acquirer_id: z.string(),
73
+ merchant_name: z.string(),
74
+ merchant_country_code: z.string(),
75
+ merchant_category_code: z.string(),
76
+ merchant_url: z.string(),
77
+ type: z.literal("merchant-account.three-ds-configuration").default(
78
+ "merchant-account.three-ds-configuration",
79
+ ),
80
+ id: z.string(),
81
+ merchant_account_id: z.string(),
82
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
83
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
84
+ scheme: CardScheme$inboundSchema,
85
+ currency: z.nullable(z.string()),
86
+ metadata: z.record(z.string()),
87
+ }).transform((v) => {
88
+ return remap$(v, {
89
+ "merchant_acquirer_bin": "merchantAcquirerBin",
90
+ "merchant_acquirer_id": "merchantAcquirerId",
91
+ "merchant_name": "merchantName",
92
+ "merchant_country_code": "merchantCountryCode",
93
+ "merchant_category_code": "merchantCategoryCode",
94
+ "merchant_url": "merchantUrl",
95
+ "merchant_account_id": "merchantAccountId",
96
+ "created_at": "createdAt",
97
+ "updated_at": "updatedAt",
98
+ });
99
+ });
100
+
101
+ export function merchantAccountThreeDSConfigurationFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<MerchantAccountThreeDSConfiguration, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) =>
107
+ MerchantAccountThreeDSConfiguration$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'MerchantAccountThreeDSConfiguration' from JSON`,
109
+ );
110
+ }
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { CardScheme, CardScheme$outboundSchema } from "./cardscheme.js";
8
+
9
+ export type MerchantAccountThreeDSConfigurationCreate = {
10
+ /**
11
+ * Acquirer BIN to use when calling 3DS through this scheme.
12
+ */
13
+ merchantAcquirerBin: string;
14
+ /**
15
+ * Merchant ID to use when calling 3DS through this scheme.
16
+ */
17
+ merchantAcquirerId: string;
18
+ merchantName: string;
19
+ /**
20
+ * The merchant's ISO 3166-1 numeric country code.
21
+ */
22
+ merchantCountryCode: string;
23
+ /**
24
+ * Merchant category code to use when calling 3DS through this scheme.
25
+ */
26
+ merchantCategoryCode: string;
27
+ /**
28
+ * URL to send when calling 3DS through this scheme.
29
+ */
30
+ merchantUrl: string;
31
+ scheme: CardScheme;
32
+ /**
33
+ * ISO 4217 currency code (3 characters). If left null, the configuration will apply to all currencies.
34
+ */
35
+ currency?: string | null | undefined;
36
+ /**
37
+ * Any additional information about the 3DS configuration that you would like to store as key-value pairs.
38
+ */
39
+ metadata: { [k: string]: string };
40
+ };
41
+
42
+ /** @internal */
43
+ export type MerchantAccountThreeDSConfigurationCreate$Outbound = {
44
+ merchant_acquirer_bin: string;
45
+ merchant_acquirer_id: string;
46
+ merchant_name: string;
47
+ merchant_country_code: string;
48
+ merchant_category_code: string;
49
+ merchant_url: string;
50
+ scheme: string;
51
+ currency?: string | null | undefined;
52
+ metadata: { [k: string]: string };
53
+ };
54
+
55
+ /** @internal */
56
+ export const MerchantAccountThreeDSConfigurationCreate$outboundSchema:
57
+ z.ZodType<
58
+ MerchantAccountThreeDSConfigurationCreate$Outbound,
59
+ z.ZodTypeDef,
60
+ MerchantAccountThreeDSConfigurationCreate
61
+ > = z.object({
62
+ merchantAcquirerBin: z.string(),
63
+ merchantAcquirerId: z.string(),
64
+ merchantName: z.string(),
65
+ merchantCountryCode: z.string(),
66
+ merchantCategoryCode: z.string(),
67
+ merchantUrl: z.string(),
68
+ scheme: CardScheme$outboundSchema,
69
+ currency: z.nullable(z.string()).optional(),
70
+ metadata: z.record(z.string()),
71
+ }).transform((v) => {
72
+ return remap$(v, {
73
+ merchantAcquirerBin: "merchant_acquirer_bin",
74
+ merchantAcquirerId: "merchant_acquirer_id",
75
+ merchantName: "merchant_name",
76
+ merchantCountryCode: "merchant_country_code",
77
+ merchantCategoryCode: "merchant_category_code",
78
+ merchantUrl: "merchant_url",
79
+ });
80
+ });
81
+
82
+ export function merchantAccountThreeDSConfigurationCreateToJSON(
83
+ merchantAccountThreeDSConfigurationCreate:
84
+ MerchantAccountThreeDSConfigurationCreate,
85
+ ): string {
86
+ return JSON.stringify(
87
+ MerchantAccountThreeDSConfigurationCreate$outboundSchema.parse(
88
+ merchantAccountThreeDSConfigurationCreate,
89
+ ),
90
+ );
91
+ }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ MerchantAccountThreeDSConfiguration,
11
+ MerchantAccountThreeDSConfiguration$inboundSchema,
12
+ } from "./merchantaccountthreedsconfiguration.js";
13
+
14
+ export type MerchantAccountThreeDSConfigurations = {
15
+ /**
16
+ * A list of items returned for this request.
17
+ */
18
+ items: Array<MerchantAccountThreeDSConfiguration>;
19
+ };
20
+
21
+ /** @internal */
22
+ export const MerchantAccountThreeDSConfigurations$inboundSchema: z.ZodType<
23
+ MerchantAccountThreeDSConfigurations,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ items: z.array(MerchantAccountThreeDSConfiguration$inboundSchema),
28
+ });
29
+
30
+ export function merchantAccountThreeDSConfigurationsFromJSON(
31
+ jsonString: string,
32
+ ): SafeParseResult<MerchantAccountThreeDSConfigurations, SDKValidationError> {
33
+ return safeParse(
34
+ jsonString,
35
+ (x) =>
36
+ MerchantAccountThreeDSConfigurations$inboundSchema.parse(JSON.parse(x)),
37
+ `Failed to parse 'MerchantAccountThreeDSConfigurations' from JSON`,
38
+ );
39
+ }
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { CardScheme, CardScheme$outboundSchema } from "./cardscheme.js";
8
+
9
+ export type MerchantAccountThreeDSConfigurationUpdate = {
10
+ /**
11
+ * Acquirer BIN to use when calling 3DS through this scheme.
12
+ */
13
+ merchantAcquirerBin?: string | null | undefined;
14
+ /**
15
+ * Merchant ID to use when calling 3DS through this scheme.
16
+ */
17
+ merchantAcquirerId?: string | null | undefined;
18
+ merchantName?: string | null | undefined;
19
+ /**
20
+ * The merchant's ISO 3166-1 numeric country code.
21
+ */
22
+ merchantCountryCode?: string | null | undefined;
23
+ /**
24
+ * Merchant category code to use when calling 3DS through this scheme.
25
+ */
26
+ merchantCategoryCode?: string | null | undefined;
27
+ /**
28
+ * URL to send when calling 3DS through this scheme.
29
+ */
30
+ merchantUrl?: string | null | undefined;
31
+ /**
32
+ * The card scheme for this 3DS configuration
33
+ */
34
+ scheme?: CardScheme | null | undefined;
35
+ /**
36
+ * ISO 4217 currency code (3 characters). If left null, the configuration will apply to all currencies.
37
+ */
38
+ currency?: string | null | undefined;
39
+ /**
40
+ * Any additional information about the 3DS configuration that you would like to store as key-value pairs.
41
+ */
42
+ metadata?: { [k: string]: string } | null | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export type MerchantAccountThreeDSConfigurationUpdate$Outbound = {
47
+ merchant_acquirer_bin?: string | null | undefined;
48
+ merchant_acquirer_id?: string | null | undefined;
49
+ merchant_name?: string | null | undefined;
50
+ merchant_country_code?: string | null | undefined;
51
+ merchant_category_code?: string | null | undefined;
52
+ merchant_url?: string | null | undefined;
53
+ scheme?: string | null | undefined;
54
+ currency?: string | null | undefined;
55
+ metadata?: { [k: string]: string } | null | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const MerchantAccountThreeDSConfigurationUpdate$outboundSchema:
60
+ z.ZodType<
61
+ MerchantAccountThreeDSConfigurationUpdate$Outbound,
62
+ z.ZodTypeDef,
63
+ MerchantAccountThreeDSConfigurationUpdate
64
+ > = z.object({
65
+ merchantAcquirerBin: z.nullable(z.string()).optional(),
66
+ merchantAcquirerId: z.nullable(z.string()).optional(),
67
+ merchantName: z.nullable(z.string()).optional(),
68
+ merchantCountryCode: z.nullable(z.string()).optional(),
69
+ merchantCategoryCode: z.nullable(z.string()).optional(),
70
+ merchantUrl: z.nullable(z.string()).optional(),
71
+ scheme: z.nullable(CardScheme$outboundSchema).optional(),
72
+ currency: z.nullable(z.string()).optional(),
73
+ metadata: z.nullable(z.record(z.string())).optional(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ merchantAcquirerBin: "merchant_acquirer_bin",
77
+ merchantAcquirerId: "merchant_acquirer_id",
78
+ merchantName: "merchant_name",
79
+ merchantCountryCode: "merchant_country_code",
80
+ merchantCategoryCode: "merchant_category_code",
81
+ merchantUrl: "merchant_url",
82
+ });
83
+ });
84
+
85
+ export function merchantAccountThreeDSConfigurationUpdateToJSON(
86
+ merchantAccountThreeDSConfigurationUpdate:
87
+ MerchantAccountThreeDSConfigurationUpdate,
88
+ ): string {
89
+ return JSON.stringify(
90
+ MerchantAccountThreeDSConfigurationUpdate$outboundSchema.parse(
91
+ merchantAccountThreeDSConfigurationUpdate,
92
+ ),
93
+ );
94
+ }
@@ -26,13 +26,17 @@ export type CaptureTransactionRequest = {
26
26
  * The ID of the merchant account to use for this request.
27
27
  */
28
28
  merchantAccountId?: string | null | undefined;
29
+ /**
30
+ * A unique key that identifies this request. Providing this header will make this an idempotent request. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions.
31
+ */
32
+ idempotencyKey?: string | null | undefined;
29
33
  transactionCaptureCreate: components.TransactionCaptureCreate;
30
34
  };
31
35
 
32
36
  /**
33
37
  * Successful Response
34
38
  */
35
- export type CaptureTransactionResponseCaptureTransaction =
39
+ export type CaptureTransactionResponse200CaptureTransaction =
36
40
  | components.Transaction
37
41
  | components.TransactionCapture;
38
42
 
@@ -41,6 +45,7 @@ export type CaptureTransactionRequest$Outbound = {
41
45
  transaction_id: string;
42
46
  prefer?: Array<string> | null | undefined;
43
47
  merchantAccountId?: string | null | undefined;
48
+ "idempotency-key"?: string | null | undefined;
44
49
  TransactionCaptureCreate: components.TransactionCaptureCreate$Outbound;
45
50
  };
46
51
 
@@ -53,10 +58,12 @@ export const CaptureTransactionRequest$outboundSchema: z.ZodType<
53
58
  transactionId: z.string(),
54
59
  prefer: z.nullable(z.array(z.string())).optional(),
55
60
  merchantAccountId: z.nullable(z.string()).optional(),
61
+ idempotencyKey: z.nullable(z.string()).optional(),
56
62
  transactionCaptureCreate: components.TransactionCaptureCreate$outboundSchema,
57
63
  }).transform((v) => {
58
64
  return remap$(v, {
59
65
  transactionId: "transaction_id",
66
+ idempotencyKey: "idempotency-key",
60
67
  transactionCaptureCreate: "TransactionCaptureCreate",
61
68
  });
62
69
  });
@@ -70,9 +77,9 @@ export function captureTransactionRequestToJSON(
70
77
  }
71
78
 
72
79
  /** @internal */
73
- export const CaptureTransactionResponseCaptureTransaction$inboundSchema:
80
+ export const CaptureTransactionResponse200CaptureTransaction$inboundSchema:
74
81
  z.ZodType<
75
- CaptureTransactionResponseCaptureTransaction,
82
+ CaptureTransactionResponse200CaptureTransaction,
76
83
  z.ZodTypeDef,
77
84
  unknown
78
85
  > = z.union([
@@ -80,18 +87,18 @@ export const CaptureTransactionResponseCaptureTransaction$inboundSchema:
80
87
  components.TransactionCapture$inboundSchema,
81
88
  ]);
82
89
 
83
- export function captureTransactionResponseCaptureTransactionFromJSON(
90
+ export function captureTransactionResponse200CaptureTransactionFromJSON(
84
91
  jsonString: string,
85
92
  ): SafeParseResult<
86
- CaptureTransactionResponseCaptureTransaction,
93
+ CaptureTransactionResponse200CaptureTransaction,
87
94
  SDKValidationError
88
95
  > {
89
96
  return safeParse(
90
97
  jsonString,
91
98
  (x) =>
92
- CaptureTransactionResponseCaptureTransaction$inboundSchema.parse(
99
+ CaptureTransactionResponse200CaptureTransaction$inboundSchema.parse(
93
100
  JSON.parse(x),
94
101
  ),
95
- `Failed to parse 'CaptureTransactionResponseCaptureTransaction' from JSON`,
102
+ `Failed to parse 'CaptureTransactionResponse200CaptureTransaction' from JSON`,
96
103
  );
97
104
  }
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as components from "../components/index.js";
8
+
9
+ export type CreateThreeDsConfigurationRequest = {
10
+ /**
11
+ * The ID of the merchant account.
12
+ */
13
+ merchantAccountId: string;
14
+ merchantAccountThreeDSConfigurationCreate:
15
+ components.MerchantAccountThreeDSConfigurationCreate;
16
+ };
17
+
18
+ /** @internal */
19
+ export type CreateThreeDsConfigurationRequest$Outbound = {
20
+ merchant_account_id: string;
21
+ MerchantAccountThreeDSConfigurationCreate:
22
+ components.MerchantAccountThreeDSConfigurationCreate$Outbound;
23
+ };
24
+
25
+ /** @internal */
26
+ export const CreateThreeDsConfigurationRequest$outboundSchema: z.ZodType<
27
+ CreateThreeDsConfigurationRequest$Outbound,
28
+ z.ZodTypeDef,
29
+ CreateThreeDsConfigurationRequest
30
+ > = z.object({
31
+ merchantAccountId: z.string(),
32
+ merchantAccountThreeDSConfigurationCreate:
33
+ components.MerchantAccountThreeDSConfigurationCreate$outboundSchema,
34
+ }).transform((v) => {
35
+ return remap$(v, {
36
+ merchantAccountId: "merchant_account_id",
37
+ merchantAccountThreeDSConfigurationCreate:
38
+ "MerchantAccountThreeDSConfigurationCreate",
39
+ });
40
+ });
41
+
42
+ export function createThreeDsConfigurationRequestToJSON(
43
+ createThreeDsConfigurationRequest: CreateThreeDsConfigurationRequest,
44
+ ): string {
45
+ return JSON.stringify(
46
+ CreateThreeDsConfigurationRequest$outboundSchema.parse(
47
+ createThreeDsConfigurationRequest,
48
+ ),
49
+ );
50
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type DeleteThreeDsConfigurationRequest = {
9
+ /**
10
+ * The ID of the merchant account.
11
+ */
12
+ merchantAccountId: string;
13
+ /**
14
+ * The ID of the 3DS configuration for a merchant account.
15
+ */
16
+ threeDsConfigurationId: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export type DeleteThreeDsConfigurationRequest$Outbound = {
21
+ merchant_account_id: string;
22
+ three_ds_configuration_id: string;
23
+ };
24
+
25
+ /** @internal */
26
+ export const DeleteThreeDsConfigurationRequest$outboundSchema: z.ZodType<
27
+ DeleteThreeDsConfigurationRequest$Outbound,
28
+ z.ZodTypeDef,
29
+ DeleteThreeDsConfigurationRequest
30
+ > = z.object({
31
+ merchantAccountId: z.string(),
32
+ threeDsConfigurationId: z.string(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ merchantAccountId: "merchant_account_id",
36
+ threeDsConfigurationId: "three_ds_configuration_id",
37
+ });
38
+ });
39
+
40
+ export function deleteThreeDsConfigurationRequestToJSON(
41
+ deleteThreeDsConfigurationRequest: DeleteThreeDsConfigurationRequest,
42
+ ): string {
43
+ return JSON.stringify(
44
+ DeleteThreeDsConfigurationRequest$outboundSchema.parse(
45
+ deleteThreeDsConfigurationRequest,
46
+ ),
47
+ );
48
+ }
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as components from "../components/index.js";
8
+
9
+ export type EditThreeDsConfigurationRequest = {
10
+ /**
11
+ * The ID of the merchant account.
12
+ */
13
+ merchantAccountId: string;
14
+ /**
15
+ * The ID of the 3DS configuration for a merchant account.
16
+ */
17
+ threeDsConfigurationId: string;
18
+ merchantAccountThreeDSConfigurationUpdate:
19
+ components.MerchantAccountThreeDSConfigurationUpdate;
20
+ };
21
+
22
+ /** @internal */
23
+ export type EditThreeDsConfigurationRequest$Outbound = {
24
+ merchant_account_id: string;
25
+ three_ds_configuration_id: string;
26
+ MerchantAccountThreeDSConfigurationUpdate:
27
+ components.MerchantAccountThreeDSConfigurationUpdate$Outbound;
28
+ };
29
+
30
+ /** @internal */
31
+ export const EditThreeDsConfigurationRequest$outboundSchema: z.ZodType<
32
+ EditThreeDsConfigurationRequest$Outbound,
33
+ z.ZodTypeDef,
34
+ EditThreeDsConfigurationRequest
35
+ > = z.object({
36
+ merchantAccountId: z.string(),
37
+ threeDsConfigurationId: z.string(),
38
+ merchantAccountThreeDSConfigurationUpdate:
39
+ components.MerchantAccountThreeDSConfigurationUpdate$outboundSchema,
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ merchantAccountId: "merchant_account_id",
43
+ threeDsConfigurationId: "three_ds_configuration_id",
44
+ merchantAccountThreeDSConfigurationUpdate:
45
+ "MerchantAccountThreeDSConfigurationUpdate",
46
+ });
47
+ });
48
+
49
+ export function editThreeDsConfigurationRequestToJSON(
50
+ editThreeDsConfigurationRequest: EditThreeDsConfigurationRequest,
51
+ ): string {
52
+ return JSON.stringify(
53
+ EditThreeDsConfigurationRequest$outboundSchema.parse(
54
+ editThreeDsConfigurationRequest,
55
+ ),
56
+ );
57
+ }
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
 
8
8
  export type GetMerchantAccountRequest = {
9
9
  /**
10
- * The ID of the merchant account
10
+ * The ID of the merchant account.
11
11
  */
12
12
  merchantAccountId: string;
13
13
  };
@@ -24,6 +24,7 @@ export * from "./createpaymentservicedefinitionsession.js";
24
24
  export * from "./createpaymentservicesession.js";
25
25
  export * from "./createpayout.js";
26
26
  export * from "./createreportexecutionurl.js";
27
+ export * from "./createthreedsconfiguration.js";
27
28
  export * from "./createthreedsscenario.js";
28
29
  export * from "./createtransaction.js";
29
30
  export * from "./createtransactionrefund.js";
@@ -36,7 +37,9 @@ export * from "./deletepaymentmethod.js";
36
37
  export * from "./deletepaymentmethodnetworktoken.js";
37
38
  export * from "./deletepaymentmethodpaymentservicetoken.js";
38
39
  export * from "./deletepaymentservice.js";
40
+ export * from "./deletethreedsconfiguration.js";
39
41
  export * from "./deletethreedsscenario.js";
42
+ export * from "./editthreedsconfiguration.js";
40
43
  export * from "./expirepaymentlink.js";
41
44
  export * from "./getbuyer.js";
42
45
  export * from "./getbuyershippingdetails.js";
@@ -77,6 +80,7 @@ export * from "./listpaymentservices.js";
77
80
  export * from "./listpayouts.js";
78
81
  export * from "./listreportexecutions.js";
79
82
  export * from "./listreports.js";
83
+ export * from "./listthreedsconfigurations.js";
80
84
  export * from "./listtransactionactions.js";
81
85
  export * from "./listtransactionevents.js";
82
86
  export * from "./listtransactionrefunds.js";
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type ListThreeDsConfigurationsRequest = {
9
+ /**
10
+ * The ID of the merchant account.
11
+ */
12
+ merchantAccountId: string;
13
+ /**
14
+ * ISO 4217 currency code (3 characters) to filter 3DS configurations.
15
+ */
16
+ currency?: string | null | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export type ListThreeDsConfigurationsRequest$Outbound = {
21
+ merchant_account_id: string;
22
+ currency?: string | null | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const ListThreeDsConfigurationsRequest$outboundSchema: z.ZodType<
27
+ ListThreeDsConfigurationsRequest$Outbound,
28
+ z.ZodTypeDef,
29
+ ListThreeDsConfigurationsRequest
30
+ > = z.object({
31
+ merchantAccountId: z.string(),
32
+ currency: z.nullable(z.string()).optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ merchantAccountId: "merchant_account_id",
36
+ });
37
+ });
38
+
39
+ export function listThreeDsConfigurationsRequestToJSON(
40
+ listThreeDsConfigurationsRequest: ListThreeDsConfigurationsRequest,
41
+ ): string {
42
+ return JSON.stringify(
43
+ ListThreeDsConfigurationsRequest$outboundSchema.parse(
44
+ listThreeDsConfigurationsRequest,
45
+ ),
46
+ );
47
+ }
@@ -8,7 +8,7 @@ import * as components from "../components/index.js";
8
8
 
9
9
  export type UpdateMerchantAccountRequest = {
10
10
  /**
11
- * The ID of the merchant account
11
+ * The ID of the merchant account.
12
12
  */
13
13
  merchantAccountId: string;
14
14
  merchantAccountUpdate: components.MerchantAccountUpdate;
@@ -11,8 +11,16 @@ import * as components from "../models/components/index.js";
11
11
  import * as operations from "../models/operations/index.js";
12
12
  import { unwrapAsync } from "../types/fp.js";
13
13
  import { PageIterator, unwrapResultIterator } from "../types/operations.js";
14
+ import { ThreeDsConfiguration } from "./threedsconfiguration.js";
14
15
 
15
16
  export class MerchantAccounts extends ClientSDK {
17
+ private _threeDsConfiguration?: ThreeDsConfiguration;
18
+ get threeDsConfiguration(): ThreeDsConfiguration {
19
+ return (this._threeDsConfiguration ??= new ThreeDsConfiguration(
20
+ this._options,
21
+ ));
22
+ }
23
+
16
24
  /**
17
25
  * List all merchant accounts
18
26
  *