@moovio/sdk 0.16.2 → 0.16.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.
Files changed (39) hide show
  1. package/bin/mcp-server.js +39 -12
  2. package/bin/mcp-server.js.map +11 -10
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/config.js.map +1 -1
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/models/components/feeproperties.d.ts +6 -0
  11. package/models/components/feeproperties.d.ts.map +1 -1
  12. package/models/components/feeproperties.js +3 -0
  13. package/models/components/feeproperties.js.map +1 -1
  14. package/models/components/index.d.ts +1 -0
  15. package/models/components/index.d.ts.map +1 -1
  16. package/models/components/index.js +1 -0
  17. package/models/components/index.js.map +1 -1
  18. package/models/components/partnerpricing.d.ts +8 -4
  19. package/models/components/partnerpricing.d.ts.map +1 -1
  20. package/models/components/partnerpricing.js +2 -2
  21. package/models/components/partnerpricing.js.map +1 -1
  22. package/models/components/partnerpricingagreement.d.ts +7 -3
  23. package/models/components/partnerpricingagreement.d.ts.map +1 -1
  24. package/models/components/partnerpricingagreement.js +2 -2
  25. package/models/components/partnerpricingagreement.js.map +1 -1
  26. package/models/components/volumerange.d.ts +51 -0
  27. package/models/components/volumerange.d.ts.map +1 -0
  28. package/models/components/volumerange.js +76 -0
  29. package/models/components/volumerange.js.map +1 -0
  30. package/package.json +1 -1
  31. package/renovate.json +1 -1
  32. package/src/lib/config.ts +3 -3
  33. package/src/mcp-server/mcp-server.ts +1 -1
  34. package/src/mcp-server/server.ts +1 -1
  35. package/src/models/components/feeproperties.ts +13 -0
  36. package/src/models/components/index.ts +1 -0
  37. package/src/models/components/partnerpricing.ts +10 -6
  38. package/src/models/components/partnerpricingagreement.ts +9 -5
  39. package/src/models/components/volumerange.ts +95 -0
@@ -12,6 +12,12 @@ import {
12
12
  AmountDecimal$Outbound,
13
13
  AmountDecimal$outboundSchema,
14
14
  } from "./amountdecimal.js";
15
+ import {
16
+ VolumeRange,
17
+ VolumeRange$inboundSchema,
18
+ VolumeRange$Outbound,
19
+ VolumeRange$outboundSchema,
20
+ } from "./volumerange.js";
15
21
 
16
22
  /**
17
23
  * Defines the specific parameters used for fee calculation.
@@ -37,6 +43,10 @@ export type FeeProperties = {
37
43
  * Specifies the maximum allowable spending for a single transaction, working as a transaction ceiling.
38
44
  */
39
45
  maxPerTransaction?: AmountDecimal | undefined;
46
+ /**
47
+ * Defines the volume ranges for tiered pricing models.
48
+ */
49
+ volumeRanges: Array<VolumeRange>;
40
50
  };
41
51
 
42
52
  /** @internal */
@@ -49,6 +59,7 @@ export const FeeProperties$inboundSchema: z.ZodType<
49
59
  variableRate: z.string().optional(),
50
60
  minPerTransaction: AmountDecimal$inboundSchema.optional(),
51
61
  maxPerTransaction: AmountDecimal$inboundSchema.optional(),
62
+ volumeRanges: z.array(VolumeRange$inboundSchema),
52
63
  });
53
64
 
54
65
  /** @internal */
@@ -57,6 +68,7 @@ export type FeeProperties$Outbound = {
57
68
  variableRate?: string | undefined;
58
69
  minPerTransaction?: AmountDecimal$Outbound | undefined;
59
70
  maxPerTransaction?: AmountDecimal$Outbound | undefined;
71
+ volumeRanges: Array<VolumeRange$Outbound>;
60
72
  };
61
73
 
62
74
  /** @internal */
@@ -69,6 +81,7 @@ export const FeeProperties$outboundSchema: z.ZodType<
69
81
  variableRate: z.string().optional(),
