@moovio/sdk 0.21.13 → 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 +106 -49
- package/bin/mcp-server.js +2707 -977
- package/bin/mcp-server.js.map +56 -15
- package/examples/package-lock.json +1 -1
- package/funcs/feePlansListFeeRevenue.d.ts +17 -0
- package/funcs/feePlansListFeeRevenue.d.ts.map +1 -0
- package/funcs/feePlansListFeeRevenue.js +132 -0
- package/funcs/feePlansListFeeRevenue.js.map +1 -0
- package/funcs/feePlansRetrieveFees.d.ts +1 -1
- package/funcs/feePlansRetrieveFees.js +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 +13 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/feePlansListFeeRevenue.d.ts +8 -0
- package/mcp-server/tools/feePlansListFeeRevenue.d.ts.map +1 -0
- package/mcp-server/tools/feePlansListFeeRevenue.js +65 -0
- package/mcp-server/tools/feePlansListFeeRevenue.js.map +1 -0
- package/mcp-server/tools/feePlansRetrieveFees.js +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 +19 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +19 -0
- package/models/components/index.js.map +1 -1
- package/models/components/instantbankcreditpaymentmethod.d.ts +40 -0
- package/models/components/instantbankcreditpaymentmethod.d.ts.map +1 -0
- package/models/components/instantbankcreditpaymentmethod.js +71 -0
- package/models/components/instantbankcreditpaymentmethod.js.map +1 -0
- 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/paymentmethod.d.ts +5 -0
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +3 -0
- package/models/components/paymentmethod.js.map +1 -1
- package/models/components/paymentmethodtype.d.ts +1 -0
- package/models/components/paymentmethodtype.d.ts.map +1 -1
- package/models/components/paymentmethodtype.js +1 -0
- package/models/components/paymentmethodtype.js.map +1 -1
- 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 +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listfeerevenue.d.ts +81 -0
- package/models/operations/listfeerevenue.d.ts.map +1 -0
- package/models/operations/listfeerevenue.js +120 -0
- package/models/operations/listfeerevenue.js.map +1 -0
- 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/feeplans.d.ts +8 -1
- package/sdk/feeplans.d.ts.map +1 -1
- package/sdk/feeplans.js +11 -1
- package/sdk/feeplans.js.map +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/feePlansListFeeRevenue.ts +187 -0
- package/src/funcs/feePlansRetrieveFees.ts +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 +13 -1
- package/src/mcp-server/tools/feePlansListFeeRevenue.ts +39 -0
- package/src/mcp-server/tools/feePlansRetrieveFees.ts +1 -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 +19 -0
- package/src/models/components/instantbankcreditpaymentmethod.ts +95 -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/paymentmethod.ts +22 -0
- package/src/models/components/paymentmethodtype.ts +1 -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 +6 -0
- package/src/models/operations/listfeerevenue.ts +200 -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/feeplans.ts +19 -1
- package/src/sdk/invoices.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
InvoiceLineItemValidationError,
|
|
11
|
+
InvoiceLineItemValidationError$inboundSchema,
|
|
12
|
+
InvoiceLineItemValidationError$Outbound,
|
|
13
|
+
InvoiceLineItemValidationError$outboundSchema,
|
|
14
|
+
} from "./invoicelineitemvalidationerror.js";
|
|
15
|
+
|
|
16
|
+
export type InvoiceLineItemsValidationError = {
|
|
17
|
+
items?: { [k: string]: InvoiceLineItemValidationError } | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const InvoiceLineItemsValidationError$inboundSchema: z.ZodType<
|
|
22
|
+
InvoiceLineItemsValidationError,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
items: z.record(InvoiceLineItemValidationError$inboundSchema).optional(),
|
|
27
|
+
});
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type InvoiceLineItemsValidationError$Outbound = {
|
|
30
|
+
items?: { [k: string]: InvoiceLineItemValidationError$Outbound } | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const InvoiceLineItemsValidationError$outboundSchema: z.ZodType<
|
|
35
|
+
InvoiceLineItemsValidationError$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
InvoiceLineItemsValidationError
|
|
38
|
+
> = z.object({
|
|
39
|
+
items: z.record(InvoiceLineItemValidationError$outboundSchema).optional(),
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export function invoiceLineItemsValidationErrorToJSON(
|
|
43
|
+
invoiceLineItemsValidationError: InvoiceLineItemsValidationError,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
InvoiceLineItemsValidationError$outboundSchema.parse(
|
|
47
|
+
invoiceLineItemsValidationError,
|
|
48
|
+
),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
export function invoiceLineItemsValidationErrorFromJSON(
|
|
52
|
+
jsonString: string,
|
|
53
|
+
): SafeParseResult<InvoiceLineItemsValidationError, SDKValidationError> {
|
|
54
|
+
return safeParse(
|
|
55
|
+
jsonString,
|
|
56
|
+
(x) => InvoiceLineItemsValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'InvoiceLineItemsValidationError' from JSON`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
AmountDecimalValidationError,
|
|
11
|
+
AmountDecimalValidationError$inboundSchema,
|
|
12
|
+
AmountDecimalValidationError$Outbound,
|
|
13
|
+
AmountDecimalValidationError$outboundSchema,
|
|
14
|
+
} from "./amountdecimalvalidationerror.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceLineItemOptionValidationError,
|
|
17
|
+
InvoiceLineItemOptionValidationError$inboundSchema,
|
|
18
|
+
InvoiceLineItemOptionValidationError$Outbound,
|
|
19
|
+
InvoiceLineItemOptionValidationError$outboundSchema,
|
|
20
|
+
} from "./invoicelineitemoptionvalidationerror.js";
|
|
21
|
+
|
|
22
|
+
export type InvoiceLineItemValidationError = {
|
|
23
|
+
productID?: string | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
basePrice?: AmountDecimalValidationError | undefined;
|
|
26
|
+
options?: { [k: string]: InvoiceLineItemOptionValidationError } | undefined;
|
|
27
|
+
quantity?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const InvoiceLineItemValidationError$inboundSchema: z.ZodType<
|
|
32
|
+
InvoiceLineItemValidationError,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
productID: z.string().optional(),
|
|
37
|
+
name: z.string().optional(),
|
|
38
|
+
basePrice: AmountDecimalValidationError$inboundSchema.optional(),
|
|
39
|
+
options: z.record(InvoiceLineItemOptionValidationError$inboundSchema)
|
|
40
|
+
.optional(),
|
|
41
|
+
quantity: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type InvoiceLineItemValidationError$Outbound = {
|
|
45
|
+
productID?: string | undefined;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
basePrice?: AmountDecimalValidationError$Outbound | undefined;
|
|
48
|
+
options?:
|
|
49
|
+
| { [k: string]: InvoiceLineItemOptionValidationError$Outbound }
|
|
50
|
+
| undefined;
|
|
51
|
+
quantity?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const InvoiceLineItemValidationError$outboundSchema: z.ZodType<
|
|
56
|
+
InvoiceLineItemValidationError$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
InvoiceLineItemValidationError
|
|
59
|
+
> = z.object({
|
|
60
|
+
productID: z.string().optional(),
|
|
61
|
+
name: z.string().optional(),
|
|
62
|
+
basePrice: AmountDecimalValidationError$outboundSchema.optional(),
|
|
63
|
+
options: z.record(InvoiceLineItemOptionValidationError$outboundSchema)
|
|
64
|
+
.optional(),
|
|
65
|
+
quantity: z.string().optional(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function invoiceLineItemValidationErrorToJSON(
|
|
69
|
+
invoiceLineItemValidationError: InvoiceLineItemValidationError,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
InvoiceLineItemValidationError$outboundSchema.parse(
|
|
73
|
+
invoiceLineItemValidationError,
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export function invoiceLineItemValidationErrorFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<InvoiceLineItemValidationError, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => InvoiceLineItemValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'InvoiceLineItemValidationError' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
InvoiceExternalPayment,
|
|
11
|
+
InvoiceExternalPayment$inboundSchema,
|
|
12
|
+
InvoiceExternalPayment$Outbound,
|
|
13
|
+
InvoiceExternalPayment$outboundSchema,
|
|
14
|
+
} from "./invoiceexternalpayment.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceTransferPayment,
|
|
17
|
+
InvoiceTransferPayment$inboundSchema,
|
|
18
|
+
InvoiceTransferPayment$Outbound,
|
|
19
|
+
InvoiceTransferPayment$outboundSchema,
|
|
20
|
+
} from "./invoicetransferpayment.js";
|
|
21
|
+
|
|
22
|
+
export type InvoicePayment =
|
|
23
|
+
| (InvoiceExternalPayment & { paymentType: "external" })
|
|
24
|
+
| (InvoiceTransferPayment & { paymentType: "transfer" });
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const InvoicePayment$inboundSchema: z.ZodType<
|
|
28
|
+
InvoicePayment,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.union([
|
|
32
|
+
InvoiceExternalPayment$inboundSchema.and(
|
|
33
|
+
z.object({ paymentType: z.literal("external") }).transform((v) => ({
|
|
34
|
+
paymentType: v.paymentType,
|
|
35
|
+
})),
|
|
36
|
+
),
|
|
37
|
+
InvoiceTransferPayment$inboundSchema.and(
|
|
38
|
+
z.object({ paymentType: z.literal("transfer") }).transform((v) => ({
|
|
39
|
+
paymentType: v.paymentType,
|
|
40
|
+
})),
|
|
41
|
+
),
|
|
42
|
+
]);
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type InvoicePayment$Outbound =
|
|
45
|
+
| (InvoiceExternalPayment$Outbound & { paymentType: "external" })
|
|
46
|
+
| (InvoiceTransferPayment$Outbound & { paymentType: "transfer" });
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const InvoicePayment$outboundSchema: z.ZodType<
|
|
50
|
+
InvoicePayment$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
InvoicePayment
|
|
53
|
+
> = z.union([
|
|
54
|
+
InvoiceExternalPayment$outboundSchema.and(
|
|
55
|
+
z.object({ paymentType: z.literal("external") }).transform((v) => ({
|
|
56
|
+
paymentType: v.paymentType,
|
|
57
|
+
})),
|
|
58
|
+
),
|
|
59
|
+
InvoiceTransferPayment$outboundSchema.and(
|
|
60
|
+
z.object({ paymentType: z.literal("transfer") }).transform((v) => ({
|
|
61
|
+
paymentType: v.paymentType,
|
|
62
|
+
})),
|
|
63
|
+
),
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
export function invoicePaymentToJSON(invoicePayment: InvoicePayment): string {
|
|
67
|
+
return JSON.stringify(InvoicePayment$outboundSchema.parse(invoicePayment));
|
|
68
|
+
}
|
|
69
|
+
export function invoicePaymentFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<InvoicePayment, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => InvoicePayment$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'InvoicePayment' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const InvoiceStatus = {
|
|
9
|
+
Draft: "draft",
|
|
10
|
+
Unpaid: "unpaid",
|
|
11
|
+
PaymentPending: "payment-pending",
|
|
12
|
+
Paid: "paid",
|
|
13
|
+
Overdue: "overdue",
|
|
14
|
+
Canceled: "canceled",
|
|
15
|
+
} as const;
|
|
16
|
+
export type InvoiceStatus = ClosedEnum<typeof InvoiceStatus>;
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const InvoiceStatus$inboundSchema: z.ZodNativeEnum<
|
|
20
|
+
typeof InvoiceStatus
|
|
21
|
+
> = z.nativeEnum(InvoiceStatus);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const InvoiceStatus$outboundSchema: z.ZodNativeEnum<
|
|
24
|
+
typeof InvoiceStatus
|
|
25
|
+
> = InvoiceStatus$inboundSchema;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const PaymentType = {
|
|
12
|
+
Transfer: "transfer",
|
|
13
|
+
} as const;
|
|
14
|
+
export type PaymentType = ClosedEnum<typeof PaymentType>;
|
|
15
|
+
|
|
16
|
+
export type InvoiceTransferPayment = {
|
|
17
|
+
paymentType: PaymentType;
|
|
18
|
+
transferID: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PaymentType$inboundSchema: z.ZodNativeEnum<typeof PaymentType> = z
|
|
23
|
+
.nativeEnum(PaymentType);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const PaymentType$outboundSchema: z.ZodNativeEnum<typeof PaymentType> =
|
|
26
|
+
PaymentType$inboundSchema;
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const InvoiceTransferPayment$inboundSchema: z.ZodType<
|
|
30
|
+
InvoiceTransferPayment,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
paymentType: PaymentType$inboundSchema,
|
|
35
|
+
transferID: z.string(),
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type InvoiceTransferPayment$Outbound = {
|
|
39
|
+
paymentType: string;
|
|
40
|
+
transferID: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const InvoiceTransferPayment$outboundSchema: z.ZodType<
|
|
45
|
+
InvoiceTransferPayment$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
InvoiceTransferPayment
|
|
48
|
+
> = z.object({
|
|
49
|
+
paymentType: PaymentType$outboundSchema,
|
|
50
|
+
transferID: z.string(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function invoiceTransferPaymentToJSON(
|
|
54
|
+
invoiceTransferPayment: InvoiceTransferPayment,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
InvoiceTransferPayment$outboundSchema.parse(invoiceTransferPayment),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export function invoiceTransferPaymentFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<InvoiceTransferPayment, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => InvoiceTransferPayment$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'InvoiceTransferPayment' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -48,6 +48,12 @@ import {
|
|
|
48
48
|
CardPresentPaymentPaymentMethod$Outbound,
|
|
49
49
|
CardPresentPaymentPaymentMethod$outboundSchema,
|
|
50
50
|
} from "./cardpresentpaymentpaymentmethod.js";
|
|
51
|
+
import {
|
|
52
|
+
InstantBankCreditPaymentMethod,
|
|
53
|
+
InstantBankCreditPaymentMethod$inboundSchema,
|
|
54
|
+
InstantBankCreditPaymentMethod$Outbound,
|
|
55
|
+
InstantBankCreditPaymentMethod$outboundSchema,
|
|
56
|
+
} from "./instantbankcreditpaymentmethod.js";
|
|
51
57
|
import {
|
|
52
58
|
MoovWalletPaymentMethod,
|
|
53
59
|
MoovWalletPaymentMethod$inboundSchema,
|
|
@@ -91,6 +97,9 @@ export type PaymentMethod =
|
|
|
91
97
|
| (PushToCardPaymentMethod & { paymentMethodType: "push-to-card" })
|
|
92
98
|
| (PullFromCardPaymentMethod & { paymentMethodType: "pull-from-card" })
|
|
93
99
|
| (ApplePayPaymentMethod & { paymentMethodType: "apple-pay" })
|
|
100
|
+
| (InstantBankCreditPaymentMethod & {
|
|
101
|
+
paymentMethodType: "instant-bank-credit";
|
|
102
|
+
})
|
|
94
103
|
| (CardPresentPaymentPaymentMethod & {
|
|
95
104
|
paymentMethodType: "card-present-payment";
|
|
96
105
|
});
|
|
@@ -151,6 +160,11 @@ export const PaymentMethod$inboundSchema: z.ZodType<
|
|
|
151
160
|
paymentMethodType: v.paymentMethodType,
|
|
152
161
|
})),
|
|
153
162
|
),
|
|
163
|
+
InstantBankCreditPaymentMethod$inboundSchema.and(
|
|
164
|
+
z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
|
|
165
|
+
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
166
|
+
),
|
|
167
|
+
),
|
|
154
168
|
CardPresentPaymentPaymentMethod$inboundSchema.and(
|
|
155
169
|
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
156
170
|
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
@@ -178,6 +192,9 @@ export type PaymentMethod$Outbound =
|
|
|
178
192
|
paymentMethodType: "pull-from-card";
|
|
179
193
|
})
|
|
180
194
|
| (ApplePayPaymentMethod$Outbound & { paymentMethodType: "apple-pay" })
|
|
195
|
+
| (InstantBankCreditPaymentMethod$Outbound & {
|
|
196
|
+
paymentMethodType: "instant-bank-credit";
|
|
197
|
+
})
|
|
181
198
|
| (CardPresentPaymentPaymentMethod$Outbound & {
|
|
182
199
|
paymentMethodType: "card-present-payment";
|
|
183
200
|
});
|
|
@@ -238,6 +255,11 @@ export const PaymentMethod$outboundSchema: z.ZodType<
|
|
|
238
255
|
paymentMethodType: v.paymentMethodType,
|
|
239
256
|
})),
|
|
240
257
|
),
|
|
258
|
+
InstantBankCreditPaymentMethod$outboundSchema.and(
|
|
259
|
+
z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
|
|
260
|
+
(v) => ({ paymentMethodType: v.paymentMethodType })
|
|
261
|
+
),
|
|
262
|
+
),
|
|
241
263
|
CardPresentPaymentPaymentMethod$outboundSchema.and(
|
|
242
264
|
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
243
265
|
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
@@ -20,6 +20,7 @@ export const PaymentMethodType = {
|
|
|
20
20
|
PullFromCard: "pull-from-card",
|
|
21
21
|
ApplePay: "apple-pay",
|
|
22
22
|
CardPresentPayment: "card-present-payment",
|
|
23
|
+
InstantBankCredit: "instant-bank-credit",
|
|
23
24
|
} as const;
|
|
24
25
|
/**
|
|
25
26
|
* The payment method type that represents a payment rail and directionality
|
|
@@ -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
|
+
}
|