@moovio/sdk 0.5.2 → 0.5.4
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/bin/mcp-server.js +105 -92
- package/bin/mcp-server.js.map +23 -23
- package/docs/sdks/feeplans/README.md +8 -0
- package/funcs/feePlansListFeePlanAgreements.js +2 -0
- package/funcs/feePlansListFeePlanAgreements.js.map +1 -1
- package/funcs/feePlansListPartnerPricingAgreements.js +2 -0
- package/funcs/feePlansListPartnerPricingAgreements.js.map +1 -1
- package/funcs/walletTransactionsList.js +1 -0
- package/funcs/walletTransactionsList.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/achtransactiondetails.d.ts +2 -0
- package/models/components/achtransactiondetails.d.ts.map +1 -1
- package/models/components/achtransactiondetails.js +3 -0
- package/models/components/achtransactiondetails.js.map +1 -1
- package/models/components/feecategory.d.ts +15 -12
- package/models/components/feecategory.d.ts.map +1 -1
- package/models/components/feecategory.js +5 -4
- package/models/components/feecategory.js.map +1 -1
- package/models/components/governmentid.d.ts +30 -30
- package/models/components/governmentid.d.ts.map +1 -1
- package/models/components/governmentid.js +35 -38
- package/models/components/governmentid.js.map +1 -1
- package/models/components/governmentiderror.d.ts +30 -30
- package/models/components/governmentiderror.d.ts.map +1 -1
- package/models/components/governmentiderror.js +38 -35
- package/models/components/governmentiderror.js.map +1 -1
- package/models/components/onboardinginvite.d.ts +6 -1
- package/models/components/onboardinginvite.d.ts.map +1 -1
- package/models/components/onboardinginvite.js +3 -10
- package/models/components/onboardinginvite.js.map +1 -1
- package/models/components/patchsweepconfig.d.ts +2 -2
- package/models/components/patchsweepconfig.d.ts.map +1 -1
- package/models/components/patchsweepconfig.js +2 -2
- package/models/components/patchsweepconfig.js.map +1 -1
- package/models/components/taxid.d.ts +15 -15
- package/models/components/taxid.d.ts.map +1 -1
- package/models/components/taxid.js +18 -20
- package/models/components/taxid.js.map +1 -1
- package/models/components/taxidupdate.d.ts +15 -15
- package/models/components/taxidupdate.d.ts.map +1 -1
- package/models/components/taxidupdate.js +20 -18
- package/models/components/taxidupdate.js.map +1 -1
- package/models/components/transfer.d.ts +4 -4
- package/models/components/transfer.d.ts.map +1 -1
- package/models/components/transfer.js +4 -4
- package/models/components/transfer.js.map +1 -1
- package/models/components/transferdestination.d.ts +5 -1
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +3 -2
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/transfersource.d.ts +10 -1
- package/models/components/transfersource.d.ts.map +1 -1
- package/models/components/transfersource.js +5 -2
- package/models/components/transfersource.js.map +1 -1
- package/models/errors/transfer.d.ts +6 -6
- package/models/errors/transfer.d.ts.map +1 -1
- package/models/errors/transfer.js +6 -8
- package/models/errors/transfer.js.map +1 -1
- package/models/operations/listfeeplanagreements.d.ts +4 -0
- package/models/operations/listfeeplanagreements.d.ts.map +1 -1
- package/models/operations/listfeeplanagreements.js +4 -0
- package/models/operations/listfeeplanagreements.js.map +1 -1
- package/models/operations/listpartnerpricingagreements.d.ts +4 -0
- package/models/operations/listpartnerpricingagreements.d.ts.map +1 -1
- package/models/operations/listpartnerpricingagreements.js +4 -0
- package/models/operations/listpartnerpricingagreements.js.map +1 -1
- package/models/operations/listwallettransactions.d.ts +5 -0
- package/models/operations/listwallettransactions.d.ts.map +1 -1
- package/models/operations/listwallettransactions.js +4 -0
- package/models/operations/listwallettransactions.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/feePlansListFeePlanAgreements.ts +2 -0
- package/src/funcs/feePlansListPartnerPricingAgreements.ts +2 -0
- package/src/funcs/walletTransactionsList.ts +1 -0
- 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/achtransactiondetails.ts +5 -0
- package/src/models/components/feecategory.ts +5 -4
- package/src/models/components/governmentid.ts +76 -58
- package/src/models/components/governmentiderror.ts +58 -78
- package/src/models/components/onboardinginvite.ts +9 -11
- package/src/models/components/patchsweepconfig.ts +4 -4
- package/src/models/components/taxid.ts +33 -27
- package/src/models/components/taxidupdate.ts +27 -33
- package/src/models/components/transfer.ts +8 -8
- package/src/models/components/transferdestination.ts +11 -3
- package/src/models/components/transfersource.ts +18 -3
- package/src/models/errors/transfer.ts +12 -12
- package/src/models/operations/listfeeplanagreements.ts +8 -0
- package/src/models/operations/listpartnerpricingagreements.ts +8 -0
- package/src/models/operations/listwallettransactions.ts +9 -0
|
@@ -7,132 +7,112 @@ 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
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type Ssn = {
|
|
11
11
|
full?: string | undefined;
|
|
12
12
|
lastFour?: string | undefined;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export type
|
|
15
|
+
export type Itin = {
|
|
16
16
|
full?: string | undefined;
|
|
17
17
|
lastFour?: string | undefined;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export type GovernmentIDError = {
|
|
21
|
-
ssn?:
|
|
22
|
-
itin?:
|
|
21
|
+
ssn?: Ssn | undefined;
|
|
22
|
+
itin?: Itin | undefined;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
/** @internal */
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
full: z.string().optional(),
|
|
32
|
-
lastFour: z.string().optional(),
|
|
33
|
-
});
|
|
26
|
+
export const Ssn$inboundSchema: z.ZodType<Ssn, z.ZodTypeDef, unknown> = z
|
|
27
|
+
.object({
|
|
28
|
+
full: z.string().optional(),
|
|
29
|
+
lastFour: z.string().optional(),
|
|
30
|
+
});
|
|
34
31
|
|
|
35
32
|
/** @internal */
|
|
36
|
-
export type
|
|
33
|
+
export type Ssn$Outbound = {
|
|
37
34
|
full?: string | undefined;
|
|
38
35
|
lastFour?: string | undefined;
|
|
39
36
|
};
|
|
40
37
|
|
|
41
38
|
/** @internal */
|
|
42
|
-
export const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
full: z.string().optional(),
|
|
48
|
-
lastFour: z.string().optional(),
|
|
49
|
-
});
|
|
39
|
+
export const Ssn$outboundSchema: z.ZodType<Ssn$Outbound, z.ZodTypeDef, Ssn> = z
|
|
40
|
+
.object({
|
|
41
|
+
full: z.string().optional(),
|
|
42
|
+
lastFour: z.string().optional(),
|
|
43
|
+
});
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
46
|
* @internal
|
|
53
47
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
48
|
*/
|
|
55
|
-
export namespace
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const inboundSchema =
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export const outboundSchema =
|
|
60
|
-
/** @deprecated use `
|
|
61
|
-
export type Outbound =
|
|
49
|
+
export namespace Ssn$ {
|
|
50
|
+
/** @deprecated use `Ssn$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = Ssn$inboundSchema;
|
|
52
|
+
/** @deprecated use `Ssn$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = Ssn$outboundSchema;
|
|
54
|
+
/** @deprecated use `Ssn$Outbound` instead. */
|
|
55
|
+
export type Outbound = Ssn$Outbound;
|
|
62
56
|
}
|
|
63
57
|
|
|
64
|
-
export function
|
|
65
|
-
|
|
66
|
-
): string {
|
|
67
|
-
return JSON.stringify(
|
|
68
|
-
GovernmentIDErrorSsn$outboundSchema.parse(governmentIDErrorSsn),
|
|
69
|
-
);
|
|
58
|
+
export function ssnToJSON(ssn: Ssn): string {
|
|
59
|
+
return JSON.stringify(Ssn$outboundSchema.parse(ssn));
|
|
70
60
|
}
|
|
71
61
|
|
|
72
|
-
export function
|
|
62
|
+
export function ssnFromJSON(
|
|
73
63
|
jsonString: string,
|
|
74
|
-
): SafeParseResult<
|
|
64
|
+
): SafeParseResult<Ssn, SDKValidationError> {
|
|
75
65
|
return safeParse(
|
|
76
66
|
jsonString,
|
|
77
|
-
(x) =>
|
|
78
|
-
`Failed to parse '
|
|
67
|
+
(x) => Ssn$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'Ssn' from JSON`,
|
|
79
69
|
);
|
|
80
70
|
}
|
|
81
71
|
|
|
82
72
|
/** @internal */
|
|
83
|
-
export const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
full: z.string().optional(),
|
|
89
|
-
lastFour: z.string().optional(),
|
|
90
|
-
});
|
|
73
|
+
export const Itin$inboundSchema: z.ZodType<Itin, z.ZodTypeDef, unknown> = z
|
|
74
|
+
.object({
|
|
75
|
+
full: z.string().optional(),
|
|
76
|
+
lastFour: z.string().optional(),
|
|
77
|
+
});
|
|
91
78
|
|
|
92
79
|
/** @internal */
|
|
93
|
-
export type
|
|
80
|
+
export type Itin$Outbound = {
|
|
94
81
|
full?: string | undefined;
|
|
95
82
|
lastFour?: string | undefined;
|
|
96
83
|
};
|
|
97
84
|
|
|
98
85
|
/** @internal */
|
|
99
|
-
export const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
full: z.string().optional(),
|
|
105
|
-
lastFour: z.string().optional(),
|
|
106
|
-
});
|
|
86
|
+
export const Itin$outboundSchema: z.ZodType<Itin$Outbound, z.ZodTypeDef, Itin> =
|
|
87
|
+
z.object({
|
|
88
|
+
full: z.string().optional(),
|
|
89
|
+
lastFour: z.string().optional(),
|
|
90
|
+
});
|
|
107
91
|
|
|
108
92
|
/**
|
|
109
93
|
* @internal
|
|
110
94
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
111
95
|
*/
|
|
112
|
-
export namespace
|
|
113
|
-
/** @deprecated use `
|
|
114
|
-
export const inboundSchema =
|
|
115
|
-
/** @deprecated use `
|
|
116
|
-
export const outboundSchema =
|
|
117
|
-
/** @deprecated use `
|
|
118
|
-
export type Outbound =
|
|
96
|
+
export namespace Itin$ {
|
|
97
|
+
/** @deprecated use `Itin$inboundSchema` instead. */
|
|
98
|
+
export const inboundSchema = Itin$inboundSchema;
|
|
99
|
+
/** @deprecated use `Itin$outboundSchema` instead. */
|
|
100
|
+
export const outboundSchema = Itin$outboundSchema;
|
|
101
|
+
/** @deprecated use `Itin$Outbound` instead. */
|
|
102
|
+
export type Outbound = Itin$Outbound;
|
|
119
103
|
}
|
|
120
104
|
|
|
121
|
-
export function
|
|
122
|
-
|
|
123
|
-
): string {
|
|
124
|
-
return JSON.stringify(
|
|
125
|
-
GovernmentIDErrorItin$outboundSchema.parse(governmentIDErrorItin),
|
|
126
|
-
);
|
|
105
|
+
export function itinToJSON(itin: Itin): string {
|
|
106
|
+
return JSON.stringify(Itin$outboundSchema.parse(itin));
|
|
127
107
|
}
|
|
128
108
|
|
|
129
|
-
export function
|
|
109
|
+
export function itinFromJSON(
|
|
130
110
|
jsonString: string,
|
|
131
|
-
): SafeParseResult<
|
|
111
|
+
): SafeParseResult<Itin, SDKValidationError> {
|
|
132
112
|
return safeParse(
|
|
133
113
|
jsonString,
|
|
134
|
-
(x) =>
|
|
135
|
-
`Failed to parse '
|
|
114
|
+
(x) => Itin$inboundSchema.parse(JSON.parse(x)),
|
|
115
|
+
`Failed to parse 'Itin' from JSON`,
|
|
136
116
|
);
|
|
137
117
|
}
|
|
138
118
|
|
|
@@ -142,14 +122,14 @@ export const GovernmentIDError$inboundSchema: z.ZodType<
|
|
|
142
122
|
z.ZodTypeDef,
|
|
143
123
|
unknown
|
|
144
124
|
> = z.object({
|
|
145
|
-
ssn: z.lazy(() =>
|
|
146
|
-
itin: z.lazy(() =>
|
|
125
|
+
ssn: z.lazy(() => Ssn$inboundSchema).optional(),
|
|
126
|
+
itin: z.lazy(() => Itin$inboundSchema).optional(),
|
|
147
127
|
});
|
|
148
128
|
|
|
149
129
|
/** @internal */
|
|
150
130
|
export type GovernmentIDError$Outbound = {
|
|
151
|
-
ssn?:
|
|
152
|
-
itin?:
|
|
131
|
+
ssn?: Ssn$Outbound | undefined;
|
|
132
|
+
itin?: Itin$Outbound | undefined;
|
|
153
133
|
};
|
|
154
134
|
|
|
155
135
|
/** @internal */
|
|
@@ -158,8 +138,8 @@ export const GovernmentIDError$outboundSchema: z.ZodType<
|
|
|
158
138
|
z.ZodTypeDef,
|
|
159
139
|
GovernmentIDError
|
|
160
140
|
> = z.object({
|
|
161
|
-
ssn: z.lazy(() =>
|
|
162
|
-
itin: z.lazy(() =>
|
|
141
|
+
ssn: z.lazy(() => Ssn$outboundSchema).optional(),
|
|
142
|
+
itin: z.lazy(() => Itin$outboundSchema).optional(),
|
|
163
143
|
});
|
|
164
144
|
|
|
165
145
|
/**
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -65,6 +64,10 @@ export type OnboardingInvite = {
|
|
|
65
64
|
* List of fee plan codes to assign the account created by the invitee.
|
|
66
65
|
*/
|
|
67
66
|
feePlanCodes: Array<string>;
|
|
67
|
+
/**
|
|
68
|
+
* The account ID of the account that redeemed the invite.
|
|
69
|
+
*/
|
|
70
|
+
redeemedAccountID?: string | undefined;
|
|
68
71
|
prefill?: CreateAccount | undefined;
|
|
69
72
|
/**
|
|
70
73
|
* The account that created the onboarding invite.
|
|
@@ -84,10 +87,11 @@ export const OnboardingInvite$inboundSchema: z.ZodType<
|
|
|
84
87
|
code: z.string(),
|
|
85
88
|
link: z.string(),
|
|
86
89
|
returnURL: z.string().optional(),
|
|
87
|
-
|
|
90
|
+
termsOfServiceURL: z.string().optional(),
|
|
88
91
|
scopes: z.array(ApplicationScope$inboundSchema),
|
|
89
92
|
capabilities: z.array(CapabilityID$inboundSchema),
|
|
90
93
|
feePlanCodes: z.array(z.string()),
|
|
94
|
+
redeemedAccountID: z.string().optional(),
|
|
91
95
|
prefill: CreateAccount$inboundSchema.optional(),
|
|
92
96
|
partner: OnboardingPartnerAccount$inboundSchema.optional(),
|
|
93
97
|
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -95,10 +99,6 @@ export const OnboardingInvite$inboundSchema: z.ZodType<
|
|
|
95
99
|
.optional(),
|
|
96
100
|
redeemedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
97
101
|
.optional(),
|
|
98
|
-
}).transform((v) => {
|
|
99
|
-
return remap$(v, {
|
|
100
|
-
"TermsOfServiceURL": "termsOfServiceURL",
|
|
101
|
-
});
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
/** @internal */
|
|
@@ -106,10 +106,11 @@ export type OnboardingInvite$Outbound = {
|
|
|
106
106
|
code: string;
|
|
107
107
|
link: string;
|
|
108
108
|
returnURL?: string | undefined;
|
|
109
|
-
|
|
109
|
+
termsOfServiceURL?: string | undefined;
|
|
110
110
|
scopes: Array<string>;
|
|
111
111
|
capabilities: Array<string>;
|
|
112
112
|
feePlanCodes: Array<string>;
|
|
113
|
+
redeemedAccountID?: string | undefined;
|
|
113
114
|
prefill?: CreateAccount$Outbound | undefined;
|
|
114
115
|
partner?: OnboardingPartnerAccount$Outbound | undefined;
|
|
115
116
|
createdOn: string;
|
|
@@ -130,15 +131,12 @@ export const OnboardingInvite$outboundSchema: z.ZodType<
|
|
|
130
131
|
scopes: z.array(ApplicationScope$outboundSchema),
|
|
131
132
|
capabilities: z.array(CapabilityID$outboundSchema),
|
|
132
133
|
feePlanCodes: z.array(z.string()),
|
|
134
|
+
redeemedAccountID: z.string().optional(),
|
|
133
135
|
prefill: CreateAccount$outboundSchema.optional(),
|
|
134
136
|
partner: OnboardingPartnerAccount$outboundSchema.optional(),
|
|
135
137
|
createdOn: z.date().transform(v => v.toISOString()),
|
|
136
138
|
revokedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
137
139
|
redeemedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
138
|
-
}).transform((v) => {
|
|
139
|
-
return remap$(v, {
|
|
140
|
-
termsOfServiceURL: "TermsOfServiceURL",
|
|
141
|
-
});
|
|
142
140
|
});
|
|
143
141
|
|
|
144
142
|
/**
|
|
@@ -31,7 +31,7 @@ export type PatchSweepConfig = {
|
|
|
31
31
|
pushPaymentMethodID?: PushPaymentMethodId2 | string | null | undefined;
|
|
32
32
|
pullPaymentMethodID?: PullPaymentMethodId2 | string | null | undefined;
|
|
33
33
|
statementDescriptor?: StatementDescriptor2 | string | null | undefined;
|
|
34
|
-
minimumBalance?: string | undefined;
|
|
34
|
+
minimumBalance?: string | null | undefined;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/** @internal */
|
|
@@ -363,7 +363,7 @@ export const PatchSweepConfig$inboundSchema: z.ZodType<
|
|
|
363
363
|
statementDescriptor: z.nullable(
|
|
364
364
|
z.union([z.lazy(() => StatementDescriptor2$inboundSchema), z.string()]),
|
|
365
365
|
).optional(),
|
|
366
|
-
minimumBalance: z.string().optional(),
|
|
366
|
+
minimumBalance: z.nullable(z.string()).optional(),
|
|
367
367
|
});
|
|
368
368
|
|
|
369
369
|
/** @internal */
|
|
@@ -384,7 +384,7 @@ export type PatchSweepConfig$Outbound = {
|
|
|
384
384
|
| string
|
|
385
385
|
| null
|
|
386
386
|
| undefined;
|
|
387
|
-
minimumBalance?: string | undefined;
|
|
387
|
+
minimumBalance?: string | null | undefined;
|
|
388
388
|
};
|
|
389
389
|
|
|
390
390
|
/** @internal */
|
|
@@ -403,7 +403,7 @@ export const PatchSweepConfig$outboundSchema: z.ZodType<
|
|
|
403
403
|
statementDescriptor: z.nullable(
|
|
404
404
|
z.union([z.lazy(() => StatementDescriptor2$outboundSchema), z.string()]),
|
|
405
405
|
).optional(),
|
|
406
|
-
minimumBalance: z.string().optional(),
|
|
406
|
+
minimumBalance: z.nullable(z.string()).optional(),
|
|
407
407
|
});
|
|
408
408
|
|
|
409
409
|
/**
|
|
@@ -7,7 +7,7 @@ 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
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type TaxIDEin = {
|
|
11
11
|
number: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,62 +15,68 @@ export type Ein = {
|
|
|
15
15
|
* An EIN (employer identification number) for the business. For sole proprietors, an SSN can be used as the EIN.
|
|
16
16
|
*/
|
|
17
17
|
export type TaxID = {
|
|
18
|
-
ein:
|
|
18
|
+
ein: TaxIDEin;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
export const TaxIDEin$inboundSchema: z.ZodType<
|
|
23
|
+
TaxIDEin,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
number: z.string(),
|
|
28
|
+
});
|
|
26
29
|
|
|
27
30
|
/** @internal */
|
|
28
|
-
export type
|
|
31
|
+
export type TaxIDEin$Outbound = {
|
|
29
32
|
number: string;
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
/** @internal */
|
|
33
|
-
export const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
export const TaxIDEin$outboundSchema: z.ZodType<
|
|
37
|
+
TaxIDEin$Outbound,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
TaxIDEin
|
|
40
|
+
> = z.object({
|
|
41
|
+
number: z.string(),
|
|
42
|
+
});
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* @internal
|
|
40
46
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
47
|
*/
|
|
42
|
-
export namespace
|
|
43
|
-
/** @deprecated use `
|
|
44
|
-
export const inboundSchema =
|
|
45
|
-
/** @deprecated use `
|
|
46
|
-
export const outboundSchema =
|
|
47
|
-
/** @deprecated use `
|
|
48
|
-
export type Outbound =
|
|
48
|
+
export namespace TaxIDEin$ {
|
|
49
|
+
/** @deprecated use `TaxIDEin$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = TaxIDEin$inboundSchema;
|
|
51
|
+
/** @deprecated use `TaxIDEin$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = TaxIDEin$outboundSchema;
|
|
53
|
+
/** @deprecated use `TaxIDEin$Outbound` instead. */
|
|
54
|
+
export type Outbound = TaxIDEin$Outbound;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
export function
|
|
52
|
-
return JSON.stringify(
|
|
57
|
+
export function taxIDEinToJSON(taxIDEin: TaxIDEin): string {
|
|
58
|
+
return JSON.stringify(TaxIDEin$outboundSchema.parse(taxIDEin));
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export function
|
|
61
|
+
export function taxIDEinFromJSON(
|
|
56
62
|
jsonString: string,
|
|
57
|
-
): SafeParseResult<
|
|
63
|
+
): SafeParseResult<TaxIDEin, SDKValidationError> {
|
|
58
64
|
return safeParse(
|
|
59
65
|
jsonString,
|
|
60
|
-
(x) =>
|
|
61
|
-
`Failed to parse '
|
|
66
|
+
(x) => TaxIDEin$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'TaxIDEin' from JSON`,
|
|
62
68
|
);
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
/** @internal */
|
|
66
72
|
export const TaxID$inboundSchema: z.ZodType<TaxID, z.ZodTypeDef, unknown> = z
|
|
67
73
|
.object({
|
|
68
|
-
ein: z.lazy(() =>
|
|
74
|
+
ein: z.lazy(() => TaxIDEin$inboundSchema),
|
|
69
75
|
});
|
|
70
76
|
|
|
71
77
|
/** @internal */
|
|
72
78
|
export type TaxID$Outbound = {
|
|
73
|
-
ein:
|
|
79
|
+
ein: TaxIDEin$Outbound;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
/** @internal */
|
|
@@ -79,7 +85,7 @@ export const TaxID$outboundSchema: z.ZodType<
|
|
|
79
85
|
z.ZodTypeDef,
|
|
80
86
|
TaxID
|
|
81
87
|
> = z.object({
|
|
82
|
-
ein: z.lazy(() =>
|
|
88
|
+
ein: z.lazy(() => TaxIDEin$outboundSchema),
|
|
83
89
|
});
|
|
84
90
|
|
|
85
91
|
/**
|
|
@@ -7,7 +7,7 @@ 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
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type Ein = {
|
|
11
11
|
number?: string | undefined;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,56 +15,50 @@ export type TaxIDUpdateEin = {
|
|
|
15
15
|
* An EIN (employer identification number) for the business. For sole proprietors, an SSN can be used as the EIN.
|
|
16
16
|
*/
|
|
17
17
|
export type TaxIDUpdate = {
|
|
18
|
-
ein?:
|
|
18
|
+
ein?: Ein | undefined;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
> = z.object({
|
|
27
|
-
number: z.string().optional(),
|
|
28
|
-
});
|
|
22
|
+
export const Ein$inboundSchema: z.ZodType<Ein, z.ZodTypeDef, unknown> = z
|
|
23
|
+
.object({
|
|
24
|
+
number: z.string().optional(),
|
|
25
|
+
});
|
|
29
26
|
|
|
30
27
|
/** @internal */
|
|
31
|
-
export type
|
|
28
|
+
export type Ein$Outbound = {
|
|
32
29
|
number?: string | undefined;
|
|
33
30
|
};
|
|
34
31
|
|
|
35
32
|
/** @internal */
|
|
36
|
-
export const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
> = z.object({
|
|
41
|
-
number: z.string().optional(),
|
|
42
|
-
});
|
|
33
|
+
export const Ein$outboundSchema: z.ZodType<Ein$Outbound, z.ZodTypeDef, Ein> = z
|
|
34
|
+
.object({
|
|
35
|
+
number: z.string().optional(),
|
|
36
|
+
});
|
|
43
37
|
|
|
44
38
|
/**
|
|
45
39
|
* @internal
|
|
46
40
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
41
|
*/
|
|
48
|
-
export namespace
|
|
49
|
-
/** @deprecated use `
|
|
50
|
-
export const inboundSchema =
|
|
51
|
-
/** @deprecated use `
|
|
52
|
-
export const outboundSchema =
|
|
53
|
-
/** @deprecated use `
|
|
54
|
-
export type Outbound =
|
|
42
|
+
export namespace Ein$ {
|
|
43
|
+
/** @deprecated use `Ein$inboundSchema` instead. */
|
|
44
|
+
export const inboundSchema = Ein$inboundSchema;
|
|
45
|
+
/** @deprecated use `Ein$outboundSchema` instead. */
|
|
46
|
+
export const outboundSchema = Ein$outboundSchema;
|
|
47
|
+
/** @deprecated use `Ein$Outbound` instead. */
|
|
48
|
+
export type Outbound = Ein$Outbound;
|
|
55
49
|
}
|
|
56
50
|
|
|
57
|
-
export function
|
|
58
|
-
return JSON.stringify(
|
|
51
|
+
export function einToJSON(ein: Ein): string {
|
|
52
|
+
return JSON.stringify(Ein$outboundSchema.parse(ein));
|
|
59
53
|
}
|
|
60
54
|
|
|
61
|
-
export function
|
|
55
|
+
export function einFromJSON(
|
|
62
56
|
jsonString: string,
|
|
63
|
-
): SafeParseResult<
|
|
57
|
+
): SafeParseResult<Ein, SDKValidationError> {
|
|
64
58
|
return safeParse(
|
|
65
59
|
jsonString,
|
|
66
|
-
(x) =>
|
|
67
|
-
`Failed to parse '
|
|
60
|
+
(x) => Ein$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'Ein' from JSON`,
|
|
68
62
|
);
|
|
69
63
|
}
|
|
70
64
|
|
|
@@ -74,12 +68,12 @@ export const TaxIDUpdate$inboundSchema: z.ZodType<
|
|
|
74
68
|
z.ZodTypeDef,
|
|
75
69
|
unknown
|
|
76
70
|
> = z.object({
|
|
77
|
-
ein: z.lazy(() =>
|
|
71
|
+
ein: z.lazy(() => Ein$inboundSchema).optional(),
|
|
78
72
|
});
|
|
79
73
|
|
|
80
74
|
/** @internal */
|
|
81
75
|
export type TaxIDUpdate$Outbound = {
|
|
82
|
-
ein?:
|
|
76
|
+
ein?: Ein$Outbound | undefined;
|
|
83
77
|
};
|
|
84
78
|
|
|
85
79
|
/** @internal */
|
|
@@ -88,7 +82,7 @@ export const TaxIDUpdate$outboundSchema: z.ZodType<
|
|
|
88
82
|
z.ZodTypeDef,
|
|
89
83
|
TaxIDUpdate
|
|
90
84
|
> = z.object({
|
|
91
|
-
ein: z.lazy(() =>
|
|
85
|
+
ein: z.lazy(() => Ein$outboundSchema).optional(),
|
|
92
86
|
});
|
|
93
87
|
|
|
94
88
|
/**
|
|
@@ -65,8 +65,8 @@ import {
|
|
|
65
65
|
export type Transfer = {
|
|
66
66
|
transferID: string;
|
|
67
67
|
createdOn: Date;
|
|
68
|
-
source
|
|
69
|
-
destination
|
|
68
|
+
source: TransferSource;
|
|
69
|
+
destination: TransferDestination;
|
|
70
70
|
completedOn?: Date | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* Status of a transfer.
|
|
@@ -119,8 +119,8 @@ export const Transfer$inboundSchema: z.ZodType<
|
|
|
119
119
|
> = z.object({
|
|
120
120
|
transferID: z.string(),
|
|
121
121
|
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
122
|
-
source: TransferSource$inboundSchema
|
|
123
|
-
destination: TransferDestination$inboundSchema
|
|
122
|
+
source: TransferSource$inboundSchema,
|
|
123
|
+
destination: TransferDestination$inboundSchema,
|
|
124
124
|
completedOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
125
125
|
.optional(),
|
|
126
126
|
status: TransferStatus$inboundSchema,
|
|
@@ -146,8 +146,8 @@ export const Transfer$inboundSchema: z.ZodType<
|
|
|
146
146
|
export type Transfer$Outbound = {
|
|
147
147
|
transferID: string;
|
|
148
148
|
createdOn: string;
|
|
149
|
-
source
|
|
150
|
-
destination
|
|
149
|
+
source: TransferSource$Outbound;
|
|
150
|
+
destination: TransferDestination$Outbound;
|
|
151
151
|
completedOn?: string | undefined;
|
|
152
152
|
status: string;
|
|
153
153
|
failureReason?: string | undefined;
|
|
@@ -176,8 +176,8 @@ export const Transfer$outboundSchema: z.ZodType<
|
|
|
176
176
|
> = z.object({
|
|
177
177
|
transferID: z.string(),
|
|
178
178
|
createdOn: z.date().transform(v => v.toISOString()),
|
|
179
|
-
source: TransferSource$outboundSchema
|
|
180
|
-
destination: TransferDestination$outboundSchema
|
|
179
|
+
source: TransferSource$outboundSchema,
|
|
180
|
+
destination: TransferDestination$outboundSchema,
|
|
181
181
|
completedOn: z.date().transform(v => v.toISOString()).optional(),
|
|
182
182
|
status: TransferStatus$outboundSchema,
|
|
183
183
|
failureReason: TransferFailureReason$outboundSchema.optional(),
|
|
@@ -42,6 +42,11 @@ import {
|
|
|
42
42
|
PaymentMethodsWallet$Outbound,
|
|
43
43
|
PaymentMethodsWallet$outboundSchema,
|
|
44
44
|
} from "./paymentmethodswallet.js";
|
|
45
|
+
import {
|
|
46
|
+
PaymentMethodType,
|
|
47
|
+
PaymentMethodType$inboundSchema,
|
|
48
|
+
PaymentMethodType$outboundSchema,
|
|
49
|
+
} from "./paymentmethodtype.js";
|
|
45
50
|
import {
|
|
46
51
|
RTPTransactionDetails,
|
|
47
52
|
RTPTransactionDetails$inboundSchema,
|
|
@@ -57,7 +62,10 @@ import {
|
|
|
57
62
|
|
|
58
63
|
export type TransferDestination = {
|
|
59
64
|
paymentMethodID: string;
|
|
60
|
-
|
|
65
|
+
/**
|
|
66
|
+
* The payment method type that represents a payment rail and directionality
|
|
67
|
+
*/
|
|
68
|
+
paymentMethodType: PaymentMethodType;
|
|
61
69
|
account: TransferAccount;
|
|
62
70
|
/**
|
|
63
71
|
* A bank account as contained within a payment method.
|
|
@@ -93,7 +101,7 @@ export const TransferDestination$inboundSchema: z.ZodType<
|
|
|
93
101
|
unknown
|
|
94
102
|
> = z.object({
|
|
95
103
|
paymentMethodID: z.string(),
|
|
96
|
-
paymentMethodType:
|
|
104
|
+
paymentMethodType: PaymentMethodType$inboundSchema,
|
|
97
105
|
account: TransferAccount$inboundSchema,
|
|
98
106
|
bankAccount: PaymentMethodsBankAccount$inboundSchema.optional(),
|
|
99
107
|
wallet: PaymentMethodsWallet$inboundSchema.optional(),
|
|
@@ -125,7 +133,7 @@ export const TransferDestination$outboundSchema: z.ZodType<
|
|
|
125
133
|
TransferDestination
|
|
126
134
|
> = z.object({
|
|
127
135
|
paymentMethodID: z.string(),
|
|
128
|
-
paymentMethodType:
|
|
136
|
+
paymentMethodType: PaymentMethodType$outboundSchema,
|
|
129
137
|
account: TransferAccount$outboundSchema,
|
|
130
138
|
bankAccount: PaymentMethodsBankAccount$outboundSchema.optional(),
|
|
131
139
|
wallet: PaymentMethodsWallet$outboundSchema.optional(),
|