@moovio/sdk 26.2.3 → 26.2.6
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/bin/mcp-server.js +74 -36
- package/bin/mcp-server.js.map +26 -24
- package/funcs/filesUpload.d.ts.map +1 -1
- package/funcs/filesUpload.js +3 -1
- package/funcs/filesUpload.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/createdtransfer.d.ts +1 -1
- package/models/components/createpaymentlink.d.ts +1 -1
- package/models/components/createpaymentlinklineitems.d.ts +1 -1
- package/models/components/createpaymentlinklineitemsupdate.d.ts +1 -1
- package/models/components/createtransfer.d.ts +1 -1
- package/models/components/createtransferlineitems.d.ts +1 -1
- 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/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/paymentlink.d.ts +1 -1
- package/models/components/paymentlinklineitems.d.ts +1 -1
- package/models/components/rtptransactiondetails.d.ts +45 -0
- package/models/components/rtptransactiondetails.d.ts.map +1 -0
- package/models/components/rtptransactiondetails.js +75 -0
- package/models/components/rtptransactiondetails.js.map +1 -0
- package/models/components/transfer.d.ts +1 -1
- package/models/components/transferdestination.d.ts +5 -43
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +4 -36
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/transferlineitems.d.ts +1 -1
- package/models/components/updatepaymentlink.d.ts +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/transfer.d.ts +2 -2
- package/package.json +1 -1
- package/src/funcs/filesUpload.ts +13 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/createdtransfer.ts +1 -1
- package/src/models/components/createpaymentlink.ts +1 -1
- package/src/models/components/createpaymentlinklineitems.ts +1 -1
- package/src/models/components/createpaymentlinklineitemsupdate.ts +1 -1
- package/src/models/components/createtransfer.ts +1 -1
- package/src/models/components/createtransferlineitems.ts +1 -1
- package/src/models/components/fileuploadmetadata.ts +73 -0
- package/src/models/components/fileuploadrequestmultipart.ts +12 -10
- package/src/models/components/index.ts +2 -0
- package/src/models/components/paymentlink.ts +1 -1
- package/src/models/components/paymentlinklineitems.ts +1 -1
- package/src/models/components/rtptransactiondetails.ts +104 -0
- package/src/models/components/transfer.ts +1 -1
- package/src/models/components/transferdestination.ts +11 -95
- package/src/models/components/transferlineitems.ts +1 -1
- package/src/models/components/updatepaymentlink.ts +1 -1
- package/src/models/components/webhookdata.ts +4 -4
- package/src/models/components/webhookdatabankaccountcreated.ts +9 -0
- package/src/models/errors/transfer.ts +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Additional metadata to be stored with the file.
|
|
13
|
+
*/
|
|
14
|
+
export type FileUploadMetadata = {
|
|
15
|
+
/**
|
|
16
|
+
* The representative ID that the file is for. Required when filePurpose is `representativeVerification`.
|
|
17
|
+
*/
|
|
18
|
+
representativeId?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Comments or notes about the file.
|
|
21
|
+
*/
|
|
22
|
+
comment?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const FileUploadMetadata$inboundSchema: z.ZodType<
|
|
27
|
+
FileUploadMetadata,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
representative_id: z.string().optional(),
|
|
32
|
+
comment: z.string().optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"representative_id": "representativeId",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type FileUploadMetadata$Outbound = {
|
|
40
|
+
representative_id?: string | undefined;
|
|
41
|
+
comment?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const FileUploadMetadata$outboundSchema: z.ZodType<
|
|
46
|
+
FileUploadMetadata$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
FileUploadMetadata
|
|
49
|
+
> = z.object({
|
|
50
|
+
representativeId: z.string().optional(),
|
|
51
|
+
comment: z.string().optional(),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
representativeId: "representative_id",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function fileUploadMetadataToJSON(
|
|
59
|
+
fileUploadMetadata: FileUploadMetadata,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
FileUploadMetadata$outboundSchema.parse(fileUploadMetadata),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export function fileUploadMetadataFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<FileUploadMetadata, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => FileUploadMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'FileUploadMetadata' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
FilePurpose$inboundSchema,
|
|
13
13
|
FilePurpose$outboundSchema,
|
|
14
14
|
} from "./filepurpose.js";
|
|
15
|
+
import {
|
|
16
|
+
FileUploadMetadata,
|
|
17
|
+
FileUploadMetadata$inboundSchema,
|
|
18
|
+
FileUploadMetadata$Outbound,
|
|
19
|
+
FileUploadMetadata$outboundSchema,
|
|
20
|
+
} from "./fileuploadmetadata.js";
|
|
15
21
|
|
|
16
22
|
export type FileUploadRequestMultiPartFile = {
|
|
17
23
|
fileName: string;
|
|
@@ -20,7 +26,7 @@ export type FileUploadRequestMultiPartFile = {
|
|
|
20
26
|
|
|
21
27
|
export type FileUploadRequestMultiPart = {
|
|
22
28
|
/**
|
|
23
|
-
* The file to
|
|
29
|
+
* The file to upload. Valid types are `csv`, `png`, `jpeg`, `pdf`.
|
|
24
30
|
*/
|
|
25
31
|
file: FileUploadRequestMultiPartFile | Blob;
|
|
26
32
|
/**
|
|
@@ -28,13 +34,9 @@ export type FileUploadRequestMultiPart = {
|
|
|
28
34
|
*/
|
|
29
35
|
filePurpose: FilePurpose;
|
|
30
36
|
/**
|
|
31
|
-
* Additional metadata to be stored with the file
|
|
32
|
-
*
|
|
33
|
-
* @remarks
|
|
34
|
-
*
|
|
35
|
-
* Valid keys are `representative_id`, `comment`, `requirement_id`, `error_code`.
|
|
37
|
+
* Additional metadata to be stored with the file.
|
|
36
38
|
*/
|
|
37
|
-
metadata?:
|
|
39
|
+
metadata?: FileUploadMetadata | undefined;
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
/** @internal */
|
|
@@ -99,13 +101,13 @@ export const FileUploadRequestMultiPart$inboundSchema: z.ZodType<
|
|
|
99
101
|
> = z.object({
|
|
100
102
|
file: z.lazy(() => FileUploadRequestMultiPartFile$inboundSchema),
|
|
101
103
|
filePurpose: FilePurpose$inboundSchema,
|
|
102
|
-
metadata:
|
|
104
|
+
metadata: FileUploadMetadata$inboundSchema.optional(),
|
|
103
105
|
});
|
|
104
106
|
/** @internal */
|
|
105
107
|
export type FileUploadRequestMultiPart$Outbound = {
|
|
106
108
|
file: FileUploadRequestMultiPartFile$Outbound | Blob;
|
|
107
109
|
filePurpose: string;
|
|
108
|
-
metadata?:
|
|
110
|
+
metadata?: FileUploadMetadata$Outbound | undefined;
|
|
109
111
|
};
|
|
110
112
|
|
|
111
113
|
/** @internal */
|
|
@@ -118,7 +120,7 @@ export const FileUploadRequestMultiPart$outboundSchema: z.ZodType<
|
|
|
118
120
|
blobLikeSchema,
|
|
119
121
|
),
|
|
120
122
|
filePurpose: FilePurpose$outboundSchema,
|
|
121
|
-
metadata:
|
|
123
|
+
metadata: FileUploadMetadata$outboundSchema.optional(),
|
|
122
124
|
});
|
|
123
125
|
|
|
124
126
|
export function fileUploadRequestMultiPartToJSON(
|
|
@@ -232,6 +232,7 @@ export * from "./feeproperties.js";
|
|
|
232
232
|
export * from "./filedetails.js";
|
|
233
233
|
export * from "./filepurpose.js";
|
|
234
234
|
export * from "./filestatus.js";
|
|
235
|
+
export * from "./fileuploadmetadata.js";
|
|
235
236
|
export * from "./fileuploadrequestmultipart.js";
|
|
236
237
|
export * from "./financialinstitutions.js";
|
|
237
238
|
export * from "./fulfillment.js";
|
|
@@ -405,6 +406,7 @@ export * from "./rtpfailurecode.js";
|
|
|
405
406
|
export * from "./rtpinstitution.js";
|
|
406
407
|
export * from "./rtprejectioncode.js";
|
|
407
408
|
export * from "./rtpservices.js";
|
|
409
|
+
export * from "./rtptransactiondetails.js";
|
|
408
410
|
export * from "./rtptransactionstatus.js";
|
|
409
411
|
export * from "./runtransfer.js";
|
|
410
412
|
export * from "./scheduledtransferimagemetadata.js";
|
|
@@ -134,7 +134,7 @@ export type PaymentLink = {
|
|
|
134
134
|
* An optional collection of line items for a payment link.
|
|
135
135
|
*
|
|
136
136
|
* @remarks
|
|
137
|
-
* When line items are provided, their total plus
|
|
137
|
+
* When line items are provided, their total plus tax must equal the payment link amount.
|
|
138
138
|
*/
|
|
139
139
|
lineItems?: PaymentLinkLineItems | undefined;
|
|
140
140
|
createdOn: Date;
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
* An optional collection of line items for a payment link.
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* When line items are provided, their total plus
|
|
20
|
+
* When line items are provided, their total plus tax must equal the payment link amount.
|
|
21
21
|
*/
|
|
22
22
|
export type PaymentLinkLineItems = {
|
|
23
23
|
/**
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
RTPFailureCode,
|
|
11
|
+
RTPFailureCode$inboundSchema,
|
|
12
|
+
RTPFailureCode$outboundSchema,
|
|
13
|
+
} from "./rtpfailurecode.js";
|
|
14
|
+
import {
|
|
15
|
+
RTPTransactionStatus,
|
|
16
|
+
RTPTransactionStatus$inboundSchema,
|
|
17
|
+
RTPTransactionStatus$outboundSchema,
|
|
18
|
+
} from "./rtptransactionstatus.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* DEPRECATED: use `InstantBankTransactionDetails` instead (v2026.04.00 or later). RTP specific details about the transaction.
|
|
22
|
+
*
|
|
23
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
24
|
+
*/
|
|
25
|
+
export type RTPTransactionDetails = {
|
|
26
|
+
/**
|
|
27
|
+
* Status of a transaction within the RTP lifecycle.
|
|
28
|
+
*/
|
|
29
|
+
status?: RTPTransactionStatus | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Response code returned by network on failure.
|
|
32
|
+
*/
|
|
33
|
+
networkResponseCode?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Status codes for RTP failures.
|
|
36
|
+
*/
|
|
37
|
+
failureCode?: RTPFailureCode | undefined;
|
|
38
|
+
initiatedOn?: Date | undefined;
|
|
39
|
+
completedOn?: Date | undefined;
|
|
40
|
+
failedOn?: Date | undefined;
|
|
41
|
+
acceptedWithoutPostingOn?: Date | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const RTPTransactionDetails$inboundSchema: z.ZodType<
|
|
46
|
+
RTPTransactionDetails,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
status: RTPTransactionStatus$inboundSchema.optional(),
|
|
51
|
+
networkResponseCode: z.string().optional(),
|
|
52
|
+
failureCode: RTPFailureCode$inboundSchema.optional(),
|
|
53
|
+
initiatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
54
|
+
.optional(),
|
|
55
|
+
completedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
56
|
+
.optional(),
|
|
57
|
+
failedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
58
|
+
.optional(),
|
|
59
|
+
acceptedWithoutPostingOn: z.string().datetime({ offset: true }).transform(v =>
|
|
60
|
+
new Date(v)
|
|
61
|
+
).optional(),
|
|
62
|
+
});
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type RTPTransactionDetails$Outbound = {
|
|
65
|
+
status?: string | undefined;
|
|
66
|
+
networkResponseCode?: string | undefined;
|
|
67
|
+
failureCode?: string | undefined;
|
|
68
|
+
initiatedOn?: string | undefined;
|
|
69
|
+
completedOn?: string | undefined;
|
|
70
|
+
failedOn?: string | undefined;
|
|
71
|
+
acceptedWithoutPostingOn?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const RTPTransactionDetails$outboundSchema: z.ZodType<
|
|
76
|
+
RTPTransactionDetails$Outbound,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
RTPTransactionDetails
|
|
79
|
+
> = z.object({
|
|
80
|
+
status: RTPTransactionStatus$outboundSchema.optional(),
|
|
81
|
+
networkResponseCode: z.string().optional(),
|
|
82
|
+
failureCode: RTPFailureCode$outboundSchema.optional(),
|
|
83
|
+
initiatedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
84
|
+
completedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
85
|
+
failedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
86
|
+
acceptedWithoutPostingOn: z.date().transform(v => v.toISOString()).optional(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function rtpTransactionDetailsToJSON(
|
|
90
|
+
rtpTransactionDetails: RTPTransactionDetails,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
RTPTransactionDetails$outboundSchema.parse(rtpTransactionDetails),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function rtpTransactionDetailsFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<RTPTransactionDetails, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => RTPTransactionDetails$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'RTPTransactionDetails' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -145,7 +145,7 @@ export type Transfer = {
|
|
|
145
145
|
* An optional collection of line items for a transfer.
|
|
146
146
|
*
|
|
147
147
|
* @remarks
|
|
148
|
-
* When line items are provided, their total plus
|
|
148
|
+
* When line items are provided, their total plus tax must equal the transfer amount.
|
|
149
149
|
*/
|
|
150
150
|
lineItems?: TransferLineItems | undefined;
|
|
151
151
|
};
|
|
@@ -31,15 +31,11 @@ import {
|
|
|
31
31
|
InstantBankTransactionDetails$outboundSchema,
|
|
32
32
|
} from "./instantbanktransactiondetails.js";
|
|
33
33
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
RTPTransactionStatus,
|
|
40
|
-
RTPTransactionStatus$inboundSchema,
|
|
41
|
-
RTPTransactionStatus$outboundSchema,
|
|
42
|
-
} from "./rtptransactionstatus.js";
|
|
34
|
+
RTPTransactionDetails,
|
|
35
|
+
RTPTransactionDetails$inboundSchema,
|
|
36
|
+
RTPTransactionDetails$Outbound,
|
|
37
|
+
RTPTransactionDetails$outboundSchema,
|
|
38
|
+
} from "./rtptransactiondetails.js";
|
|
43
39
|
import {
|
|
44
40
|
TransferAccount,
|
|
45
41
|
TransferAccount$inboundSchema,
|
|
@@ -70,30 +66,6 @@ import {
|
|
|
70
66
|
TransferPaymentMethodType$outboundSchema,
|
|
71
67
|
} from "./transferpaymentmethodtype.js";
|
|
72
68
|
|
|
73
|
-
/**
|
|
74
|
-
* DEPRECATED: use `InstantBankTransactionDetails` instead (v2026.04.00 or later). RTP specific details about the transaction.
|
|
75
|
-
*
|
|
76
|
-
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
77
|
-
*/
|
|
78
|
-
export type RtpDetails = {
|
|
79
|
-
/**
|
|
80
|
-
* Status of a transaction within the RTP lifecycle.
|
|
81
|
-
*/
|
|
82
|
-
status?: RTPTransactionStatus | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Response code returned by network on failure.
|
|
85
|
-
*/
|
|
86
|
-
networkResponseCode?: string | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Status codes for RTP failures.
|
|
89
|
-
*/
|
|
90
|
-
failureCode?: RTPFailureCode | undefined;
|
|
91
|
-
initiatedOn?: Date | undefined;
|
|
92
|
-
completedOn?: Date | undefined;
|
|
93
|
-
failedOn?: Date | undefined;
|
|
94
|
-
acceptedWithoutPostingOn?: Date | undefined;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
69
|
export type TransferDestination = {
|
|
98
70
|
paymentMethodID: string;
|
|
99
71
|
/**
|
|
@@ -123,73 +95,17 @@ export type TransferDestination = {
|
|
|
123
95
|
*/
|
|
124
96
|
cardDetails?: CardTransactionDetails | undefined;
|
|
125
97
|
/**
|
|
98
|
+
* DEPRECATED: use `InstantBankTransactionDetails` instead (v2026.04.00 or later). RTP specific details about the transaction.
|
|
99
|
+
*
|
|
126
100
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
127
101
|
*/
|
|
128
|
-
rtpDetails?:
|
|
102
|
+
rtpDetails?: RTPTransactionDetails | undefined;
|
|
129
103
|
/**
|
|
130
104
|
* Instant-bank specific details about the transaction.
|
|
131
105
|
*/
|
|
132
106
|
instantBankDetails?: InstantBankTransactionDetails | undefined;
|
|
133
107
|
};
|
|
134
108
|
|
|
135
|
-
/** @internal */
|
|
136
|
-
export const RtpDetails$inboundSchema: z.ZodType<
|
|
137
|
-
RtpDetails,
|
|
138
|
-
z.ZodTypeDef,
|
|
139
|
-
unknown
|
|
140
|
-
> = z.object({
|
|
141
|
-
status: RTPTransactionStatus$inboundSchema.optional(),
|
|
142
|
-
networkResponseCode: z.string().optional(),
|
|
143
|
-
failureCode: RTPFailureCode$inboundSchema.optional(),
|
|
144
|
-
initiatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
145
|
-
.optional(),
|
|
146
|
-
completedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
147
|
-
.optional(),
|
|
148
|
-
failedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
149
|
-
.optional(),
|
|
150
|
-
acceptedWithoutPostingOn: z.string().datetime({ offset: true }).transform(v =>
|
|
151
|
-
new Date(v)
|
|
152
|
-
).optional(),
|
|
153
|
-
});
|
|
154
|
-
/** @internal */
|
|
155
|
-
export type RtpDetails$Outbound = {
|
|
156
|
-
status?: string | undefined;
|
|
157
|
-
networkResponseCode?: string | undefined;
|
|
158
|
-
failureCode?: string | undefined;
|
|
159
|
-
initiatedOn?: string | undefined;
|
|
160
|
-
completedOn?: string | undefined;
|
|
161
|
-
failedOn?: string | undefined;
|
|
162
|
-
acceptedWithoutPostingOn?: string | undefined;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
/** @internal */
|
|
166
|
-
export const RtpDetails$outboundSchema: z.ZodType<
|
|
167
|
-
RtpDetails$Outbound,
|
|
168
|
-
z.ZodTypeDef,
|
|
169
|
-
RtpDetails
|
|
170
|
-
> = z.object({
|
|
171
|
-
status: RTPTransactionStatus$outboundSchema.optional(),
|
|
172
|
-
networkResponseCode: z.string().optional(),
|
|
173
|
-
failureCode: RTPFailureCode$outboundSchema.optional(),
|
|
174
|
-
initiatedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
175
|
-
completedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
176
|
-
failedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
177
|
-
acceptedWithoutPostingOn: z.date().transform(v => v.toISOString()).optional(),
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
export function rtpDetailsToJSON(rtpDetails: RtpDetails): string {
|
|
181
|
-
return JSON.stringify(RtpDetails$outboundSchema.parse(rtpDetails));
|
|
182
|
-
}
|
|
183
|
-
export function rtpDetailsFromJSON(
|
|
184
|
-
jsonString: string,
|
|
185
|
-
): SafeParseResult<RtpDetails, SDKValidationError> {
|
|
186
|
-
return safeParse(
|
|
187
|
-
jsonString,
|
|
188
|
-
(x) => RtpDetails$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
-
`Failed to parse 'RtpDetails' from JSON`,
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
109
|
/** @internal */
|
|
194
110
|
export const TransferDestination$inboundSchema: z.ZodType<
|
|
195
111
|
TransferDestination,
|
|
@@ -205,7 +121,7 @@ export const TransferDestination$inboundSchema: z.ZodType<
|
|
|
205
121
|
achDetails: ACHTransactionDetails$inboundSchema.optional(),
|
|
206
122
|
applePay: ApplePayResponse$inboundSchema.optional(),
|
|
207
123
|
cardDetails: CardTransactionDetails$inboundSchema.optional(),
|
|
208
|
-
rtpDetails:
|
|
124
|
+
rtpDetails: RTPTransactionDetails$inboundSchema.optional(),
|
|
209
125
|
instantBankDetails: InstantBankTransactionDetails$inboundSchema.optional(),
|
|
210
126
|
});
|
|
211
127
|
/** @internal */
|
|
@@ -219,7 +135,7 @@ export type TransferDestination$Outbound = {
|
|
|
219
135
|
achDetails?: ACHTransactionDetails$Outbound | undefined;
|
|
220
136
|
applePay?: ApplePayResponse$Outbound | undefined;
|
|
221
137
|
cardDetails?: CardTransactionDetails$Outbound | undefined;
|
|
222
|
-
rtpDetails?:
|
|
138
|
+
rtpDetails?: RTPTransactionDetails$Outbound | undefined;
|
|
223
139
|
instantBankDetails?: InstantBankTransactionDetails$Outbound | undefined;
|
|
224
140
|
};
|
|
225
141
|
|
|
@@ -238,7 +154,7 @@ export const TransferDestination$outboundSchema: z.ZodType<
|
|
|
238
154
|
achDetails: ACHTransactionDetails$outboundSchema.optional(),
|
|
239
155
|
applePay: ApplePayResponse$outboundSchema.optional(),
|
|
240
156
|
cardDetails: CardTransactionDetails$outboundSchema.optional(),
|
|
241
|
-
rtpDetails:
|
|
157
|
+
rtpDetails: RTPTransactionDetails$outboundSchema.optional(),
|
|
242
158
|
instantBankDetails: InstantBankTransactionDetails$outboundSchema.optional(),
|
|
243
159
|
});
|
|
244
160
|
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
* An optional collection of line items for a transfer.
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* When line items are provided, their total plus
|
|
20
|
+
* When line items are provided, their total plus tax must equal the transfer amount.
|
|
21
21
|
*/
|
|
22
22
|
export type TransferLineItems = {
|
|
23
23
|
/**
|
|
@@ -61,7 +61,7 @@ export type UpdatePaymentLink = {
|
|
|
61
61
|
* An optional collection of line items for a payment link.
|
|
62
62
|
*
|
|
63
63
|
* @remarks
|
|
64
|
-
* When line items are provided, their total plus
|
|
64
|
+
* When line items are provided, their total plus tax must equal the payment link amount.
|
|
65
65
|
*/
|
|
66
66
|
lineItems?: CreatePaymentLinkLineItemsUpdate | undefined;
|
|
67
67
|
};
|
|
@@ -239,6 +239,7 @@ export type WebhookData =
|
|
|
239
239
|
| WebhookDataBankAccountUpdated
|
|
240
240
|
| WebhookDataRefundUpdated
|
|
241
241
|
| WebhookDataWalletTransactionUpdated
|
|
242
|
+
| WebhookDataBankAccountCreated
|
|
242
243
|
| WebhookDataCancellationCreated
|
|
243
244
|
| WebhookDataCancellationUpdated
|
|
244
245
|
| WebhookDataCardAutoUpdated
|
|
@@ -252,7 +253,6 @@ export type WebhookData =
|
|
|
252
253
|
| WebhookDataTransferCreated
|
|
253
254
|
| WebhookDataWalletUpdated
|
|
254
255
|
| WebhookDataBalanceUpdated
|
|
255
|
-
| WebhookDataBankAccountCreated
|
|
256
256
|
| WebhookDataBankAccountDeleted
|
|
257
257
|
| WebhookDataCapabilityRequested
|
|
258
258
|
| WebhookDataInvoiceCreated
|
|
@@ -283,6 +283,7 @@ export const WebhookData$inboundSchema: z.ZodType<
|
|
|
283
283
|
WebhookDataBankAccountUpdated$inboundSchema,
|
|
284
284
|
WebhookDataRefundUpdated$inboundSchema,
|
|
285
285
|
WebhookDataWalletTransactionUpdated$inboundSchema,
|
|
286
|
+
WebhookDataBankAccountCreated$inboundSchema,
|
|
286
287
|
WebhookDataCancellationCreated$inboundSchema,
|
|
287
288
|
WebhookDataCancellationUpdated$inboundSchema,
|
|
288
289
|
WebhookDataCardAutoUpdated$inboundSchema,
|
|
@@ -296,7 +297,6 @@ export const WebhookData$inboundSchema: z.ZodType<
|
|
|
296
297
|
WebhookDataTransferCreated$inboundSchema,
|
|
297
298
|
WebhookDataWalletUpdated$inboundSchema,
|
|
298
299
|
WebhookDataBalanceUpdated$inboundSchema,
|
|
299
|
-
WebhookDataBankAccountCreated$inboundSchema,
|
|
300
300
|
WebhookDataBankAccountDeleted$inboundSchema,
|
|
301
301
|
WebhookDataCapabilityRequested$inboundSchema,
|
|
302
302
|
WebhookDataInvoiceCreated$inboundSchema,
|
|
@@ -323,6 +323,7 @@ export type WebhookData$Outbound =
|
|
|
323
323
|
| WebhookDataBankAccountUpdated$Outbound
|
|
324
324
|
| WebhookDataRefundUpdated$Outbound
|
|
325
325
|
| WebhookDataWalletTransactionUpdated$Outbound
|
|
326
|
+
| WebhookDataBankAccountCreated$Outbound
|
|
326
327
|
| WebhookDataCancellationCreated$Outbound
|
|
327
328
|
| WebhookDataCancellationUpdated$Outbound
|
|
328
329
|
| WebhookDataCardAutoUpdated$Outbound
|
|
@@ -336,7 +337,6 @@ export type WebhookData$Outbound =
|
|
|
336
337
|
| WebhookDataTransferCreated$Outbound
|
|
337
338
|
| WebhookDataWalletUpdated$Outbound
|
|
338
339
|
| WebhookDataBalanceUpdated$Outbound
|
|
339
|
-
| WebhookDataBankAccountCreated$Outbound
|
|
340
340
|
| WebhookDataBankAccountDeleted$Outbound
|
|
341
341
|
| WebhookDataCapabilityRequested$Outbound
|
|
342
342
|
| WebhookDataInvoiceCreated$Outbound
|
|
@@ -367,6 +367,7 @@ export const WebhookData$outboundSchema: z.ZodType<
|
|
|
367
367
|
WebhookDataBankAccountUpdated$outboundSchema,
|
|
368
368
|
WebhookDataRefundUpdated$outboundSchema,
|
|
369
369
|
WebhookDataWalletTransactionUpdated$outboundSchema,
|
|
370
|
+
WebhookDataBankAccountCreated$outboundSchema,
|
|
370
371
|
WebhookDataCancellationCreated$outboundSchema,
|
|
371
372
|
WebhookDataCancellationUpdated$outboundSchema,
|
|
372
373
|
WebhookDataCardAutoUpdated$outboundSchema,
|
|
@@ -380,7 +381,6 @@ export const WebhookData$outboundSchema: z.ZodType<
|
|
|
380
381
|
WebhookDataTransferCreated$outboundSchema,
|
|
381
382
|
WebhookDataWalletUpdated$outboundSchema,
|
|
382
383
|
WebhookDataBalanceUpdated$outboundSchema,
|
|
383
|
-
WebhookDataBankAccountCreated$outboundSchema,
|
|
384
384
|
WebhookDataBankAccountDeleted$outboundSchema,
|
|
385
385
|
WebhookDataCapabilityRequested$outboundSchema,
|
|
386
386
|
WebhookDataInvoiceCreated$outboundSchema,
|
|
@@ -6,10 +6,16 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
BankAccountStatus,
|
|
11
|
+
BankAccountStatus$inboundSchema,
|
|
12
|
+
BankAccountStatus$outboundSchema,
|
|
13
|
+
} from "./bankaccountstatus.js";
|
|
9
14
|
|
|
10
15
|
export type WebhookDataBankAccountCreated = {
|
|
11
16
|
bankAccountID: string;
|
|
12
17
|
accountID: string;
|
|
18
|
+
status: BankAccountStatus;
|
|
13
19
|
};
|
|
14
20
|
|
|
15
21
|
/** @internal */
|
|
@@ -20,11 +26,13 @@ export const WebhookDataBankAccountCreated$inboundSchema: z.ZodType<
|
|
|
20
26
|
> = z.object({
|
|
21
27
|
bankAccountID: z.string(),
|
|
22
28
|
accountID: z.string(),
|
|
29
|
+
status: BankAccountStatus$inboundSchema,
|
|
23
30
|
});
|
|
24
31
|
/** @internal */
|
|
25
32
|
export type WebhookDataBankAccountCreated$Outbound = {
|
|
26
33
|
bankAccountID: string;
|
|
27
34
|
accountID: string;
|
|
35
|
+
status: string;
|
|
28
36
|
};
|
|
29
37
|
|
|
30
38
|
/** @internal */
|
|
@@ -35,6 +43,7 @@ export const WebhookDataBankAccountCreated$outboundSchema: z.ZodType<
|
|
|
35
43
|
> = z.object({
|
|
36
44
|
bankAccountID: z.string(),
|
|
37
45
|
accountID: z.string(),
|
|
46
|
+
status: BankAccountStatus$outboundSchema,
|
|
38
47
|
});
|
|
39
48
|
|
|
40
49
|
export function webhookDataBankAccountCreatedToJSON(
|
|
@@ -74,7 +74,7 @@ export type TransferData = {
|
|
|
74
74
|
* An optional collection of line items for a transfer.
|
|
75
75
|
*
|
|
76
76
|
* @remarks
|
|
77
|
-
* When line items are provided, their total plus
|
|
77
|
+
* When line items are provided, their total plus tax must equal the transfer amount.
|
|
78
78
|
*/
|
|
79
79
|
lineItems?: components.TransferLineItems | undefined;
|
|
80
80
|
};
|
|
@@ -147,7 +147,7 @@ export class Transfer extends MoovError {
|
|
|
147
147
|
* An optional collection of line items for a transfer.
|
|
148
148
|
*
|
|
149
149
|
* @remarks
|
|
150
|
-
* When line items are provided, their total plus
|
|
150
|
+
* When line items are provided, their total plus tax must equal the transfer amount.
|
|
151
151
|
*/
|
|
152
152
|
lineItems?: components.TransferLineItems | undefined;
|
|
153
153
|
|