70
82
  minPerTransaction: AmountDecimal$outboundSchema.optional(),
71
83
  maxPerTransaction: AmountDecimal$outboundSchema.optional(),
84
+ volumeRanges: z.array(VolumeRange$outboundSchema),
72
85
  });
73
86
 
74
87
  /**
@@ -426,6 +426,7 @@ export * from "./verificationstatus.js";
426
426
  export * from "./verificationstatusdetail.js";
427
427
  export * from "./volumebycustomertype.js";
428
428
  export * from "./volumebycustomertypeerror.js";
429
+ export * from "./volumerange.js";
429
430
  export * from "./volumesharebycustomertype.js";
430
431
  export * from "./volumesharebycustomertypeerror.js";
431
432
  export * from "./wallet.js";
@@ -33,7 +33,7 @@ import {
33
33
  export type PartnerPricing = {
34
34
  planID: string;
35
35
  /**
36
- * The name of the fee plan.
36
+ * The name of the partner pricing plan.
37
37
  */
38
38
  name: string;
39
39
  /**
@@ -41,9 +41,13 @@ export type PartnerPricing = {
41
41
  */
42
42
  description?: string | undefined;
43
43
  /**
44
- * The integer percentage value of the revenue split for partner.
44
+ * The decimal-formatted numerical string of the revenue split for partner.
45
+ *
46
+ * @remarks
47
+ *
48
+ * For example, 2.25% is '2.25'.
45
49
  */
46
- revenueShare: number;
50
+ revenueShare: string;
47
51
  /**
48
52
  * Specifies the card processing pricing model
49
53
  */
@@ -69,7 +73,7 @@ export const PartnerPricing$inboundSchema: z.ZodType<
69
73
  planID: z.string(),
70
74
  name: z.string(),
71
75
  description: z.string().optional(),
72
- revenueShare: z.number().int(),
76
+ revenueShare: z.string(),
73
77
  cardAcquiringModel: CardAcquiringModel$inboundSchema,
74
78
  billableFees: z.array(BillableFee$inboundSchema),
75
79
  minimumCommitment: MinimumCommitment$inboundSchema,
@@ -82,7 +86,7 @@ export type PartnerPricing$Outbound = {
82
86
  planID: string;
83
87
  name: string;
84
88
  description?: string | undefined;
85
- revenueShare: number;
89
+ revenueShare: string;
86
90
  cardAcquiringModel: string;
87
91
  billableFees: Array<BillableFee$Outbound>;
88
92
  minimumCommitment: MinimumCommitment$Outbound;
@@ -99,7 +103,7 @@ export const PartnerPricing$outboundSchema: z.ZodType<
99
103
  planID: z.string(),
100
104
  name: z.string(),
101
105
  description: z.string().optional(),
102
- revenueShare: z.number().int(),
106
+ revenueShare: z.string(),
103
107
  cardAcquiringModel: CardAcquiringModel$outboundSchema,
104
108
  billableFees: z.array(BillableFee$outboundSchema),
105
109
  minimumCommitment: MinimumCommitment$outboundSchema,
@@ -63,9 +63,13 @@ export type PartnerPricingAgreement = {
63
63
  */
64
64
  monthlyPlatformFee: MonthlyPlatformFee;
65
65
  /**
66
- * The integer percentage value of the revenue split for partner.
66
+ * The decimal-formatted numerical string of the revenue split for partner.
67
+ *
68
+ * @remarks
69
+ *
70
+ * For example, 2.25% is '2.25'.
67
71
  */
68
- revenueShare: number;
72
+ revenueShare: string;
69
73
  };
70
74
 
71
75
  /** @internal */
@@ -85,7 +89,7 @@ export const PartnerPricingAgreement$inboundSchema: z.ZodType<
85
89
  billableFees: z.array(BillableFee$inboundSchema),
86
90
  minimumCommitment: MinimumCommitment$inboundSchema,
87
91
  monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
88
- revenueShare: z.number().int(),
92
+ revenueShare: z.string(),
89
93
  });
