@moovio/sdk 0.8.1 → 0.10.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 +42 -7
- package/bin/mcp-server.js +78 -11
- package/bin/mcp-server.js.map +19 -17
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/security.d.ts +4 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -1
- package/lib/security.js.map +1 -1
- package/mcp-server/extensions.d.ts +2 -0
- package/mcp-server/extensions.d.ts.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/prompts.d.ts +26 -0
- package/mcp-server/prompts.d.ts.map +1 -0
- package/mcp-server/prompts.js +47 -0
- package/mcp-server/prompts.js.map +1 -0
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js +1 -0
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +4 -2
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.js +1 -0
- package/mcp-server/tools.js.map +1 -1
- package/models/components/createtransfersource.d.ts +2 -0
- package/models/components/createtransfersource.d.ts.map +1 -1
- package/models/components/createtransfersource.js +2 -0
- package/models/components/createtransfersource.js.map +1 -1
- package/models/components/feeplan.d.ts +6 -0
- package/models/components/feeplan.d.ts.map +1 -1
- package/models/components/feeplan.js +3 -0
- package/models/components/feeplan.js.map +1 -1
- package/models/components/feeplanagreement.d.ts +6 -0
- package/models/components/feeplanagreement.d.ts.map +1 -1
- package/models/components/feeplanagreement.js +3 -0
- package/models/components/feeplanagreement.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/monthlyplatformfee.d.ts +44 -0
- package/models/components/monthlyplatformfee.d.ts.map +1 -0
- package/models/components/monthlyplatformfee.js +71 -0
- package/models/components/monthlyplatformfee.js.map +1 -0
- package/models/components/partnerpricing.d.ts +6 -0
- package/models/components/partnerpricing.d.ts.map +1 -1
- package/models/components/partnerpricing.js +3 -0
- package/models/components/partnerpricing.js.map +1 -1
- package/models/components/partnerpricingagreement.d.ts +6 -0
- package/models/components/partnerpricingagreement.d.ts.map +1 -1
- package/models/components/partnerpricingagreement.js +3 -0
- package/models/components/partnerpricingagreement.js.map +1 -1
- package/models/components/transfersource.d.ts +6 -0
- package/models/components/transfersource.d.ts.map +1 -1
- package/models/components/transfersource.js +3 -0
- package/models/components/transfersource.js.map +1 -1
- package/models/components/wallettransactionsourcetype.d.ts +3 -0
- package/models/components/wallettransactionsourcetype.d.ts.map +1 -1
- package/models/components/wallettransactionsourcetype.js +1 -0
- package/models/components/wallettransactionsourcetype.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +11 -3
- package/src/mcp-server/extensions.ts +4 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +110 -0
- package/src/mcp-server/resources.ts +1 -0
- package/src/mcp-server/server.ts +4 -2
- package/src/mcp-server/tools.ts +1 -0
- package/src/models/components/createtransfersource.ts +4 -0
- package/src/models/components/feeplan.ts +13 -0
- package/src/models/components/feeplanagreement.ts +13 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/monthlyplatformfee.ts +83 -0
- package/src/models/components/partnerpricing.ts +13 -0
- package/src/models/components/partnerpricingagreement.ts +13 -0
- package/src/models/components/transfersource.ts +13 -0
- package/src/models/components/wallettransactionsourcetype.ts +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
7
|
+
import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import {
|
|
9
|
+
objectOutputType,
|
|
10
|
+
ZodOptional,
|
|
11
|
+
ZodType,
|
|
12
|
+
ZodTypeAny,
|
|
13
|
+
ZodTypeDef,
|
|
14
|
+
} from "zod";
|
|
15
|
+
import { MoovCore } from "../core.js";
|
|
16
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
17
|
+
import { MCPScope } from "./scopes.js";
|
|
18
|
+
|
|
19
|
+
// '@modelcontextprotocol/sdk' currently does not export this type
|
|
20
|
+
export type PromptArgsRawShape = {
|
|
21
|
+
[k: string]:
|
|
22
|
+
| ZodType<string, ZodTypeDef, string>
|
|
23
|
+
| ZodOptional<ZodType<string, ZodTypeDef, string>>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PromptDefinition<
|
|
27
|
+
Args extends undefined | PromptArgsRawShape = undefined,
|
|
28
|
+
> = Args extends PromptArgsRawShape ? {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
scopes?: MCPScope[];
|
|
32
|
+
args: Args;
|
|
33
|
+
prompt: (
|
|
34
|
+
client: MoovCore,
|
|
35
|
+
args: objectOutputType<Args, ZodTypeAny>,
|
|
36
|
+
extra: RequestHandlerExtra,
|
|
37
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
38
|
+
}
|
|
39
|
+
: {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
scopes?: MCPScope[];
|
|
43
|
+
args?: undefined;
|
|
44
|
+
prompt: (
|
|
45
|
+
client: MoovCore,
|
|
46
|
+
extra: RequestHandlerExtra,
|
|
47
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Optional function to assist with formatting prompt results
|
|
51
|
+
export async function formatResult(value: string): Promise<GetPromptResult> {
|
|
52
|
+
return {
|
|
53
|
+
messages: [
|
|
54
|
+
{
|
|
55
|
+
role: "user",
|
|
56
|
+
content: {
|
|
57
|
+
type: "text",
|
|
58
|
+
text: value,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function createRegisterPrompt(
|
|
66
|
+
logger: ConsoleLogger,
|
|
67
|
+
server: McpServer,
|
|
68
|
+
sdk: MoovCore,
|
|
69
|
+
allowedScopes: Set<MCPScope>,
|
|
70
|
+
): <A extends PromptArgsRawShape | undefined>(
|
|
71
|
+
prompt: PromptDefinition<A>,
|
|
72
|
+
) => void {
|
|
73
|
+
return <A extends PromptArgsRawShape | undefined>(
|
|
74
|
+
prompt: PromptDefinition<A>,
|
|
75
|
+
): void => {
|
|
76
|
+
const scopes = prompt.scopes ?? [];
|
|
77
|
+
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (prompt.args) {
|
|
82
|
+
if (prompt.description) {
|
|
83
|
+
server.prompt(
|
|
84
|
+
prompt.name,
|
|
85
|
+
prompt.description,
|
|
86
|
+
prompt.args,
|
|
87
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
88
|
+
);
|
|
89
|
+
} else {
|
|
90
|
+
server.prompt(
|
|
91
|
+
prompt.name,
|
|
92
|
+
prompt.args,
|
|
93
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
if (prompt.description) {
|
|
98
|
+
server.prompt(
|
|
99
|
+
prompt.name,
|
|
100
|
+
prompt.description,
|
|
101
|
+
async (ctx) => prompt.prompt(sdk, ctx),
|
|
102
|
+
);
|
|
103
|
+
} else {
|
|
104
|
+
server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
logger.debug("Registered prompt", { name: prompt.name });
|
|
109
|
+
};
|
|
110
|
+
}
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
6
6
|
import { MoovCore } from "../core.js";
|
|
7
7
|
import { SDKOptions } from "../lib/config.js";
|
|
8
8
|
import type { ConsoleLogger } from "./console-logger.js";
|
|
9
|
+
import { createRegisterPrompt } from "./prompts.js";
|
|
9
10
|
import {
|
|
10
11
|
createRegisterResource,
|
|
11
12
|
createRegisterResourceTemplate,
|
|
@@ -155,7 +156,7 @@ export function createMCPServer(deps: {
|
|
|
155
156
|
}) {
|
|
156
157
|
const server = new McpServer({
|
|
157
158
|
name: "Moov",
|
|
158
|
-
version: "0.
|
|
159
|
+
version: "0.10.0",
|
|
159
160
|
});
|
|
160
161
|
|
|
161
162
|
const client = new MoovCore({
|
|
@@ -182,7 +183,8 @@ export function createMCPServer(deps: {
|
|
|
182
183
|
client,
|
|
183
184
|
scopes,
|
|
184
185
|
);
|
|
185
|
-
const
|
|
186
|
+
const prompt = createRegisterPrompt(deps.logger, server, client, scopes);
|
|
187
|
+
const register = { tool, resource, resourceTemplate, prompt };
|
|
186
188
|
void register; // suppress unused warnings
|
|
187
189
|
|
|
188
190
|
tool(tool$accountsCreate);
|
package/src/mcp-server/tools.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
|
|
|
34
34
|
) => CallToolResult | Promise<CallToolResult>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
// Optional function to assist with formatting tool results
|
|
37
38
|
export async function formatResult(
|
|
38
39
|
value: unknown,
|
|
39
40
|
init: { response?: Response | undefined },
|
|
@@ -31,6 +31,7 @@ export type CreateTransferSource = {
|
|
|
31
31
|
*/
|
|
32
32
|
transferID?: string | undefined;
|
|
33
33
|
paymentMethodID?: string | undefined;
|
|
34
|
+
paymentToken?: string | undefined;
|
|
34
35
|
cardDetails?: CreateTransferSourceCard | undefined;
|
|
35
36
|
achDetails?: CreateTransferSourceACH | undefined;
|
|
36
37
|
};
|
|
@@ -43,6 +44,7 @@ export const CreateTransferSource$inboundSchema: z.ZodType<
|
|
|
43
44
|
> = z.object({
|
|
44
45
|
transferID: z.string().optional(),
|
|
45
46
|
paymentMethodID: z.string().optional(),
|
|
47
|
+
paymentToken: z.string().optional(),
|
|
46
48
|
cardDetails: CreateTransferSourceCard$inboundSchema.optional(),
|
|
47
49
|
achDetails: CreateTransferSourceACH$inboundSchema.optional(),
|
|
48
50
|
});
|
|
@@ -51,6 +53,7 @@ export const CreateTransferSource$inboundSchema: z.ZodType<
|
|
|
51
53
|
export type CreateTransferSource$Outbound = {
|
|
52
54
|
transferID?: string | undefined;
|
|
53
55
|
paymentMethodID?: string | undefined;
|
|
56
|
+
paymentToken?: string | undefined;
|
|
54
57
|
cardDetails?: CreateTransferSourceCard$Outbound | undefined;
|
|
55
58
|
achDetails?: CreateTransferSourceACH$Outbound | undefined;
|
|
56
59
|
};
|
|
@@ -63,6 +66,7 @@ export const CreateTransferSource$outboundSchema: z.ZodType<
|
|
|
63
66
|
> = z.object({
|
|
64
67
|
transferID: z.string().optional(),
|
|
65
68
|
paymentMethodID: z.string().optional(),
|
|
69
|
+
paymentToken: z.string().optional(),
|
|
66
70
|
cardDetails: CreateTransferSourceCard$outboundSchema.optional(),
|
|
67
71
|
achDetails: CreateTransferSourceACH$outboundSchema.optional(),
|
|
68
72
|
});
|
|
@@ -23,6 +23,12 @@ import {
|
|
|
23
23
|
MinimumCommitment$Outbound,
|
|
24
24
|
MinimumCommitment$outboundSchema,
|
|
25
25
|
} from "./minimumcommitment.js";
|
|
26
|
+
import {
|
|
27
|
+
MonthlyPlatformFee,
|
|
28
|
+
MonthlyPlatformFee$inboundSchema,
|
|
29
|
+
MonthlyPlatformFee$Outbound,
|
|
30
|
+
MonthlyPlatformFee$outboundSchema,
|
|
31
|
+
} from "./monthlyplatformfee.js";
|
|
26
32
|
|
|
27
33
|
export type FeePlan = {
|
|
28
34
|
planID: string;
|
|
@@ -46,6 +52,10 @@ export type FeePlan = {
|
|
|
46
52
|
* The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
|
|
47
53
|
*/
|
|
48
54
|
minimumCommitment: MinimumCommitment;
|
|
55
|
+
/**
|
|
56
|
+
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
57
|
+
*/
|
|
58
|
+
monthlyPlatformFee: MonthlyPlatformFee;
|
|
49
59
|
createdAt: Date;
|
|
50
60
|
};
|
|
51
61
|
|
|
@@ -58,6 +68,7 @@ export const FeePlan$inboundSchema: z.ZodType<FeePlan, z.ZodTypeDef, unknown> =
|
|
|
58
68
|
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
59
69
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
60
70
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
71
|
+
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
61
72
|
createdAt: z.string().datetime({ offset: true }).transform(v =>
|
|
62
73
|
new Date(v)
|
|
63
74
|
),
|
|
@@ -71,6 +82,7 @@ export type FeePlan$Outbound = {
|
|
|
71
82
|
cardAcquiringModel: string;
|
|
72
83
|
billableFees: Array<BillableFee$Outbound>;
|
|
73
84
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
85
|
+
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
74
86
|
createdAt: string;
|
|
75
87
|
};
|
|
76
88
|
|
|
@@ -86,6 +98,7 @@ export const FeePlan$outboundSchema: z.ZodType<
|
|
|
86
98
|
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
87
99
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
88
100
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
101
|
+
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
89
102
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
90
103
|
});
|
|
91
104
|
|
|
@@ -28,6 +28,12 @@ import {
|
|
|
28
28
|
MinimumCommitment$Outbound,
|
|
29
29
|
MinimumCommitment$outboundSchema,
|
|
30
30
|
} from "./minimumcommitment.js";
|
|
31
|
+
import {
|
|
32
|
+
MonthlyPlatformFee,
|
|
33
|
+
MonthlyPlatformFee$inboundSchema,
|
|
34
|
+
MonthlyPlatformFee$Outbound,
|
|
35
|
+
MonthlyPlatformFee$outboundSchema,
|
|
36
|
+
} from "./monthlyplatformfee.js";
|
|
31
37
|
|
|
32
38
|
export type FeePlanAgreement = {
|
|
33
39
|
agreementID: string;
|
|
@@ -52,6 +58,10 @@ export type FeePlanAgreement = {
|
|
|
52
58
|
* The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
|
|
53
59
|
*/
|
|
54
60
|
minimumCommitment: MinimumCommitment;
|
|
61
|
+
/**
|
|
62
|
+
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
63
|
+
*/
|
|
64
|
+
monthlyPlatformFee: MonthlyPlatformFee;
|
|
55
65
|
};
|
|
56
66
|
|
|
57
67
|
/** @internal */
|
|
@@ -70,6 +80,7 @@ export const FeePlanAgreement$inboundSchema: z.ZodType<
|
|
|
70
80
|
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
71
81
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
72
82
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
83
|
+
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
73
84
|
});
|
|
74
85
|
|
|
75
86
|
/** @internal */
|
|
@@ -84,6 +95,7 @@ export type FeePlanAgreement$Outbound = {
|
|
|
84
95
|
cardAcquiringModel: string;
|
|
85
96
|
billableFees: Array<BillableFee$Outbound>;
|
|
86
97
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
98
|
+
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
87
99
|
};
|
|
88
100
|
|
|
89
101
|
/** @internal */
|
|
@@ -102,6 +114,7 @@ export const FeePlanAgreement$outboundSchema: z.ZodType<
|
|
|
102
114
|
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
103
115
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
104
116
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
117
|
+
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
105
118
|
});
|
|
106
119
|
|
|
107
120
|
/**
|
|
@@ -223,6 +223,7 @@ export * from "./manualtermsofserviceupdate.js";
|
|
|
223
223
|
export * from "./microdepositstatus.js";
|
|
224
224
|
export * from "./minimumcommitment.js";
|
|
225
225
|
export * from "./mode.js";
|
|
226
|
+
export * from "./monthlyplatformfee.js";
|
|
226
227
|
export * from "./moovfeedetails.js";
|
|
227
228
|
export * from "./moovwalletpaymentmethod.js";
|
|
228
229
|
export * from "./mxauthorizationcode.js";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
12
|
+
*/
|
|
13
|
+
export type MonthlyPlatformFee = {
|
|
14
|
+
/**
|
|
15
|
+
* A 3-letter ISO 4217 currency code.
|
|
16
|
+
*/
|
|
17
|
+
currency: string;
|
|
18
|
+
/**
|
|
19
|
+
* A decimal-formatted numerical string that represents up to 9 decimal place precision.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* For example, $12.987654321 is '12.987654321'.
|
|
24
|
+
*/
|
|
25
|
+
valueDecimal: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const MonthlyPlatformFee$inboundSchema: z.ZodType<
|
|
30
|
+
MonthlyPlatformFee,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
currency: z.string(),
|
|
35
|
+
valueDecimal: z.string(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type MonthlyPlatformFee$Outbound = {
|
|
40
|
+
currency: string;
|
|
41
|
+
valueDecimal: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const MonthlyPlatformFee$outboundSchema: z.ZodType<
|
|
46
|
+
MonthlyPlatformFee$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
MonthlyPlatformFee
|
|
49
|
+
> = z.object({
|
|
50
|
+
currency: z.string(),
|
|
51
|
+
valueDecimal: z.string(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace MonthlyPlatformFee$ {
|
|
59
|
+
/** @deprecated use `MonthlyPlatformFee$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = MonthlyPlatformFee$inboundSchema;
|
|
61
|
+
/** @deprecated use `MonthlyPlatformFee$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = MonthlyPlatformFee$outboundSchema;
|
|
63
|
+
/** @deprecated use `MonthlyPlatformFee$Outbound` instead. */
|
|
64
|
+
export type Outbound = MonthlyPlatformFee$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function monthlyPlatformFeeToJSON(
|
|
68
|
+
monthlyPlatformFee: MonthlyPlatformFee,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
MonthlyPlatformFee$outboundSchema.parse(monthlyPlatformFee),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function monthlyPlatformFeeFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<MonthlyPlatformFee, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => MonthlyPlatformFee$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'MonthlyPlatformFee' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -23,6 +23,12 @@ import {
|
|
|
23
23
|
MinimumCommitment$Outbound,
|
|
24
24
|
MinimumCommitment$outboundSchema,
|
|
25
25
|
} from "./minimumcommitment.js";
|
|
26
|
+
import {
|
|
27
|
+
MonthlyPlatformFee,
|
|
28
|
+
MonthlyPlatformFee$inboundSchema,
|
|
29
|
+
MonthlyPlatformFee$Outbound,
|
|
30
|
+
MonthlyPlatformFee$outboundSchema,
|
|
31
|
+
} from "./monthlyplatformfee.js";
|
|
26
32
|
|
|
27
33
|
export type PartnerPricing = {
|
|
28
34
|
planID: string;
|
|
@@ -47,6 +53,10 @@ export type PartnerPricing = {
|
|
|
47
53
|
* The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
|
|
48
54
|
*/
|
|
49
55
|
minimumCommitment: MinimumCommitment;
|
|
56
|
+
/**
|
|
57
|
+
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
58
|
+
*/
|
|
59
|
+
monthlyPlatformFee: MonthlyPlatformFee;
|
|
50
60
|
createdAt: Date;
|
|
51
61
|
};
|
|
52
62
|
|
|
@@ -63,6 +73,7 @@ export const PartnerPricing$inboundSchema: z.ZodType<
|
|
|
63
73
|
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
64
74
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
65
75
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
76
|
+
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
66
77
|
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
67
78
|
});
|
|
68
79
|
|
|
@@ -75,6 +86,7 @@ export type PartnerPricing$Outbound = {
|
|
|
75
86
|
cardAcquiringModel: string;
|
|
76
87
|
billableFees: Array<BillableFee$Outbound>;
|
|
77
88
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
89
|
+
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
78
90
|
createdAt: string;
|
|
79
91
|
};
|
|
80
92
|
|
|
@@ -91,6 +103,7 @@ export const PartnerPricing$outboundSchema: z.ZodType<
|
|
|
91
103
|
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
92
104
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
93
105
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
106
|
+
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
94
107
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
95
108
|
});
|
|
96
109
|
|
|
@@ -28,6 +28,12 @@ import {
|
|
|
28
28
|
MinimumCommitment$Outbound,
|
|
29
29
|
MinimumCommitment$outboundSchema,
|
|
30
30
|
} from "./minimumcommitment.js";
|
|
31
|
+
import {
|
|
32
|
+
MonthlyPlatformFee,
|
|
33
|
+
MonthlyPlatformFee$inboundSchema,
|
|
34
|
+
MonthlyPlatformFee$Outbound,
|
|
35
|
+
MonthlyPlatformFee$outboundSchema,
|
|
36
|
+
} from "./monthlyplatformfee.js";
|
|
31
37
|
|
|
32
38
|
export type PartnerPricingAgreement = {
|
|
33
39
|
agreementID: string;
|
|
@@ -52,6 +58,10 @@ export type PartnerPricingAgreement = {
|
|
|
52
58
|
* The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
|
|
53
59
|
*/
|
|
54
60
|
minimumCommitment: MinimumCommitment;
|
|
61
|
+
/**
|
|
62
|
+
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
63
|
+
*/
|
|
64
|
+
monthlyPlatformFee: MonthlyPlatformFee;
|
|
55
65
|
/**
|
|
56
66
|
* The integer percentage value of the revenue split for partner.
|
|
57
67
|
*/
|
|
@@ -74,6 +84,7 @@ export const PartnerPricingAgreement$inboundSchema: z.ZodType<
|
|
|
74
84
|
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
75
85
|
billableFees: z.array(BillableFee$inboundSchema),
|
|
76
86
|
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
87
|
+
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
77
88
|
revenueShare: z.number().int(),
|
|
78
89
|
});
|
|
79
90
|
|
|
@@ -89,6 +100,7 @@ export type PartnerPricingAgreement$Outbound = {
|
|
|
89
100
|
cardAcquiringModel: string;
|
|
90
101
|
billableFees: Array<BillableFee$Outbound>;
|
|
91
102
|
minimumCommitment: MinimumCommitment$Outbound;
|
|
103
|
+
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
92
104
|
revenueShare: number;
|
|
93
105
|
};
|
|
94
106
|
|
|
@@ -108,6 +120,7 @@ export const PartnerPricingAgreement$outboundSchema: z.ZodType<
|
|
|
108
120
|
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
109
121
|
billableFees: z.array(BillableFee$outboundSchema),
|
|
110
122
|
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
123
|
+
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
111
124
|
revenueShare: z.number().int(),
|
|
112
125
|
});
|
|
113
126
|
|
|
@@ -47,6 +47,12 @@ import {
|
|
|
47
47
|
PaymentMethodType$inboundSchema,
|
|
48
48
|
PaymentMethodType$outboundSchema,
|
|
49
49
|
} from "./paymentmethodtype.js";
|
|
50
|
+
import {
|
|
51
|
+
TerminalCard,
|
|
52
|
+
TerminalCard$inboundSchema,
|
|
53
|
+
TerminalCard$Outbound,
|
|
54
|
+
TerminalCard$outboundSchema,
|
|
55
|
+
} from "./terminalcard.js";
|
|
50
56
|
import {
|
|
51
57
|
TransferAccount,
|
|
52
58
|
TransferAccount$inboundSchema,
|
|
@@ -78,6 +84,10 @@ export type TransferSource = {
|
|
|
78
84
|
* Describes an Apple Pay token on a Moov account.
|
|
79
85
|
*/
|
|
80
86
|
applePay?: ApplePayResponse | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Describes payment card details captured with tap or in-person payment.
|
|
89
|
+
*/
|
|
90
|
+
terminalCard?: TerminalCard | undefined;
|
|
81
91
|
/**
|
|
82
92
|
* Card-specific details about the transaction.
|
|
83
93
|
*/
|
|
@@ -102,6 +112,7 @@ export const TransferSource$inboundSchema: z.ZodType<
|
|
|
102
112
|
wallet: PaymentMethodsWallet$inboundSchema.optional(),
|
|
103
113
|
card: PaymentMethodsCard$inboundSchema.optional(),
|
|
104
114
|
applePay: ApplePayResponse$inboundSchema.optional(),
|
|
115
|
+
terminalCard: TerminalCard$inboundSchema.optional(),
|
|
105
116
|
cardDetails: CardTransactionDetails$inboundSchema.optional(),
|
|
106
117
|
achDetails: ACHTransactionDetails$inboundSchema.optional(),
|
|
107
118
|
});
|
|
@@ -116,6 +127,7 @@ export type TransferSource$Outbound = {
|
|
|
116
127
|
wallet?: PaymentMethodsWallet$Outbound | undefined;
|
|
117
128
|
card?: PaymentMethodsCard$Outbound | undefined;
|
|
118
129
|
applePay?: ApplePayResponse$Outbound | undefined;
|
|
130
|
+
terminalCard?: TerminalCard$Outbound | undefined;
|
|
119
131
|
cardDetails?: CardTransactionDetails$Outbound | undefined;
|
|
120
132
|
achDetails?: ACHTransactionDetails$Outbound | undefined;
|
|
121
133
|
};
|
|
@@ -134,6 +146,7 @@ export const TransferSource$outboundSchema: z.ZodType<
|
|
|
134
146
|
wallet: PaymentMethodsWallet$outboundSchema.optional(),
|
|
135
147
|
card: PaymentMethodsCard$outboundSchema.optional(),
|
|
136
148
|
applePay: ApplePayResponse$outboundSchema.optional(),
|
|
149
|
+
terminalCard: TerminalCard$outboundSchema.optional(),
|
|
137
150
|
cardDetails: CardTransactionDetails$outboundSchema.optional(),
|
|
138
151
|
achDetails: ACHTransactionDetails$outboundSchema.optional(),
|
|
139
152
|
});
|
|
@@ -12,6 +12,7 @@ export const WalletTransactionSourceType = {
|
|
|
12
12
|
IssuingAuthorization: "issuing-authorization",
|
|
13
13
|
Sweep: "sweep",
|
|
14
14
|
Adjustment: "adjustment",
|
|
15
|
+
Fee: "fee",
|
|
15
16
|
} as const;
|
|
16
17
|
export type WalletTransactionSourceType = ClosedEnum<
|
|
17
18
|
typeof WalletTransactionSourceType
|