@moovio/sdk 0.9.0 → 0.10.1

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 (87) hide show
  1. package/README.md +53 -7
  2. package/bin/mcp-server.js +354 -128
  3. package/bin/mcp-server.js.map +18 -13
  4. package/docs/sdks/terminalconfigurations/README.md +98 -0
  5. package/funcs/terminalConfigurationsGet.d.ts +16 -0
  6. package/funcs/terminalConfigurationsGet.d.ts.map +1 -0
  7. package/funcs/terminalConfigurationsGet.js +124 -0
  8. package/funcs/terminalConfigurationsGet.js.map +1 -0
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/lib/config.js.map +1 -1
  13. package/lib/security.d.ts +4 -3
  14. package/lib/security.d.ts.map +1 -1
  15. package/lib/security.js +6 -1
  16. package/lib/security.js.map +1 -1
  17. package/mcp-server/mcp-server.js +1 -1
  18. package/mcp-server/mcp-server.js.map +1 -1
  19. package/mcp-server/server.d.ts.map +1 -1
  20. package/mcp-server/server.js +3 -1
  21. package/mcp-server/server.js.map +1 -1
  22. package/mcp-server/tools/terminalConfigurationsGet.d.ts +8 -0
  23. package/mcp-server/tools/terminalConfigurationsGet.d.ts.map +1 -0
  24. package/mcp-server/tools/terminalConfigurationsGet.js +65 -0
  25. package/mcp-server/tools/terminalConfigurationsGet.js.map +1 -0
  26. package/models/components/feeplan.d.ts +6 -0
  27. package/models/components/feeplan.d.ts.map +1 -1
  28. package/models/components/feeplan.js +3 -0
  29. package/models/components/feeplan.js.map +1 -1
  30. package/models/components/feeplanagreement.d.ts +6 -0
  31. package/models/components/feeplanagreement.d.ts.map +1 -1
  32. package/models/components/feeplanagreement.js +3 -0
  33. package/models/components/feeplanagreement.js.map +1 -1
  34. package/models/components/index.d.ts +2 -0
  35. package/models/components/index.d.ts.map +1 -1
  36. package/models/components/index.js +2 -0
  37. package/models/components/index.js.map +1 -1
  38. package/models/components/monthlyplatformfee.d.ts +44 -0
  39. package/models/components/monthlyplatformfee.d.ts.map +1 -0
  40. package/models/components/monthlyplatformfee.js +71 -0
  41. package/models/components/monthlyplatformfee.js.map +1 -0
  42. package/models/components/partnerpricing.d.ts +6 -0
  43. package/models/components/partnerpricing.d.ts.map +1 -1
  44. package/models/components/partnerpricing.js +3 -0
  45. package/models/components/partnerpricing.js.map +1 -1
  46. package/models/components/partnerpricingagreement.d.ts +6 -0
  47. package/models/components/partnerpricingagreement.d.ts.map +1 -1
  48. package/models/components/partnerpricingagreement.js +3 -0
  49. package/models/components/partnerpricingagreement.js.map +1 -1
  50. package/models/components/terminalconfiguration.d.ts +32 -0
  51. package/models/components/terminalconfiguration.d.ts.map +1 -0
  52. package/models/components/terminalconfiguration.js +69 -0
  53. package/models/components/terminalconfiguration.js.map +1 -0
  54. package/models/operations/getterminalconfiguration.d.ts +101 -0
  55. package/models/operations/getterminalconfiguration.d.ts.map +1 -0
  56. package/models/operations/getterminalconfiguration.js +147 -0
  57. package/models/operations/getterminalconfiguration.js.map +1 -0
  58. package/models/operations/index.d.ts +1 -0
  59. package/models/operations/index.d.ts.map +1 -1
  60. package/models/operations/index.js +1 -0
  61. package/models/operations/index.js.map +1 -1
  62. package/package.json +1 -1
  63. package/sdk/sdk.d.ts +3 -0
  64. package/sdk/sdk.d.ts.map +1 -1
  65. package/sdk/sdk.js +4 -0
  66. package/sdk/sdk.js.map +1 -1
  67. package/sdk/terminalconfigurations.d.ts +12 -0
  68. package/sdk/terminalconfigurations.d.ts.map +1 -0
  69. package/sdk/terminalconfigurations.js +22 -0
  70. package/sdk/terminalconfigurations.js.map +1 -0
  71. package/src/funcs/terminalConfigurationsGet.ts +181 -0
  72. package/src/lib/config.ts +3 -3
  73. package/src/lib/security.ts +11 -3
  74. package/src/mcp-server/mcp-server.ts +1 -1
  75. package/src/mcp-server/server.ts +3 -1
  76. package/src/mcp-server/tools/terminalConfigurationsGet.ts +38 -0
  77. package/src/models/components/feeplan.ts +13 -0
  78. package/src/models/components/feeplanagreement.ts +13 -0
  79. package/src/models/components/index.ts +2 -0
  80. package/src/models/components/monthlyplatformfee.ts +83 -0
  81. package/src/models/components/partnerpricing.ts +13 -0
  82. package/src/models/components/partnerpricingagreement.ts +13 -0
  83. package/src/models/components/terminalconfiguration.ts +69 -0
  84. package/src/models/operations/getterminalconfiguration.ts +229 -0
  85. package/src/models/operations/index.ts +1 -0
  86. package/src/sdk/sdk.ts +8 -0
  87. package/src/sdk/terminalconfigurations.ts +27 -0
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as components from "../models/components/index.js";
6
+
6
7
  type OAuth2PasswordFlow = {
7
8
  username: string;
8
9
  password?: string | undefined;
@@ -84,7 +85,9 @@ type SecurityInputOAuth2ClientCredentials = {
84
85
  value:
85
86
  | { clientID?: string | undefined; clientSecret?: string | undefined }
86
87
  | null
88
+ | string
87
89
  | undefined;
90
+ fieldName?: string;
88
91
  };
89
92
 
90
93
  type SecurityInputOAuth2PasswordCredentials = {
@@ -93,13 +96,13 @@ type SecurityInputOAuth2PasswordCredentials = {
93
96
  | string
94
97
  | null
95
98
  | undefined;
96
- fieldName: string;
99
+ fieldName?: string;
97
100
  };
98
101
 
99
102
  type SecurityInputCustom = {
100
103
  type: "http:custom";
101
104
  value: any | null | undefined;
102
- fieldName: string;
105
+ fieldName?: string;
103
106
  };
104
107
 
105
108
  export type SecurityInput =
@@ -136,6 +139,9 @@ export function resolveSecurity(
136
139
  typeof o.value === "string" && !!o.value
137
140
  );
138
141
  } else if (o.type === "oauth2:client_credentials") {
142
+ if (typeof o.value == "string") {
143
+ return !!o.value;
144
+ }
139
145
  return o.value.clientID != null || o.value.clientSecret != null;
140
146
  } else if (typeof o.value === "string") {
141
147
  return !!o.value;
@@ -224,7 +230,9 @@ function applyBearer(
224
230
  value = `Bearer ${value}`;
225
231
  }
226
232
 
227
- state.headers[spec.fieldName] = value;
233
+ if (spec.fieldName !== undefined) {
234
+ state.headers[spec.fieldName] = value;
235
+ }
228
236
  }
229
237
 
230
238
  export function resolveGlobalSecurity(
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.9.0",
22
+ currentVersion: "0.10.1",
23
23
  },
24
24
  });