90
94
 
91
95
  /** @internal */
@@ -101,7 +105,7 @@ export type PartnerPricingAgreement$Outbound = {
101
105
  billableFees: Array<BillableFee$Outbound>;
102
106
  minimumCommitment: MinimumCommitment$Outbound;
103
107
  monthlyPlatformFee: MonthlyPlatformFee$Outbound;
104
- revenueShare: number;
108
+ revenueShare: string;
105
109
  };
106
110
 
107
111
  /** @internal */
@@ -121,7 +125,7 @@ export const PartnerPricingAgreement$outboundSchema: z.ZodType<
121
125
  billableFees: z.array(BillableFee$outboundSchema),
122
126
  minimumCommitment: MinimumCommitment$outboundSchema,
123
127
  monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
124
- revenueShare: z.number().int(),
128
+ revenueShare: z.string(),
125
129
  });
126
130
 
127
131
  /**
@@ -0,0 +1,95 @@
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
+ import {
10
+ AmountDecimal,
11
+ AmountDecimal$inboundSchema,
12
+ AmountDecimal$Outbound,
13
+ AmountDecimal$outboundSchema,
14
+ } from "./amountdecimal.js";
15
+
16
+ /**
17
+ * Defines the volume ranges for tiered pricing models.
18
+ */
19
+ export type VolumeRange = {
20
+ /**
21
+ * Specifies the lower value of a tier for the fee.
22
+ */
23
+ fromValue: number;
24
+ /**
25
+ * Specifies the upper value of a tier for the fee.
26
+ */
27
+ toValue?: number | undefined;
28
+ /**
29
+ * The flat amount for a whole tier of the fee.
30
+ */
31
+ flatAmount: AmountDecimal;
32
+ /**
33
+ * The unit price for a specific tier of the fee.
34
+ */
35
+ perUnitAmount: AmountDecimal;
36
+ };
37
+
38
+ /** @internal */
39
+ export const VolumeRange$inboundSchema: z.ZodType<
40
+ VolumeRange,
41
+ z.ZodTypeDef,
42
+ unknown
43
+ > = z.object({
44
+ fromValue: z.number().int(),
45
+ toValue: z.number().int().optional(),
46
+ flatAmount: AmountDecimal$inboundSchema,
47
+ perUnitAmount: AmountDecimal$inboundSchema,
48
+ });
49
+
50
+ /** @internal */
51
+ export type VolumeRange$Outbound = {
52
+ fromValue: number;
53
+ toValue?: number | undefined;
54
+ flatAmount: AmountDecimal$Outbound;
55
+ perUnitAmount: AmountDecimal$Outbound;
56
+ };
57
+
58
+ /** @internal */
59
+ export const VolumeRange$outboundSchema: z.ZodType<
60
+ VolumeRange$Outbound,
61
+ z.ZodTypeDef,
62
+ VolumeRange
63
+ > = z.object({
64
+ fromValue: z.number().int(),
65
+ toValue: z.number().int().optional(),
66
+ flatAmount: AmountDecimal$outboundSchema,
67
+ perUnitAmount: AmountDecimal$outboundSchema,
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 VolumeRange$ {
75
+ /** @deprecated use `VolumeRange$inboundSchema` instead. */
76
+ export const inboundSchema = VolumeRange$inboundSchema;
77
+ /** @deprecated use `VolumeRange$outboundSchema` instead. */
78
+ export const outboundSchema = VolumeRange$outboundSchema;
79
+ /** @deprecated use `VolumeRange$Outbound` instead. */
80
+ export type Outbound = VolumeRange$Outbound;
81
+ }
82
+
83
+ export function volumeRangeToJSON(volumeRange: VolumeRange): string {
84
+ return JSON.stringify(VolumeRange$outboundSchema.parse(volumeRange));
85
+ }
86
+
87
+ export function volumeRangeFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<VolumeRange, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => VolumeRange$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'VolumeRange' from JSON`,
94
+ );
95
+ }