@moovio/sdk 26.4.0 → 26.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +2 -2
- package/README.md +73 -59
- package/bin/mcp-server.js +1107 -271
- package/bin/mcp-server.js.map +55 -31
- package/funcs/filesUpload.d.ts.map +1 -1
- package/funcs/filesUpload.js +3 -1
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/googlePayLinkToken.d.ts +3 -1
- package/funcs/googlePayLinkToken.d.ts.map +1 -1
- package/funcs/googlePayLinkToken.js +3 -1
- package/funcs/googlePayLinkToken.js.map +1 -1
- package/funcs/transferConfigCreate.d.ts +15 -0
- package/funcs/transferConfigCreate.d.ts.map +1 -0
- package/funcs/transferConfigCreate.js +128 -0
- package/funcs/transferConfigCreate.js.map +1 -0
- package/funcs/transferConfigGet.d.ts +14 -0
- package/funcs/transferConfigGet.d.ts.map +1 -0
- package/funcs/transferConfigGet.js +122 -0
- package/funcs/transferConfigGet.js.map +1 -0
- package/funcs/transferConfigUpdate.d.ts +15 -0
- package/funcs/transferConfigUpdate.d.ts.map +1 -0
- package/funcs/transferConfigUpdate.js +126 -0
- package/funcs/transferConfigUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +7 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/googlePayLinkToken.d.ts.map +1 -1
- package/mcp-server/tools/googlePayLinkToken.js +3 -1
- package/mcp-server/tools/googlePayLinkToken.js.map +1 -1
- package/mcp-server/tools/transferConfigCreate.d.ts +8 -0
- package/mcp-server/tools/transferConfigCreate.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigCreate.js +62 -0
- package/mcp-server/tools/transferConfigCreate.js.map +1 -0
- package/mcp-server/tools/transferConfigGet.d.ts +8 -0
- package/mcp-server/tools/transferConfigGet.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigGet.js +62 -0
- package/mcp-server/tools/transferConfigGet.js.map +1 -0
- package/mcp-server/tools/transferConfigUpdate.d.ts +8 -0
- package/mcp-server/tools/transferConfigUpdate.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigUpdate.js +62 -0
- package/mcp-server/tools/transferConfigUpdate.js.map +1 -0
- package/models/components/createdtransfer.d.ts +4 -1
- package/models/components/createdtransfer.d.ts.map +1 -1
- package/models/components/createdtransfer.js +3 -0
- package/models/components/createdtransfer.js.map +1 -1
- package/models/components/createpaymentlink.d.ts +13 -0
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/createtippresets.d.ts +36 -0
- package/models/components/createtippresets.d.ts.map +1 -0
- package/models/components/createtippresets.js +64 -0
- package/models/components/createtippresets.js.map +1 -0
- package/models/components/createtransfer.d.ts +3 -3
- package/models/components/createtransfer.d.ts.map +1 -1
- package/models/components/createtransfer.js +3 -0
- package/models/components/createtransfer.js.map +1 -1
- package/models/components/createtransferamountdetails.d.ts +21 -0
- package/models/components/createtransferamountdetails.d.ts.map +1 -0
- package/models/components/createtransferamountdetails.js +59 -0
- package/models/components/createtransferamountdetails.js.map +1 -0
- package/models/components/createtransferamountdetailsvalidationerror.d.ts +17 -0
- package/models/components/createtransferamountdetailsvalidationerror.d.ts.map +1 -0
- package/models/components/createtransferamountdetailsvalidationerror.js +58 -0
- package/models/components/createtransferamountdetailsvalidationerror.js.map +1 -0
- package/models/components/createtransferconfig.d.ts +18 -0
- package/models/components/createtransferconfig.d.ts.map +1 -0
- package/models/components/{googlepayintermediatesigningkey.js → createtransferconfig.js} +13 -14
- package/models/components/createtransferconfig.js.map +1 -0
- package/models/components/fileuploadmetadata.d.ts +28 -0
- package/models/components/fileuploadmetadata.d.ts.map +1 -0
- package/models/components/fileuploadmetadata.js +69 -0
- package/models/components/fileuploadmetadata.js.map +1 -0
- package/models/components/fileuploadrequestmultipart.d.ts +5 -8
- package/models/components/fileuploadrequestmultipart.d.ts.map +1 -1
- package/models/components/fileuploadrequestmultipart.js +3 -2
- package/models/components/fileuploadrequestmultipart.js.map +1 -1
- package/models/components/googlepayassurancedetails.d.ts +28 -0
- package/models/components/googlepayassurancedetails.d.ts.map +1 -0
- package/models/components/googlepayassurancedetails.js +60 -0
- package/models/components/googlepayassurancedetails.js.map +1 -0
- package/models/components/googlepaybillingaddress.d.ts +73 -0
- package/models/components/googlepaybillingaddress.d.ts.map +1 -0
- package/models/components/googlepaybillingaddress.js +76 -0
- package/models/components/googlepaybillingaddress.js.map +1 -0
- package/models/components/googlepaycardinfo.d.ts +91 -0
- package/models/components/googlepaycardinfo.d.ts.map +1 -0
- package/models/components/googlepaycardinfo.js +98 -0
- package/models/components/googlepaycardinfo.js.map +1 -0
- package/models/components/googlepaypaymentmethoddata.d.ts +65 -0
- package/models/components/googlepaypaymentmethoddata.d.ts.map +1 -0
- package/models/components/googlepaypaymentmethoddata.js +76 -0
- package/models/components/googlepaypaymentmethoddata.js.map +1 -0
- package/models/components/googlepaytokenizationdata.d.ts +47 -0
- package/models/components/googlepaytokenizationdata.d.ts.map +1 -0
- package/models/components/googlepaytokenizationdata.js +70 -0
- package/models/components/googlepaytokenizationdata.js.map +1 -0
- package/models/components/index.d.ts +16 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +16 -2
- package/models/components/index.js.map +1 -1
- package/models/components/linkedgooglepaypaymentmethod.d.ts +5 -10
- package/models/components/linkedgooglepaypaymentmethod.d.ts.map +1 -1
- package/models/components/linkedgooglepaypaymentmethod.js +4 -11
- package/models/components/linkedgooglepaypaymentmethod.js.map +1 -1
- package/models/components/linkgooglepay.d.ts +17 -9
- package/models/components/linkgooglepay.d.ts.map +1 -1
- package/models/components/linkgooglepay.js +5 -3
- package/models/components/linkgooglepay.js.map +1 -1
- package/models/components/paymentlink.d.ts +10 -0
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentlinkcustomeroptions.d.ts +5 -0
- package/models/components/paymentlinkcustomeroptions.d.ts.map +1 -1
- package/models/components/paymentlinkcustomeroptions.js +2 -0
- package/models/components/paymentlinkcustomeroptions.js.map +1 -1
- package/models/components/puttippresets.d.ts +36 -0
- package/models/components/puttippresets.d.ts.map +1 -0
- package/models/components/puttippresets.js +64 -0
- package/models/components/puttippresets.js.map +1 -0
- package/models/components/puttransferconfig.d.ts +18 -0
- package/models/components/puttransferconfig.d.ts.map +1 -0
- package/models/components/puttransferconfig.js +59 -0
- package/models/components/puttransferconfig.js.map +1 -0
- package/models/components/tipcalculationbasis.d.ts +26 -0
- package/models/components/tipcalculationbasis.d.ts.map +1 -0
- package/models/components/tipcalculationbasis.js +56 -0
- package/models/components/tipcalculationbasis.js.map +1 -0
- package/models/components/tippresets.d.ts +39 -0
- package/models/components/tippresets.d.ts.map +1 -0
- package/models/components/tippresets.js +64 -0
- package/models/components/tippresets.js.map +1 -0
- package/models/components/transfer.d.ts +3 -3
- package/models/components/transfer.d.ts.map +1 -1
- package/models/components/transfer.js +3 -0
- package/models/components/transfer.js.map +1 -1
- package/models/components/transferamountdetails.d.ts +21 -0
- package/models/components/transferamountdetails.d.ts.map +1 -0
- package/models/components/transferamountdetails.js +59 -0
- package/models/components/transferamountdetails.js.map +1 -0
- package/models/components/transferconfig.d.ts +24 -0
- package/models/components/transferconfig.d.ts.map +1 -0
- package/models/components/{googlepaytoken.js → transferconfig.js} +13 -19
- package/models/components/transferconfig.js.map +1 -0
- package/models/components/transferdestination.d.ts +6 -0
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +3 -0
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/transfersource.d.ts +6 -0
- package/models/components/transfersource.d.ts.map +1 -1
- package/models/components/transfersource.js +3 -0
- package/models/components/transfersource.js.map +1 -1
- package/models/components/webhookdata.d.ts +2 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +2 -2
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdatabankaccountcreated.d.ts +3 -0
- package/models/components/webhookdatabankaccountcreated.d.ts.map +1 -1
- package/models/components/webhookdatabankaccountcreated.js +3 -0
- package/models/components/webhookdatabankaccountcreated.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/linkgooglepayerror.d.ts +14 -5
- package/models/errors/linkgooglepayerror.d.ts.map +1 -1
- package/models/errors/linkgooglepayerror.js +10 -4
- package/models/errors/linkgooglepayerror.js.map +1 -1
- package/models/errors/transfer.d.ts +3 -6
- package/models/errors/transfer.d.ts.map +1 -1
- package/models/errors/transfer.js +4 -0
- package/models/errors/transfer.js.map +1 -1
- package/models/errors/transferconfigvalidationerror.d.ts +43 -0
- package/models/errors/transferconfigvalidationerror.d.ts.map +1 -0
- package/models/errors/transferconfigvalidationerror.js +99 -0
- package/models/errors/transferconfigvalidationerror.js.map +1 -0
- package/models/errors/transfervalidationerror.d.ts +3 -0
- package/models/errors/transfervalidationerror.d.ts.map +1 -1
- package/models/errors/transfervalidationerror.js +6 -0
- package/models/errors/transfervalidationerror.js.map +1 -1
- package/models/operations/createtransferconfig.d.ts +42 -0
- package/models/operations/createtransferconfig.d.ts.map +1 -0
- package/models/operations/createtransferconfig.js +98 -0
- package/models/operations/createtransferconfig.js.map +1 -0
- package/models/operations/gettransferconfig.d.ts +37 -0
- package/models/operations/gettransferconfig.d.ts.map +1 -0
- package/models/operations/gettransferconfig.js +88 -0
- package/models/operations/gettransferconfig.js.map +1 -0
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/updatetransferconfig.d.ts +39 -0
- package/models/operations/updatetransferconfig.d.ts.map +1 -0
- package/models/operations/updatetransferconfig.js +98 -0
- package/models/operations/updatetransferconfig.js.map +1 -0
- package/package.json +1 -1
- package/sdk/googlepay.d.ts +3 -1
- package/sdk/googlepay.d.ts.map +1 -1
- package/sdk/googlepay.js +3 -1
- package/sdk/googlepay.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/transferconfig.d.ts +17 -0
- package/sdk/transferconfig.d.ts.map +1 -0
- package/sdk/transferconfig.js +33 -0
- package/sdk/transferconfig.js.map +1 -0
- package/src/funcs/filesUpload.ts +13 -2
- package/src/funcs/googlePayLinkToken.ts +3 -1
- package/src/funcs/transferConfigCreate.ts +187 -0
- package/src/funcs/transferConfigGet.ts +172 -0
- package/src/funcs/transferConfigUpdate.ts +185 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/googlePayLinkToken.ts +3 -1
- package/src/mcp-server/tools/transferConfigCreate.ts +35 -0
- package/src/mcp-server/tools/transferConfigGet.ts +35 -0
- package/src/mcp-server/tools/transferConfigUpdate.ts +35 -0
- package/src/models/components/createdtransfer.ts +11 -1
- package/src/models/components/createpaymentlink.ts +13 -0
- package/src/models/components/createtippresets.ts +83 -0
- package/src/models/components/createtransfer.ts +10 -3
- package/src/models/components/createtransferamountdetails.ts +62 -0
- package/src/models/components/createtransferamountdetailsvalidationerror.ts +59 -0
- package/src/models/components/createtransferconfig.ts +57 -0
- package/src/models/components/fileuploadmetadata.ts +73 -0
- package/src/models/components/fileuploadrequestmultipart.ts +12 -10
- package/src/models/components/googlepayassurancedetails.ts +64 -0
- package/src/models/components/googlepaybillingaddress.ts +125 -0
- package/src/models/components/googlepaycardinfo.ts +153 -0
- package/src/models/components/googlepaypaymentmethoddata.ts +120 -0
- package/src/models/components/googlepaytokenizationdata.ts +91 -0
- package/src/models/components/index.ts +16 -2
- package/src/models/components/linkedgooglepaypaymentmethod.ts +11 -22
- package/src/models/components/linkgooglepay.ts +25 -15
- package/src/models/components/paymentlink.ts +10 -0
- package/src/models/components/paymentlinkcustomeroptions.ts +7 -0
- package/src/models/components/puttippresets.ts +79 -0
- package/src/models/components/puttransferconfig.ts +57 -0
- package/src/models/components/tipcalculationbasis.ts +35 -0
- package/src/models/components/tippresets.ts +82 -0
- package/src/models/components/transfer.ts +10 -3
- package/src/models/components/transferamountdetails.ts +60 -0
- package/src/models/components/transferconfig.ts +59 -0
- package/src/models/components/transferdestination.ts +13 -0
- package/src/models/components/transfersource.ts +13 -0
- package/src/models/components/webhookdata.ts +4 -4
- package/src/models/components/webhookdatabankaccountcreated.ts +9 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/linkgooglepayerror.ts +24 -8
- package/src/models/errors/transfer.ts +6 -6
- package/src/models/errors/transferconfigvalidationerror.ts +110 -0
- package/src/models/errors/transfervalidationerror.ts +14 -0
- package/src/models/operations/createtransferconfig.ts +129 -0
- package/src/models/operations/gettransferconfig.ts +110 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/updatetransferconfig.ts +126 -0
- package/src/sdk/googlepay.ts +3 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transferconfig.ts +54 -0
- package/models/components/googlepayintermediatesigningkey.d.ts +0 -28
- package/models/components/googlepayintermediatesigningkey.d.ts.map +0 -1
- package/models/components/googlepayintermediatesigningkey.js.map +0 -1
- package/models/components/googlepaytoken.d.ts +0 -44
- package/models/components/googlepaytoken.d.ts.map +0 -1
- package/models/components/googlepaytoken.js.map +0 -1
- package/src/models/components/googlepayintermediatesigningkey.ts +0 -66
- package/src/models/components/googlepaytoken.ts +0 -85
|
@@ -11,9 +11,13 @@ export type LinkGooglePayErrorData = {
|
|
|
11
11
|
*/
|
|
12
12
|
error?: string | undefined;
|
|
13
13
|
/**
|
|
14
|
-
* Describes an error within the `
|
|
14
|
+
* Describes an error within the `merchantAccountID` request field.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
merchantAccountID?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Describes an error within the `paymentMethodData` request field.
|
|
19
|
+
*/
|
|
20
|
+
paymentMethodData?: string | undefined;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export class LinkGooglePayError extends MoovError {
|
|
@@ -22,9 +26,13 @@ export class LinkGooglePayError extends MoovError {
|
|
|
22
26
|
*/
|
|
23
27
|
error?: string | undefined;
|
|
24
28
|
/**
|
|
25
|
-
* Describes an error within the `
|
|
29
|
+
* Describes an error within the `merchantAccountID` request field.
|
|
30
|
+
*/
|
|
31
|
+
merchantAccountID?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Describes an error within the `paymentMethodData` request field.
|
|
26
34
|
*/
|
|
27
|
-
|
|
35
|
+
paymentMethodData?: string | undefined;
|
|
28
36
|
|
|
29
37
|
/** The original data that was passed to this error instance. */
|
|
30
38
|
data$: LinkGooglePayErrorData;
|
|
@@ -39,7 +47,12 @@ export class LinkGooglePayError extends MoovError {
|
|
|
39
47
|
super(message, httpMeta);
|
|
40
48
|
this.data$ = err;
|
|
41
49
|
if (err.error != null) this.error = err.error;
|
|
42
|
-
if (err.
|
|
50
|
+
if (err.merchantAccountID != null) {
|
|
51
|
+
this.merchantAccountID = err.merchantAccountID;
|
|
52
|
+
}
|
|
53
|
+
if (err.paymentMethodData != null) {
|
|
54
|
+
this.paymentMethodData = err.paymentMethodData;
|
|
55
|
+
}
|
|
43
56
|
|
|
44
57
|
this.name = "LinkGooglePayError";
|
|
45
58
|
}
|
|
@@ -52,7 +65,8 @@ export const LinkGooglePayError$inboundSchema: z.ZodType<
|
|
|
52
65
|
unknown
|
|
53
66
|
> = z.object({
|
|
54
67
|
error: z.string().optional(),
|
|
55
|
-
|
|
68
|
+
merchantAccountID: z.string().optional(),
|
|
69
|
+
paymentMethodData: z.string().optional(),
|
|
56
70
|
request$: z.instanceof(Request),
|
|
57
71
|
response$: z.instanceof(Response),
|
|
58
72
|
body$: z.string(),
|
|
@@ -68,7 +82,8 @@ export const LinkGooglePayError$inboundSchema: z.ZodType<
|
|
|
68
82
|
/** @internal */
|
|
69
83
|
export type LinkGooglePayError$Outbound = {
|
|
70
84
|
error?: string | undefined;
|
|
71
|
-
|
|
85
|
+
merchantAccountID?: string | undefined;
|
|
86
|
+
paymentMethodData?: string | undefined;
|
|
72
87
|
};
|
|
73
88
|
|
|
74
89
|
/** @internal */
|
|
@@ -80,5 +95,6 @@ export const LinkGooglePayError$outboundSchema: z.ZodType<
|
|
|
80
95
|
.transform(v => v.data$)
|
|
81
96
|
.pipe(z.object({
|
|
82
97
|
error: z.string().optional(),
|
|
83
|
-
|
|
98
|
+
merchantAccountID: z.string().optional(),
|
|
99
|
+
paymentMethodData: z.string().optional(),
|
|
84
100
|
}));
|
|
@@ -65,9 +65,6 @@ export type TransferData = {
|
|
|
65
65
|
scheduleID?: string | undefined;
|
|
66
66
|
occurrenceID?: string | undefined;
|
|
67
67
|
paymentLinkCode?: string | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Optional sales tax amount. `transfer.amount.value` should be inclusive of any sales tax and represents the total amount charged.
|
|
70
|
-
*/
|
|
71
68
|
salesTaxAmount?: components.Amount | undefined;
|
|
72
69
|
/**
|
|
73
70
|
* Optional alias from a foreign/external system which can be used to reference this resource.
|
|
@@ -84,6 +81,7 @@ export type TransferData = {
|
|
|
84
81
|
* ID of the invoice that the transfer is associated with.
|
|
85
82
|
*/
|
|
86
83
|
invoiceID?: string | undefined;
|
|
84
|
+
amountDetails?: components.TransferAmountDetails | undefined;
|
|
87
85
|
};
|
|
88
86
|
|
|
89
87
|
/**
|
|
@@ -145,9 +143,6 @@ export class Transfer extends MoovError {
|
|
|
145
143
|
scheduleID?: string | undefined;
|
|
146
144
|
occurrenceID?: string | undefined;
|
|
147
145
|
paymentLinkCode?: string | undefined;
|
|
148
|
-
/**
|
|
149
|
-
* Optional sales tax amount. `transfer.amount.value` should be inclusive of any sales tax and represents the total amount charged.
|
|
150
|
-
*/
|
|
151
146
|
salesTaxAmount?: components.Amount | undefined;
|
|
152
147
|
/**
|
|
153
148
|
* Optional alias from a foreign/external system which can be used to reference this resource.
|
|
@@ -164,6 +159,7 @@ export class Transfer extends MoovError {
|
|
|
164
159
|
* ID of the invoice that the transfer is associated with.
|
|
165
160
|
*/
|
|
166
161
|
invoiceID?: string | undefined;
|
|
162
|
+
amountDetails?: components.TransferAmountDetails | undefined;
|
|
167
163
|
|
|
168
164
|
/** The original data that was passed to this error instance. */
|
|
169
165
|
data$: TransferData;
|
|
@@ -206,6 +202,7 @@ export class Transfer extends MoovError {
|
|
|
206
202
|
if (err.foreignID != null) this.foreignID = err.foreignID;
|
|
207
203
|
if (err.lineItems != null) this.lineItems = err.lineItems;
|
|
208
204
|
if (err.invoiceID != null) this.invoiceID = err.invoiceID;
|
|
205
|
+
if (err.amountDetails != null) this.amountDetails = err.amountDetails;
|
|
209
206
|
|
|
210
207
|
this.name = "Transfer";
|
|
211
208
|
}
|
|
@@ -247,6 +244,7 @@ export const Transfer$inboundSchema: z.ZodType<
|
|
|
247
244
|
foreignID: z.string().optional(),
|
|
248
245
|
lineItems: components.TransferLineItems$inboundSchema.optional(),
|
|
249
246
|
invoiceID: z.string().optional(),
|
|
247
|
+
amountDetails: components.TransferAmountDetails$inboundSchema.optional(),
|
|
250
248
|
request$: z.instanceof(Request),
|
|
251
249
|
response$: z.instanceof(Response),
|
|
252
250
|
body$: z.string(),
|
|
@@ -290,6 +288,7 @@ export type Transfer$Outbound = {
|
|
|
290
288
|
foreignID?: string | undefined;
|
|
291
289
|
lineItems?: components.TransferLineItems$Outbound | undefined;
|
|
292
290
|
invoiceID?: string | undefined;
|
|
291
|
+
amountDetails?: components.TransferAmountDetails$Outbound | undefined;
|
|
293
292
|
};
|
|
294
293
|
|
|
295
294
|
/** @internal */
|
|
@@ -330,4 +329,5 @@ export const Transfer$outboundSchema: z.ZodType<
|
|
|
330
329
|
foreignID: z.string().optional(),
|
|
331
330
|
lineItems: components.TransferLineItems$outboundSchema.optional(),
|
|
332
331
|
invoiceID: z.string().optional(),
|
|
332
|
+
amountDetails: components.TransferAmountDetails$outboundSchema.optional(),
|
|
333
333
|
}));
|
|
@@ -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 * as components from "../components/index.js";
|
|
8
|
+
import { MoovError } from "./mooverror.js";
|
|
9
|
+
|
|
10
|
+
export type TransferConfigValidationErrorData = {
|
|
11
|
+
tipPresetsCalculationBasis?: string | undefined;
|
|
12
|
+
tipPresetsPercentageOptions?: { [k: string]: string } | undefined;
|
|
13
|
+
tipPresetsFixedAmountOptions?: {
|
|
14
|
+
[k: string]: components.AmountDecimalValidationError;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export class TransferConfigValidationError extends MoovError {
|
|
19
|
+
tipPresetsCalculationBasis?: string | undefined;
|
|
20
|
+
tipPresetsPercentageOptions?: { [k: string]: string } | undefined;
|
|
21
|
+
tipPresetsFixedAmountOptions?: {
|
|
22
|
+
[k: string]: components.AmountDecimalValidationError;
|
|
23
|
+
} | undefined;
|
|
24
|
+
|
|
25
|
+
/** The original data that was passed to this error instance. */
|
|
26
|
+
data$: TransferConfigValidationErrorData;
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
err: TransferConfigValidationErrorData,
|
|
30
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
31
|
+
) {
|
|
32
|
+
const message = "message" in err && typeof err.message === "string"
|
|
33
|
+
? err.message
|
|
34
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
35
|
+
super(message, httpMeta);
|
|
36
|
+
this.data$ = err;
|
|
37
|
+
if (err.tipPresetsCalculationBasis != null) {
|
|
38
|
+
this.tipPresetsCalculationBasis = err.tipPresetsCalculationBasis;
|
|
39
|
+
}
|
|
40
|
+
if (err.tipPresetsPercentageOptions != null) {
|
|
41
|
+
this.tipPresetsPercentageOptions = err.tipPresetsPercentageOptions;
|
|
42
|
+
}
|
|
43
|
+
if (err.tipPresetsFixedAmountOptions != null) {
|
|
44
|
+
this.tipPresetsFixedAmountOptions = err.tipPresetsFixedAmountOptions;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
this.name = "TransferConfigValidationError";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const TransferConfigValidationError$inboundSchema: z.ZodType<
|
|
53
|
+
TransferConfigValidationError,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
unknown
|
|
56
|
+
> = z.object({
|
|
57
|
+
"TipPresets.CalculationBasis": z.string().optional(),
|
|
58
|
+
"TipPresets.PercentageOptions": z.record(z.string()).optional(),
|
|
59
|
+
"TipPresets.FixedAmountOptions": z.record(
|
|
60
|
+
components.AmountDecimalValidationError$inboundSchema,
|
|
61
|
+
).optional(),
|
|
62
|
+
request$: z.instanceof(Request),
|
|
63
|
+
response$: z.instanceof(Response),
|
|
64
|
+
body$: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.transform((v) => {
|
|
67
|
+
const remapped = remap$(v, {
|
|
68
|
+
"TipPresets.CalculationBasis": "tipPresetsCalculationBasis",
|
|
69
|
+
"TipPresets.PercentageOptions": "tipPresetsPercentageOptions",
|
|
70
|
+
"TipPresets.FixedAmountOptions": "tipPresetsFixedAmountOptions",
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
return new TransferConfigValidationError(remapped, {
|
|
74
|
+
request: v.request$,
|
|
75
|
+
response: v.response$,
|
|
76
|
+
body: v.body$,
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type TransferConfigValidationError$Outbound = {
|
|
82
|
+
"TipPresets.CalculationBasis"?: string | undefined;
|
|
83
|
+
"TipPresets.PercentageOptions"?: { [k: string]: string } | undefined;
|
|
84
|
+
"TipPresets.FixedAmountOptions"?: {
|
|
85
|
+
[k: string]: components.AmountDecimalValidationError$Outbound;
|
|
86
|
+
} | undefined;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const TransferConfigValidationError$outboundSchema: z.ZodType<
|
|
91
|
+
TransferConfigValidationError$Outbound,
|
|
92
|
+
z.ZodTypeDef,
|
|
93
|
+
TransferConfigValidationError
|
|
94
|
+
> = z.instanceof(TransferConfigValidationError)
|
|
95
|
+
.transform(v => v.data$)
|
|
96
|
+
.pipe(
|
|
97
|
+
z.object({
|
|
98
|
+
tipPresetsCalculationBasis: z.string().optional(),
|
|
99
|
+
tipPresetsPercentageOptions: z.record(z.string()).optional(),
|
|
100
|
+
tipPresetsFixedAmountOptions: z.record(
|
|
101
|
+
components.AmountDecimalValidationError$outboundSchema,
|
|
102
|
+
).optional(),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
tipPresetsCalculationBasis: "TipPresets.CalculationBasis",
|
|
106
|
+
tipPresetsPercentageOptions: "TipPresets.PercentageOptions",
|
|
107
|
+
tipPresetsFixedAmountOptions: "TipPresets.FixedAmountOptions",
|
|
108
|
+
});
|
|
109
|
+
}),
|
|
110
|
+
);
|
|
@@ -19,6 +19,9 @@ export type TransferValidationErrorData = {
|
|
|
19
19
|
salesTaxAmount?: string | undefined;
|
|
20
20
|
foreignID?: string | undefined;
|
|
21
21
|
lineItems?: components.CreateTransferLineItemsValidationError | undefined;
|
|
22
|
+
amountDetails?:
|
|
23
|
+
| components.CreateTransferAmountDetailsValidationError
|
|
24
|
+
| undefined;
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
export class TransferValidationError extends MoovError {
|
|
@@ -33,6 +36,9 @@ export class TransferValidationError extends MoovError {
|
|
|
33
36
|
salesTaxAmount?: string | undefined;
|
|
34
37
|
foreignID?: string | undefined;
|
|
35
38
|
lineItems?: components.CreateTransferLineItemsValidationError | undefined;
|
|
39
|
+
amountDetails?:
|
|
40
|
+
| components.CreateTransferAmountDetailsValidationError
|
|
41
|
+
| undefined;
|
|
36
42
|
|
|
37
43
|
/** The original data that was passed to this error instance. */
|
|
38
44
|
data$: TransferValidationErrorData;
|
|
@@ -65,6 +71,7 @@ export class TransferValidationError extends MoovError {
|
|
|
65
71
|
if (err.salesTaxAmount != null) this.salesTaxAmount = err.salesTaxAmount;
|
|
66
72
|
if (err.foreignID != null) this.foreignID = err.foreignID;
|
|
67
73
|
if (err.lineItems != null) this.lineItems = err.lineItems;
|
|
74
|
+
if (err.amountDetails != null) this.amountDetails = err.amountDetails;
|
|
68
75
|
|
|
69
76
|
this.name = "TransferValidationError";
|
|
70
77
|
}
|
|
@@ -88,6 +95,8 @@ export const TransferValidationError$inboundSchema: z.ZodType<
|
|
|
88
95
|
foreignID: z.string().optional(),
|
|
89
96
|
lineItems: components.CreateTransferLineItemsValidationError$inboundSchema
|
|
90
97
|
.optional(),
|
|
98
|
+
amountDetails: components
|
|
99
|
+
.CreateTransferAmountDetailsValidationError$inboundSchema.optional(),
|
|
91
100
|
request$: z.instanceof(Request),
|
|
92
101
|
response$: z.instanceof(Response),
|
|
93
102
|
body$: z.string(),
|
|
@@ -120,6 +129,9 @@ export type TransferValidationError$Outbound = {
|
|
|
120
129
|
lineItems?:
|
|
121
130
|
| components.CreateTransferLineItemsValidationError$Outbound
|
|
122
131
|
| undefined;
|
|
132
|
+
amountDetails?:
|
|
133
|
+
| components.CreateTransferAmountDetailsValidationError$Outbound
|
|
134
|
+
| undefined;
|
|
123
135
|
};
|
|
124
136
|
|
|
125
137
|
/** @internal */
|
|
@@ -143,6 +155,8 @@ export const TransferValidationError$outboundSchema: z.ZodType<
|
|
|
143
155
|
foreignID: z.string().optional(),
|
|
144
156
|
lineItems: components
|
|
145
157
|
.CreateTransferLineItemsValidationError$outboundSchema.optional(),
|
|
158
|
+
amountDetails: components
|
|
159
|
+
.CreateTransferAmountDetailsValidationError$outboundSchema.optional(),
|
|
146
160
|
}).transform((v) => {
|
|
147
161
|
return remap$(v, {
|
|
148
162
|
facilitatorFeeTotalDecimal: "FacilitatorFee.TotalDecimal",
|
|
@@ -0,0 +1,129 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateTransferConfigRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Your Moov account ID.
|
|
15
|
+
*/
|
|
16
|
+
accountID: string;
|
|
17
|
+
createTransferConfig: components.CreateTransferConfig;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type CreateTransferConfigResponse = {
|
|
21
|
+
headers: { [k: string]: Array<string> };
|
|
22
|
+
result: components.TransferConfig;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const CreateTransferConfigRequest$inboundSchema: z.ZodType<
|
|
27
|
+
CreateTransferConfigRequest,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
accountID: z.string(),
|
|
32
|
+
CreateTransferConfig: components.CreateTransferConfig$inboundSchema,
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"CreateTransferConfig": "createTransferConfig",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type CreateTransferConfigRequest$Outbound = {
|
|
40
|
+
accountID: string;
|
|
41
|
+
CreateTransferConfig: components.CreateTransferConfig$Outbound;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const CreateTransferConfigRequest$outboundSchema: z.ZodType<
|
|
46
|
+
CreateTransferConfigRequest$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
CreateTransferConfigRequest
|
|
49
|
+
> = z.object({
|
|
50
|
+
accountID: z.string(),
|
|
51
|
+
createTransferConfig: components.CreateTransferConfig$outboundSchema,
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
createTransferConfig: "CreateTransferConfig",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function createTransferConfigRequestToJSON(
|
|
59
|
+
createTransferConfigRequest: CreateTransferConfigRequest,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
CreateTransferConfigRequest$outboundSchema.parse(
|
|
63
|
+
createTransferConfigRequest,
|
|
64
|
+
),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export function createTransferConfigRequestFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<CreateTransferConfigRequest, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => CreateTransferConfigRequest$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'CreateTransferConfigRequest' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const CreateTransferConfigResponse$inboundSchema: z.ZodType<
|
|
79
|
+
CreateTransferConfigResponse,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
unknown
|
|
82
|
+
> = z.object({
|
|
83
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
84
|
+
Result: components.TransferConfig$inboundSchema,
|
|
85
|
+
}).transform((v) => {
|
|
86
|
+
return remap$(v, {
|
|
87
|
+
"Headers": "headers",
|
|
88
|
+
"Result": "result",
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
/** @internal */
|
|
92
|
+
export type CreateTransferConfigResponse$Outbound = {
|
|
93
|
+
Headers: { [k: string]: Array<string> };
|
|
94
|
+
Result: components.TransferConfig$Outbound;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const CreateTransferConfigResponse$outboundSchema: z.ZodType<
|
|
99
|
+
CreateTransferConfigResponse$Outbound,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
CreateTransferConfigResponse
|
|
102
|
+
> = z.object({
|
|
103
|
+
headers: z.record(z.array(z.string())),
|
|
104
|
+
result: components.TransferConfig$outboundSchema,
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
headers: "Headers",
|
|
108
|
+
result: "Result",
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function createTransferConfigResponseToJSON(
|
|
113
|
+
createTransferConfigResponse: CreateTransferConfigResponse,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
CreateTransferConfigResponse$outboundSchema.parse(
|
|
117
|
+
createTransferConfigResponse,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
export function createTransferConfigResponseFromJSON(
|
|
122
|
+
jsonString: string,
|
|
123
|
+
): SafeParseResult<CreateTransferConfigResponse, SDKValidationError> {
|
|
124
|
+
return safeParse(
|
|
125
|
+
jsonString,
|
|
126
|
+
(x) => CreateTransferConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
127
|
+
`Failed to parse 'CreateTransferConfigResponse' from JSON`,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetTransferConfigRequest = {
|
|
13
|
+
accountID: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type GetTransferConfigResponse = {
|
|
17
|
+
headers: { [k: string]: Array<string> };
|
|
18
|
+
result: components.TransferConfig;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const GetTransferConfigRequest$inboundSchema: z.ZodType<
|
|
23
|
+
GetTransferConfigRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
accountID: z.string(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type GetTransferConfigRequest$Outbound = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const GetTransferConfigRequest$outboundSchema: z.ZodType<
|
|
36
|
+
GetTransferConfigRequest$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
GetTransferConfigRequest
|
|
39
|
+
> = z.object({
|
|
40
|
+
accountID: z.string(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function getTransferConfigRequestToJSON(
|
|
44
|
+
getTransferConfigRequest: GetTransferConfigRequest,
|
|
45
|
+
): string {
|
|
46
|
+
return JSON.stringify(
|
|
47
|
+
GetTransferConfigRequest$outboundSchema.parse(getTransferConfigRequest),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export function getTransferConfigRequestFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<GetTransferConfigRequest, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => GetTransferConfigRequest$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'GetTransferConfigRequest' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const GetTransferConfigResponse$inboundSchema: z.ZodType<
|
|
62
|
+
GetTransferConfigResponse,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
67
|
+
Result: components.TransferConfig$inboundSchema,
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
"Headers": "headers",
|
|
71
|
+
"Result": "result",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type GetTransferConfigResponse$Outbound = {
|
|
76
|
+
Headers: { [k: string]: Array<string> };
|
|
77
|
+
Result: components.TransferConfig$Outbound;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const GetTransferConfigResponse$outboundSchema: z.ZodType<
|
|
82
|
+
GetTransferConfigResponse$Outbound,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
GetTransferConfigResponse
|
|
85
|
+
> = z.object({
|
|
86
|
+
headers: z.record(z.array(z.string())),
|
|
87
|
+
result: components.TransferConfig$outboundSchema,
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
headers: "Headers",
|
|
91
|
+
result: "Result",
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export function getTransferConfigResponseToJSON(
|
|
96
|
+
getTransferConfigResponse: GetTransferConfigResponse,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(
|
|
99
|
+
GetTransferConfigResponse$outboundSchema.parse(getTransferConfigResponse),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
export function getTransferConfigResponseFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<GetTransferConfigResponse, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => GetTransferConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'GetTransferConfigResponse' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -30,6 +30,7 @@ export * from "./createterminalapplication.js";
|
|
|
30
30
|
export * from "./createterminalapplicationversion.js";
|
|
31
31
|
export * from "./createticket.js";
|
|
32
32
|
export * from "./createtransfer.js";
|
|
33
|
+
export * from "./createtransferconfig.js";
|
|
33
34
|
export * from "./createtransferoptions.js";
|
|
34
35
|
export * from "./createwallet.js";
|
|
35
36
|
export * from "./createwebhook.js";
|
|
@@ -92,6 +93,7 @@ export * from "./getterminalconfiguration.js";
|
|
|
92
93
|
export * from "./gettermsofservicetoken.js";
|
|
93
94
|
export * from "./getticket.js";
|
|
94
95
|
export * from "./gettransfer.js";
|
|
96
|
+
export * from "./gettransferconfig.js";
|
|
95
97
|
export * from "./getunderwriting.js";
|
|
96
98
|
export * from "./getwallet.js";
|
|
97
99
|
export * from "./getwallettransaction.js";
|
|
@@ -178,6 +180,7 @@ export * from "./updateschedule.js";
|
|
|
178
180
|
export * from "./updatesweepconfig.js";
|
|
179
181
|
export * from "./updateticket.js";
|
|
180
182
|
export * from "./updatetransfer.js";
|
|
183
|
+
export * from "./updatetransferconfig.js";
|
|
181
184
|
export * from "./updatewallet.js";
|
|
182
185
|
export * from "./updatewebhook.js";
|
|
183
186
|
export * from "./uploaddisputeevidencefile.js";
|
|
@@ -0,0 +1,126 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateTransferConfigRequest = {
|
|
13
|
+
accountID: string;
|
|
14
|
+
putTransferConfig: components.PutTransferConfig;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type UpdateTransferConfigResponse = {
|
|
18
|
+
headers: { [k: string]: Array<string> };
|
|
19
|
+
result: components.TransferConfig;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const UpdateTransferConfigRequest$inboundSchema: z.ZodType<
|
|
24
|
+
UpdateTransferConfigRequest,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
accountID: z.string(),
|
|
29
|
+
PutTransferConfig: components.PutTransferConfig$inboundSchema,
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"PutTransferConfig": "putTransferConfig",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type UpdateTransferConfigRequest$Outbound = {
|
|
37
|
+
accountID: string;
|
|
38
|
+
PutTransferConfig: components.PutTransferConfig$Outbound;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const UpdateTransferConfigRequest$outboundSchema: z.ZodType<
|
|
43
|
+
UpdateTransferConfigRequest$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
UpdateTransferConfigRequest
|
|
46
|
+
> = z.object({
|
|
47
|
+
accountID: z.string(),
|
|
48
|
+
putTransferConfig: components.PutTransferConfig$outboundSchema,
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
putTransferConfig: "PutTransferConfig",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function updateTransferConfigRequestToJSON(
|
|
56
|
+
updateTransferConfigRequest: UpdateTransferConfigRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
UpdateTransferConfigRequest$outboundSchema.parse(
|
|
60
|
+
updateTransferConfigRequest,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export function updateTransferConfigRequestFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<UpdateTransferConfigRequest, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => UpdateTransferConfigRequest$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'UpdateTransferConfigRequest' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const UpdateTransferConfigResponse$inboundSchema: z.ZodType<
|
|
76
|
+
UpdateTransferConfigResponse,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
unknown
|
|
79
|
+
> = z.object({
|
|
80
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
81
|
+
Result: components.TransferConfig$inboundSchema,
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
"Headers": "headers",
|
|
85
|
+
"Result": "result",
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type UpdateTransferConfigResponse$Outbound = {
|
|
90
|
+
Headers: { [k: string]: Array<string> };
|
|
91
|
+
Result: components.TransferConfig$Outbound;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const UpdateTransferConfigResponse$outboundSchema: z.ZodType<
|
|
96
|
+
UpdateTransferConfigResponse$Outbound,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
UpdateTransferConfigResponse
|
|
99
|
+
> = z.object({
|
|
100
|
+
headers: z.record(z.array(z.string())),
|
|
101
|
+
result: components.TransferConfig$outboundSchema,
|
|
102
|
+
}).transform((v) => {
|
|
103
|
+
return remap$(v, {
|
|
104
|
+
headers: "Headers",
|
|
105
|
+
result: "Result",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export function updateTransferConfigResponseToJSON(
|
|
110
|
+
updateTransferConfigResponse: UpdateTransferConfigResponse,
|
|
111
|
+
): string {
|
|
112
|
+
return JSON.stringify(
|
|
113
|
+
UpdateTransferConfigResponse$outboundSchema.parse(
|
|
114
|
+
updateTransferConfigResponse,
|
|
115
|
+
),
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
export function updateTransferConfigResponseFromJSON(
|
|
119
|
+
jsonString: string,
|
|
120
|
+
): SafeParseResult<UpdateTransferConfigResponse, SDKValidationError> {
|
|
121
|
+
return safeParse(
|
|
122
|
+
jsonString,
|
|
123
|
+
(x) => UpdateTransferConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
124
|
+
`Failed to parse 'UpdateTransferConfigResponse' from JSON`,
|
|
125
|
+
);
|
|
126
|
+
}
|