@moovio/sdk 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -46
- package/bin/mcp-server.js +1261 -659
- package/bin/mcp-server.js.map +20 -10
- package/docs/sdks/feeplans/README.md +276 -0
- package/examples/package-lock.json +1 -1
- package/funcs/feePlansGetResidual.d.ts +17 -0
- package/funcs/feePlansGetResidual.d.ts.map +1 -0
- package/funcs/feePlansGetResidual.js +129 -0
- package/funcs/feePlansGetResidual.js.map +1 -0
- package/funcs/feePlansListResidualFees.d.ts +17 -0
- package/funcs/feePlansListResidualFees.d.ts.map +1 -0
- package/funcs/feePlansListResidualFees.js +136 -0
- package/funcs/feePlansListResidualFees.js.map +1 -0
- package/funcs/feePlansListResiduals.d.ts +17 -0
- package/funcs/feePlansListResiduals.d.ts.map +1 -0
- package/funcs/feePlansListResiduals.js +132 -0
- package/funcs/feePlansListResiduals.js.map +1 -0
- 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.d.ts.map +1 -1
- package/mcp-server/server.js +7 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/feePlansGetResidual.d.ts +8 -0
- package/mcp-server/tools/feePlansGetResidual.d.ts.map +1 -0
- package/mcp-server/tools/feePlansGetResidual.js +65 -0
- package/mcp-server/tools/feePlansGetResidual.js.map +1 -0
- package/mcp-server/tools/feePlansListResidualFees.d.ts +8 -0
- package/mcp-server/tools/feePlansListResidualFees.d.ts.map +1 -0
- package/mcp-server/tools/feePlansListResidualFees.js +65 -0
- package/mcp-server/tools/feePlansListResidualFees.js.map +1 -0
- package/mcp-server/tools/feePlansListResiduals.d.ts +8 -0
- package/mcp-server/tools/feePlansListResiduals.d.ts.map +1 -0
- package/mcp-server/tools/feePlansListResiduals.js +65 -0
- package/mcp-server/tools/feePlansListResiduals.js.map +1 -0
- package/models/components/imagemetadata.d.ts +5 -0
- package/models/components/imagemetadata.d.ts.map +1 -1
- package/models/components/imagemetadata.js +2 -0
- package/models/components/imagemetadata.js.map +1 -1
- package/models/components/incurredfee.d.ts +2 -0
- package/models/components/incurredfee.d.ts.map +1 -1
- package/models/components/incurredfee.js +2 -0
- package/models/components/incurredfee.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/residual.d.ts +59 -0
- package/models/components/residual.d.ts.map +1 -0
- package/models/components/residual.js +92 -0
- package/models/components/residual.js.map +1 -0
- package/models/operations/getresidual.d.ts +101 -0
- package/models/operations/getresidual.d.ts.map +1 -0
- package/models/operations/getresidual.js +147 -0
- package/models/operations/getresidual.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/listresidualfees.d.ts +115 -0
- package/models/operations/listresidualfees.d.ts.map +1 -0
- package/models/operations/listresidualfees.js +155 -0
- package/models/operations/listresidualfees.js.map +1 -0
- package/models/operations/listresiduals.d.ts +113 -0
- package/models/operations/listresiduals.d.ts.map +1 -0
- package/models/operations/listresiduals.js +153 -0
- package/models/operations/listresiduals.js.map +1 -0
- package/package.json +1 -1
- package/sdk/feeplans.d.ts +21 -0
- package/sdk/feeplans.d.ts.map +1 -1
- package/sdk/feeplans.js +30 -0
- package/sdk/feeplans.js.map +1 -1
- package/src/funcs/feePlansGetResidual.ts +185 -0
- package/src/funcs/feePlansListResidualFees.ts +193 -0
- package/src/funcs/feePlansListResiduals.ts +187 -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/feePlansGetResidual.ts +38 -0
- package/src/mcp-server/tools/feePlansListResidualFees.ts +38 -0
- package/src/mcp-server/tools/feePlansListResiduals.ts +38 -0
- package/src/models/components/imagemetadata.ts +7 -0
- package/src/models/components/incurredfee.ts +4 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/residual.ts +121 -0
- package/src/models/operations/getresidual.ts +223 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listresidualfees.ts +245 -0
- package/src/models/operations/listresiduals.ts +241 -0
- package/src/sdk/feeplans.ts +54 -0
- package/test/tests/accounts.test.ts +2 -2
- package/test/tests/bankAccounts.test.ts +2 -8
- package/test/tests/capabilities.test.ts +3 -3
- package/test/tests/cards.test.ts +4 -4
- package/test/tests/paymentMethods.test.ts +3 -3
- package/test/tests/representatives.test.ts +3 -3
- package/test/tests/transfers.test.ts +6 -6
- package/test/tests/wallets.test.ts +1 -1
- package/test/utils/utils.ts +5 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { feePlansGetResidual } from "../../funcs/feePlansGetResidual.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetResidualRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$feePlansGetResidual: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "fee-plans-get-residual",
|
|
15
|
+
description: `Get a residual associated with an account.
|
|
16
|
+
|
|
17
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
+
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await feePlansGetResidual(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value.result;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { feePlansListResidualFees } from "../../funcs/feePlansListResidualFees.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListResidualFeesRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$feePlansListResidualFees: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "fee-plans-list-residual-fees",
|
|
15
|
+
description: `List all fees associated with a residual.
|
|
16
|
+
|
|
17
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
+
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await feePlansListResidualFees(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value.result;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { feePlansListResiduals } from "../../funcs/feePlansListResiduals.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListResidualsRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$feePlansListResiduals: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "fee-plans-list-residuals",
|
|
15
|
+
description: `List all residuals associated with an account.
|
|
16
|
+
|
|
17
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
+
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await feePlansListResiduals(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value.result;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -12,6 +12,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export type ImageMetadata = {
|
|
14
14
|
imageID: string;
|
|
15
|
+
/**
|
|
16
|
+
* The ID used to get an image with the public endpoint.
|
|
17
|
+
*/
|
|
18
|
+
publicID: string;
|
|
15
19
|
/**
|
|
16
20
|
* Alternative text for the image.
|
|
17
21
|
*/
|
|
@@ -34,6 +38,7 @@ export const ImageMetadata$inboundSchema: z.ZodType<
|
|
|
34
38
|
unknown
|
|
35
39
|
> = z.object({
|
|
36
40
|
imageID: z.string(),
|
|
41
|
+
publicID: z.string(),
|
|
37
42
|
altText: z.string().optional(),
|
|
38
43
|
link: z.string(),
|
|
39
44
|
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
@@ -43,6 +48,7 @@ export const ImageMetadata$inboundSchema: z.ZodType<
|
|
|
43
48
|
/** @internal */
|
|
44
49
|
export type ImageMetadata$Outbound = {
|
|
45
50
|
imageID: string;
|
|
51
|
+
publicID: string;
|
|
46
52
|
altText?: string | undefined;
|
|
47
53
|
link: string;
|
|
48
54
|
createdOn: string;
|
|
@@ -56,6 +62,7 @@ export const ImageMetadata$outboundSchema: z.ZodType<
|
|
|
56
62
|
ImageMetadata
|
|
57
63
|
> = z.object({
|
|
58
64
|
imageID: z.string(),
|
|
65
|
+
publicID: z.string(),
|
|
59
66
|
altText: z.string().optional(),
|
|
60
67
|
link: z.string(),
|
|
61
68
|
createdOn: z.date().transform(v => v.toISOString()),
|
|
@@ -33,6 +33,7 @@ export type IncurredFee = {
|
|
|
33
33
|
* The entity that generated the fee.
|
|
34
34
|
*/
|
|
35
35
|
generatedBy?: GeneratedBy | undefined;
|
|
36
|
+
feeGroup?: string | undefined;
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
/** @internal */
|
|
@@ -49,6 +50,7 @@ export const IncurredFee$inboundSchema: z.ZodType<
|
|
|
49
50
|
feeName: z.string().optional(),
|
|
50
51
|
amount: AmountDecimal$inboundSchema.optional(),
|
|
51
52
|
generatedBy: GeneratedBy$inboundSchema.optional(),
|
|
53
|
+
feeGroup: z.string().optional(),
|
|
52
54
|
});
|
|
53
55
|
|
|
54
56
|
/** @internal */
|
|
@@ -60,6 +62,7 @@ export type IncurredFee$Outbound = {
|
|
|
60
62
|
feeName?: string | undefined;
|
|
61
63
|
amount?: AmountDecimal$Outbound | undefined;
|
|
62
64
|
generatedBy?: GeneratedBy$Outbound | undefined;
|
|
65
|
+
feeGroup?: string | undefined;
|
|
63
66
|
};
|
|
64
67
|
|
|
65
68
|
/** @internal */
|
|
@@ -75,6 +78,7 @@ export const IncurredFee$outboundSchema: z.ZodType<
|
|
|
75
78
|
feeName: z.string().optional(),
|
|
76
79
|
amount: AmountDecimal$outboundSchema.optional(),
|
|
77
80
|
generatedBy: GeneratedBy$outboundSchema.optional(),
|
|
81
|
+
feeGroup: z.string().optional(),
|
|
78
82
|
});
|
|
79
83
|
|
|
80
84
|
/**
|
|
@@ -348,6 +348,7 @@ export * from "./requestcard.js";
|
|
|
348
348
|
export * from "./requirementerror.js";
|
|
349
349
|
export * from "./requirementerrorcode.js";
|
|
350
350
|
export * from "./requirementid.js";
|
|
351
|
+
export * from "./residual.js";
|
|
351
352
|
export * from "./returnpolicytype.js";
|
|
352
353
|
export * from "./reversal.js";
|
|
353
354
|
export * from "./reversedwithcancellation.js";
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
AmountDecimal,
|
|
11
|
+
AmountDecimal$inboundSchema,
|
|
12
|
+
AmountDecimal$Outbound,
|
|
13
|
+
AmountDecimal$outboundSchema,
|
|
14
|
+
} from "./amountdecimal.js";
|
|
15
|
+
|
|
16
|
+
export type Residual = {
|
|
17
|
+
residualID: string;
|
|
18
|
+
partnerAccountID: string;
|
|
19
|
+
periodStart: Date;
|
|
20
|
+
periodEnd: Date;
|
|
21
|
+
merchantFees: AmountDecimal;
|
|
22
|
+
partnerCost: AmountDecimal;
|
|
23
|
+
netIncome: AmountDecimal;
|
|
24
|
+
/**
|
|
25
|
+
* The decimal-formatted numerical string of the revenue split for partner.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
*
|
|
29
|
+
* For example, 2.25% is '2.25'.
|
|
30
|
+
*/
|
|
31
|
+
revenueShare: string;
|
|
32
|
+
residualAmount: AmountDecimal;
|
|
33
|
+
moovShare: AmountDecimal;
|
|
34
|
+
createdOn: Date;
|
|
35
|
+
updatedOn: Date;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const Residual$inboundSchema: z.ZodType<
|
|
40
|
+
Residual,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
residualID: z.string(),
|
|
45
|
+
partnerAccountID: z.string(),
|
|
46
|
+
periodStart: z.string().datetime({ offset: true }).transform(v =>
|
|
47
|
+
new Date(v)
|
|
48
|
+
),
|
|
49
|
+
periodEnd: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
50
|
+
merchantFees: AmountDecimal$inboundSchema,
|
|
51
|
+
partnerCost: AmountDecimal$inboundSchema,
|
|
52
|
+
netIncome: AmountDecimal$inboundSchema,
|
|
53
|
+
revenueShare: z.string(),
|
|
54
|
+
residualAmount: AmountDecimal$inboundSchema,
|
|
55
|
+
moovShare: AmountDecimal$inboundSchema,
|
|
56
|
+
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
57
|
+
updatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type Residual$Outbound = {
|
|
62
|
+
residualID: string;
|
|
63
|
+
partnerAccountID: string;
|
|
64
|
+
periodStart: string;
|
|
65
|
+
periodEnd: string;
|
|
66
|
+
merchantFees: AmountDecimal$Outbound;
|
|
67
|
+
partnerCost: AmountDecimal$Outbound;
|
|
68
|
+
netIncome: AmountDecimal$Outbound;
|
|
69
|
+
revenueShare: string;
|
|
70
|
+
residualAmount: AmountDecimal$Outbound;
|
|
71
|
+
moovShare: AmountDecimal$Outbound;
|
|
72
|
+
createdOn: string;
|
|
73
|
+
updatedOn: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const Residual$outboundSchema: z.ZodType<
|
|
78
|
+
Residual$Outbound,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
Residual
|
|
81
|
+
> = z.object({
|
|
82
|
+
residualID: z.string(),
|
|
83
|
+
partnerAccountID: z.string(),
|
|
84
|
+
periodStart: z.date().transform(v => v.toISOString()),
|
|
85
|
+
periodEnd: z.date().transform(v => v.toISOString()),
|
|
86
|
+
merchantFees: AmountDecimal$outboundSchema,
|
|
87
|
+
partnerCost: AmountDecimal$outboundSchema,
|
|
88
|
+
netIncome: AmountDecimal$outboundSchema,
|
|
89
|
+
revenueShare: z.string(),
|
|
90
|
+
residualAmount: AmountDecimal$outboundSchema,
|
|
91
|
+
moovShare: AmountDecimal$outboundSchema,
|
|
92
|
+
createdOn: z.date().transform(v => v.toISOString()),
|
|
93
|
+
updatedOn: z.date().transform(v => v.toISOString()),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
|
+
*/
|
|
100
|
+
export namespace Residual$ {
|
|
101
|
+
/** @deprecated use `Residual$inboundSchema` instead. */
|
|
102
|
+
export const inboundSchema = Residual$inboundSchema;
|
|
103
|
+
/** @deprecated use `Residual$outboundSchema` instead. */
|
|
104
|
+
export const outboundSchema = Residual$outboundSchema;
|
|
105
|
+
/** @deprecated use `Residual$Outbound` instead. */
|
|
106
|
+
export type Outbound = Residual$Outbound;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function residualToJSON(residual: Residual): string {
|
|
110
|
+
return JSON.stringify(Residual$outboundSchema.parse(residual));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function residualFromJSON(
|
|
114
|
+
jsonString: string,
|
|
115
|
+
): SafeParseResult<Residual, SDKValidationError> {
|
|
116
|
+
return safeParse(
|
|
117
|
+
jsonString,
|
|
118
|
+
(x) => Residual$inboundSchema.parse(JSON.parse(x)),
|
|
119
|
+
`Failed to parse 'Residual' from JSON`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
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 GetResidualGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type GetResidualRequest = {
|
|
30
|
+
accountID: string;
|
|
31
|
+
residualID: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type GetResidualResponse = {
|
|
35
|
+
headers: { [k: string]: Array<string> };
|
|
36
|
+
result: components.Residual;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const GetResidualGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
GetResidualGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"X-Moov-Version": z.string().default("v2024.01.00"),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"X-Moov-Version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type GetResidualGlobals$Outbound = {
|
|
54
|
+
"X-Moov-Version": string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const GetResidualGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
GetResidualGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
GetResidualGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "X-Moov-Version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace GetResidualGlobals$ {
|
|
75
|
+
/** @deprecated use `GetResidualGlobals$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = GetResidualGlobals$inboundSchema;
|
|
77
|
+
/** @deprecated use `GetResidualGlobals$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = GetResidualGlobals$outboundSchema;
|
|
79
|
+
/** @deprecated use `GetResidualGlobals$Outbound` instead. */
|
|
80
|
+
export type Outbound = GetResidualGlobals$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function getResidualGlobalsToJSON(
|
|
84
|
+
getResidualGlobals: GetResidualGlobals,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
GetResidualGlobals$outboundSchema.parse(getResidualGlobals),
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function getResidualGlobalsFromJSON(
|
|
92
|
+
jsonString: string,
|
|
93
|
+
): SafeParseResult<GetResidualGlobals, SDKValidationError> {
|
|
94
|
+
return safeParse(
|
|
95
|
+
jsonString,
|
|
96
|
+
(x) => GetResidualGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'GetResidualGlobals' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const GetResidualRequest$inboundSchema: z.ZodType<
|
|
103
|
+
GetResidualRequest,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
unknown
|
|
106
|
+
> = z.object({
|
|
107
|
+
accountID: z.string(),
|
|
108
|
+
residualID: z.string(),
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type GetResidualRequest$Outbound = {
|
|
113
|
+
accountID: string;
|
|
114
|
+
residualID: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const GetResidualRequest$outboundSchema: z.ZodType<
|
|
119
|
+
GetResidualRequest$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
GetResidualRequest
|
|
122
|
+
> = z.object({
|
|
123
|
+
accountID: z.string(),
|
|
124
|
+
residualID: z.string(),
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
130
|
+
*/
|
|
131
|
+
export namespace GetResidualRequest$ {
|
|
132
|
+
/** @deprecated use `GetResidualRequest$inboundSchema` instead. */
|
|
133
|
+
export const inboundSchema = GetResidualRequest$inboundSchema;
|
|
134
|
+
/** @deprecated use `GetResidualRequest$outboundSchema` instead. */
|
|
135
|
+
export const outboundSchema = GetResidualRequest$outboundSchema;
|
|
136
|
+
/** @deprecated use `GetResidualRequest$Outbound` instead. */
|
|
137
|
+
export type Outbound = GetResidualRequest$Outbound;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function getResidualRequestToJSON(
|
|
141
|
+
getResidualRequest: GetResidualRequest,
|
|
142
|
+
): string {
|
|
143
|
+
return JSON.stringify(
|
|
144
|
+
GetResidualRequest$outboundSchema.parse(getResidualRequest),
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function getResidualRequestFromJSON(
|
|
149
|
+
jsonString: string,
|
|
150
|
+
): SafeParseResult<GetResidualRequest, SDKValidationError> {
|
|
151
|
+
return safeParse(
|
|
152
|
+
jsonString,
|
|
153
|
+
(x) => GetResidualRequest$inboundSchema.parse(JSON.parse(x)),
|
|
154
|
+
`Failed to parse 'GetResidualRequest' from JSON`,
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export const GetResidualResponse$inboundSchema: z.ZodType<
|
|
160
|
+
GetResidualResponse,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
unknown
|
|
163
|
+
> = z.object({
|
|
164
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
165
|
+
Result: components.Residual$inboundSchema,
|
|
166
|
+
}).transform((v) => {
|
|
167
|
+
return remap$(v, {
|
|
168
|
+
"Headers": "headers",
|
|
169
|
+
"Result": "result",
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export type GetResidualResponse$Outbound = {
|
|
175
|
+
Headers: { [k: string]: Array<string> };
|
|
176
|
+
Result: components.Residual$Outbound;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export const GetResidualResponse$outboundSchema: z.ZodType<
|
|
181
|
+
GetResidualResponse$Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
GetResidualResponse
|
|
184
|
+
> = z.object({
|
|
185
|
+
headers: z.record(z.array(z.string())),
|
|
186
|
+
result: components.Residual$outboundSchema,
|
|
187
|
+
}).transform((v) => {
|
|
188
|
+
return remap$(v, {
|
|
189
|
+
headers: "Headers",
|
|
190
|
+
result: "Result",
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
197
|
+
*/
|
|
198
|
+
export namespace GetResidualResponse$ {
|
|
199
|
+
/** @deprecated use `GetResidualResponse$inboundSchema` instead. */
|
|
200
|
+
export const inboundSchema = GetResidualResponse$inboundSchema;
|
|
201
|
+
/** @deprecated use `GetResidualResponse$outboundSchema` instead. */
|
|
202
|
+
export const outboundSchema = GetResidualResponse$outboundSchema;
|
|
203
|
+
/** @deprecated use `GetResidualResponse$Outbound` instead. */
|
|
204
|
+
export type Outbound = GetResidualResponse$Outbound;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function getResidualResponseToJSON(
|
|
208
|
+
getResidualResponse: GetResidualResponse,
|
|
209
|
+
): string {
|
|
210
|
+
return JSON.stringify(
|
|
211
|
+
GetResidualResponse$outboundSchema.parse(getResidualResponse),
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function getResidualResponseFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<GetResidualResponse, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => GetResidualResponse$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'GetResidualResponse' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
@@ -70,6 +70,7 @@ export * from "./getproduct.js";
|
|
|
70
70
|
export * from "./getpublicimage.js";
|
|
71
71
|
export * from "./getrefund.js";
|
|
72
72
|
export * from "./getrepresentative.js";
|
|
73
|
+
export * from "./getresidual.js";
|
|
73
74
|
export * from "./getscheduledoccurrence.js";
|
|
74
75
|
export * from "./getschedules.js";
|
|
75
76
|
export * from "./getstatement.js";
|
|
@@ -118,6 +119,8 @@ export * from "./listproducts.js";
|
|
|
118
119
|
export * from "./listreceipts.js";
|
|
119
120
|
export * from "./listrefunds.js";
|
|
120
121
|
export * from "./listrepresentatives.js";
|
|
122
|
+
export * from "./listresidualfees.js";
|
|
123
|
+
export * from "./listresiduals.js";
|
|
121
124
|
export * from "./listschedules.js";
|
|
122
125
|
export * from "./liststatements.js";
|
|
123
126
|
export * from "./listsweepconfigs.js";
|