@moovio/sdk 26.2.3 → 26.2.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 (42) hide show
  1. package/FUNCTIONS.md +2 -2
  2. package/bin/mcp-server.js +43 -13
  3. package/bin/mcp-server.js.map +12 -11
  4. package/funcs/filesUpload.d.ts.map +1 -1
  5. package/funcs/filesUpload.js +3 -1
  6. package/funcs/filesUpload.js.map +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +3 -3
  9. package/lib/config.js +3 -3
  10. package/lib/config.js.map +1 -1
  11. package/mcp-server/mcp-server.js +1 -1
  12. package/mcp-server/server.js +1 -1
  13. package/models/components/fileuploadmetadata.d.ts +28 -0
  14. package/models/components/fileuploadmetadata.d.ts.map +1 -0
  15. package/models/components/fileuploadmetadata.js +69 -0
  16. package/models/components/fileuploadmetadata.js.map +1 -0
  17. package/models/components/fileuploadrequestmultipart.d.ts +5 -8
  18. package/models/components/fileuploadrequestmultipart.d.ts.map +1 -1
  19. package/models/components/fileuploadrequestmultipart.js +3 -2
  20. package/models/components/fileuploadrequestmultipart.js.map +1 -1
  21. package/models/components/index.d.ts +1 -0
  22. package/models/components/index.d.ts.map +1 -1
  23. package/models/components/index.js +1 -0
  24. package/models/components/index.js.map +1 -1
  25. package/models/components/webhookdata.d.ts +2 -2
  26. package/models/components/webhookdata.d.ts.map +1 -1
  27. package/models/components/webhookdata.js +2 -2
  28. package/models/components/webhookdata.js.map +1 -1
  29. package/models/components/webhookdatabankaccountcreated.d.ts +3 -0
  30. package/models/components/webhookdatabankaccountcreated.d.ts.map +1 -1
  31. package/models/components/webhookdatabankaccountcreated.js +3 -0
  32. package/models/components/webhookdatabankaccountcreated.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/funcs/filesUpload.ts +13 -2
  35. package/src/lib/config.ts +3 -3
  36. package/src/mcp-server/mcp-server.ts +1 -1
  37. package/src/mcp-server/server.ts +1 -1
  38. package/src/models/components/fileuploadmetadata.ts +73 -0
  39. package/src/models/components/fileuploadrequestmultipart.ts +12 -10
  40. package/src/models/components/index.ts +1 -0
  41. package/src/models/components/webhookdata.ts +4 -4
  42. package/src/models/components/webhookdatabankaccountcreated.ts +9 -0
@@ -3,7 +3,12 @@
3
3
  */
4
4
 
5
5
  import { MoovCore } from "../core.js";
6
- import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js";
6
+ import {
7
+ appendForm,
8
+ encodeJSON,
9
+ encodeSimple,
10
+ normalizeBlob,
11
+ } from "../lib/encodings.js";
7
12
  import {
8
13
  bytesToBlob,
9
14
  getContentTypeFromFileName,
@@ -140,7 +145,13 @@ async function $do(
140
145
  payload.FileUploadRequestMultiPart.filePurpose,
141
146
  );
142
147
  if (payload.FileUploadRequestMultiPart.metadata !== undefined) {
143
- appendForm(body, "metadata", payload.FileUploadRequestMultiPart.metadata);
148
+ appendForm(
149
+ body,
150
+ "metadata",
151
+ encodeJSON("metadata", payload.FileUploadRequestMultiPart.metadata, {
152
+ explode: true,
153
+ }),
154
+ );
144
155
  }
145
156
 
146
157
  const pathParams = {
package/src/lib/config.ts CHANGED
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "v2026.01.00",
71
- sdkVersion: "26.2.3",
72
- genVersion: "2.881.4",
73
- userAgent: "speakeasy-sdk/typescript 26.2.3 2.881.4 v2026.01.00 @moovio/sdk",
71
+ sdkVersion: "26.2.4",
72
+ genVersion: "2.881.17",
73
+ userAgent: "speakeasy-sdk/typescript 26.2.4 2.881.17 v2026.01.00 @moovio/sdk",
74
74
  } 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: "26.2.3",
22
+ currentVersion: "26.2.4",
23
23
  },
