@moovio/sdk 26.7.0-dev.4 → 26.7.0-dev.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/README.md +81 -61
- package/bin/mcp-server.js +1314 -958
- package/bin/mcp-server.js.map +44 -34
- package/funcs/bankAccountsLink.d.ts +1 -1
- package/funcs/bankAccountsLink.js +1 -1
- package/funcs/depositViewCreate.d.ts +22 -0
- package/funcs/depositViewCreate.d.ts.map +1 -0
- package/funcs/depositViewCreate.js +136 -0
- package/funcs/depositViewCreate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/http.d.ts +1 -1
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +1 -1
- package/lib/http.js.map +1 -1
- package/lib/security.d.ts +5 -4
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -7
- package/lib/security.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 +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/bankAccountsLink.js +1 -1
- package/mcp-server/tools/depositViewCreate.d.ts +8 -0
- package/mcp-server/tools/depositViewCreate.d.ts.map +1 -0
- package/mcp-server/tools/depositViewCreate.js +69 -0
- package/mcp-server/tools/depositViewCreate.js.map +1 -0
- package/models/components/capabilityid.d.ts +1 -0
- package/models/components/capabilityid.d.ts.map +1 -1
- package/models/components/capabilityid.js +1 -0
- package/models/components/capabilityid.js.map +1 -1
- package/models/components/cardbrandfees.d.ts +5 -0
- package/models/components/cardbrandfees.d.ts.map +1 -1
- package/models/components/cardbrandfees.js +2 -0
- package/models/components/cardbrandfees.js.map +1 -1
- package/models/components/cardtransactiondetails.d.ts +7 -0
- package/models/components/cardtransactiondetails.d.ts.map +1 -1
- package/models/components/cardtransactiondetails.js +4 -0
- package/models/components/cardtransactiondetails.js.map +1 -1
- package/models/components/cardtransactionstatus.d.ts +1 -0
- package/models/components/cardtransactionstatus.d.ts.map +1 -1
- package/models/components/cardtransactionstatus.js +1 -0
- package/models/components/cardtransactionstatus.js.map +1 -1
- package/models/components/createtransferdestinationcard.d.ts +5 -0
- package/models/components/createtransferdestinationcard.d.ts.map +1 -1
- package/models/components/createtransferdestinationcard.js +2 -0
- package/models/components/createtransferdestinationcard.js.map +1 -1
- package/models/components/depositaccountingestedresponse.d.ts +39 -0
- package/models/components/depositaccountingestedresponse.d.ts.map +1 -0
- package/models/components/depositaccountingestedresponse.js +66 -0
- package/models/components/depositaccountingestedresponse.js.map +1 -0
- package/models/components/fullissuedcard.d.ts +1 -3
- package/models/components/fullissuedcard.d.ts.map +1 -1
- package/models/components/fullissuedcard.js.map +1 -1
- package/models/components/index.d.ts +6 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +6 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +5 -0
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +2 -0
- package/models/components/invoice.js.map +1 -1
- package/models/components/issuedcard.d.ts +1 -3
- package/models/components/issuedcard.d.ts.map +1 -1
- package/models/components/issuedcard.js.map +1 -1
- package/models/components/issuedcardstate.d.ts +2 -8
- package/models/components/issuedcardstate.d.ts.map +1 -1
- package/models/components/issuedcardstate.js +1 -5
- package/models/components/issuedcardstate.js.map +1 -1
- package/models/components/manualtermsofservice.d.ts +1 -1
- package/models/components/manualtermsofserviceupdate.d.ts +1 -1
- package/models/components/patchtransfer.d.ts +5 -2
- package/models/components/patchtransfer.d.ts.map +1 -1
- package/models/components/patchtransfer.js +2 -2
- package/models/components/patchtransfer.js.map +1 -1
- package/models/components/patchwallet.d.ts +4 -7
- package/models/components/patchwallet.d.ts.map +1 -1
- package/models/components/patchwallet.js +4 -4
- package/models/components/patchwallet.js.map +1 -1
- package/models/components/paymentlinkpayoutdetails.d.ts +11 -0
- package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
- package/models/components/paymentlinkpayoutdetails.js +3 -0
- package/models/components/paymentlinkpayoutdetails.js.map +1 -1
- package/models/components/paymentlinkpayoutdetailsupdate.d.ts +11 -0
- package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
- package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
- package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
- package/models/components/paymentmethodscard.d.ts +8 -0
- package/models/components/paymentmethodscard.d.ts.map +1 -1
- package/models/components/paymentmethodscard.js +2 -0
- package/models/components/paymentmethodscard.js.map +1 -1
- package/models/components/payoutdetailserror.d.ts +3 -0
- package/models/components/payoutdetailserror.d.ts.map +1 -1
- package/models/components/payoutdetailserror.js +3 -0
- package/models/components/payoutdetailserror.js.map +1 -1
- package/models/components/pushdeliveryspeed.d.ts +18 -0
- package/models/components/pushdeliveryspeed.d.ts.map +1 -0
- package/models/components/pushdeliveryspeed.js +52 -0
- package/models/components/pushdeliveryspeed.js.map +1 -0
- package/models/components/pushoptions.d.ts +35 -0
- package/models/components/pushoptions.d.ts.map +1 -0
- package/models/components/pushoptions.js +62 -0
- package/models/components/pushoptions.js.map +1 -0
- package/models/components/pushoptionserror.d.ts +19 -0
- package/models/components/pushoptionserror.d.ts.map +1 -0
- package/models/components/pushoptionserror.js +61 -0
- package/models/components/pushoptionserror.js.map +1 -0
- package/models/components/pushoptionsupdate.d.ts +35 -0
- package/models/components/pushoptionsupdate.d.ts.map +1 -0
- package/models/components/pushoptionsupdate.js +62 -0
- package/models/components/pushoptionsupdate.js.map +1 -0
- package/models/components/sourcesystem.d.ts +29 -0
- package/models/components/sourcesystem.d.ts.map +1 -0
- package/models/components/sourcesystem.js +58 -0
- package/models/components/sourcesystem.js.map +1 -0
- package/models/components/termsofservice.d.ts +1 -1
- package/models/components/updatepaymentlinkamountdetails.d.ts +60 -5
- package/models/components/updatepaymentlinkamountdetails.d.ts.map +1 -1
- package/models/components/updatepaymentlinkamountdetails.js +43 -6
- package/models/components/updatepaymentlinkamountdetails.js.map +1 -1
- package/models/errors/depositaccountvalidationerror.d.ts +41 -0
- package/models/errors/depositaccountvalidationerror.d.ts.map +1 -0
- package/models/errors/depositaccountvalidationerror.js +81 -0
- package/models/errors/depositaccountvalidationerror.js.map +1 -0
- 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/operations/createdepositaccount.d.ts +44 -0
- package/models/operations/createdepositaccount.d.ts.map +1 -0
- package/models/operations/createdepositaccount.js +113 -0
- package/models/operations/createdepositaccount.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/linkbankaccount.d.ts +1 -1
- package/models/operations/listissuedcards.d.ts +1 -1
- package/package.json +1 -1
- package/sdk/bankaccounts.d.ts +1 -1
- package/sdk/bankaccounts.js +1 -1
- package/sdk/depositview.d.ts +16 -0
- package/sdk/depositview.d.ts.map +1 -0
- package/sdk/depositview.js +26 -0
- package/sdk/depositview.js.map +1 -0
- 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/src/funcs/bankAccountsLink.ts +1 -1
- package/src/funcs/depositViewCreate.ts +201 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/http.ts +3 -1
- package/src/lib/security.ts +10 -5
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/bankAccountsLink.ts +1 -1
- package/src/mcp-server/tools/depositViewCreate.ts +43 -0
- package/src/models/components/capabilityid.ts +1 -0
- package/src/models/components/cardbrandfees.ts +7 -0
- package/src/models/components/cardtransactiondetails.ts +11 -0
- package/src/models/components/cardtransactionstatus.ts +1 -0
- package/src/models/components/createtransferdestinationcard.ts +7 -0
- package/src/models/components/depositaccountingestedresponse.ts +86 -0
- package/src/models/components/fullissuedcard.ts +1 -3
- package/src/models/components/index.ts +6 -0
- package/src/models/components/invoice.ts +7 -0
- package/src/models/components/issuedcard.ts +1 -3
- package/src/models/components/issuedcardstate.ts +2 -8
- package/src/models/components/manualtermsofservice.ts +1 -1
- package/src/models/components/manualtermsofserviceupdate.ts +1 -1
- package/src/models/components/patchtransfer.ts +7 -4
- package/src/models/components/patchwallet.ts +8 -11
- package/src/models/components/paymentlinkpayoutdetails.ts +18 -0
- package/src/models/components/paymentlinkpayoutdetailsupdate.ts +18 -0
- package/src/models/components/paymentmethodscard.ts +10 -0
- package/src/models/components/payoutdetailserror.ts +10 -0
- package/src/models/components/pushdeliveryspeed.ts +32 -0
- package/src/models/components/pushoptions.ts +72 -0
- package/src/models/components/pushoptionserror.ts +56 -0
- package/src/models/components/pushoptionsupdate.ts +76 -0
- package/src/models/components/sourcesystem.ts +43 -0
- package/src/models/components/termsofservice.ts +1 -1
- package/src/models/components/updatepaymentlinkamountdetails.ts +114 -14
- package/src/models/errors/depositaccountvalidationerror.ts +86 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createdepositaccount.ts +146 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/linkbankaccount.ts +1 -1
- package/src/models/operations/listissuedcards.ts +1 -1
- package/src/sdk/bankaccounts.ts +1 -1
- package/src/sdk/depositview.ts +31 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -7,37 +7,137 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The amount of tax applied to the payment link.
|
|
13
|
+
*/
|
|
14
|
+
export type Tax = {
|
|
15
|
+
/**
|
|
16
|
+
* A 3-letter ISO 4217 currency code.
|
|
17
|
+
*/
|
|
18
|
+
currency?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* A decimal-formatted numerical string that represents up to 9 decimal place precision.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
*
|
|
24
|
+
* For example, $12.987654321 is '12.987654321'.
|
|
25
|
+
*/
|
|
26
|
+
valueDecimal?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The amount of surcharge applied to the payment link.
|
|
31
|
+
*/
|
|
32
|
+
export type Surcharge = {
|
|
33
|
+
/**
|
|
34
|
+
* A 3-letter ISO 4217 currency code.
|
|
35
|
+
*/
|
|
36
|
+
currency?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* A decimal-formatted numerical string that represents up to 9 decimal place precision.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*
|
|
42
|
+
* For example, $12.987654321 is '12.987654321'.
|
|
43
|
+
*/
|
|
44
|
+
valueDecimal?: string | undefined;
|
|
45
|
+
};
|
|
16
46
|
|
|
17
47
|
export type UpdatePaymentLinkAmountDetails = {
|
|
18
48
|
/**
|
|
19
49
|
* The amount of tax applied to the payment link.
|
|
20
50
|
*/
|
|
21
|
-
tax?:
|
|
51
|
+
tax?: Tax | null | undefined;
|
|
22
52
|
/**
|
|
23
53
|
* The amount of surcharge applied to the payment link.
|
|
24
54
|
*/
|
|
25
|
-
surcharge?:
|
|
55
|
+
surcharge?: Surcharge | null | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const Tax$inboundSchema: z.ZodType<Tax, z.ZodTypeDef, unknown> = z
|
|
60
|
+
.object({
|
|
61
|
+
currency: types.optional(types.string()),
|
|
62
|
+
valueDecimal: types.optional(types.string()),
|
|
63
|
+
});
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type Tax$Outbound = {
|
|
66
|
+
currency?: string | undefined;
|
|
67
|
+
valueDecimal?: string | undefined;
|
|
26
68
|
};
|
|
27
69
|
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const Tax$outboundSchema: z.ZodType<Tax$Outbound, z.ZodTypeDef, Tax> = z
|
|
72
|
+
.object({
|
|
73
|
+
currency: z.string().optional(),
|
|
74
|
+
valueDecimal: z.string().optional(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function taxToJSON(tax: Tax): string {
|
|
78
|
+
return JSON.stringify(Tax$outboundSchema.parse(tax));
|
|
79
|
+
}
|
|
80
|
+
export function taxFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<Tax, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => Tax$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'Tax' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const Surcharge$inboundSchema: z.ZodType<
|
|
92
|
+
Surcharge,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
currency: types.optional(types.string()),
|
|
97
|
+
valueDecimal: types.optional(types.string()),
|
|
98
|
+
});
|
|
99
|
+
/** @internal */
|
|
100
|
+
export type Surcharge$Outbound = {
|
|
101
|
+
currency?: string | undefined;
|
|
102
|
+
valueDecimal?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const Surcharge$outboundSchema: z.ZodType<
|
|
107
|
+
Surcharge$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
Surcharge
|
|
110
|
+
> = z.object({
|
|
111
|
+
currency: z.string().optional(),
|
|
112
|
+
valueDecimal: z.string().optional(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export function surchargeToJSON(surcharge: Surcharge): string {
|
|
116
|
+
return JSON.stringify(Surcharge$outboundSchema.parse(surcharge));
|
|
117
|
+
}
|
|
118
|
+
export function surchargeFromJSON(
|
|
119
|
+
jsonString: string,
|
|
120
|
+
): SafeParseResult<Surcharge, SDKValidationError> {
|
|
121
|
+
return safeParse(
|
|
122
|
+
jsonString,
|
|
123
|
+
(x) => Surcharge$inboundSchema.parse(JSON.parse(x)),
|
|
124
|
+
`Failed to parse 'Surcharge' from JSON`,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
28
128
|
/** @internal */
|
|
29
129
|
export const UpdatePaymentLinkAmountDetails$inboundSchema: z.ZodType<
|
|
30
130
|
UpdatePaymentLinkAmountDetails,
|
|
31
131
|
z.ZodTypeDef,
|
|
32
132
|
unknown
|
|
33
133
|
> = z.object({
|
|
34
|
-
tax:
|
|
35
|
-
surcharge:
|
|
134
|
+
tax: z.nullable(z.lazy(() => Tax$inboundSchema)).optional(),
|
|
135
|
+
surcharge: z.nullable(z.lazy(() => Surcharge$inboundSchema)).optional(),
|
|
36
136
|
});
|
|
37
137
|
/** @internal */
|
|
38
138
|
export type UpdatePaymentLinkAmountDetails$Outbound = {
|
|
39
|
-
tax?:
|
|
40
|
-
surcharge?:
|
|
139
|
+
tax?: Tax$Outbound | null | undefined;
|
|
140
|
+
surcharge?: Surcharge$Outbound | null | undefined;
|
|
41
141
|
};
|
|
42
142
|
|
|
43
143
|
/** @internal */
|
|
@@ -46,8 +146,8 @@ export const UpdatePaymentLinkAmountDetails$outboundSchema: z.ZodType<
|
|
|
46
146
|
z.ZodTypeDef,
|
|
47
147
|
UpdatePaymentLinkAmountDetails
|
|
48
148
|
> = z.object({
|
|
49
|
-
tax:
|
|
50
|
-
surcharge:
|
|
149
|
+
tax: z.nullable(z.lazy(() => Tax$outboundSchema)).optional(),
|
|
150
|
+
surcharge: z.nullable(z.lazy(() => Surcharge$outboundSchema)).optional(),
|
|
51
151
|
});
|
|
52
152
|
|
|
53
153
|
export function updatePaymentLinkAmountDetailsToJSON(
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as types from "../../types/primitives.js";
|
|
7
|
+
import { MoovError } from "./mooverror.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Descriptions of any field validations that failed while parsing the deposit account payload.
|
|
11
|
+
*/
|
|
12
|
+
export type DepositAccountValidationErrorData = {
|
|
13
|
+
/**
|
|
14
|
+
* An error describing why the X-Source-System header was missing or unsupported.
|
|
15
|
+
*/
|
|
16
|
+
sourceSystem?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* An error describing why the request body could not be parsed for the given source system.
|
|
19
|
+
*/
|
|
20
|
+
body?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Descriptions of any field validations that failed while parsing the deposit account payload.
|
|
25
|
+
*/
|
|
26
|
+
export class DepositAccountValidationError extends MoovError {
|
|
27
|
+
/**
|
|
28
|
+
* An error describing why the X-Source-System header was missing or unsupported.
|
|
29
|
+
*/
|
|
30
|
+
sourceSystem?: string | undefined;
|
|
31
|
+
|
|
32
|
+
/** The original data that was passed to this error instance. */
|
|
33
|
+
data$: DepositAccountValidationErrorData;
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
err: DepositAccountValidationErrorData,
|
|
37
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
38
|
+
) {
|
|
39
|
+
const message = "message" in err && typeof err.message === "string"
|
|
40
|
+
? err.message
|
|
41
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
42
|
+
super(message, httpMeta);
|
|
43
|
+
this.data$ = err;
|
|
44
|
+
if (err.sourceSystem != null) this.sourceSystem = err.sourceSystem;
|
|
45
|
+
|
|
46
|
+
this.name = "DepositAccountValidationError";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const DepositAccountValidationError$inboundSchema: z.ZodType<
|
|
52
|
+
DepositAccountValidationError,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
sourceSystem: types.optional(types.string()),
|
|
57
|
+
body: types.optional(types.string()),
|
|
58
|
+
request$: z.instanceof(Request),
|
|
59
|
+
response$: z.instanceof(Response),
|
|
60
|
+
body$: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((v) => {
|
|
63
|
+
return new DepositAccountValidationError(v, {
|
|
64
|
+
request: v.request$,
|
|
65
|
+
response: v.response$,
|
|
66
|
+
body: v.body$,
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type DepositAccountValidationError$Outbound = {
|
|
72
|
+
sourceSystem?: string | undefined;
|
|
73
|
+
body?: string | undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const DepositAccountValidationError$outboundSchema: z.ZodType<
|
|
78
|
+
DepositAccountValidationError$Outbound,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
DepositAccountValidationError
|
|
81
|
+
> = z.instanceof(DepositAccountValidationError)
|
|
82
|
+
.transform(v => v.data$)
|
|
83
|
+
.pipe(z.object({
|
|
84
|
+
sourceSystem: z.string().optional(),
|
|
85
|
+
body: z.string().optional(),
|
|
86
|
+
}));
|
|
@@ -21,6 +21,7 @@ export * from "./createsweepconfigerror.js";
|
|
|
21
21
|
export * from "./createticketerror.js";
|
|
22
22
|
export * from "./createwalletvalidationerror.js";
|
|
23
23
|
export * from "./createwebhookvalidationerror.js";
|
|
24
|
+
export * from "./depositaccountvalidationerror.js";
|
|
24
25
|
export * from "./duplicatecarderror.js";
|
|
25
26
|
export * from "./feeplanagreementerror.js";
|
|
26
27
|
export * from "./fileuploadvalidationerror.js";
|
|
@@ -0,0 +1,146 @@
|
|
|
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 types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type CreateDepositAccountRequest = {
|
|
14
|
+
accountID: string;
|
|
15
|
+
/**
|
|
16
|
+
* Identifies the core banking source system that produced the request body.
|
|
17
|
+
*/
|
|
18
|
+
xSourceSystem: components.SourceSystem;
|
|
19
|
+
requestBody: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type CreateDepositAccountResponse = {
|
|
23
|
+
headers: { [k: string]: Array<string> };
|
|
24
|
+
result: components.DepositAccountIngestedResponse;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const CreateDepositAccountRequest$inboundSchema: z.ZodType<
|
|
29
|
+
CreateDepositAccountRequest,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
accountID: types.string(),
|
|
34
|
+
"X-Source-System": components.SourceSystem$inboundSchema,
|
|
35
|
+
RequestBody: z.union([
|
|
36
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
37
|
+
z.instanceof(Blob),
|
|
38
|
+
z.instanceof(ArrayBuffer),
|
|
39
|
+
z.instanceof(Uint8Array),
|
|
40
|
+
]),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"X-Source-System": "xSourceSystem",
|
|
44
|
+
"RequestBody": "requestBody",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CreateDepositAccountRequest$Outbound = {
|
|
49
|
+
accountID: string;
|
|
50
|
+
"X-Source-System": string;
|
|
51
|
+
RequestBody: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const CreateDepositAccountRequest$outboundSchema: z.ZodType<
|
|
56
|
+
CreateDepositAccountRequest$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
CreateDepositAccountRequest
|
|
59
|
+
> = z.object({
|
|
60
|
+
accountID: z.string(),
|
|
61
|
+
xSourceSystem: components.SourceSystem$outboundSchema,
|
|
62
|
+
requestBody: z.union([
|
|
63
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
64
|
+
z.instanceof(Blob),
|
|
65
|
+
z.instanceof(ArrayBuffer),
|
|
66
|
+
z.instanceof(Uint8Array),
|
|
67
|
+
]),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
xSourceSystem: "X-Source-System",
|
|
71
|
+
requestBody: "RequestBody",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function createDepositAccountRequestToJSON(
|
|
76
|
+
createDepositAccountRequest: CreateDepositAccountRequest,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
CreateDepositAccountRequest$outboundSchema.parse(
|
|
80
|
+
createDepositAccountRequest,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
export function createDepositAccountRequestFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<CreateDepositAccountRequest, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => CreateDepositAccountRequest$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'CreateDepositAccountRequest' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const CreateDepositAccountResponse$inboundSchema: z.ZodType<
|
|
96
|
+
CreateDepositAccountResponse,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
unknown
|
|
99
|
+
> = z.object({
|
|
100
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
101
|
+
Result: components.DepositAccountIngestedResponse$inboundSchema,
|
|
102
|
+
}).transform((v) => {
|
|
103
|
+
return remap$(v, {
|
|
104
|
+
"Headers": "headers",
|
|
105
|
+
"Result": "result",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type CreateDepositAccountResponse$Outbound = {
|
|
110
|
+
Headers: { [k: string]: Array<string> };
|
|
111
|
+
Result: components.DepositAccountIngestedResponse$Outbound;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const CreateDepositAccountResponse$outboundSchema: z.ZodType<
|
|
116
|
+
CreateDepositAccountResponse$Outbound,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
CreateDepositAccountResponse
|
|
119
|
+
> = z.object({
|
|
120
|
+
headers: z.record(z.array(z.string())),
|
|
121
|
+
result: components.DepositAccountIngestedResponse$outboundSchema,
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
headers: "Headers",
|
|
125
|
+
result: "Result",
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export function createDepositAccountResponseToJSON(
|
|
130
|
+
createDepositAccountResponse: CreateDepositAccountResponse,
|
|
131
|
+
): string {
|
|
132
|
+
return JSON.stringify(
|
|
133
|
+
CreateDepositAccountResponse$outboundSchema.parse(
|
|
134
|
+
createDepositAccountResponse,
|
|
135
|
+
),
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
export function createDepositAccountResponseFromJSON(
|
|
139
|
+
jsonString: string,
|
|
140
|
+
): SafeParseResult<CreateDepositAccountResponse, SDKValidationError> {
|
|
141
|
+
return safeParse(
|
|
142
|
+
jsonString,
|
|
143
|
+
(x) => CreateDepositAccountResponse$inboundSchema.parse(JSON.parse(x)),
|
|
144
|
+
`Failed to parse 'CreateDepositAccountResponse' from JSON`,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
@@ -14,6 +14,7 @@ export * from "./createaccount.js";
|
|
|
14
14
|
export * from "./createapplepaysession.js";
|
|
15
15
|
export * from "./createbrand.js";
|
|
16
16
|
export * from "./createcancellation.js";
|
|
17
|
+
export * from "./createdepositaccount.js";
|
|
17
18
|
export * from "./createfeeplanagreements.js";
|
|
18
19
|
export * from "./createinvoice.js";
|
|
19
20
|
export * from "./createinvoicepayment.js";
|
|
@@ -17,7 +17,7 @@ export type LinkBankAccountRequest = {
|
|
|
17
17
|
* @remarks
|
|
18
18
|
*
|
|
19
19
|
* When this header is set to `payment-method`, the response will include any payment methods that were created for the newly
|
|
20
|
-
* linked
|
|
20
|
+
* linked bank account in the `paymentMethods` field. Otherwise, the `paymentMethods` field will be omitted from the response.
|
|
21
21
|
*/
|
|
22
22
|
xWaitFor?: components.BankAccountWaitFor | undefined;
|
|
23
23
|
accountID: string;
|
|
@@ -18,7 +18,7 @@ export type ListIssuedCardsRequest = {
|
|
|
18
18
|
skip?: number | undefined;
|
|
19
19
|
count?: number | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* Optional, comma-separated states to filter the Moov list issued cards response. For example `active,
|
|
21
|
+
* Optional, comma-separated states to filter the Moov list issued cards response. For example `active,closed`
|
|
22
22
|
*/
|
|
23
23
|
states?: Array<components.IssuedCardState> | undefined;
|
|
24
24
|
};
|
package/src/sdk/bankaccounts.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class BankAccounts extends ClientSDK {
|
|
|
20
20
|
* Link a bank account to an existing Moov account. Read our [bank accounts guide](https://docs.moov.io/guides/sources/bank-accounts/) to learn more.
|
|
21
21
|
*
|
|
22
22
|
* It is strongly recommended that callers include the `X-Wait-For` header, set to `payment-method`, if the newly linked
|
|
23
|
-
* bank
|
|
23
|
+
* bank account is intended to be used right away. If this header is not included, the caller will need to poll the [List Payment
|
|
24
24
|
* Methods](https://docs.moov.io/api/sources/payment-methods/list/)
|
|
25
25
|
* endpoint to wait for the new payment methods to be available for use.
|
|
26
26
|
*
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { depositViewCreate } from "../funcs/depositViewCreate.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class DepositView extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Ingest a deposit account into the deposit view from a core banking source system.
|
|
13
|
+
*
|
|
14
|
+
* The request body is a raw byte payload whose format depends on the core banking
|
|
15
|
+
* system that produced it. Set the `X-Source-System` header to identify that system
|
|
16
|
+
* so the payload can be parsed correctly.
|
|
17
|
+
*
|
|
18
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
19
|
+
* you'll need to specify the `/accounts/{accountID}/profile.write` scope.
|
|
20
|
+
*/
|
|
21
|
+
async create(
|
|
22
|
+
request: operations.CreateDepositAccountRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<operations.CreateDepositAccountResponse> {
|
|
25
|
+
return unwrapAsync(depositViewCreate(
|
|
26
|
+
this,
|
|
27
|
+
request,
|
|
28
|
+
options,
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { Branding } from "./branding.js";
|
|
|
14
14
|
import { Capabilities } from "./capabilities.js";
|
|
15
15
|
import { CardIssuing } from "./cardissuing.js";
|
|
16
16
|
import { Cards } from "./cards.js";
|
|
17
|
+
import { DepositView } from "./depositview.js";
|
|
17
18
|
import { Disputes } from "./disputes.js";
|
|
18
19
|
import { EndToEndEncryption } from "./endtoendencryption.js";
|
|
19
20
|
import { EnrichedAddress } from "./enrichedaddress.js";
|
|
@@ -261,4 +262,9 @@ export class Moov extends ClientSDK {
|
|
|
261
262
|
this._options,
|
|
262
263
|
));
|
|
263
264
|
}
|
|
265
|
+
|
|
266
|
+
private _depositView?: DepositView;
|
|
267
|
+
get depositView(): DepositView {
|
|
268
|
+
return (this._depositView ??= new DepositView(this._options));
|
|
269
|
+
}
|
|
264
270
|
}
|