25
25
 
@@ -127,6 +127,7 @@ import { tool$terminalApplicationsCreate } from "./tools/terminalApplicationsCre
127
127
  import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDelete.js";
128
128
  import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
129
129
  import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
130
+ import { tool$terminalConfigurationsGet } from "./tools/terminalConfigurationsGet.js";
130
131
  import { tool$transfersCreate } from "./tools/transfersCreate.js";
131
132
  import { tool$transfersCreateCancellation } from "./tools/transfersCreateCancellation.js";
132
133
  import { tool$transfersCreateReversal } from "./tools/transfersCreateReversal.js";
@@ -156,7 +157,7 @@ export function createMCPServer(deps: {
156
157
  }) {
157
158
  const server = new McpServer({
158
159
  name: "Moov",
159
- version: "0.9.0",
160
+ version: "0.10.1",
160
161
  });
161
162
 
162
163
  const client = new MoovCore({
@@ -271,6 +272,7 @@ export function createMCPServer(deps: {
271
272
  tool(tool$sweepsUpdateConfig);
272
273
  tool(tool$sweepsList);
273
274
  tool(tool$sweepsGet);
275
+ tool(tool$terminalConfigurationsGet);
274
276
  tool(tool$transfersCreate);
275
277
  tool(tool$transfersList);
276
278
  tool(tool$transfersGet);
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { terminalConfigurationsGet } from "../../funcs/terminalConfigurationsGet.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetTerminalConfigurationRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$terminalConfigurationsGet: ToolDefinition<typeof args> = {
14
+ name: "terminal-configurations-get",
15
+ description: `Fetch the configuration for a given Terminal Application
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}/terminal-configuration.read\` scope.`,
19
+ args,
20
+ tool: async (client, args, ctx) => {
21
+ const [result, apiCall] = await terminalConfigurationsGet(
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
+ };
@@ -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";
@@ -318,6 +319,7 @@ export * from "./terminalapplication.js";
318
319
  export * from "./terminalapplicationplatform.js";
319
320
  export * from "./terminalapplicationstatus.js";
320
321
  export * from "./terminalcard.js";
322
+ export * from "./terminalconfiguration.js";
321
323
  export * from "./termsofservice.js";
322
324
  export * from "./termsofserviceerror.js";
323
325
  export * from "./termsofservicetoken.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
 
@@ -0,0 +1,69 @@
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
+ * Describes a terminal configuration.
12
+ */
13
+ export type TerminalConfiguration = {
14
+ configuration: string;
15
+ };
16
+
17
+ /** @internal */
18
+ export const TerminalConfiguration$inboundSchema: z.ZodType<
19
+ TerminalConfiguration,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ configuration: z.string(),
24
+ });
25
+
26
+ /** @internal */
27
+ export type TerminalConfiguration$Outbound = {
28
+ configuration: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const TerminalConfiguration$outboundSchema: z.ZodType<
33
+ TerminalConfiguration$Outbound,
34
+ z.ZodTypeDef,
35
+ TerminalConfiguration
36
+ > = z.object({
37
+ configuration: z.string(),
38
+ });
39
+
40
+ /**
41
+ * @internal
42
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
+ */
44
+ export namespace TerminalConfiguration$ {
45
+ /** @deprecated use `TerminalConfiguration$inboundSchema` instead. */
46
+ export const inboundSchema = TerminalConfiguration$inboundSchema;
47
+ /** @deprecated use `TerminalConfiguration$outboundSchema` instead. */
48
+ export const outboundSchema = TerminalConfiguration$outboundSchema;
49
+ /** @deprecated use `TerminalConfiguration$Outbound` instead. */
50
+ export type Outbound = TerminalConfiguration$Outbound;
51
+ }
52
+
53
+ export function terminalConfigurationToJSON(
54
+ terminalConfiguration: TerminalConfiguration,
55
+ ): string {
56
+ return JSON.stringify(
57
+ TerminalConfiguration$outboundSchema.parse(terminalConfiguration),
58
+ );
59
+ }
60
+
61
+ export function terminalConfigurationFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<TerminalConfiguration, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => TerminalConfiguration$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'TerminalConfiguration' from JSON`,
68
+ );
69
+ }