24
24
  });
25
25
 
@@ -196,7 +196,7 @@ export function createMCPServer(deps: {
196
196
  }) {
197
197
  const server = new McpServer({
198
198
  name: "Moov",
199
- version: "26.2.3",
199
+ version: "26.2.4",
200
200
  });
201
201
 
202
202
  const client = new MoovCore({
@@ -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 { 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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Additional metadata to be stored with the file.
13
+ */
14
+ export type FileUploadMetadata = {
15
+ /**
16
+ * The representative ID that the file is for. Required when filePurpose is `representativeVerification`.
17
+ */
18
+ representativeId?: string | undefined;
19
+ /**
20
+ * Comments or notes about the file.
21
+ */
22
+ comment?: string | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const FileUploadMetadata$inboundSchema: z.ZodType<
27
+ FileUploadMetadata,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ representative_id: z.string().optional(),
32
+ comment: z.string().optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "representative_id": "representativeId",
36
+ });
37
+ });
38
+ /** @internal */
39
+ export type FileUploadMetadata$Outbound = {
40
+ representative_id?: string | undefined;
41
+ comment?: string | undefined;
42
+ };
43
+
44
+ /** @internal */
45
+ export const FileUploadMetadata$outboundSchema: z.ZodType<
46
+ FileUploadMetadata$Outbound,
47
+ z.ZodTypeDef,
48
+ FileUploadMetadata
49
+ > = z.object({
50
+ representativeId: z.string().optional(),
51
+ comment: z.string().optional(),
52
+ }).transform((v) => {
53
+ return remap$(v, {
54
+ representativeId: "representative_id",
55
+ });
56
+ });
57
+
58
+ export function fileUploadMetadataToJSON(
59
+ fileUploadMetadata: FileUploadMetadata,
60
+ ): string {
61
+ return JSON.stringify(
62
+ FileUploadMetadata$outboundSchema.parse(fileUploadMetadata),
63
+ );
64
+ }
65
+ export function fileUploadMetadataFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<FileUploadMetadata, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => FileUploadMetadata$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'FileUploadMetadata' from JSON`,
72
+ );
73
+ }
@@ -12,6 +12,12 @@ import {
12
12
  FilePurpose$inboundSchema,
13
13
  FilePurpose$outboundSchema,
14
14
  } from "./filepurpose.js";
15
+ import {
16
+ FileUploadMetadata,
17
+ FileUploadMetadata$inboundSchema,
18
+ FileUploadMetadata$Outbound,
19
+ FileUploadMetadata$outboundSchema,
20
+ } from "./fileuploadmetadata.js";
15
21
 
16
22
  export type FileUploadRequestMultiPartFile = {
17
23
  fileName: string;
@@ -20,7 +26,7 @@ export type FileUploadRequestMultiPartFile = {
20
26
 
21
27
  export type FileUploadRequestMultiPart = {
22
28
  /**
23
- * The file to be added. Valid types are `csv`, `png`, `jpeg`, `pdf`.
29
+ * The file to upload. Valid types are `csv`, `png`, `jpeg`, `pdf`.
24
30
  */
25
31
  file: FileUploadRequestMultiPartFile | Blob;
26
32
  /**
@@ -28,13 +34,9 @@ export type FileUploadRequestMultiPart = {
28
34
  */
29
35
  filePurpose: FilePurpose;
30
36
  /**
31
- * Additional metadata to be stored with the file, formatted as a JSON string.
32
- *
33
- * @remarks
34
- *
35
- * Valid keys are `representative_id`, `comment`, `requirement_id`, `error_code`.
37
+ * Additional metadata to be stored with the file.
36
38
  */
37
- metadata?: string | undefined;
39
+ metadata?: FileUploadMetadata | undefined;
38
40
  };
39
41
 
40
42
  /** @internal */
@@ -99,13 +101,13 @@ export const FileUploadRequestMultiPart$inboundSchema: z.ZodType<
99
101
  > = z.object({
100
102
  file: z.lazy(() => FileUploadRequestMultiPartFile$inboundSchema),
101
103
  filePurpose: FilePurpose$inboundSchema,
102
- metadata: z.string().optional(),
104
+ metadata: FileUploadMetadata$inboundSchema.optional(),
103
105
  });
104
106
  /** @internal */
105
107
  export type FileUploadRequestMultiPart$Outbound = {
106
108
  file: FileUploadRequestMultiPartFile$Outbound | Blob;
107
109
  filePurpose: string;
108
- metadata?: string | undefined;
110
+ metadata?: FileUploadMetadata$Outbound | undefined;
109
111
  };
110
112
 
111
113
  /** @internal */
@@ -118,7 +120,7 @@ export const FileUploadRequestMultiPart$outboundSchema: z.ZodType<
118
120
  blobLikeSchema,
119
121
  ),
120
122
  filePurpose: FilePurpose$outboundSchema,
121
- metadata: z.string().optional(),
123
+ metadata: FileUploadMetadata$outboundSchema.optional(),
122
124
  });
123
125
 
124
126
  export function fileUploadRequestMultiPartToJSON(
@@ -232,6 +232,7 @@ export * from "./feeproperties.js";
232
232
  export * from "./filedetails.js";
233
233
  export * from "./filepurpose.js";
234
234
  export * from "./filestatus.js";
235
+ export * from "./fileuploadmetadata.js";
235
236
  export * from "./fileuploadrequestmultipart.js";
236
237
  export * from "./financialinstitutions.js";
237
238
  export * from "./fulfillment.js";
@@ -239,6 +239,7 @@ export type WebhookData =
239
239
  | WebhookDataBankAccountUpdated
240
240
  | WebhookDataRefundUpdated
241
241
  | WebhookDataWalletTransactionUpdated
242
+ | WebhookDataBankAccountCreated
242
243
  | WebhookDataCancellationCreated
243
244
  | WebhookDataCancellationUpdated
244
245
  | WebhookDataCardAutoUpdated
@@ -252,7 +253,6 @@ export type WebhookData =
252
253
  | WebhookDataTransferCreated
253
254
  | WebhookDataWalletUpdated
254
255
  | WebhookDataBalanceUpdated
255
- | WebhookDataBankAccountCreated
256
256
  | WebhookDataBankAccountDeleted
257
257
  | WebhookDataCapabilityRequested
258
258
  | WebhookDataInvoiceCreated
@@ -283,6 +283,7 @@ export const WebhookData$inboundSchema: z.ZodType<
283
283
  WebhookDataBankAccountUpdated$inboundSchema,
284
284
  WebhookDataRefundUpdated$inboundSchema,
285
285
  WebhookDataWalletTransactionUpdated$inboundSchema,
286
+ WebhookDataBankAccountCreated$inboundSchema,
286
287
  WebhookDataCancellationCreated$inboundSchema,
287
288
  WebhookDataCancellationUpdated$inboundSchema,
288
289
  WebhookDataCardAutoUpdated$inboundSchema,
@@ -296,7 +297,6 @@ export const WebhookData$inboundSchema: z.ZodType<
296
297
  WebhookDataTransferCreated$inboundSchema,
297
298
  WebhookDataWalletUpdated$inboundSchema,
298
299
  WebhookDataBalanceUpdated$inboundSchema,
299
- WebhookDataBankAccountCreated$inboundSchema,
300
300
  WebhookDataBankAccountDeleted$inboundSchema,
301
301
  WebhookDataCapabilityRequested$inboundSchema,
302
302
  WebhookDataInvoiceCreated$inboundSchema,
@@ -323,6 +323,7 @@ export type WebhookData$Outbound =
323
323
  | WebhookDataBankAccountUpdated$Outbound
324
324
  | WebhookDataRefundUpdated$Outbound
325
325
  | WebhookDataWalletTransactionUpdated$Outbound
326
+ | WebhookDataBankAccountCreated$Outbound
326
327
  | WebhookDataCancellationCreated$Outbound
327
328
  | WebhookDataCancellationUpdated$Outbound
328
329
  | WebhookDataCardAutoUpdated$Outbound
@@ -336,7 +337,6 @@ export type WebhookData$Outbound =
336
337
  | WebhookDataTransferCreated$Outbound
337
338
  | WebhookDataWalletUpdated$Outbound
338
339
  | WebhookDataBalanceUpdated$Outbound
339
- | WebhookDataBankAccountCreated$Outbound
340
340
  | WebhookDataBankAccountDeleted$Outbound
341
341
  | WebhookDataCapabilityRequested$Outbound
342
342
  | WebhookDataInvoiceCreated$Outbound
@@ -367,6 +367,7 @@ export const WebhookData$outboundSchema: z.ZodType<
367
367
  WebhookDataBankAccountUpdated$outboundSchema,
368
368
  WebhookDataRefundUpdated$outboundSchema,
369
369
  WebhookDataWalletTransactionUpdated$outboundSchema,
370
+ WebhookDataBankAccountCreated$outboundSchema,
370
371
  WebhookDataCancellationCreated$outboundSchema,
371
372
  WebhookDataCancellationUpdated$outboundSchema,
372
373
  WebhookDataCardAutoUpdated$outboundSchema,
@@ -380,7 +381,6 @@ export const WebhookData$outboundSchema: z.ZodType<
380
381
  WebhookDataTransferCreated$outboundSchema,
381
382
  WebhookDataWalletUpdated$outboundSchema,
382
383
  WebhookDataBalanceUpdated$outboundSchema,
383
- WebhookDataBankAccountCreated$outboundSchema,
384
384
  WebhookDataBankAccountDeleted$outboundSchema,
385
385
  WebhookDataCapabilityRequested$outboundSchema,
386
386
  WebhookDataInvoiceCreated$outboundSchema,
@@ -6,10 +6,16 @@ import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ BankAccountStatus,
11
+ BankAccountStatus$inboundSchema,
12
+ BankAccountStatus$outboundSchema,
13
+ } from "./bankaccountstatus.js";
9
14
 
10
15
  export type WebhookDataBankAccountCreated = {
11
16
  bankAccountID: string;
12
17
  accountID: string;
18
+ status: BankAccountStatus;
13
19
  };
14
20
 
15
21
  /** @internal */
@@ -20,11 +26,13 @@ export const WebhookDataBankAccountCreated$inboundSchema: z.ZodType<
20
26
  > = z.object({
21
27
  bankAccountID: z.string(),
22
28
  accountID: z.string(),
29
+ status: BankAccountStatus$inboundSchema,
23
30
  });
24
31
  /** @internal */
25
32
  export type WebhookDataBankAccountCreated$Outbound = {
26
33
  bankAccountID: string;
27
34
  accountID: string;
35
+ status: string;
28
36
  };
29
37
 
30
38
  /** @internal */
@@ -35,6 +43,7 @@ export const WebhookDataBankAccountCreated$outboundSchema: z.ZodType<
35
43
  > = z.object({
36
44
  bankAccountID: z.string(),
37
45
  accountID: z.string(),
46
+ status: BankAccountStatus$outboundSchema,
38
47
  });
39
48
 
40
49
  export function webhookDataBankAccountCreatedToJSON(