@moovio/sdk 0.21.7 → 0.21.9

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 (37) hide show
  1. package/bin/mcp-server.js +48 -44
  2. package/bin/mcp-server.js.map +11 -9
  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/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/createaccount.d.ts +3 -13
  10. package/models/components/createaccount.d.ts.map +1 -1
  11. package/models/components/createaccount.js +4 -29
  12. package/models/components/createaccount.js.map +1 -1
  13. package/models/components/index.d.ts +2 -0
  14. package/models/components/index.d.ts.map +1 -1
  15. package/models/components/index.js +2 -0
  16. package/models/components/index.js.map +1 -1
  17. package/models/components/patchaccount.d.ts +3 -13
  18. package/models/components/patchaccount.d.ts.map +1 -1
  19. package/models/components/patchaccount.js +4 -29
  20. package/models/components/patchaccount.js.map +1 -1
  21. package/models/components/termsofservicepayload.d.ts +27 -0
  22. package/models/components/termsofservicepayload.d.ts.map +1 -0
  23. package/models/components/termsofservicepayload.js +62 -0
  24. package/models/components/termsofservicepayload.js.map +1 -0
  25. package/models/components/termsofservicepayloadupdate.d.ts +27 -0
  26. package/models/components/termsofservicepayloadupdate.d.ts.map +1 -0
  27. package/models/components/termsofservicepayloadupdate.js +62 -0
  28. package/models/components/termsofservicepayloadupdate.js.map +1 -0
  29. package/package.json +1 -1
  30. package/src/lib/config.ts +3 -3
  31. package/src/mcp-server/mcp-server.ts +1 -1
  32. package/src/mcp-server/server.ts +1 -1
  33. package/src/models/components/createaccount.ts +9 -71
  34. package/src/models/components/index.ts +2 -0
  35. package/src/models/components/patchaccount.ts +9 -72
  36. package/src/models/components/termsofservicepayload.ts +73 -0
  37. package/src/models/components/termsofservicepayloadupdate.ts +75 -0
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.TermsOfServicePayloadUpdate$outboundSchema = exports.TermsOfServicePayloadUpdate$inboundSchema = void 0;
40
+ exports.termsOfServicePayloadUpdateToJSON = termsOfServicePayloadUpdateToJSON;
41
+ exports.termsOfServicePayloadUpdateFromJSON = termsOfServicePayloadUpdateFromJSON;
42
+ const z = __importStar(require("zod/v3"));
43
+ const schemas_js_1 = require("../../lib/schemas.js");
44
+ const manualtermsofserviceupdate_js_1 = require("./manualtermsofserviceupdate.js");
45
+ const termsofservicetokenupdate_js_1 = require("./termsofservicetokenupdate.js");
46
+ /** @internal */
47
+ exports.TermsOfServicePayloadUpdate$inboundSchema = z.object({
48
+ token: termsofservicetokenupdate_js_1.TermsOfServiceTokenUpdate$inboundSchema.optional(),
49
+ manual: manualtermsofserviceupdate_js_1.ManualTermsOfServiceUpdate$inboundSchema.optional(),
50
+ });
51
+ /** @internal */
52
+ exports.TermsOfServicePayloadUpdate$outboundSchema = z.object({
53
+ token: termsofservicetokenupdate_js_1.TermsOfServiceTokenUpdate$outboundSchema.optional(),
54
+ manual: manualtermsofserviceupdate_js_1.ManualTermsOfServiceUpdate$outboundSchema.optional(),
55
+ });
56
+ function termsOfServicePayloadUpdateToJSON(termsOfServicePayloadUpdate) {
57
+ return JSON.stringify(exports.TermsOfServicePayloadUpdate$outboundSchema.parse(termsOfServicePayloadUpdate));
58
+ }
59
+ function termsOfServicePayloadUpdateFromJSON(jsonString) {
60
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TermsOfServicePayloadUpdate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TermsOfServicePayloadUpdate' from JSON`);
61
+ }
62
+ //# sourceMappingURL=termsofservicepayloadupdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"termsofservicepayloadupdate.js","sourceRoot":"","sources":["../../src/models/components/termsofservicepayloadupdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDH,8EAQC;AACD,kFAQC;AAtED,0CAA4B;AAC5B,qDAAiD;AAGjD,mFAKyC;AACzC,iFAKwC;AAaxC,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,sEAAuC,CAAC,QAAQ,EAAE;IACzD,MAAM,EAAE,wEAAwC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC;AAOH,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,uEAAwC,CAAC,QAAQ,EAAE;IAC1D,MAAM,EAAE,yEAAyC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC;AAEH,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AACD,SAAgB,mCAAmC,CACjD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iDAAyC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrE,yDAAyD,CAC1D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moovio/sdk",
3
- "version": "0.21.7",
3
+ "version": "0.21.9",
4
4
  "author": "Moov",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"
