@moovio/sdk 0.21.14 → 0.21.15
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 +96 -47
- package/bin/mcp-server.js +2071 -543
- package/bin/mcp-server.js.map +48 -11
- package/examples/package-lock.json +1 -1
- package/funcs/invoicesCreateInvoice.d.ts +18 -0
- package/funcs/invoicesCreateInvoice.d.ts.map +1 -0
- package/funcs/invoicesCreateInvoice.js +139 -0
- package/funcs/invoicesCreateInvoice.js.map +1 -0
- package/funcs/invoicesGetInvoice.d.ts +17 -0
- package/funcs/invoicesGetInvoice.d.ts.map +1 -0
- package/funcs/invoicesGetInvoice.js +129 -0
- package/funcs/invoicesGetInvoice.js.map +1 -0
- package/funcs/invoicesListInvoices.d.ts +18 -0
- package/funcs/invoicesListInvoices.d.ts.map +1 -0
- package/funcs/invoicesListInvoices.js +135 -0
- package/funcs/invoicesListInvoices.js.map +1 -0
- package/funcs/invoicesMarkPaidInvoice.d.ts +19 -0
- package/funcs/invoicesMarkPaidInvoice.d.ts.map +1 -0
- package/funcs/invoicesMarkPaidInvoice.js +144 -0
- package/funcs/invoicesMarkPaidInvoice.js.map +1 -0
- package/funcs/invoicesUpdateInvoice.d.ts +18 -0
- package/funcs/invoicesUpdateInvoice.d.ts.map +1 -0
- package/funcs/invoicesUpdateInvoice.js +143 -0
- package/funcs/invoicesUpdateInvoice.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- 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/tools/invoicesCreateInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesCreateInvoice.js +65 -0
- package/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesGetInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesGetInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesGetInvoice.js +65 -0
- package/mcp-server/tools/invoicesGetInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesListInvoices.d.ts +8 -0
- package/mcp-server/tools/invoicesListInvoices.d.ts.map +1 -0
- package/mcp-server/tools/invoicesListInvoices.js +65 -0
- package/mcp-server/tools/invoicesListInvoices.js.map +1 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.js +66 -0
- package/mcp-server/tools/invoicesMarkPaidInvoice.js.map +1 -0
- package/mcp-server/tools/invoicesUpdateInvoice.d.ts +8 -0
- package/mcp-server/tools/invoicesUpdateInvoice.d.ts.map +1 -0
- package/mcp-server/tools/invoicesUpdateInvoice.js +65 -0
- package/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -0
- package/models/components/amountdecimalupdate.d.ts +29 -0
- package/models/components/amountdecimalupdate.d.ts.map +1 -0
- package/models/components/amountdecimalupdate.js +60 -0
- package/models/components/amountdecimalupdate.js.map +1 -0
- package/models/components/createinvoice.d.ts +32 -0
- package/models/components/createinvoice.d.ts.map +1 -0
- package/models/components/createinvoice.js +72 -0
- package/models/components/createinvoice.js.map +1 -0
- package/models/components/index.d.ts +18 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +18 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +81 -0
- package/models/components/invoice.d.ts.map +1 -0
- package/models/components/invoice.js +107 -0
- package/models/components/invoice.js.map +1 -0
- package/models/components/invoiceexternalpayment.d.ts +35 -0
- package/models/components/invoiceexternalpayment.d.ts.map +1 -0
- package/models/components/invoiceexternalpayment.js +75 -0
- package/models/components/invoiceexternalpayment.js.map +1 -0
- package/models/components/invoicelineitem.d.ts +45 -0
- package/models/components/invoicelineitem.d.ts.map +1 -0
- package/models/components/invoicelineitem.js +68 -0
- package/models/components/invoicelineitem.js.map +1 -0
- package/models/components/invoicelineitemoption.d.ts +39 -0
- package/models/components/invoicelineitemoption.d.ts.map +1 -0
- package/models/components/invoicelineitemoption.js +65 -0
- package/models/components/invoicelineitemoption.js.map +1 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts +24 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemoptionvalidationerror.js +65 -0
- package/models/components/invoicelineitemoptionvalidationerror.js.map +1 -0
- package/models/components/invoicelineitems.d.ts +24 -0
- package/models/components/invoicelineitems.d.ts.map +1 -0
- package/models/components/invoicelineitems.js +59 -0
- package/models/components/invoicelineitems.js.map +1 -0
- package/models/components/invoicelineitemsupdate.d.ts +24 -0
- package/models/components/invoicelineitemsupdate.d.ts.map +1 -0
- package/models/components/invoicelineitemsupdate.js +59 -0
- package/models/components/invoicelineitemsupdate.js.map +1 -0
- package/models/components/invoicelineitemsvalidationerror.d.ts +22 -0
- package/models/components/invoicelineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemsvalidationerror.js +59 -0
- package/models/components/invoicelineitemsvalidationerror.js.map +1 -0
- package/models/components/invoicelineitemvalidationerror.d.ts +31 -0
- package/models/components/invoicelineitemvalidationerror.d.ts.map +1 -0
- package/models/components/invoicelineitemvalidationerror.js +70 -0
- package/models/components/invoicelineitemvalidationerror.js.map +1 -0
- package/models/components/invoicepayment.d.ts +23 -0
- package/models/components/invoicepayment.d.ts.map +1 -0
- package/models/components/invoicepayment.js +70 -0
- package/models/components/invoicepayment.js.map +1 -0
- package/models/components/invoicestatus.d.ts +16 -0
- package/models/components/invoicestatus.d.ts.map +1 -0
- package/models/components/invoicestatus.js +53 -0
- package/models/components/invoicestatus.js.map +1 -0
- package/models/components/invoicetransferpayment.d.ts +28 -0
- package/models/components/invoicetransferpayment.d.ts.map +1 -0
- package/models/components/invoicetransferpayment.js +68 -0
- package/models/components/invoicetransferpayment.js.map +1 -0
- package/models/components/markinvoicepaid.d.ts +21 -0
- package/models/components/markinvoicepaid.d.ts.map +1 -0
- package/models/components/markinvoicepaid.js +63 -0
- package/models/components/markinvoicepaid.js.map +1 -0
- package/models/components/updateinvoice.d.ts +36 -0
- package/models/components/updateinvoice.d.ts.map +1 -0
- package/models/components/updateinvoice.js +71 -0
- package/models/components/updateinvoice.js.map +1 -0
- package/models/components/webhookdata.d.ts +4 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +6 -0
- package/models/components/webhookdata.js.map +1 -1
- package/models/components/webhookdatainvoicecreated.d.ts +19 -0
- package/models/components/webhookdatainvoicecreated.d.ts.map +1 -0
- package/models/components/webhookdatainvoicecreated.js +60 -0
- package/models/components/webhookdatainvoicecreated.js.map +1 -0
- package/models/components/webhookdatainvoiceupdated.d.ts +22 -0
- package/models/components/webhookdatainvoiceupdated.d.ts.map +1 -0
- package/models/components/webhookdatainvoiceupdated.js +63 -0
- package/models/components/webhookdatainvoiceupdated.js.map +1 -0
- package/models/components/webhookeventtype.d.ts +2 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +2 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/errors/createinvoiceerror.d.ts +40 -0
- package/models/errors/createinvoiceerror.d.ts.map +1 -0
- package/models/errors/createinvoiceerror.js +100 -0
- package/models/errors/createinvoiceerror.js.map +1 -0
- package/models/errors/index.d.ts +4 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +4 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/listinvoicesvalidationerror.d.ts +33 -0
- package/models/errors/listinvoicesvalidationerror.d.ts.map +1 -0
- package/models/errors/listinvoicesvalidationerror.js +88 -0
- package/models/errors/listinvoicesvalidationerror.js.map +1 -0
- package/models/errors/markinvoicepaiderror.d.ts +30 -0
- package/models/errors/markinvoicepaiderror.d.ts.map +1 -0
- package/models/errors/markinvoicepaiderror.js +83 -0
- package/models/errors/markinvoicepaiderror.js.map +1 -0
- package/models/errors/updateinvoiceerror.d.ts +40 -0
- package/models/errors/updateinvoiceerror.d.ts.map +1 -0
- package/models/errors/updateinvoiceerror.js +99 -0
- package/models/errors/updateinvoiceerror.js.map +1 -0
- package/models/operations/createinvoice.d.ts +66 -0
- package/models/operations/createinvoice.d.ts.map +1 -0
- package/models/operations/createinvoice.js +122 -0
- package/models/operations/createinvoice.js.map +1 -0
- package/models/operations/getinvoice.d.ts +66 -0
- package/models/operations/getinvoice.d.ts.map +1 -0
- package/models/operations/getinvoice.js +114 -0
- package/models/operations/getinvoice.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/listinvoices.d.ts +72 -0
- package/models/operations/listinvoices.d.ts.map +1 -0
- package/models/operations/listinvoices.js +120 -0
- package/models/operations/listinvoices.js.map +1 -0
- package/models/operations/markpaidinvoice.d.ts +68 -0
- package/models/operations/markpaidinvoice.d.ts.map +1 -0
- package/models/operations/markpaidinvoice.js +124 -0
- package/models/operations/markpaidinvoice.js.map +1 -0
- package/models/operations/updateinvoice.d.ts +68 -0
- package/models/operations/updateinvoice.d.ts.map +1 -0
- package/models/operations/updateinvoice.js +124 -0
- package/models/operations/updateinvoice.js.map +1 -0
- package/package.json +1 -1
- package/sdk/invoices.d.ts +41 -0
- package/sdk/invoices.d.ts.map +1 -0
- package/sdk/invoices.js +63 -0
- package/sdk/invoices.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/invoicesCreateInvoice.ts +201 -0
- package/src/funcs/invoicesGetInvoice.ts +185 -0
- package/src/funcs/invoicesListInvoices.ts +194 -0
- package/src/funcs/invoicesMarkPaidInvoice.ts +208 -0
- package/src/funcs/invoicesUpdateInvoice.ts +207 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/invoicesCreateInvoice.ts +38 -0
- package/src/mcp-server/tools/invoicesGetInvoice.ts +38 -0
- package/src/mcp-server/tools/invoicesListInvoices.ts +38 -0
- package/src/mcp-server/tools/invoicesMarkPaidInvoice.ts +39 -0
- package/src/mcp-server/tools/invoicesUpdateInvoice.ts +38 -0
- package/src/models/components/amountdecimalupdate.ts +65 -0
- package/src/models/components/createinvoice.ts +84 -0
- package/src/models/components/index.ts +18 -0
- package/src/models/components/invoice.ts +178 -0
- package/src/models/components/invoiceexternalpayment.ts +91 -0
- package/src/models/components/invoicelineitem.ts +95 -0
- package/src/models/components/invoicelineitemoption.ts +84 -0
- package/src/models/components/invoicelineitemoptionvalidationerror.ts +72 -0
- package/src/models/components/invoicelineitems.ts +63 -0
- package/src/models/components/invoicelineitemsupdate.ts +63 -0
- package/src/models/components/invoicelineitemsvalidationerror.ts +59 -0
- package/src/models/components/invoicelineitemvalidationerror.ts +85 -0
- package/src/models/components/invoicepayment.ts +77 -0
- package/src/models/components/invoicestatus.ts +25 -0
- package/src/models/components/invoicetransferpayment.ts +68 -0
- package/src/models/components/markinvoicepaid.ts +58 -0
- package/src/models/components/updateinvoice.ts +94 -0
- package/src/models/components/webhookdata.ts +20 -0
- package/src/models/components/webhookdatainvoicecreated.ts +55 -0
- package/src/models/components/webhookdatainvoiceupdated.ts +64 -0
- package/src/models/components/webhookeventtype.ts +2 -0
- package/src/models/errors/createinvoiceerror.ts +102 -0
- package/src/models/errors/index.ts +4 -0
- package/src/models/errors/listinvoicesvalidationerror.ts +86 -0
- package/src/models/errors/markinvoicepaiderror.ts +78 -0
- package/src/models/errors/updateinvoiceerror.ts +100 -0
- package/src/models/operations/createinvoice.ts +187 -0
- package/src/models/operations/getinvoice.ts +179 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listinvoices.ts +191 -0
- package/src/models/operations/markpaidinvoice.ts +191 -0
- package/src/models/operations/updateinvoice.ts +191 -0
- package/src/sdk/invoices.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
export type MarkInvoicePaid = {
|
|
11
|
+
foreignID?: string | undefined;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
paymentDate?: Date | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const MarkInvoicePaid$inboundSchema: z.ZodType<
|
|
18
|
+
MarkInvoicePaid,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
foreignID: z.string().optional(),
|
|
23
|
+
description: z.string().optional(),
|
|
24
|
+
paymentDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
25
|
+
.optional(),
|
|
26
|
+
});
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type MarkInvoicePaid$Outbound = {
|
|
29
|
+
foreignID?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
paymentDate?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const MarkInvoicePaid$outboundSchema: z.ZodType<
|
|
36
|
+
MarkInvoicePaid$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
MarkInvoicePaid
|
|
39
|
+
> = z.object({
|
|
40
|
+
foreignID: z.string().optional(),
|
|
41
|
+
description: z.string().optional(),
|
|
42
|
+
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function markInvoicePaidToJSON(
|
|
46
|
+
markInvoicePaid: MarkInvoicePaid,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(MarkInvoicePaid$outboundSchema.parse(markInvoicePaid));
|
|
49
|
+
}
|
|
50
|
+
export function markInvoicePaidFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<MarkInvoicePaid, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => MarkInvoicePaid$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'MarkInvoicePaid' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
AmountDecimalUpdate,
|
|
11
|
+
AmountDecimalUpdate$inboundSchema,
|
|
12
|
+
AmountDecimalUpdate$Outbound,
|
|
13
|
+
AmountDecimalUpdate$outboundSchema,
|
|
14
|
+
} from "./amountdecimalupdate.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceLineItemsUpdate,
|
|
17
|
+
InvoiceLineItemsUpdate$inboundSchema,
|
|
18
|
+
InvoiceLineItemsUpdate$Outbound,
|
|
19
|
+
InvoiceLineItemsUpdate$outboundSchema,
|
|
20
|
+
} from "./invoicelineitemsupdate.js";
|
|
21
|
+
import {
|
|
22
|
+
InvoiceStatus,
|
|
23
|
+
InvoiceStatus$inboundSchema,
|
|
24
|
+
InvoiceStatus$outboundSchema,
|
|
25
|
+
} from "./invoicestatus.js";
|
|
26
|
+
|
|
27
|
+
export type UpdateInvoice = {
|
|
28
|
+
description?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* A collection of line items for an invoice.
|
|
31
|
+
*/
|
|
32
|
+
lineItems?: InvoiceLineItemsUpdate | undefined;
|
|
33
|
+
invoiceDate?: Date | null | undefined;
|
|
34
|
+
dueDate?: Date | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Status can only be updated to `canceled` when the status is either `draft`, `unpaid`, or `overdue`.
|
|
37
|
+
*/
|
|
38
|
+
status?: InvoiceStatus | undefined;
|
|
39
|
+
taxAmount?: AmountDecimalUpdate | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const UpdateInvoice$inboundSchema: z.ZodType<
|
|
44
|
+
UpdateInvoice,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
unknown
|
|
47
|
+
> = z.object({
|
|
48
|
+
description: z.string().optional(),
|
|
49
|
+
lineItems: InvoiceLineItemsUpdate$inboundSchema.optional(),
|
|
50
|
+
invoiceDate: z.nullable(
|
|
51
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
52
|
+
).optional(),
|
|
53
|
+
dueDate: z.nullable(
|
|
54
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
55
|
+
).optional(),
|
|
56
|
+
status: InvoiceStatus$inboundSchema.optional(),
|
|
57
|
+
taxAmount: AmountDecimalUpdate$inboundSchema.optional(),
|
|
58
|
+
});
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type UpdateInvoice$Outbound = {
|
|
61
|
+
description?: string | undefined;
|
|
62
|
+
lineItems?: InvoiceLineItemsUpdate$Outbound | undefined;
|
|
63
|
+
invoiceDate?: string | null | undefined;
|
|
64
|
+
dueDate?: string | null | undefined;
|
|
65
|
+
status?: string | undefined;
|
|
66
|
+
taxAmount?: AmountDecimalUpdate$Outbound | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const UpdateInvoice$outboundSchema: z.ZodType<
|
|
71
|
+
UpdateInvoice$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
UpdateInvoice
|
|
74
|
+
> = z.object({
|
|
75
|
+
description: z.string().optional(),
|
|
76
|
+
lineItems: InvoiceLineItemsUpdate$outboundSchema.optional(),
|
|
77
|
+
invoiceDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
78
|
+
dueDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
79
|
+
status: InvoiceStatus$outboundSchema.optional(),
|
|
80
|
+
taxAmount: AmountDecimalUpdate$outboundSchema.optional(),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export function updateInvoiceToJSON(updateInvoice: UpdateInvoice): string {
|
|
84
|
+
return JSON.stringify(UpdateInvoice$outboundSchema.parse(updateInvoice));
|
|
85
|
+
}
|
|
86
|
+
export function updateInvoiceFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<UpdateInvoice, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => UpdateInvoice$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'UpdateInvoice' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -96,6 +96,18 @@ import {
|
|
|
96
96
|
WebhookDataDisputeUpdated$Outbound,
|
|
97
97
|
WebhookDataDisputeUpdated$outboundSchema,
|
|
98
98
|
} from "./webhookdatadisputeupdated.js";
|
|
99
|
+
import {
|
|
100
|
+
WebhookDataInvoiceCreated,
|
|
101
|
+
WebhookDataInvoiceCreated$inboundSchema,
|
|
102
|
+
WebhookDataInvoiceCreated$Outbound,
|
|
103
|
+
WebhookDataInvoiceCreated$outboundSchema,
|
|
104
|
+
} from "./webhookdatainvoicecreated.js";
|
|
105
|
+
import {
|
|
106
|
+
WebhookDataInvoiceUpdated,
|
|
107
|
+
WebhookDataInvoiceUpdated$inboundSchema,
|
|
108
|
+
WebhookDataInvoiceUpdated$Outbound,
|
|
109
|
+
WebhookDataInvoiceUpdated$outboundSchema,
|
|
110
|
+
} from "./webhookdatainvoiceupdated.js";
|
|
99
111
|
import {
|
|
100
112
|
WebhookDataNetworkIDUpdated,
|
|
101
113
|
WebhookDataNetworkIDUpdated$inboundSchema,
|
|
@@ -231,6 +243,7 @@ export type WebhookData =
|
|
|
231
243
|
| WebhookDataCancellationUpdated
|
|
232
244
|
| WebhookDataCardAutoUpdated
|
|
233
245
|
| WebhookDataCapabilityUpdated
|
|
246
|
+
| WebhookDataInvoiceUpdated
|
|
234
247
|
| WebhookDataPaymentMethodEnabled
|
|
235
248
|
| WebhookDataPaymentMethodDisabled
|
|
236
249
|
| WebhookDataRefundCreated
|
|
@@ -242,6 +255,7 @@ export type WebhookData =
|
|
|
242
255
|
| WebhookDataBankAccountCreated
|
|
243
256
|
| WebhookDataBankAccountDeleted
|
|
244
257
|
| WebhookDataCapabilityRequested
|
|
258
|
+
| WebhookDataInvoiceCreated
|
|
245
259
|
| WebhookDataRepresentativeCreated
|
|
246
260
|
| WebhookDataRepresentativeUpdated
|
|
247
261
|
| WebhookDataRepresentativeDisabled
|
|
@@ -273,6 +287,7 @@ export const WebhookData$inboundSchema: z.ZodType<
|
|
|
273
287
|
WebhookDataCancellationUpdated$inboundSchema,
|
|
274
288
|
WebhookDataCardAutoUpdated$inboundSchema,
|
|
275
289
|
WebhookDataCapabilityUpdated$inboundSchema,
|
|
290
|
+
WebhookDataInvoiceUpdated$inboundSchema,
|
|
276
291
|
WebhookDataPaymentMethodEnabled$inboundSchema,
|
|
277
292
|
WebhookDataPaymentMethodDisabled$inboundSchema,
|
|
278
293
|
WebhookDataRefundCreated$inboundSchema,
|
|
@@ -284,6 +299,7 @@ export const WebhookData$inboundSchema: z.ZodType<
|
|
|
284
299
|
WebhookDataBankAccountCreated$inboundSchema,
|
|
285
300
|
WebhookDataBankAccountDeleted$inboundSchema,
|
|
286
301
|
WebhookDataCapabilityRequested$inboundSchema,
|
|
302
|
+
WebhookDataInvoiceCreated$inboundSchema,
|
|
287
303
|
WebhookDataRepresentativeCreated$inboundSchema,
|
|
288
304
|
WebhookDataRepresentativeUpdated$inboundSchema,
|
|
289
305
|
WebhookDataRepresentativeDisabled$inboundSchema,
|
|
@@ -311,6 +327,7 @@ export type WebhookData$Outbound =
|
|
|
311
327
|
| WebhookDataCancellationUpdated$Outbound
|
|
312
328
|
| WebhookDataCardAutoUpdated$Outbound
|
|
313
329
|
| WebhookDataCapabilityUpdated$Outbound
|
|
330
|
+
| WebhookDataInvoiceUpdated$Outbound
|
|
314
331
|
| WebhookDataPaymentMethodEnabled$Outbound
|
|
315
332
|
| WebhookDataPaymentMethodDisabled$Outbound
|
|
316
333
|
| WebhookDataRefundCreated$Outbound
|
|
@@ -322,6 +339,7 @@ export type WebhookData$Outbound =
|
|
|
322
339
|
| WebhookDataBankAccountCreated$Outbound
|
|
323
340
|
| WebhookDataBankAccountDeleted$Outbound
|
|
324
341
|
| WebhookDataCapabilityRequested$Outbound
|
|
342
|
+
| WebhookDataInvoiceCreated$Outbound
|
|
325
343
|
| WebhookDataRepresentativeCreated$Outbound
|
|
326
344
|
| WebhookDataRepresentativeUpdated$Outbound
|
|
327
345
|
| WebhookDataRepresentativeDisabled$Outbound
|
|
@@ -353,6 +371,7 @@ export const WebhookData$outboundSchema: z.ZodType<
|
|
|
353
371
|
WebhookDataCancellationUpdated$outboundSchema,
|
|
354
372
|
WebhookDataCardAutoUpdated$outboundSchema,
|
|
355
373
|
WebhookDataCapabilityUpdated$outboundSchema,
|
|
374
|
+
WebhookDataInvoiceUpdated$outboundSchema,
|
|
356
375
|
WebhookDataPaymentMethodEnabled$outboundSchema,
|
|
357
376
|
WebhookDataPaymentMethodDisabled$outboundSchema,
|
|
358
377
|
WebhookDataRefundCreated$outboundSchema,
|
|
@@ -364,6 +383,7 @@ export const WebhookData$outboundSchema: z.ZodType<
|
|
|
364
383
|
WebhookDataBankAccountCreated$outboundSchema,
|
|
365
384
|
WebhookDataBankAccountDeleted$outboundSchema,
|
|
366
385
|
WebhookDataCapabilityRequested$outboundSchema,
|
|
386
|
+
WebhookDataInvoiceCreated$outboundSchema,
|
|
367
387
|
WebhookDataRepresentativeCreated$outboundSchema,
|
|
368
388
|
WebhookDataRepresentativeUpdated$outboundSchema,
|
|
369
389
|
WebhookDataRepresentativeDisabled$outboundSchema,
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
export type WebhookDataInvoiceCreated = {
|
|
11
|
+
accountID: string;
|
|
12
|
+
invoiceID: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const WebhookDataInvoiceCreated$inboundSchema: z.ZodType<
|
|
17
|
+
WebhookDataInvoiceCreated,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
accountID: z.string(),
|
|
22
|
+
invoiceID: z.string(),
|
|
23
|
+
});
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type WebhookDataInvoiceCreated$Outbound = {
|
|
26
|
+
accountID: string;
|
|
27
|
+
invoiceID: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const WebhookDataInvoiceCreated$outboundSchema: z.ZodType<
|
|
32
|
+
WebhookDataInvoiceCreated$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
WebhookDataInvoiceCreated
|
|
35
|
+
> = z.object({
|
|
36
|
+
accountID: z.string(),
|
|
37
|
+
invoiceID: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function webhookDataInvoiceCreatedToJSON(
|
|
41
|
+
webhookDataInvoiceCreated: WebhookDataInvoiceCreated,
|
|
42
|
+
): string {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
WebhookDataInvoiceCreated$outboundSchema.parse(webhookDataInvoiceCreated),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export function webhookDataInvoiceCreatedFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<WebhookDataInvoiceCreated, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => WebhookDataInvoiceCreated$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'WebhookDataInvoiceCreated' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
InvoiceStatus,
|
|
11
|
+
InvoiceStatus$inboundSchema,
|
|
12
|
+
InvoiceStatus$outboundSchema,
|
|
13
|
+
} from "./invoicestatus.js";
|
|
14
|
+
|
|
15
|
+
export type WebhookDataInvoiceUpdated = {
|
|
16
|
+
accountID: string;
|
|
17
|
+
invoiceID: string;
|
|
18
|
+
status: InvoiceStatus;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const WebhookDataInvoiceUpdated$inboundSchema: z.ZodType<
|
|
23
|
+
WebhookDataInvoiceUpdated,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
accountID: z.string(),
|
|
28
|
+
invoiceID: z.string(),
|
|
29
|
+
status: InvoiceStatus$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type WebhookDataInvoiceUpdated$Outbound = {
|
|
33
|
+
accountID: string;
|
|
34
|
+
invoiceID: string;
|
|
35
|
+
status: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const WebhookDataInvoiceUpdated$outboundSchema: z.ZodType<
|
|
40
|
+
WebhookDataInvoiceUpdated$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
WebhookDataInvoiceUpdated
|
|
43
|
+
> = z.object({
|
|
44
|
+
accountID: z.string(),
|
|
45
|
+
invoiceID: z.string(),
|
|
46
|
+
status: InvoiceStatus$outboundSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function webhookDataInvoiceUpdatedToJSON(
|
|
50
|
+
webhookDataInvoiceUpdated: WebhookDataInvoiceUpdated,
|
|
51
|
+
): string {
|
|
52
|
+
return JSON.stringify(
|
|
53
|
+
WebhookDataInvoiceUpdated$outboundSchema.parse(webhookDataInvoiceUpdated),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export function webhookDataInvoiceUpdatedFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<WebhookDataInvoiceUpdated, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) => WebhookDataInvoiceUpdated$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'WebhookDataInvoiceUpdated' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -24,6 +24,8 @@ export const WebhookEventType = {
|
|
|
24
24
|
CapabilityUpdated: "capability.updated",
|
|
25
25
|
DisputeCreated: "dispute.created",
|
|
26
26
|
DisputeUpdated: "dispute.updated",
|
|
27
|
+
InvoiceCreated: "invoice.created",
|
|
28
|
+
InvoiceUpdated: "invoice.updated",
|
|
27
29
|
NetworkIDUpdated: "networkID.updated",
|
|
28
30
|
PaymentMethodEnabled: "paymentMethod.enabled",
|
|
29
31
|
PaymentMethodDisabled: "paymentMethod.disabled",
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as components from "../components/index.js";
|
|
7
|
+
import { MoovError } from "./mooverror.js";
|
|
8
|
+
|
|
9
|
+
export type CreateInvoiceErrorData = {
|
|
10
|
+
customerAccountID?: string | undefined;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
lineItems?: components.InvoiceLineItemsValidationError | undefined;
|
|
13
|
+
invoiceDate?: string | undefined;
|
|
14
|
+
dueDate?: string | undefined;
|
|
15
|
+
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export class CreateInvoiceError extends MoovError {
|
|
19
|
+
customerAccountID?: string | undefined;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
lineItems?: components.InvoiceLineItemsValidationError | undefined;
|
|
22
|
+
invoiceDate?: string | undefined;
|
|
23
|
+
dueDate?: string | undefined;
|
|
24
|
+
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
25
|
+
|
|
26
|
+
/** The original data that was passed to this error instance. */
|
|
27
|
+
data$: CreateInvoiceErrorData;
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
err: CreateInvoiceErrorData,
|
|
31
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
32
|
+
) {
|
|
33
|
+
const message = "message" in err && typeof err.message === "string"
|
|
34
|
+
? err.message
|
|
35
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
36
|
+
super(message, httpMeta);
|
|
37
|
+
this.data$ = err;
|
|
38
|
+
if (err.customerAccountID != null) {
|
|
39
|
+
this.customerAccountID = err.customerAccountID;
|
|
40
|
+
}
|
|
41
|
+
if (err.description != null) this.description = err.description;
|
|
42
|
+
if (err.lineItems != null) this.lineItems = err.lineItems;
|
|
43
|
+
if (err.invoiceDate != null) this.invoiceDate = err.invoiceDate;
|
|
44
|
+
if (err.dueDate != null) this.dueDate = err.dueDate;
|
|
45
|
+
if (err.taxAmount != null) this.taxAmount = err.taxAmount;
|
|
46
|
+
|
|
47
|
+
this.name = "CreateInvoiceError";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const CreateInvoiceError$inboundSchema: z.ZodType<
|
|
53
|
+
CreateInvoiceError,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
unknown
|
|
56
|
+
> = z.object({
|
|
57
|
+
customerAccountID: z.string().optional(),
|
|
58
|
+
description: z.string().optional(),
|
|
59
|
+
lineItems: components.InvoiceLineItemsValidationError$inboundSchema
|
|
60
|
+
.optional(),
|
|
61
|
+
invoiceDate: z.string().optional(),
|
|
62
|
+
dueDate: z.string().optional(),
|
|
63
|
+
taxAmount: components.AmountDecimalValidationError$inboundSchema.optional(),
|
|
64
|
+
request$: z.instanceof(Request),
|
|
65
|
+
response$: z.instanceof(Response),
|
|
66
|
+
body$: z.string(),
|
|
67
|
+
})
|
|
68
|
+
.transform((v) => {
|
|
69
|
+
return new CreateInvoiceError(v, {
|
|
70
|
+
request: v.request$,
|
|
71
|
+
response: v.response$,
|
|
72
|
+
body: v.body$,
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export type CreateInvoiceError$Outbound = {
|
|
78
|
+
customerAccountID?: string | undefined;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
lineItems?: components.InvoiceLineItemsValidationError$Outbound | undefined;
|
|
81
|
+
invoiceDate?: string | undefined;
|
|
82
|
+
dueDate?: string | undefined;
|
|
83
|
+
taxAmount?: components.AmountDecimalValidationError$Outbound | undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const CreateInvoiceError$outboundSchema: z.ZodType<
|
|
88
|
+
CreateInvoiceError$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
CreateInvoiceError
|
|
91
|
+
> = z.instanceof(CreateInvoiceError)
|
|
92
|
+
.transform(v => v.data$)
|
|
93
|
+
.pipe(z.object({
|
|
94
|
+
customerAccountID: z.string().optional(),
|
|
95
|
+
description: z.string().optional(),
|
|
96
|
+
lineItems: components.InvoiceLineItemsValidationError$outboundSchema
|
|
97
|
+
.optional(),
|
|
98
|
+
invoiceDate: z.string().optional(),
|
|
99
|
+
dueDate: z.string().optional(),
|
|
100
|
+
taxAmount: components.AmountDecimalValidationError$outboundSchema
|
|
101
|
+
.optional(),
|
|
102
|
+
}));
|
|
@@ -11,6 +11,7 @@ export * from "./bankaccountvalidationerror.js";
|
|
|
11
11
|
export * from "./brandvalidationerror.js";
|
|
12
12
|
export * from "./cardacquiringrefund.js";
|
|
13
13
|
export * from "./createaccounterror.js";
|
|
14
|
+
export * from "./createinvoiceerror.js";
|
|
14
15
|
export * from "./createpaymentlinkerror.js";
|
|
15
16
|
export * from "./createsweepconfigerror.js";
|
|
16
17
|
export * from "./createticketerror.js";
|
|
@@ -24,9 +25,11 @@ export * from "./imagemetadatavalidationerror.js";
|
|
|
24
25
|
export * from "./imagerequestvalidationerror.js";
|
|
25
26
|
export * from "./linkapplepayerror.js";
|
|
26
27
|
export * from "./linkcarderror.js";
|
|
28
|
+
export * from "./listinvoicesvalidationerror.js";
|
|
27
29
|
export * from "./listtransfersvalidationerror.js";
|
|
28
30
|
export * from "./listwalletsvalidationerror.js";
|
|
29
31
|
export * from "./listwallettransactionsvalidationerror.js";
|
|
32
|
+
export * from "./markinvoicepaiderror.js";
|
|
30
33
|
export * from "./microdepositvalidationerror.js";
|
|
31
34
|
export * from "./mooverror.js";
|
|
32
35
|
export * from "./onboardinginviteerror.js";
|
|
@@ -48,6 +51,7 @@ export * from "./transfer.js";
|
|
|
48
51
|
export * from "./transferoptionsvalidationerror.js";
|
|
49
52
|
export * from "./transfervalidationerror.js";
|
|
50
53
|
export * from "./updatecarderror.js";
|
|
54
|
+
export * from "./updateinvoiceerror.js";
|
|
51
55
|
export * from "./updateissuedcarderror.js";
|
|
52
56
|
export * from "./updatepaymentlinkerror.js";
|
|
53
57
|
export * from "./updateticketerror.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
export type ListInvoicesValidationErrorData = {
|
|
9
|
+
status?: string | undefined;
|
|
10
|
+
customerAccountID?: string | undefined;
|
|
11
|
+
skip?: string | undefined;
|
|
12
|
+
count?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export class ListInvoicesValidationError extends MoovError {
|
|
16
|
+
status?: string | undefined;
|
|
17
|
+
customerAccountID?: string | undefined;
|
|
18
|
+
skip?: string | undefined;
|
|
19
|
+
count?: string | undefined;
|
|
20
|
+
|
|
21
|
+
/** The original data that was passed to this error instance. */
|
|
22
|
+
data$: ListInvoicesValidationErrorData;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
err: ListInvoicesValidationErrorData,
|
|
26
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
27
|
+
) {
|
|
28
|
+
const message = "message" in err && typeof err.message === "string"
|
|
29
|
+
? err.message
|
|
30
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
31
|
+
super(message, httpMeta);
|
|
32
|
+
this.data$ = err;
|
|
33
|
+
if (err.status != null) this.status = err.status;
|
|
34
|
+
if (err.customerAccountID != null) {
|
|
35
|
+
this.customerAccountID = err.customerAccountID;
|
|
36
|
+
}
|
|
37
|
+
if (err.skip != null) this.skip = err.skip;
|
|
38
|
+
if (err.count != null) this.count = err.count;
|
|
39
|
+
|
|
40
|
+
this.name = "ListInvoicesValidationError";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ListInvoicesValidationError$inboundSchema: z.ZodType<
|
|
46
|
+
ListInvoicesValidationError,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.object({
|
|
50
|
+
status: z.string().optional(),
|
|
51
|
+
customerAccountID: z.string().optional(),
|
|
52
|
+
skip: z.string().optional(),
|
|
53
|
+
count: z.string().optional(),
|
|
54
|
+
request$: z.instanceof(Request),
|
|
55
|
+
response$: z.instanceof(Response),
|
|
56
|
+
body$: z.string(),
|
|
57
|
+
})
|
|
58
|
+
.transform((v) => {
|
|
59
|
+
return new ListInvoicesValidationError(v, {
|
|
60
|
+
request: v.request$,
|
|
61
|
+
response: v.response$,
|
|
62
|
+
body: v.body$,
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type ListInvoicesValidationError$Outbound = {
|
|
68
|
+
status?: string | undefined;
|
|
69
|
+
customerAccountID?: string | undefined;
|
|
70
|
+
skip?: string | undefined;
|
|
71
|
+
count?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const ListInvoicesValidationError$outboundSchema: z.ZodType<
|
|
76
|
+
ListInvoicesValidationError$Outbound,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
ListInvoicesValidationError
|
|
79
|
+
> = z.instanceof(ListInvoicesValidationError)
|
|
80
|
+
.transform(v => v.data$)
|
|
81
|
+
.pipe(z.object({
|
|
82
|
+
status: z.string().optional(),
|
|
83
|
+
customerAccountID: z.string().optional(),
|
|
84
|
+
skip: z.string().optional(),
|
|
85
|
+
count: z.string().optional(),
|
|
86
|
+
}));
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
export type MarkInvoicePaidErrorData = {
|
|
9
|
+
foreignID?: string | undefined;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
paymentDate?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export class MarkInvoicePaidError extends MoovError {
|
|
15
|
+
foreignID?: string | undefined;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
paymentDate?: string | undefined;
|
|
18
|
+
|
|
19
|
+
/** The original data that was passed to this error instance. */
|
|
20
|
+
data$: MarkInvoicePaidErrorData;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
err: MarkInvoicePaidErrorData,
|
|
24
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
+
) {
|
|
26
|
+
const message = "message" in err && typeof err.message === "string"
|
|
27
|
+
? err.message
|
|
28
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
29
|
+
super(message, httpMeta);
|
|
30
|
+
this.data$ = err;
|
|
31
|
+
if (err.foreignID != null) this.foreignID = err.foreignID;
|
|
32
|
+
if (err.description != null) this.description = err.description;
|
|
33
|
+
if (err.paymentDate != null) this.paymentDate = err.paymentDate;
|
|
34
|
+
|
|
35
|
+
this.name = "MarkInvoicePaidError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const MarkInvoicePaidError$inboundSchema: z.ZodType<
|
|
41
|
+
MarkInvoicePaidError,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
foreignID: z.string().optional(),
|
|
46
|
+
description: z.string().optional(),
|
|
47
|
+
paymentDate: z.string().optional(),
|
|
48
|
+
request$: z.instanceof(Request),
|
|
49
|
+
response$: z.instanceof(Response),
|
|
50
|
+
body$: z.string(),
|
|
51
|
+
})
|
|
52
|
+
.transform((v) => {
|
|
53
|
+
return new MarkInvoicePaidError(v, {
|
|
54
|
+
request: v.request$,
|
|
55
|
+
response: v.response$,
|
|
56
|
+
body: v.body$,
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export type MarkInvoicePaidError$Outbound = {
|
|
62
|
+
foreignID?: string | undefined;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
paymentDate?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const MarkInvoicePaidError$outboundSchema: z.ZodType<
|
|
69
|
+
MarkInvoicePaidError$Outbound,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
MarkInvoicePaidError
|
|
72
|
+
> = z.instanceof(MarkInvoicePaidError)
|
|
73
|
+
.transform(v => v.data$)
|
|
74
|
+
.pipe(z.object({
|
|
75
|
+
foreignID: z.string().optional(),
|
|
76
|
+
description: z.string().optional(),
|
|
77
|
+
paymentDate: z.string().optional(),
|
|
78
|
+
}));
|