@moovio/sdk 0.0.0-dev.5 → 0.0.0-dev.7
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 +115 -55
- package/bin/mcp-server.js +1792 -876
- package/bin/mcp-server.js.map +43 -27
- package/funcs/disputesUploadEvidenceFile.js +6 -0
- package/funcs/disputesUploadEvidenceFile.js.map +1 -1
- package/funcs/filesUpload.js +6 -0
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/imagesUpdate.js +7 -0
- package/funcs/imagesUpdate.js.map +1 -1
- package/funcs/imagesUpload.js +7 -0
- package/funcs/imagesUpload.js.map +1 -1
- package/funcs/invoicesDelete.d.ts +24 -0
- package/funcs/invoicesDelete.d.ts.map +1 -0
- package/funcs/invoicesDelete.js +146 -0
- package/funcs/invoicesDelete.js.map +1 -0
- package/funcs/resolutionLinksCreate.d.ts +20 -0
- package/funcs/resolutionLinksCreate.d.ts.map +1 -0
- package/funcs/resolutionLinksCreate.js +145 -0
- package/funcs/resolutionLinksCreate.js.map +1 -0
- package/funcs/resolutionLinksDisable.d.ts +18 -0
- package/funcs/resolutionLinksDisable.d.ts.map +1 -0
- package/funcs/resolutionLinksDisable.js +135 -0
- package/funcs/resolutionLinksDisable.js.map +1 -0
- package/funcs/resolutionLinksGet.d.ts +17 -0
- package/funcs/resolutionLinksGet.d.ts.map +1 -0
- package/funcs/resolutionLinksGet.js +126 -0
- package/funcs/resolutionLinksGet.js.map +1 -0
- package/funcs/resolutionLinksList.d.ts +17 -0
- package/funcs/resolutionLinksList.d.ts.map +1 -0
- package/funcs/resolutionLinksList.js +125 -0
- package/funcs/resolutionLinksList.js.map +1 -0
- package/hooks/moov-version-hook.d.ts +3 -4
- package/hooks/moov-version-hook.d.ts.map +1 -1
- package/hooks/moov-version-hook.js +5 -4
- package/hooks/moov-version-hook.js.map +1 -1
- package/hooks/registration.js +1 -1
- package/hooks/registration.js.map +1 -1
- 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/matchers.d.ts.map +1 -1
- package/lib/matchers.js +0 -1
- package/lib/matchers.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +1 -2
- package/lib/security.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +11 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/shared.js +1 -1
- package/mcp-server/shared.js.map +1 -1
- package/mcp-server/tools/invoicesDelete.d.ts +8 -0
- package/mcp-server/tools/invoicesDelete.d.ts.map +1 -0
- package/mcp-server/tools/invoicesDelete.js +70 -0
- package/mcp-server/tools/invoicesDelete.js.map +1 -0
- package/mcp-server/tools/resolutionLinksCreate.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksCreate.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksCreate.js +67 -0
- package/mcp-server/tools/resolutionLinksCreate.js.map +1 -0
- package/mcp-server/tools/resolutionLinksDisable.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksDisable.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksDisable.js +64 -0
- package/mcp-server/tools/resolutionLinksDisable.js.map +1 -0
- package/mcp-server/tools/resolutionLinksGet.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksGet.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksGet.js +65 -0
- package/mcp-server/tools/resolutionLinksGet.js.map +1 -0
- package/mcp-server/tools/resolutionLinksList.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksList.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksList.js +65 -0
- package/mcp-server/tools/resolutionLinksList.js.map +1 -0
- package/models/components/createinvoicelineitem.d.ts +2 -1
- package/models/components/createinvoicelineitem.d.ts.map +1 -1
- package/models/components/createinvoicelineitem.js.map +1 -1
- package/models/components/createpaymentlinklineitem.d.ts +2 -1
- package/models/components/createpaymentlinklineitem.d.ts.map +1 -1
- package/models/components/createpaymentlinklineitem.js.map +1 -1
- package/models/components/createresolutionlink.d.ts +24 -0
- package/models/components/createresolutionlink.d.ts.map +1 -0
- package/models/components/{rtpfailurecode.js → createresolutionlink.js} +18 -19
- package/models/components/createresolutionlink.js.map +1 -0
- package/models/components/index.d.ts +3 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -3
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +12 -0
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +6 -0
- package/models/components/invoice.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +2 -1
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/resolutionlink.d.ts +63 -0
- package/models/components/resolutionlink.d.ts.map +1 -0
- package/models/components/resolutionlink.js +75 -0
- package/models/components/resolutionlink.js.map +1 -0
- package/models/components/resolutionlinkrecipient.d.ts +29 -0
- package/models/components/resolutionlinkrecipient.d.ts.map +1 -0
- package/models/components/{rtptransactionstatus.js → resolutionlinkrecipient.js} +20 -13
- package/models/components/resolutionlinkrecipient.js.map +1 -0
- package/models/components/transferdestination.d.ts +0 -6
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +0 -3
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/updateinvoice.d.ts +4 -1
- package/models/components/updateinvoice.d.ts.map +1 -1
- package/models/components/updateinvoice.js.map +1 -1
- package/models/errors/createresolutionlinkerror.d.ts +45 -0
- package/models/errors/createresolutionlinkerror.d.ts.map +1 -0
- package/models/errors/createresolutionlinkerror.js +82 -0
- package/models/errors/createresolutionlinkerror.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/createresolutionlink.d.ts +66 -0
- package/models/operations/createresolutionlink.d.ts.map +1 -0
- package/models/operations/createresolutionlink.js +122 -0
- package/models/operations/createresolutionlink.js.map +1 -0
- package/models/operations/deleteinvoice.d.ts +63 -0
- package/models/operations/deleteinvoice.d.ts.map +1 -0
- package/models/operations/deleteinvoice.js +109 -0
- package/models/operations/deleteinvoice.js.map +1 -0
- package/models/operations/disableresolutionlink.d.ts +63 -0
- package/models/operations/disableresolutionlink.d.ts.map +1 -0
- package/models/operations/disableresolutionlink.js +109 -0
- package/models/operations/disableresolutionlink.js.map +1 -0
- package/models/operations/getresolutionlink.d.ts +66 -0
- package/models/operations/getresolutionlink.d.ts.map +1 -0
- package/models/operations/getresolutionlink.js +114 -0
- package/models/operations/getresolutionlink.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listresolutionlinks.d.ts +64 -0
- package/models/operations/listresolutionlinks.d.ts.map +1 -0
- package/models/operations/listresolutionlinks.js +112 -0
- package/models/operations/listresolutionlinks.js.map +1 -0
- package/package.json +1 -1
- package/sdk/invoices.d.ts +13 -0
- package/sdk/invoices.d.ts.map +1 -1
- package/sdk/invoices.js +16 -0
- package/sdk/invoices.js.map +1 -1
- package/sdk/resolutionlinks.d.ts +35 -0
- package/sdk/resolutionlinks.d.ts.map +1 -0
- package/sdk/resolutionlinks.js +54 -0
- package/sdk/resolutionlinks.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/disputesUploadEvidenceFile.ts +15 -0
- package/src/funcs/filesUpload.ts +15 -0
- package/src/funcs/imagesUpdate.ts +16 -0
- package/src/funcs/imagesUpload.ts +16 -0
- package/src/funcs/invoicesDelete.ts +206 -0
- package/src/funcs/resolutionLinksCreate.ts +208 -0
- package/src/funcs/resolutionLinksDisable.ts +204 -0
- package/src/funcs/resolutionLinksGet.ts +186 -0
- package/src/funcs/resolutionLinksList.ts +180 -0
- package/src/hooks/moov-version-hook.ts +10 -6
- package/src/hooks/registration.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/matchers.ts +3 -2
- package/src/lib/security.ts +1 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/shared.ts +2 -2
- package/src/mcp-server/tools/invoicesDelete.ts +43 -0
- package/src/mcp-server/tools/resolutionLinksCreate.ts +41 -0
- package/src/mcp-server/tools/resolutionLinksDisable.ts +37 -0
- package/src/mcp-server/tools/resolutionLinksGet.ts +38 -0
- package/src/mcp-server/tools/resolutionLinksList.ts +38 -0
- package/src/models/components/createinvoicelineitem.ts +2 -1
- package/src/models/components/createpaymentlinklineitem.ts +2 -1
- package/src/models/components/createresolutionlink.ts +63 -0
- package/src/models/components/index.ts +3 -3
- package/src/models/components/invoice.ts +20 -0
- package/src/models/components/invoicelineitem.ts +2 -1
- package/src/models/components/resolutionlink.ts +110 -0
- package/src/models/components/resolutionlinkrecipient.ts +70 -0
- package/src/models/components/transferdestination.ts +0 -13
- package/src/models/components/updateinvoice.ts +4 -1
- package/src/models/errors/createresolutionlinkerror.ts +90 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createresolutionlink.ts +193 -0
- package/src/models/operations/deleteinvoice.ts +172 -0
- package/src/models/operations/disableresolutionlink.ts +178 -0
- package/src/models/operations/getresolutionlink.ts +179 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listresolutionlinks.ts +177 -0
- package/src/sdk/invoices.ts +24 -0
- package/src/sdk/resolutionlinks.ts +83 -0
- package/src/sdk/sdk.ts +6 -0
- package/models/components/rtpfailurecode.d.ts +0 -26
- package/models/components/rtpfailurecode.d.ts.map +0 -1
- package/models/components/rtpfailurecode.js.map +0 -1
- package/models/components/rtptransactiondetails.d.ts +0 -43
- package/models/components/rtptransactiondetails.d.ts.map +0 -1
- package/models/components/rtptransactiondetails.js +0 -75
- package/models/components/rtptransactiondetails.js.map +0 -1
- package/models/components/rtptransactionstatus.d.ts +0 -20
- package/models/components/rtptransactionstatus.d.ts.map +0 -1
- package/models/components/rtptransactionstatus.js.map +0 -1
- package/src/models/components/rtpfailurecode.ts +0 -35
- package/src/models/components/rtptransactiondetails.ts +0 -102
- package/src/models/components/rtptransactionstatus.ts +0 -29
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksList } from "../../funcs/resolutionLinksList.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListResolutionLinksRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$resolutionLinksList: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "resolution-links-list",
|
|
15
|
+
description: `List resolution links for the specified account.
|
|
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}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await resolutionLinksList(
|
|
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
|
+
};
|
|
@@ -39,7 +39,8 @@ export type CreateInvoiceLineItem = {
|
|
|
39
39
|
* Optional unique identifier associating the line item with a product.
|
|
40
40
|
*
|
|
41
41
|
* @remarks
|
|
42
|
-
*
|
|
42
|
+
* When provided, images associated with the product will be included on the line item.
|
|
43
|
+
* This does not populate other details of the line item.
|
|
43
44
|
*/
|
|
44
45
|
productID?: string | undefined;
|
|
45
46
|
/**
|
|
@@ -52,7 +52,8 @@ export type CreatePaymentLinkLineItem = {
|
|
|
52
52
|
* Optional unique identifier associating the line item with a product.
|
|
53
53
|
*
|
|
54
54
|
* @remarks
|
|
55
|
-
*
|
|
55
|
+
* When provided, images associated with the product will be included on the line item.
|
|
56
|
+
* This does not populate other details of the line item.
|
|
56
57
|
*/
|
|
57
58
|
productID?: string | undefined;
|
|
58
59
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
ResolutionLinkRecipient,
|
|
11
|
+
ResolutionLinkRecipient$inboundSchema,
|
|
12
|
+
ResolutionLinkRecipient$Outbound,
|
|
13
|
+
ResolutionLinkRecipient$outboundSchema,
|
|
14
|
+
} from "./resolutionlinkrecipient.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Request body for creating a resolution link.
|
|
18
|
+
*/
|
|
19
|
+
export type CreateResolutionLink = {
|
|
20
|
+
/**
|
|
21
|
+
* The recipient contact information for the resolution link.
|
|
22
|
+
*/
|
|
23
|
+
recipient: ResolutionLinkRecipient;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const CreateResolutionLink$inboundSchema: z.ZodType<
|
|
28
|
+
CreateResolutionLink,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
recipient: ResolutionLinkRecipient$inboundSchema,
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type CreateResolutionLink$Outbound = {
|
|
36
|
+
recipient: ResolutionLinkRecipient$Outbound;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CreateResolutionLink$outboundSchema: z.ZodType<
|
|
41
|
+
CreateResolutionLink$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
CreateResolutionLink
|
|
44
|
+
> = z.object({
|
|
45
|
+
recipient: ResolutionLinkRecipient$outboundSchema,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function createResolutionLinkToJSON(
|
|
49
|
+
createResolutionLink: CreateResolutionLink,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
CreateResolutionLink$outboundSchema.parse(createResolutionLink),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function createResolutionLinkFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<CreateResolutionLink, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) => CreateResolutionLink$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'CreateResolutionLink' from JSON`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -174,6 +174,7 @@ export * from "./createprofileerror.js";
|
|
|
174
174
|
export * from "./createrefund.js";
|
|
175
175
|
export * from "./createrefundresponse.js";
|
|
176
176
|
export * from "./createrepresentative.js";
|
|
177
|
+
export * from "./createresolutionlink.js";
|
|
177
178
|
export * from "./createreversal.js";
|
|
178
179
|
export * from "./createruntransfer.js";
|
|
179
180
|
export * from "./createscheduledtransferlineitem.js";
|
|
@@ -415,6 +416,8 @@ export * from "./requirementerror.js";
|
|
|
415
416
|
export * from "./requirementerrorcode.js";
|
|
416
417
|
export * from "./requirementid.js";
|
|
417
418
|
export * from "./residual.js";
|
|
419
|
+
export * from "./resolutionlink.js";
|
|
420
|
+
export * from "./resolutionlinkrecipient.js";
|
|
418
421
|
export * from "./returnpolicytype.js";
|
|
419
422
|
export * from "./reversal.js";
|
|
420
423
|
export * from "./reversedwithcancellation.js";
|
|
@@ -422,12 +425,9 @@ export * from "./reversedwithrefund.js";
|
|
|
422
425
|
export * from "./revoketokenrequest.js";
|
|
423
426
|
export * from "./rtpcreditpaymentmethod.js";
|
|
424
427
|
export * from "./rtpcredittransferpaymentmethod.js";
|
|
425
|
-
export * from "./rtpfailurecode.js";
|
|
426
428
|
export * from "./rtpinstitution.js";
|
|
427
429
|
export * from "./rtprejectioncode.js";
|
|
428
430
|
export * from "./rtpservices.js";
|
|
429
|
-
export * from "./rtptransactiondetails.js";
|
|
430
|
-
export * from "./rtptransactionstatus.js";
|
|
431
431
|
export * from "./runtransfer.js";
|
|
432
432
|
export * from "./scheduledtransferimagemetadata.js";
|
|
433
433
|
export * from "./scheduledtransferlineitem.js";
|
|
@@ -41,6 +41,14 @@ export type Invoice = {
|
|
|
41
41
|
* A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
|
|
42
42
|
*/
|
|
43
43
|
customerAccountID: string;
|
|
44
|
+
/**
|
|
45
|
+
* Display name of the customer account.
|
|
46
|
+
*/
|
|
47
|
+
customerDisplayName: string;
|
|
48
|
+
/**
|
|
49
|
+
* Email address of the customer account.
|
|
50
|
+
*/
|
|
51
|
+
customerEmail: string;
|
|
44
52
|
/**
|
|
45
53
|
* A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
|
|
46
54
|
*/
|
|
@@ -83,6 +91,7 @@ export type Invoice = {
|
|
|
83
91
|
sentOn?: Date | undefined;
|
|
84
92
|
paidOn?: Date | undefined;
|
|
85
93
|
canceledOn?: Date | undefined;
|
|
94
|
+
disabledOn?: Date | undefined;
|
|
86
95
|
};
|
|
87
96
|
|
|
88
97
|
/** @internal */
|
|
@@ -92,6 +101,8 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
92
101
|
invoiceNumber: z.string(),
|
|
93
102
|
description: z.string().optional(),
|
|
94
103
|
customerAccountID: z.string(),
|
|
104
|
+
customerDisplayName: z.string(),
|
|
105
|
+
customerEmail: z.string(),
|
|
95
106
|
partnerAccountID: z.string(),
|
|
96
107
|
status: InvoiceStatus$inboundSchema,
|
|
97
108
|
lineItems: InvoiceLineItems$inboundSchema,
|
|
@@ -119,6 +130,9 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
119
130
|
canceledOn: z.string().datetime({ offset: true }).transform(v =>
|
|
120
131
|
new Date(v)
|
|
121
132
|
).optional(),
|
|
133
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v =>
|
|
134
|
+
new Date(v)
|
|
135
|
+
).optional(),
|
|
122
136
|
});
|
|
123
137
|
/** @internal */
|
|
124
138
|
export type Invoice$Outbound = {
|
|
@@ -126,6 +140,8 @@ export type Invoice$Outbound = {
|
|
|
126
140
|
invoiceNumber: string;
|
|
127
141
|
description?: string | undefined;
|
|
128
142
|
customerAccountID: string;
|
|
143
|
+
customerDisplayName: string;
|
|
144
|
+
customerEmail: string;
|
|
129
145
|
partnerAccountID: string;
|
|
130
146
|
status: string;
|
|
131
147
|
lineItems: InvoiceLineItems$Outbound;
|
|
@@ -144,6 +160,7 @@ export type Invoice$Outbound = {
|
|
|
144
160
|
sentOn?: string | undefined;
|
|
145
161
|
paidOn?: string | undefined;
|
|
146
162
|
canceledOn?: string | undefined;
|
|
163
|
+
disabledOn?: string | undefined;
|
|
147
164
|
};
|
|
148
165
|
|
|
149
166
|
/** @internal */
|
|
@@ -156,6 +173,8 @@ export const Invoice$outboundSchema: z.ZodType<
|
|
|
156
173
|
invoiceNumber: z.string(),
|
|
157
174
|
description: z.string().optional(),
|
|
158
175
|
customerAccountID: z.string(),
|
|
176
|
+
customerDisplayName: z.string(),
|
|
177
|
+
customerEmail: z.string(),
|
|
159
178
|
partnerAccountID: z.string(),
|
|
160
179
|
status: InvoiceStatus$outboundSchema,
|
|
161
180
|
lineItems: InvoiceLineItems$outboundSchema,
|
|
@@ -174,6 +193,7 @@ export const Invoice$outboundSchema: z.ZodType<
|
|
|
174
193
|
sentOn: z.date().transform(v => v.toISOString()).optional(),
|
|
175
194
|
paidOn: z.date().transform(v => v.toISOString()).optional(),
|
|
176
195
|
canceledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
196
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
177
197
|
});
|
|
178
198
|
|
|
179
199
|
export function invoiceToJSON(invoice: Invoice): string {
|
|
@@ -45,7 +45,8 @@ export type InvoiceLineItem = {
|
|
|
45
45
|
* Optional unique identifier associating the line item with a product.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
*
|
|
48
|
+
* When provided, images associated with the product will be included on the line item.
|
|
49
|
+
* This does not populate other details of the line item.
|
|
49
50
|
*/
|
|
50
51
|
productID?: string | undefined;
|
|
51
52
|
/**
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A temporary, secure link sent to a merchant to resolve account requirements such as KYC verification or document uploads.
|
|
12
|
+
*/
|
|
13
|
+
export type ResolutionLink = {
|
|
14
|
+
/**
|
|
15
|
+
* A unique nanoid identifier for the resolution link.
|
|
16
|
+
*/
|
|
17
|
+
code: string;
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the merchant account this resolution link is associated with.
|
|
20
|
+
*/
|
|
21
|
+
accountID: string;
|
|
22
|
+
/**
|
|
23
|
+
* The ID of the partner account this resolution link is associated with.
|
|
24
|
+
*/
|
|
25
|
+
partnerAccountID: string;
|
|
26
|
+
/**
|
|
27
|
+
* The recipient contact information for the resolution link.
|
|
28
|
+
*/
|
|
29
|
+
recipient: string;
|
|
30
|
+
/**
|
|
31
|
+
* The URL of the resolution link.
|
|
32
|
+
*/
|
|
33
|
+
url: string;
|
|
34
|
+
/**
|
|
35
|
+
* The date and time the resolution link was created.
|
|
36
|
+
*/
|
|
37
|
+
createdOn: Date;
|
|
38
|
+
/**
|
|
39
|
+
* The date and time the resolution link was last updated.
|
|
40
|
+
*/
|
|
41
|
+
updatedOn: Date;
|
|
42
|
+
/**
|
|
43
|
+
* The date and time the resolution link was disabled, if applicable.
|
|
44
|
+
*/
|
|
45
|
+
disabledOn?: Date | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The date and time the resolution link expires.
|
|
48
|
+
*/
|
|
49
|
+
expiresOn: Date;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const ResolutionLink$inboundSchema: z.ZodType<
|
|
54
|
+
ResolutionLink,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
code: z.string(),
|
|
59
|
+
accountID: z.string(),
|
|
60
|
+
partnerAccountID: z.string(),
|
|
61
|
+
recipient: z.string(),
|
|
62
|
+
url: z.string(),
|
|
63
|
+
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
64
|
+
updatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
65
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
66
|
+
.optional(),
|
|
67
|
+
expiresOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
68
|
+
});
|
|
69
|
+
/** @internal */
|
|
70
|
+
export type ResolutionLink$Outbound = {
|
|
71
|
+
code: string;
|
|
72
|
+
accountID: string;
|
|
73
|
+
partnerAccountID: string;
|
|
74
|
+
recipient: string;
|
|
75
|
+
url: string;
|
|
76
|
+
createdOn: string;
|
|
77
|
+
updatedOn: string;
|
|
78
|
+
disabledOn?: string | undefined;
|
|
79
|
+
expiresOn: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const ResolutionLink$outboundSchema: z.ZodType<
|
|
84
|
+
ResolutionLink$Outbound,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
ResolutionLink
|
|
87
|
+
> = z.object({
|
|
88
|
+
code: z.string(),
|
|
89
|
+
accountID: z.string(),
|
|
90
|
+
partnerAccountID: z.string(),
|
|
91
|
+
recipient: z.string(),
|
|
92
|
+
url: z.string(),
|
|
93
|
+
createdOn: z.date().transform(v => v.toISOString()),
|
|
94
|
+
updatedOn: z.date().transform(v => v.toISOString()),
|
|
95
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
96
|
+
expiresOn: z.date().transform(v => v.toISOString()),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export function resolutionLinkToJSON(resolutionLink: ResolutionLink): string {
|
|
100
|
+
return JSON.stringify(ResolutionLink$outboundSchema.parse(resolutionLink));
|
|
101
|
+
}
|
|
102
|
+
export function resolutionLinkFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<ResolutionLink, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => ResolutionLink$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'ResolutionLink' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
PhoneNumber,
|
|
11
|
+
PhoneNumber$inboundSchema,
|
|
12
|
+
PhoneNumber$Outbound,
|
|
13
|
+
PhoneNumber$outboundSchema,
|
|
14
|
+
} from "./phonenumber.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Contact information for the recipient of a resolution link. Provide either `email` or `phone`, but not both.
|
|
18
|
+
*/
|
|
19
|
+
export type ResolutionLinkRecipient = {
|
|
20
|
+
/**
|
|
21
|
+
* The email address of the recipient.
|
|
22
|
+
*/
|
|
23
|
+
email?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The phone number of the recipient.
|
|
26
|
+
*/
|
|
27
|
+
phone?: PhoneNumber | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ResolutionLinkRecipient$inboundSchema: z.ZodType<
|
|
32
|
+
ResolutionLinkRecipient,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
email: z.string().optional(),
|
|
37
|
+
phone: PhoneNumber$inboundSchema.optional(),
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type ResolutionLinkRecipient$Outbound = {
|
|
41
|
+
email?: string | undefined;
|
|
42
|
+
phone?: PhoneNumber$Outbound | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ResolutionLinkRecipient$outboundSchema: z.ZodType<
|
|
47
|
+
ResolutionLinkRecipient$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
ResolutionLinkRecipient
|
|
50
|
+
> = z.object({
|
|
51
|
+
email: z.string().optional(),
|
|
52
|
+
phone: PhoneNumber$outboundSchema.optional(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function resolutionLinkRecipientToJSON(
|
|
56
|
+
resolutionLinkRecipient: ResolutionLinkRecipient,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
ResolutionLinkRecipient$outboundSchema.parse(resolutionLinkRecipient),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export function resolutionLinkRecipientFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<ResolutionLinkRecipient, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => ResolutionLinkRecipient$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'ResolutionLinkRecipient' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -30,12 +30,6 @@ import {
|
|
|
30
30
|
InstantBankTransactionDetails$Outbound,
|
|
31
31
|
InstantBankTransactionDetails$outboundSchema,
|
|
32
32
|
} from "./instantbanktransactiondetails.js";
|
|
33
|
-
import {
|
|
34
|
-
RTPTransactionDetails,
|
|
35
|
-
RTPTransactionDetails$inboundSchema,
|
|
36
|
-
RTPTransactionDetails$Outbound,
|
|
37
|
-
RTPTransactionDetails$outboundSchema,
|
|
38
|
-
} from "./rtptransactiondetails.js";
|
|
39
33
|
import {
|
|
40
34
|
TransferAccount,
|
|
41
35
|
TransferAccount$inboundSchema,
|
|
@@ -94,10 +88,6 @@ export type TransferDestination = {
|
|
|
94
88
|
* Card-specific details about the transaction.
|
|
95
89
|
*/
|
|
96
90
|
cardDetails?: CardTransactionDetails | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* RTP specific details about the transaction.
|
|
99
|
-
*/
|
|
100
|
-
rtpDetails?: RTPTransactionDetails | undefined;
|
|
101
91
|
/**
|
|
102
92
|
* Instant-bank specific details about the transaction.
|
|
103
93
|
*/
|
|
@@ -119,7 +109,6 @@ export const TransferDestination$inboundSchema: z.ZodType<
|
|
|
119
109
|
achDetails: ACHTransactionDetails$inboundSchema.optional(),
|
|
120
110
|
applePay: ApplePayResponse$inboundSchema.optional(),
|
|
121
111
|
cardDetails: CardTransactionDetails$inboundSchema.optional(),
|
|
122
|
-
rtpDetails: RTPTransactionDetails$inboundSchema.optional(),
|
|
123
112
|
instantBankDetails: InstantBankTransactionDetails$inboundSchema.optional(),
|
|
124
113
|
});
|
|
125
114
|
/** @internal */
|
|
@@ -133,7 +122,6 @@ export type TransferDestination$Outbound = {
|
|
|
133
122
|
achDetails?: ACHTransactionDetails$Outbound | undefined;
|
|
134
123
|
applePay?: ApplePayResponse$Outbound | undefined;
|
|
135
124
|
cardDetails?: CardTransactionDetails$Outbound | undefined;
|
|
136
|
-
rtpDetails?: RTPTransactionDetails$Outbound | undefined;
|
|
137
125
|
instantBankDetails?: InstantBankTransactionDetails$Outbound | undefined;
|
|
138
126
|
};
|
|
139
127
|
|
|
@@ -152,7 +140,6 @@ export const TransferDestination$outboundSchema: z.ZodType<
|
|
|
152
140
|
achDetails: ACHTransactionDetails$outboundSchema.optional(),
|
|
153
141
|
applePay: ApplePayResponse$outboundSchema.optional(),
|
|
154
142
|
cardDetails: CardTransactionDetails$outboundSchema.optional(),
|
|
155
|
-
rtpDetails: RTPTransactionDetails$outboundSchema.optional(),
|
|
156
143
|
instantBankDetails: InstantBankTransactionDetails$outboundSchema.optional(),
|
|
157
144
|
});
|
|
158
145
|
|
|
@@ -36,7 +36,10 @@ export type UpdateInvoice = {
|
|
|
36
36
|
* The status can be updated to one of the following values under specific conditions:
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* - `canceled`: Can only be set if the current status is `draft`, `unpaid`, or `overdue`.
|
|
39
|
+
* - `canceled`: Can only be set if the current status is `draft`, `unpaid`, or `overdue`. Canceling an invoice
|
|
40
|
+
* indicates the invoice is no longer expected to be paid (e.g., the charge was waived or terms changed).
|
|
41
|
+
* Canceled invoices still appear in list results by default and remain part of the invoice history.
|
|
42
|
+
* To completely discard an invoice created by mistake, use the delete endpoint instead.
|
|
40
43
|
* - `unpaid`: Can only be set if the current status is `draft`. Setting the status to `unpaid` finalizes the invoice and sends an email with a payment link to the customer.
|
|
41
44
|
*/
|
|
42
45
|
status?: InvoiceStatus | undefined;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { MoovError } from "./mooverror.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Describes validation errors for the create resolution link request.
|
|
10
|
+
*/
|
|
11
|
+
export type CreateResolutionLinkErrorData = {
|
|
12
|
+
/**
|
|
13
|
+
* An error with the recipient email address.
|
|
14
|
+
*/
|
|
15
|
+
email?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* An error with the recipient phone number.
|
|
18
|
+
*/
|
|
19
|
+
phone?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Describes validation errors for the create resolution link request.
|
|
24
|
+
*/
|
|
25
|
+
export class CreateResolutionLinkError extends MoovError {
|
|
26
|
+
/**
|
|
27
|
+
* An error with the recipient email address.
|
|
28
|
+
*/
|
|
29
|
+
email?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* An error with the recipient phone number.
|
|
32
|
+
*/
|
|
33
|
+
phone?: string | undefined;
|
|
34
|
+
|
|
35
|
+
/** The original data that was passed to this error instance. */
|
|
36
|
+
data$: CreateResolutionLinkErrorData;
|
|
37
|
+
|
|
38
|
+
constructor(
|
|
39
|
+
err: CreateResolutionLinkErrorData,
|
|
40
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
41
|
+
) {
|
|
42
|
+
const message = "message" in err && typeof err.message === "string"
|
|
43
|
+
? err.message
|
|
44
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
45
|
+
super(message, httpMeta);
|
|
46
|
+
this.data$ = err;
|
|
47
|
+
if (err.email != null) this.email = err.email;
|
|
48
|
+
if (err.phone != null) this.phone = err.phone;
|
|
49
|
+
|
|
50
|
+
this.name = "CreateResolutionLinkError";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const CreateResolutionLinkError$inboundSchema: z.ZodType<
|
|
56
|
+
CreateResolutionLinkError,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
email: z.string().optional(),
|
|
61
|
+
phone: z.string().optional(),
|
|
62
|
+
request$: z.instanceof(Request),
|
|
63
|
+
response$: z.instanceof(Response),
|
|
64
|
+
body$: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.transform((v) => {
|
|
67
|
+
return new CreateResolutionLinkError(v, {
|
|
68
|
+
request: v.request$,
|
|
69
|
+
response: v.response$,
|
|
70
|
+
body: v.body$,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type CreateResolutionLinkError$Outbound = {
|
|
76
|
+
email?: string | undefined;
|
|
77
|
+
phone?: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const CreateResolutionLinkError$outboundSchema: z.ZodType<
|
|
82
|
+
CreateResolutionLinkError$Outbound,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
CreateResolutionLinkError
|
|
85
|
+
> = z.instanceof(CreateResolutionLinkError)
|
|
86
|
+
.transform(v => v.data$)
|
|
87
|
+
.pipe(z.object({
|
|
88
|
+
email: z.string().optional(),
|
|
89
|
+
phone: z.string().optional(),
|
|
90
|
+
}));
|
|
@@ -15,6 +15,7 @@ export * from "./createaccounterror.js";
|
|
|
15
15
|
export * from "./createinvoiceerror.js";
|
|
16
16
|
export * from "./createinvoicepaymenterror.js";
|
|
17
17
|
export * from "./createpaymentlinkerror.js";
|
|
18
|
+
export * from "./createresolutionlinkerror.js";
|
|
18
19
|
export * from "./createsweepconfigerror.js";
|
|
19
20
|
export * from "./createticketerror.js";
|
|
20
21
|
export * from "./createwalletvalidationerror.js";
|