package/src/lib/config.ts CHANGED
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "latest",
76
- sdkVersion: "0.21.7",
77
- genVersion: "2.745.2",
78
- userAgent: "speakeasy-sdk/typescript 0.21.7 2.745.2 latest @moovio/sdk",
76
+ sdkVersion: "0.21.9",
77
+ genVersion: "2.748.0",
78
+ userAgent: "speakeasy-sdk/typescript 0.21.9 2.748.0 latest @moovio/sdk",
79
79
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.21.7",
22
+ currentVersion: "0.21.9",
23
23
  },
24
24
  });
25
25
 
@@ -187,7 +187,7 @@ export function createMCPServer(deps: {
187
187
  }) {
188
188
  const server = new McpServer({
189
189
  name: "Moov",
190
- version: "0.21.7",
190
+ version: "0.21.9",
191
191
  });
192
192
 
193
193
  const client = new MoovCore({
@@ -28,12 +28,6 @@ import {
28
28
  CustomerSupport$Outbound,
29
29
  CustomerSupport$outboundSchema,
30
30
  } from "./customersupport.js";
31
- import {
32
- ManualTermsOfService,
33
- ManualTermsOfService$inboundSchema,
34
- ManualTermsOfService$Outbound,
35
- ManualTermsOfService$outboundSchema,
36
- } from "./manualtermsofservice.js";
37
31
  import { Mode, Mode$inboundSchema, Mode$outboundSchema } from "./mode.js";
38
32
  import {
39
33
  Settings,
@@ -42,15 +36,11 @@ import {
42
36
  Settings$outboundSchema,
43
37
  } from "./settings.js";
44
38
  import {
45
- TermsOfServiceToken,
46
- TermsOfServiceToken$inboundSchema,
47
- TermsOfServiceToken$Outbound,
48
- TermsOfServiceToken$outboundSchema,
49
- } from "./termsofservicetoken.js";
50
-
51
- export type CreateAccountTermsOfService =
52
- | ManualTermsOfService
53
- | TermsOfServiceToken;
39
+ TermsOfServicePayload,
40
+ TermsOfServicePayload$inboundSchema,
41
+ TermsOfServicePayload$Outbound,
42
+ TermsOfServicePayload$outboundSchema,
43
+ } from "./termsofservicepayload.js";
54
44
 
55
45
  export type CreateAccount = {
56
46
  accountType: CreateAccountType;
@@ -59,7 +49,7 @@ export type CreateAccount = {
59
49
  * Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
60
50
  */
61
51
  metadata?: { [k: string]: string } | undefined;
62
- termsOfService?: ManualTermsOfService | TermsOfServiceToken | undefined;
52
+ termsOfService?: TermsOfServicePayload | undefined;
63
53
  /**
64
54
  * Optional alias from a foreign/external system which can be used to reference this resource.
65
55
  */
@@ -82,49 +72,6 @@ export type CreateAccount = {
82
72
  mode?: Mode | undefined;
83
73
  };
84
74
 
85
- /** @internal */
86
- export const CreateAccountTermsOfService$inboundSchema: z.ZodType<
87
- CreateAccountTermsOfService,
88
- z.ZodTypeDef,
89
- unknown
90
- > = z.union([
91
- ManualTermsOfService$inboundSchema,
92
- TermsOfServiceToken$inboundSchema,
93
- ]);
94
- /** @internal */
95
- export type CreateAccountTermsOfService$Outbound =
96
- | ManualTermsOfService$Outbound
97
- | TermsOfServiceToken$Outbound;
98
-
99
- /** @internal */
100
- export const CreateAccountTermsOfService$outboundSchema: z.ZodType<
101
- CreateAccountTermsOfService$Outbound,
102
- z.ZodTypeDef,
103
- CreateAccountTermsOfService
104
- > = z.union([
105
- ManualTermsOfService$outboundSchema,
106
- TermsOfServiceToken$outboundSchema,
107
- ]);
108
-
109
- export function createAccountTermsOfServiceToJSON(
110
- createAccountTermsOfService: CreateAccountTermsOfService,
111
- ): string {
112
- return JSON.stringify(
113
- CreateAccountTermsOfService$outboundSchema.parse(
114
- createAccountTermsOfService,
115
- ),
116
- );
117
- }
118
- export function createAccountTermsOfServiceFromJSON(
119
- jsonString: string,
120
- ): SafeParseResult<CreateAccountTermsOfService, SDKValidationError> {
121
- return safeParse(
122
- jsonString,
123
- (x) => CreateAccountTermsOfService$inboundSchema.parse(JSON.parse(x)),
124
- `Failed to parse 'CreateAccountTermsOfService' from JSON`,
125
- );
126
- }
127
-
128
75
  /** @internal */
129
76
  export const CreateAccount$inboundSchema: z.ZodType<
130
77
  CreateAccount,
@@ -134,10 +81,7 @@ export const CreateAccount$inboundSchema: z.ZodType<
134
81
  accountType: CreateAccountType$inboundSchema,
135
82
  profile: CreateProfile$inboundSchema,
136
83
  metadata: z.record(z.string()).optional(),
137
- termsOfService: z.union([
138
- ManualTermsOfService$inboundSchema,
139
- TermsOfServiceToken$inboundSchema,
140
- ]).optional(),
84
+ termsOfService: TermsOfServicePayload$inboundSchema.optional(),
141
85
  foreignID: z.string().optional(),
142
86
  customerSupport: CustomerSupport$inboundSchema.optional(),
143
87
  settings: Settings$inboundSchema.optional(),
@@ -149,10 +93,7 @@ export type CreateAccount$Outbound = {
149
93
  accountType: string;
150
94
  profile: CreateProfile$Outbound;
151
95
  metadata?: { [k: string]: string } | undefined;
152
- termsOfService?:
153
- | ManualTermsOfService$Outbound
154
- | TermsOfServiceToken$Outbound
155
- | undefined;
96
+ termsOfService?: TermsOfServicePayload$Outbound | undefined;
156
97
  foreignID?: string | undefined;
157
98
  customerSupport?: CustomerSupport$Outbound | undefined;
158
99
  settings?: Settings$Outbound | undefined;
@@ -169,10 +110,7 @@ export const CreateAccount$outboundSchema: z.ZodType<
169
110
  accountType: CreateAccountType$outboundSchema,
170
111
  profile: CreateProfile$outboundSchema,
171
112
  metadata: z.record(z.string()).optional(),
172
- termsOfService: z.union([
173
- ManualTermsOfService$outboundSchema,
174
- TermsOfServiceToken$outboundSchema,
175
- ]).optional(),
113
+ termsOfService: TermsOfServicePayload$outboundSchema.optional(),
176
114
  foreignID: z.string().optional(),
177
115
  customerSupport: CustomerSupport$outboundSchema.optional(),
178
116
  settings: Settings$outboundSchema.optional(),
@@ -406,6 +406,8 @@ export * from "./terminalcard.js";
406
406
  export * from "./terminalconfiguration.js";
407
407
  export * from "./termsofservice.js";
408
408
  export * from "./termsofserviceerror.js";
409
+ export * from "./termsofservicepayload.js";
410
+ export * from "./termsofservicepayloadupdate.js";
409
411
  export * from "./termsofservicetoken.js";
410
412
  export * from "./termsofservicetokenupdate.js";
411
413
  export * from "./ticket.js";
@@ -18,12 +18,6 @@ import {
18
18
  CreateAccountSettings$Outbound,
19
19
  CreateAccountSettings$outboundSchema,
20
20
  } from "./createaccountsettings.js";
21
- import {
22
- ManualTermsOfServiceUpdate,
23
- ManualTermsOfServiceUpdate$inboundSchema,
24
- ManualTermsOfServiceUpdate$Outbound,
25
- ManualTermsOfServiceUpdate$outboundSchema,
26
- } from "./manualtermsofserviceupdate.js";
27
21
  import {
28
22
  PatchProfile,
29
23
  PatchProfile$inboundSchema,
@@ -37,15 +31,11 @@ import {
37
31
  PhoneNumber$outboundSchema,
38
32
  } from "./phonenumber.js";
39
33
  import {
40
- TermsOfServiceTokenUpdate,
41
- TermsOfServiceTokenUpdate$inboundSchema,
42
- TermsOfServiceTokenUpdate$Outbound,
43
- TermsOfServiceTokenUpdate$outboundSchema,
44
- } from "./termsofservicetokenupdate.js";
45
-
46
- export type PatchAccountTermsOfService =
47
- | TermsOfServiceTokenUpdate
48
- | ManualTermsOfServiceUpdate;
34
+ TermsOfServicePayloadUpdate,
35
+ TermsOfServicePayloadUpdate$inboundSchema,
36
+ TermsOfServicePayloadUpdate$Outbound,
37
+ TermsOfServicePayloadUpdate$outboundSchema,
38
+ } from "./termsofservicepayloadupdate.js";
49
39
 
50
40
  /**
51
41
  * User-provided information that can be displayed on credit card transactions for customers to use when
@@ -72,56 +62,12 @@ export type PatchAccount = {
72
62
  */
73
63
  profile?: PatchProfile | undefined;
74
64
  metadata?: { [k: string]: string } | null | undefined;
75
- termsOfService?:
76
- | TermsOfServiceTokenUpdate
77
- | ManualTermsOfServiceUpdate
78
- | undefined;
65
+ termsOfService?: TermsOfServicePayloadUpdate | undefined;
79
66
  foreignID?: string | undefined;
80
67
  customerSupport?: PatchAccountCustomerSupport | null | undefined;
81
68
  settings?: CreateAccountSettings | undefined;
82
69
  };
83
70
 
84
- /** @internal */
85
- export const PatchAccountTermsOfService$inboundSchema: z.ZodType<
86
- PatchAccountTermsOfService,
87
- z.ZodTypeDef,
88
- unknown
89
- > = z.union([
90
- TermsOfServiceTokenUpdate$inboundSchema,
91
- ManualTermsOfServiceUpdate$inboundSchema,
92
- ]);
93
- /** @internal */
94
- export type PatchAccountTermsOfService$Outbound =
95
- | TermsOfServiceTokenUpdate$Outbound
96
- | ManualTermsOfServiceUpdate$Outbound;
97
-
98
- /** @internal */
99
- export const PatchAccountTermsOfService$outboundSchema: z.ZodType<
100
- PatchAccountTermsOfService$Outbound,
101
- z.ZodTypeDef,
102
- PatchAccountTermsOfService
103
- > = z.union([
104
- TermsOfServiceTokenUpdate$outboundSchema,
105
- ManualTermsOfServiceUpdate$outboundSchema,
106
- ]);
107
-
108
- export function patchAccountTermsOfServiceToJSON(
109
- patchAccountTermsOfService: PatchAccountTermsOfService,
110
- ): string {
111
- return JSON.stringify(
112
- PatchAccountTermsOfService$outboundSchema.parse(patchAccountTermsOfService),
113
- );
114
- }
115
- export function patchAccountTermsOfServiceFromJSON(
116
- jsonString: string,
117
- ): SafeParseResult<PatchAccountTermsOfService, SDKValidationError> {
118
- return safeParse(
119
- jsonString,
120
- (x) => PatchAccountTermsOfService$inboundSchema.parse(JSON.parse(x)),
121
- `Failed to parse 'PatchAccountTermsOfService' from JSON`,
122
- );
123
- }
124
-
125
71
  /** @internal */
126
72
  export const PatchAccountCustomerSupport$inboundSchema: z.ZodType<
127
73
  PatchAccountCustomerSupport,
@@ -180,10 +126,7 @@ export const PatchAccount$inboundSchema: z.ZodType<
180
126
  > = z.object({
181
127
  profile: PatchProfile$inboundSchema.optional(),
182
128
  metadata: z.nullable(z.record(z.string())).optional(),
183
- termsOfService: z.union([
184
- TermsOfServiceTokenUpdate$inboundSchema,
185
- ManualTermsOfServiceUpdate$inboundSchema,
186
- ]).optional(),
129
+ termsOfService: TermsOfServicePayloadUpdate$inboundSchema.optional(),
187
130
  foreignID: z.string().optional(),
188
131
  customerSupport: z.nullable(
189
132
  z.lazy(() => PatchAccountCustomerSupport$inboundSchema),
@@ -194,10 +137,7 @@ export const PatchAccount$inboundSchema: z.ZodType<
194
137
  export type PatchAccount$Outbound = {
195
138
  profile?: PatchProfile$Outbound | undefined;
196
139
  metadata?: { [k: string]: string } | null | undefined;
197
- termsOfService?:
198
- | TermsOfServiceTokenUpdate$Outbound
199
- | ManualTermsOfServiceUpdate$Outbound
200
- | undefined;
140
+ termsOfService?: TermsOfServicePayloadUpdate$Outbound | undefined;
201
141
  foreignID?: string | undefined;
202
142
  customerSupport?: PatchAccountCustomerSupport$Outbound | null | undefined;
203
143
  settings?: CreateAccountSettings$Outbound | undefined;
@@ -211,10 +151,7 @@ export const PatchAccount$outboundSchema: z.ZodType<
211
151
  > = z.object({
212
152
  profile: PatchProfile$outboundSchema.optional(),
213
153
  metadata: z.nullable(z.record(z.string())).optional(),
214
- termsOfService: z.union([
215
- TermsOfServiceTokenUpdate$outboundSchema,
216
- ManualTermsOfServiceUpdate$outboundSchema,
217
- ]).optional(),
154
+ termsOfService: TermsOfServicePayloadUpdate$outboundSchema.optional(),
218
155
  foreignID: z.string().optional(),
219
156
  customerSupport: z.nullable(
220
157
  z.lazy(() => PatchAccountCustomerSupport$outboundSchema),
@@ -0,0 +1,73 @@
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
+ ManualTermsOfService,
11
+ ManualTermsOfService$inboundSchema,
12
+ ManualTermsOfService$Outbound,
13
+ ManualTermsOfService$outboundSchema,
14
+ } from "./manualtermsofservice.js";
15
+ import {
16
+ TermsOfServiceToken,
17
+ TermsOfServiceToken$inboundSchema,
18
+ TermsOfServiceToken$Outbound,
19
+ TermsOfServiceToken$outboundSchema,
20
+ } from "./termsofservicetoken.js";
21
+
22
+ export type TermsOfServicePayload = {
23
+ /**
24
+ * An encrypted value used to record acceptance of Moov's Terms of Service.
25
+ */
26
+ token?: TermsOfServiceToken | undefined;
27
+ /**
28
+ * Describes the acceptance of the Terms of Service. All data is required, and must be from the user.
29
+ */
30
+ manual?: ManualTermsOfService | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export const TermsOfServicePayload$inboundSchema: z.ZodType<
35
+ TermsOfServicePayload,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ token: TermsOfServiceToken$inboundSchema.optional(),
40
+ manual: ManualTermsOfService$inboundSchema.optional(),
41
+ });
42
+ /** @internal */
43
+ export type TermsOfServicePayload$Outbound = {
44
+ token?: TermsOfServiceToken$Outbound | undefined;
45
+ manual?: ManualTermsOfService$Outbound | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const TermsOfServicePayload$outboundSchema: z.ZodType<
50
+ TermsOfServicePayload$Outbound,
51
+ z.ZodTypeDef,
52
+ TermsOfServicePayload
53
+ > = z.object({
54
+ token: TermsOfServiceToken$outboundSchema.optional(),
55
+ manual: ManualTermsOfService$outboundSchema.optional(),
56
+ });
57
+
58
+ export function termsOfServicePayloadToJSON(
59
+ termsOfServicePayload: TermsOfServicePayload,
60
+ ): string {
61
+ return JSON.stringify(
62
+ TermsOfServicePayload$outboundSchema.parse(termsOfServicePayload),
63
+ );
64
+ }
65
+ export function termsOfServicePayloadFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<TermsOfServicePayload, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => TermsOfServicePayload$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'TermsOfServicePayload' from JSON`,
72
+ );
73
+ }
@@ -0,0 +1,75 @@
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
+ ManualTermsOfServiceUpdate,
11
+ ManualTermsOfServiceUpdate$inboundSchema,
12
+ ManualTermsOfServiceUpdate$Outbound,
13
+ ManualTermsOfServiceUpdate$outboundSchema,
14
+ } from "./manualtermsofserviceupdate.js";
15
+ import {
16
+ TermsOfServiceTokenUpdate,
17
+ TermsOfServiceTokenUpdate$inboundSchema,
18
+ TermsOfServiceTokenUpdate$Outbound,
19
+ TermsOfServiceTokenUpdate$outboundSchema,
20
+ } from "./termsofservicetokenupdate.js";
21
+
22
+ export type TermsOfServicePayloadUpdate = {
23
+ /**
24
+ * An encrypted value used to record acceptance of Moov's Terms of Service.
25
+ */
26
+ token?: TermsOfServiceTokenUpdate | undefined;
27
+ /**
28
+ * Describes the acceptance of the Terms of Service. All data is required, and must be from the user.
29
+ */
30
+ manual?: ManualTermsOfServiceUpdate | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export const TermsOfServicePayloadUpdate$inboundSchema: z.ZodType<
35
+ TermsOfServicePayloadUpdate,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ token: TermsOfServiceTokenUpdate$inboundSchema.optional(),
40
+ manual: ManualTermsOfServiceUpdate$inboundSchema.optional(),
41
+ });
42
+ /** @internal */
43
+ export type TermsOfServicePayloadUpdate$Outbound = {
44
+ token?: TermsOfServiceTokenUpdate$Outbound | undefined;
45
+ manual?: ManualTermsOfServiceUpdate$Outbound | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const TermsOfServicePayloadUpdate$outboundSchema: z.ZodType<
50
+ TermsOfServicePayloadUpdate$Outbound,
51
+ z.ZodTypeDef,
52
+ TermsOfServicePayloadUpdate
53
+ > = z.object({
54
+ token: TermsOfServiceTokenUpdate$outboundSchema.optional(),
55
+ manual: ManualTermsOfServiceUpdate$outboundSchema.optional(),
56
+ });
57
+
58
+ export function termsOfServicePayloadUpdateToJSON(
59
+ termsOfServicePayloadUpdate: TermsOfServicePayloadUpdate,
60
+ ): string {
61
+ return JSON.stringify(
62
+ TermsOfServicePayloadUpdate$outboundSchema.parse(
63
+ termsOfServicePayloadUpdate,
64
+ ),
65
+ );
66
+ }
67
+ export function termsOfServicePayloadUpdateFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<TermsOfServicePayloadUpdate, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => TermsOfServicePayloadUpdate$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'TermsOfServicePayloadUpdate' from JSON`,
74
+ );
75
+ }