@moovio/sdk 0.21.16 → 0.22.0
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 +44 -46
- package/bin/mcp-server.js +316 -313
- package/bin/mcp-server.js.map +64 -58
- package/examples/package-lock.json +1 -1
- package/funcs/imagesUpdate.d.ts +1 -2
- package/funcs/imagesUpdate.d.ts.map +1 -1
- package/funcs/imagesUpdate.js +12 -13
- package/funcs/imagesUpdate.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/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +12 -1
- package/lib/encodings.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountsUpdate.js +1 -1
- package/mcp-server/tools/applePayUpdateMerchantDomains.js +3 -3
- package/mcp-server/tools/brandingUpdate.js +1 -1
- package/mcp-server/tools/cardIssuingUpdate.js +1 -1
- package/mcp-server/tools/cardsUpdate.js +6 -6
- package/mcp-server/tools/imagesUpdate.d.ts.map +1 -1
- package/mcp-server/tools/imagesUpdate.js +1 -2
- package/mcp-server/tools/imagesUpdate.js.map +1 -1
- package/mcp-server/tools/paymentLinksUpdate.js +1 -1
- package/mcp-server/tools/representativesUpdate.js +2 -2
- package/mcp-server/tools/supportUpdateTicket.js +1 -1
- package/mcp-server/tools/sweepsUpdateConfig.js +1 -1
- package/mcp-server/tools/transfersUpdate.js +3 -3
- package/mcp-server/tools/walletsUpdate.js +1 -1
- package/models/components/achcreditsamedaypaymentmethod.d.ts +2 -11
- package/models/components/achcreditsamedaypaymentmethod.d.ts.map +1 -1
- package/models/components/achcreditsamedaypaymentmethod.js +3 -11
- package/models/components/achcreditsamedaypaymentmethod.js.map +1 -1
- package/models/components/achcreditstandardpaymentmethod.d.ts +2 -11
- package/models/components/achcreditstandardpaymentmethod.d.ts.map +1 -1
- package/models/components/achcreditstandardpaymentmethod.js +3 -11
- package/models/components/achcreditstandardpaymentmethod.js.map +1 -1
- package/models/components/achdebitcollectpaymentmethod.d.ts +2 -11
- package/models/components/achdebitcollectpaymentmethod.d.ts.map +1 -1
- package/models/components/achdebitcollectpaymentmethod.js +3 -11
- package/models/components/achdebitcollectpaymentmethod.js.map +1 -1
- package/models/components/achdebitfundpaymentmethod.d.ts +2 -11
- package/models/components/achdebitfundpaymentmethod.d.ts.map +1 -1
- package/models/components/achdebitfundpaymentmethod.js +3 -11
- package/models/components/achdebitfundpaymentmethod.js.map +1 -1
- package/models/components/applepaypaymentmethod.d.ts +2 -11
- package/models/components/applepaypaymentmethod.d.ts.map +1 -1
- package/models/components/applepaypaymentmethod.js +3 -10
- package/models/components/applepaypaymentmethod.js.map +1 -1
- package/models/components/cardpaymentpaymentmethod.d.ts +2 -11
- package/models/components/cardpaymentpaymentmethod.d.ts.map +1 -1
- package/models/components/cardpaymentpaymentmethod.js +3 -11
- package/models/components/cardpaymentpaymentmethod.js.map +1 -1
- package/models/components/cardpresentpaymentpaymentmethod.d.ts +2 -11
- package/models/components/cardpresentpaymentpaymentmethod.d.ts.map +1 -1
- package/models/components/cardpresentpaymentpaymentmethod.js +3 -11
- package/models/components/cardpresentpaymentpaymentmethod.js.map +1 -1
- package/models/components/createevidencefilemultipart.d.ts +1 -1
- package/models/components/createinvoice.d.ts +3 -3
- package/models/components/createinvoice.d.ts.map +1 -1
- package/models/components/createinvoice.js +3 -3
- package/models/components/createinvoice.js.map +1 -1
- package/models/components/createinvoicelineitem.d.ts +50 -0
- package/models/components/createinvoicelineitem.d.ts.map +1 -0
- package/models/components/createinvoicelineitem.js +70 -0
- package/models/components/createinvoicelineitem.js.map +1 -0
- package/models/components/createinvoicelineitemoption.d.ts +44 -0
- package/models/components/createinvoicelineitemoption.d.ts.map +1 -0
- package/models/components/createinvoicelineitemoption.js +67 -0
- package/models/components/createinvoicelineitemoption.js.map +1 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.d.ts +24 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.d.ts.map +1 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.js +65 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.js.map +1 -0
- package/models/components/createinvoicelineitems.d.ts +24 -0
- package/models/components/createinvoicelineitems.d.ts.map +1 -0
- package/models/components/{invoicelineitemsupdate.js → createinvoicelineitems.js} +13 -13
- package/models/components/createinvoicelineitems.js.map +1 -0
- package/models/components/createinvoicelineitemsupdate.d.ts +24 -0
- package/models/components/createinvoicelineitemsupdate.d.ts.map +1 -0
- package/models/components/createinvoicelineitemsupdate.js +59 -0
- package/models/components/createinvoicelineitemsupdate.js.map +1 -0
- package/models/components/createinvoicelineitemsvalidationerror.d.ts +22 -0
- package/models/components/createinvoicelineitemsvalidationerror.d.ts.map +1 -0
- package/models/components/createinvoicelineitemsvalidationerror.js +61 -0
- package/models/components/createinvoicelineitemsvalidationerror.js.map +1 -0
- package/models/components/createinvoicelineitemvalidationerror.d.ts +31 -0
- package/models/components/createinvoicelineitemvalidationerror.d.ts.map +1 -0
- package/models/components/createinvoicelineitemvalidationerror.js +70 -0
- package/models/components/createinvoicelineitemvalidationerror.js.map +1 -0
- package/models/components/createpaymentlink.d.ts +0 -2
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/fileuploadrequestmultipart.d.ts +1 -4
- package/models/components/fileuploadrequestmultipart.d.ts.map +1 -1
- package/models/components/fileuploadrequestmultipart.js.map +1 -1
- package/models/components/imageuploadrequestmultipart.d.ts +3 -3
- package/models/components/imageuploadrequestmultipart.d.ts.map +1 -1
- package/models/components/index.d.ts +8 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -2
- package/models/components/index.js.map +1 -1
- package/models/components/instantbankcreditpaymentmethod.d.ts +2 -11
- package/models/components/instantbankcreditpaymentmethod.d.ts.map +1 -1
- package/models/components/instantbankcreditpaymentmethod.js +3 -11
- package/models/components/instantbankcreditpaymentmethod.js.map +1 -1
- package/models/components/invoiceexternalpayment.d.ts +2 -11
- package/models/components/invoiceexternalpayment.d.ts.map +1 -1
- package/models/components/invoiceexternalpayment.js +3 -10
- package/models/components/invoiceexternalpayment.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +9 -3
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js +5 -2
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/invoicelineitemimagemetadata.d.ts +35 -0
- package/models/components/invoicelineitemimagemetadata.d.ts.map +1 -0
- package/models/components/invoicelineitemimagemetadata.js +64 -0
- package/models/components/invoicelineitemimagemetadata.js.map +1 -0
- package/models/components/invoicepayment.d.ts +2 -10
- package/models/components/invoicepayment.d.ts.map +1 -1
- package/models/components/invoicepayment.js +4 -12
- package/models/components/invoicepayment.js.map +1 -1
- package/models/components/invoicetransferpayment.d.ts +2 -11
- package/models/components/invoicetransferpayment.d.ts.map +1 -1
- package/models/components/invoicetransferpayment.js +3 -11
- package/models/components/invoicetransferpayment.js.map +1 -1
- package/models/components/moovwalletpaymentmethod.d.ts +2 -11
- package/models/components/moovwalletpaymentmethod.d.ts.map +1 -1
- package/models/components/moovwalletpaymentmethod.js +3 -11
- package/models/components/moovwalletpaymentmethod.js.map +1 -1
- package/models/components/patchsweepconfig.d.ts +6 -60
- package/models/components/patchsweepconfig.d.ts.map +1 -1
- package/models/components/patchsweepconfig.js +7 -79
- package/models/components/patchsweepconfig.js.map +1 -1
- package/models/components/paymentmethod.d.ts +2 -50
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +24 -34
- package/models/components/paymentmethod.js.map +1 -1
- package/models/components/pullfromcardpaymentmethod.d.ts +2 -11
- package/models/components/pullfromcardpaymentmethod.d.ts.map +1 -1
- package/models/components/pullfromcardpaymentmethod.js +3 -11
- package/models/components/pullfromcardpaymentmethod.js.map +1 -1
- package/models/components/pushtocardpaymentmethod.d.ts +2 -11
- package/models/components/pushtocardpaymentmethod.d.ts.map +1 -1
- package/models/components/pushtocardpaymentmethod.js +3 -11
- package/models/components/pushtocardpaymentmethod.js.map +1 -1
- package/models/components/rtpcreditpaymentmethod.d.ts +2 -11
- package/models/components/rtpcreditpaymentmethod.d.ts.map +1 -1
- package/models/components/rtpcreditpaymentmethod.js +3 -11
- package/models/components/rtpcreditpaymentmethod.js.map +1 -1
- package/models/components/updateinvoice.d.ts +3 -3
- package/models/components/updateinvoice.d.ts.map +1 -1
- package/models/components/updateinvoice.js +3 -3
- package/models/components/updateinvoice.js.map +1 -1
- package/models/components/updaterepresentative.d.ts +2 -20
- package/models/components/updaterepresentative.d.ts.map +1 -1
- package/models/components/updaterepresentative.js +3 -32
- package/models/components/updaterepresentative.js.map +1 -1
- package/models/errors/createinvoiceerror.d.ts +3 -3
- package/models/errors/createinvoiceerror.d.ts.map +1 -1
- package/models/errors/createinvoiceerror.js +2 -2
- package/models/errors/createinvoiceerror.js.map +1 -1
- package/models/operations/createpaymentlink.d.ts +3 -0
- package/models/operations/createpaymentlink.d.ts.map +1 -1
- package/models/operations/createpaymentlink.js.map +1 -1
- package/models/operations/disablepaymentlink.d.ts +3 -0
- package/models/operations/disablepaymentlink.d.ts.map +1 -1
- package/models/operations/disablepaymentlink.js.map +1 -1
- package/models/operations/getpaymentlink.d.ts +3 -0
- package/models/operations/getpaymentlink.d.ts.map +1 -1
- package/models/operations/getpaymentlink.js.map +1 -1
- package/models/operations/getpaymentlinkqrcode.d.ts +3 -0
- package/models/operations/getpaymentlinkqrcode.d.ts.map +1 -1
- package/models/operations/getpaymentlinkqrcode.js.map +1 -1
- package/models/operations/listpaymentlinks.d.ts +3 -0
- package/models/operations/listpaymentlinks.d.ts.map +1 -1
- package/models/operations/listpaymentlinks.js.map +1 -1
- package/models/operations/updateimage.d.ts +2 -2
- package/models/operations/updateimage.js +4 -4
- package/models/operations/updatepaymentlink.d.ts +3 -0
- package/models/operations/updatepaymentlink.d.ts.map +1 -1
- package/models/operations/updatepaymentlink.js.map +1 -1
- package/package.json +1 -1
- package/sdk/images.d.ts +1 -2
- package/sdk/images.d.ts.map +1 -1
- package/sdk/images.js +1 -2
- package/sdk/images.js.map +1 -1
- package/src/funcs/imagesUpdate.ts +12 -13
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +17 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/accountsUpdate.ts +1 -1
- package/src/mcp-server/tools/applePayUpdateMerchantDomains.ts +3 -3
- package/src/mcp-server/tools/brandingUpdate.ts +1 -1
- package/src/mcp-server/tools/cardIssuingUpdate.ts +1 -1
- package/src/mcp-server/tools/cardsUpdate.ts +6 -6
- package/src/mcp-server/tools/imagesUpdate.ts +1 -2
- package/src/mcp-server/tools/paymentLinksUpdate.ts +1 -1
- package/src/mcp-server/tools/representativesUpdate.ts +2 -2
- package/src/mcp-server/tools/supportUpdateTicket.ts +1 -1
- package/src/mcp-server/tools/sweepsUpdateConfig.ts +1 -1
- package/src/mcp-server/tools/transfersUpdate.ts +3 -3
- package/src/mcp-server/tools/walletsUpdate.ts +1 -1
- package/src/models/components/achcreditsamedaypaymentmethod.ts +4 -23
- package/src/models/components/achcreditstandardpaymentmethod.ts +4 -23
- package/src/models/components/achdebitcollectpaymentmethod.ts +4 -23
- package/src/models/components/achdebitfundpaymentmethod.ts +4 -21
- package/src/models/components/applepaypaymentmethod.ts +4 -22
- package/src/models/components/cardpaymentpaymentmethod.ts +4 -21
- package/src/models/components/cardpresentpaymentpaymentmethod.ts +4 -23
- package/src/models/components/createevidencefilemultipart.ts +1 -1
- package/src/models/components/createinvoice.ts +9 -9
- package/src/models/components/createinvoicelineitem.ts +104 -0
- package/src/models/components/createinvoicelineitemoption.ts +93 -0
- package/src/models/components/createinvoicelineitemoptionvalidationerror.ts +77 -0
- package/src/models/components/createinvoicelineitems.ts +63 -0
- package/src/models/components/createinvoicelineitemsupdate.ts +65 -0
- package/src/models/components/createinvoicelineitemsvalidationerror.ts +64 -0
- package/src/models/components/createinvoicelineitemvalidationerror.ts +88 -0
- package/src/models/components/createpaymentlink.ts +0 -2
- package/src/models/components/fileuploadrequestmultipart.ts +1 -4
- package/src/models/components/imageuploadrequestmultipart.ts +3 -3
- package/src/models/components/index.ts +8 -2
- package/src/models/components/instantbankcreditpaymentmethod.ts +4 -23
- package/src/models/components/invoiceexternalpayment.ts +4 -21
- package/src/models/components/invoicelineitem.ts +18 -5
- package/src/models/components/invoicelineitemimagemetadata.ts +77 -0
- package/src/models/components/invoicepayment.ts +7 -25
- package/src/models/components/invoicetransferpayment.ts +4 -17
- package/src/models/components/moovwalletpaymentmethod.ts +4 -21
- package/src/models/components/patchsweepconfig.ts +12 -252
- package/src/models/components/paymentmethod.ts +48 -164
- package/src/models/components/pullfromcardpaymentmethod.ts +4 -21
- package/src/models/components/pushtocardpaymentmethod.ts +4 -21
- package/src/models/components/rtpcreditpaymentmethod.ts +4 -21
- package/src/models/components/updateinvoice.ts +9 -9
- package/src/models/components/updaterepresentative.ts +4 -59
- package/src/models/errors/createinvoiceerror.ts +7 -5
- package/src/models/operations/createpaymentlink.ts +3 -0
- package/src/models/operations/disablepaymentlink.ts +3 -0
- package/src/models/operations/getpaymentlink.ts +3 -0
- package/src/models/operations/getpaymentlinkqrcode.ts +3 -0
- package/src/models/operations/listpaymentlinks.ts +3 -0
- package/src/models/operations/updateimage.ts +8 -8
- package/src/models/operations/updatepaymentlink.ts +3 -0
- package/src/sdk/images.ts +1 -2
- package/src/types/unrecognized.ts +9 -1
- package/tsconfig.json +1 -2
- package/types/unrecognized.d.ts +7 -1
- package/types/unrecognized.d.ts.map +1 -1
- package/types/unrecognized.js +9 -1
- package/types/unrecognized.js.map +1 -1
- package/models/components/imageupdaterequestmultipart.d.ts +0 -67
- package/models/components/imageupdaterequestmultipart.d.ts.map +0 -1
- package/models/components/imageupdaterequestmultipart.js +0 -105
- package/models/components/imageupdaterequestmultipart.js.map +0 -1
- package/models/components/invoicelineitemsupdate.d.ts +0 -24
- package/models/components/invoicelineitemsupdate.d.ts.map +0 -1
- package/models/components/invoicelineitemsupdate.js.map +0 -1
- package/src/models/components/imageupdaterequestmultipart.ts +0 -178
- package/src/models/components/invoicelineitemsupdate.ts +0 -63
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
CreateInvoiceLineItem,
|
|
11
|
+
CreateInvoiceLineItem$inboundSchema,
|
|
12
|
+
CreateInvoiceLineItem$Outbound,
|
|
13
|
+
CreateInvoiceLineItem$outboundSchema,
|
|
14
|
+
} from "./createinvoicelineitem.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A collection of line items for an invoice.
|
|
18
|
+
*/
|
|
19
|
+
export type CreateInvoiceLineItemsUpdate = {
|
|
20
|
+
/**
|
|
21
|
+
* The list of line items.
|
|
22
|
+
*/
|
|
23
|
+
items?: Array<CreateInvoiceLineItem> | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const CreateInvoiceLineItemsUpdate$inboundSchema: z.ZodType<
|
|
28
|
+
CreateInvoiceLineItemsUpdate,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
items: z.array(CreateInvoiceLineItem$inboundSchema).optional(),
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type CreateInvoiceLineItemsUpdate$Outbound = {
|
|
36
|
+
items?: Array<CreateInvoiceLineItem$Outbound> | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CreateInvoiceLineItemsUpdate$outboundSchema: z.ZodType<
|
|
41
|
+
CreateInvoiceLineItemsUpdate$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
CreateInvoiceLineItemsUpdate
|
|
44
|
+
> = z.object({
|
|
45
|
+
items: z.array(CreateInvoiceLineItem$outboundSchema).optional(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function createInvoiceLineItemsUpdateToJSON(
|
|
49
|
+
createInvoiceLineItemsUpdate: CreateInvoiceLineItemsUpdate,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
CreateInvoiceLineItemsUpdate$outboundSchema.parse(
|
|
53
|
+
createInvoiceLineItemsUpdate,
|
|
54
|
+
),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export function createInvoiceLineItemsUpdateFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<CreateInvoiceLineItemsUpdate, SDKValidationError> {
|
|
60
|
+
return safeParse(
|
|
61
|
+
jsonString,
|
|
62
|
+
(x) => CreateInvoiceLineItemsUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'CreateInvoiceLineItemsUpdate' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -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
|
+
CreateInvoiceLineItemValidationError,
|
|
11
|
+
CreateInvoiceLineItemValidationError$inboundSchema,
|
|
12
|
+
CreateInvoiceLineItemValidationError$Outbound,
|
|
13
|
+
CreateInvoiceLineItemValidationError$outboundSchema,
|
|
14
|
+
} from "./createinvoicelineitemvalidationerror.js";
|
|
15
|
+
|
|
16
|
+
export type CreateInvoiceLineItemsValidationError = {
|
|
17
|
+
items?: { [k: string]: CreateInvoiceLineItemValidationError } | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreateInvoiceLineItemsValidationError$inboundSchema: z.ZodType<
|
|
22
|
+
CreateInvoiceLineItemsValidationError,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
items: z.record(CreateInvoiceLineItemValidationError$inboundSchema)
|
|
27
|
+
.optional(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type CreateInvoiceLineItemsValidationError$Outbound = {
|
|
31
|
+
items?:
|
|
32
|
+
| { [k: string]: CreateInvoiceLineItemValidationError$Outbound }
|
|
33
|
+
| undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const CreateInvoiceLineItemsValidationError$outboundSchema: z.ZodType<
|
|
38
|
+
CreateInvoiceLineItemsValidationError$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
CreateInvoiceLineItemsValidationError
|
|
41
|
+
> = z.object({
|
|
42
|
+
items: z.record(CreateInvoiceLineItemValidationError$outboundSchema)
|
|
43
|
+
.optional(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function createInvoiceLineItemsValidationErrorToJSON(
|
|
47
|
+
createInvoiceLineItemsValidationError: CreateInvoiceLineItemsValidationError,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
CreateInvoiceLineItemsValidationError$outboundSchema.parse(
|
|
51
|
+
createInvoiceLineItemsValidationError,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function createInvoiceLineItemsValidationErrorFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<CreateInvoiceLineItemsValidationError, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) =>
|
|
61
|
+
CreateInvoiceLineItemsValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'CreateInvoiceLineItemsValidationError' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
CreateInvoiceLineItemOptionValidationError,
|
|
17
|
+
CreateInvoiceLineItemOptionValidationError$inboundSchema,
|
|
18
|
+
CreateInvoiceLineItemOptionValidationError$Outbound,
|
|
19
|
+
CreateInvoiceLineItemOptionValidationError$outboundSchema,
|
|
20
|
+
} from "./createinvoicelineitemoptionvalidationerror.js";
|
|
21
|
+
|
|
22
|
+
export type CreateInvoiceLineItemValidationError = {
|
|
23
|
+
productID?: string | undefined;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
basePrice?: AmountDecimalValidationError | undefined;
|
|
26
|
+
options?:
|
|
27
|
+
| { [k: string]: CreateInvoiceLineItemOptionValidationError }
|
|
28
|
+
| undefined;
|
|
29
|
+
quantity?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const CreateInvoiceLineItemValidationError$inboundSchema: z.ZodType<
|
|
34
|
+
CreateInvoiceLineItemValidationError,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
productID: z.string().optional(),
|
|
39
|
+
name: z.string().optional(),
|
|
40
|
+
basePrice: AmountDecimalValidationError$inboundSchema.optional(),
|
|
41
|
+
options: z.record(CreateInvoiceLineItemOptionValidationError$inboundSchema)
|
|
42
|
+
.optional(),
|
|
43
|
+
quantity: z.string().optional(),
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type CreateInvoiceLineItemValidationError$Outbound = {
|
|
47
|
+
productID?: string | undefined;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
basePrice?: AmountDecimalValidationError$Outbound | undefined;
|
|
50
|
+
options?:
|
|
51
|
+
| { [k: string]: CreateInvoiceLineItemOptionValidationError$Outbound }
|
|
52
|
+
| undefined;
|
|
53
|
+
quantity?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const CreateInvoiceLineItemValidationError$outboundSchema: z.ZodType<
|
|
58
|
+
CreateInvoiceLineItemValidationError$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
CreateInvoiceLineItemValidationError
|
|
61
|
+
> = z.object({
|
|
62
|
+
productID: z.string().optional(),
|
|
63
|
+
name: z.string().optional(),
|
|
64
|
+
basePrice: AmountDecimalValidationError$outboundSchema.optional(),
|
|
65
|
+
options: z.record(CreateInvoiceLineItemOptionValidationError$outboundSchema)
|
|
66
|
+
.optional(),
|
|
67
|
+
quantity: z.string().optional(),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function createInvoiceLineItemValidationErrorToJSON(
|
|
71
|
+
createInvoiceLineItemValidationError: CreateInvoiceLineItemValidationError,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
CreateInvoiceLineItemValidationError$outboundSchema.parse(
|
|
75
|
+
createInvoiceLineItemValidationError,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
export function createInvoiceLineItemValidationErrorFromJSON(
|
|
80
|
+
jsonString: string,
|
|
81
|
+
): SafeParseResult<CreateInvoiceLineItemValidationError, SDKValidationError> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) =>
|
|
85
|
+
CreateInvoiceLineItemValidationError$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'CreateInvoiceLineItemValidationError' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -51,8 +51,6 @@ import {
|
|
|
51
51
|
* A payment link must include either `payment` or `payout` details, but not both. For payout payment links,
|
|
52
52
|
* `maxUses` will automatically be set to 1, as these are intended for a one-time disbursement
|
|
53
53
|
* to a specific recipient.
|
|
54
|
-
*
|
|
55
|
-
* **Note:** The `payout` option is currently under development and is not yet available for general use.
|
|
56
54
|
*/
|
|
57
55
|
export type CreatePaymentLink = {
|
|
58
56
|
/**
|
|
@@ -18,16 +18,13 @@ export type FileUploadRequestMultiPartFile = {
|
|
|
18
18
|
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* Request to upload a file for an account.
|
|
23
|
-
*/
|
|
24
21
|
export type FileUploadRequestMultiPart = {
|
|
25
22
|
/**
|
|
26
23
|
* The file to be added. Valid types are `csv`, `png`, `jpeg`, `pdf`.
|
|
27
24
|
*/
|
|
28
25
|
file: FileUploadRequestMultiPartFile | Blob;
|
|
29
26
|
/**
|
|
30
|
-
* The file
|
|
27
|
+
* The purpose of the file being uploaded.
|
|
31
28
|
*/
|
|
32
29
|
filePurpose: FilePurpose;
|
|
33
30
|
/**
|
|
@@ -19,10 +19,10 @@ export type Image = {
|
|
|
19
19
|
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* Multipart request body for uploading an image with optional metadata.
|
|
24
|
-
*/
|
|
25
22
|
export type ImageUploadRequestMultiPart = {
|
|
23
|
+
/**
|
|
24
|
+
* A PNG, JPEG, or WebP image file to upload.
|
|
25
|
+
*/
|
|
26
26
|
image: Image | Blob;
|
|
27
27
|
/**
|
|
28
28
|
* Optional, json-encoded metadata to associate with the uploaded image.
|
|
@@ -143,6 +143,13 @@ export * from "./createfeeplanagreement.js";
|
|
|
143
143
|
export * from "./createindividualerror.js";
|
|
144
144
|
export * from "./createindividualprofile.js";
|
|
145
145
|
export * from "./createinvoice.js";
|
|
146
|
+
export * from "./createinvoicelineitem.js";
|
|
147
|
+
export * from "./createinvoicelineitemoption.js";
|
|
148
|
+
export * from "./createinvoicelineitemoptionvalidationerror.js";
|
|
149
|
+
export * from "./createinvoicelineitems.js";
|
|
150
|
+
export * from "./createinvoicelineitemsupdate.js";
|
|
151
|
+
export * from "./createinvoicelineitemsvalidationerror.js";
|
|
152
|
+
export * from "./createinvoicelineitemvalidationerror.js";
|
|
146
153
|
export * from "./createpaymentlink.js";
|
|
147
154
|
export * from "./createpaymentlinklineitem.js";
|
|
148
155
|
export * from "./createpaymentlinklineitemoption.js";
|
|
@@ -230,7 +237,6 @@ export * from "./guestprofile.js";
|
|
|
230
237
|
export * from "./imagemetadata.js";
|
|
231
238
|
export * from "./imagemetadatarequest.js";
|
|
232
239
|
export * from "./imagemetadatavalidationerror.js";
|
|
233
|
-
export * from "./imageupdaterequestmultipart.js";
|
|
234
240
|
export * from "./imageuploadrequestmultipart.js";
|
|
235
241
|
export * from "./incurredfee.js";
|
|
236
242
|
export * from "./individualname.js";
|
|
@@ -245,10 +251,10 @@ export * from "./institutionssearchresponse.js";
|
|
|
245
251
|
export * from "./invoice.js";
|
|
246
252
|
export * from "./invoiceexternalpayment.js";
|
|
247
253
|
export * from "./invoicelineitem.js";
|
|
254
|
+
export * from "./invoicelineitemimagemetadata.js";
|
|
248
255
|
export * from "./invoicelineitemoption.js";
|
|
249
256
|
export * from "./invoicelineitemoptionvalidationerror.js";
|
|
250
257
|
export * from "./invoicelineitems.js";
|
|
251
|
-
export * from "./invoicelineitemsupdate.js";
|
|
252
258
|
export * from "./invoicelineitemsvalidationerror.js";
|
|
253
259
|
export * from "./invoicelineitemvalidationerror.js";
|
|
254
260
|
export * from "./invoicepayment.js";
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
9
|
import {
|
|
@@ -14,13 +13,6 @@ import {
|
|
|
14
13
|
PaymentMethodsBankAccount$outboundSchema,
|
|
15
14
|
} from "./paymentmethodsbankaccount.js";
|
|
16
15
|
|
|
17
|
-
export const InstantBankCreditPaymentMethodPaymentMethodType = {
|
|
18
|
-
InstantBankCredit: "instant-bank-credit",
|
|
19
|
-
} as const;
|
|
20
|
-
export type InstantBankCreditPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof InstantBankCreditPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
/**
|
|
25
17
|
* Instantly send funds to a bank account.
|
|
26
18
|
*/
|
|
@@ -29,22 +21,13 @@ export type InstantBankCreditPaymentMethod = {
|
|
|
29
21
|
* ID of the payment method.
|
|
30
22
|
*/
|
|
31
23
|
paymentMethodID: string;
|
|
32
|
-
paymentMethodType:
|
|
24
|
+
paymentMethodType: "instant-bank-credit";
|
|
33
25
|
/**
|
|
34
26
|
* A bank account as contained within a payment method.
|
|
35
27
|
*/
|
|
36
28
|
bankAccount: PaymentMethodsBankAccount;
|
|
37
29
|
};
|
|
38
30
|
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema:
|
|
41
|
-
z.ZodNativeEnum<typeof InstantBankCreditPaymentMethodPaymentMethodType> = z
|
|
42
|
-
.nativeEnum(InstantBankCreditPaymentMethodPaymentMethodType);
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const InstantBankCreditPaymentMethodPaymentMethodType$outboundSchema:
|
|
45
|
-
z.ZodNativeEnum<typeof InstantBankCreditPaymentMethodPaymentMethodType> =
|
|
46
|
-
InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema;
|
|
47
|
-
|
|
48
31
|
/** @internal */
|
|
49
32
|
export const InstantBankCreditPaymentMethod$inboundSchema: z.ZodType<
|
|
50
33
|
InstantBankCreditPaymentMethod,
|
|
@@ -52,14 +35,13 @@ export const InstantBankCreditPaymentMethod$inboundSchema: z.ZodType<
|
|
|
52
35
|
unknown
|
|
53
36
|
> = z.object({
|
|
54
37
|
paymentMethodID: z.string(),
|
|
55
|
-
paymentMethodType:
|
|
56
|
-
InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema,
|
|
38
|
+
paymentMethodType: z.literal("instant-bank-credit"),
|
|
57
39
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
58
40
|
});
|
|
59
41
|
/** @internal */
|
|
60
42
|
export type InstantBankCreditPaymentMethod$Outbound = {
|
|
61
43
|
paymentMethodID: string;
|
|
62
|
-
paymentMethodType:
|
|
44
|
+
paymentMethodType: "instant-bank-credit";
|
|
63
45
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
64
46
|
};
|
|
65
47
|
|
|
@@ -70,8 +52,7 @@ export const InstantBankCreditPaymentMethod$outboundSchema: z.ZodType<
|
|
|
70
52
|
InstantBankCreditPaymentMethod
|
|
71
53
|
> = z.object({
|
|
72
54
|
paymentMethodID: z.string(),
|
|
73
|
-
paymentMethodType:
|
|
74
|
-
InstantBankCreditPaymentMethodPaymentMethodType$outboundSchema,
|
|
55
|
+
paymentMethodType: z.literal("instant-bank-credit"),
|
|
75
56
|
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
76
57
|
});
|
|
77
58
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
9
|
import {
|
|
@@ -14,37 +13,21 @@ import {
|
|
|
14
13
|
AmountDecimal$outboundSchema,
|
|
15
14
|
} from "./amountdecimal.js";
|
|
16
15
|
|
|
17
|
-
export const InvoiceExternalPaymentPaymentType = {
|
|
18
|
-
External: "external",
|
|
19
|
-
} as const;
|
|
20
|
-
export type InvoiceExternalPaymentPaymentType = ClosedEnum<
|
|
21
|
-
typeof InvoiceExternalPaymentPaymentType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type InvoiceExternalPayment = {
|
|
25
|
-
paymentType:
|
|
17
|
+
paymentType: "external";
|
|
26
18
|
description: string;
|
|
27
19
|
foreignID?: string | undefined;
|
|
28
20
|
paymentDate?: Date | undefined;
|
|
29
21
|
amount: AmountDecimal;
|
|
30
22
|
};
|
|
31
23
|
|
|
32
|
-
/** @internal */
|
|
33
|
-
export const InvoiceExternalPaymentPaymentType$inboundSchema: z.ZodNativeEnum<
|
|
34
|
-
typeof InvoiceExternalPaymentPaymentType
|
|
35
|
-
> = z.nativeEnum(InvoiceExternalPaymentPaymentType);
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const InvoiceExternalPaymentPaymentType$outboundSchema: z.ZodNativeEnum<
|
|
38
|
-
typeof InvoiceExternalPaymentPaymentType
|
|
39
|
-
> = InvoiceExternalPaymentPaymentType$inboundSchema;
|
|
40
|
-
|
|
41
24
|
/** @internal */
|
|
42
25
|
export const InvoiceExternalPayment$inboundSchema: z.ZodType<
|
|
43
26
|
InvoiceExternalPayment,
|
|
44
27
|
z.ZodTypeDef,
|
|
45
28
|
unknown
|
|
46
29
|
> = z.object({
|
|
47
|
-
paymentType:
|
|
30
|
+
paymentType: z.literal("external"),
|
|
48
31
|
description: z.string(),
|
|
49
32
|
foreignID: z.string().optional(),
|
|
50
33
|
paymentDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
@@ -53,7 +36,7 @@ export const InvoiceExternalPayment$inboundSchema: z.ZodType<
|
|
|
53
36
|
});
|
|
54
37
|
/** @internal */
|
|
55
38
|
export type InvoiceExternalPayment$Outbound = {
|
|
56
|
-
paymentType:
|
|
39
|
+
paymentType: "external";
|
|
57
40
|
description: string;
|
|
58
41
|
foreignID?: string | undefined;
|
|
59
42
|
paymentDate?: string | undefined;
|
|
@@ -66,7 +49,7 @@ export const InvoiceExternalPayment$outboundSchema: z.ZodType<
|
|
|
66
49
|
z.ZodTypeDef,
|
|
67
50
|
InvoiceExternalPayment
|
|
68
51
|
> = z.object({
|
|
69
|
-
paymentType:
|
|
52
|
+
paymentType: z.literal("external"),
|
|
70
53
|
description: z.string(),
|
|
71
54
|
foreignID: z.string().optional(),
|
|
72
55
|
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
AmountDecimal$Outbound,
|
|
13
13
|
AmountDecimal$outboundSchema,
|
|
14
14
|
} from "./amountdecimal.js";
|
|
15
|
+
import {
|
|
16
|
+
InvoiceLineItemImageMetadata,
|
|
17
|
+
InvoiceLineItemImageMetadata$inboundSchema,
|
|
18
|
+
InvoiceLineItemImageMetadata$Outbound,
|
|
19
|
+
InvoiceLineItemImageMetadata$outboundSchema,
|
|
20
|
+
} from "./invoicelineitemimagemetadata.js";
|
|
15
21
|
import {
|
|
16
22
|
InvoiceLineItemOption,
|
|
17
23
|
InvoiceLineItemOption$inboundSchema,
|
|
@@ -35,14 +41,18 @@ export type InvoiceLineItem = {
|
|
|
35
41
|
* The quantity of this item.
|
|
36
42
|
*/
|
|
37
43
|
quantity: number;
|
|
44
|
+
/**
|
|
45
|
+
* Optional unique identifier associating the line item with a product.
|
|
46
|
+
*/
|
|
47
|
+
productID?: string | undefined;
|
|
38
48
|
/**
|
|
39
49
|
* Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
|
|
40
50
|
*/
|
|
41
51
|
options?: Array<InvoiceLineItemOption> | undefined;
|
|
42
52
|
/**
|
|
43
|
-
* Optional
|
|
53
|
+
* Optional list of images associated with this line item.
|
|
44
54
|
*/
|
|
45
|
-
|
|
55
|
+
images?: Array<InvoiceLineItemImageMetadata> | undefined;
|
|
46
56
|
};
|
|
47
57
|
|
|
48
58
|
/** @internal */
|
|
@@ -54,16 +64,18 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
54
64
|
name: z.string(),
|
|
55
65
|
basePrice: AmountDecimal$inboundSchema,
|
|
56
66
|
quantity: z.number().int(),
|
|
57
|
-
options: z.array(InvoiceLineItemOption$inboundSchema).optional(),
|
|
58
67
|
productID: z.string().optional(),
|
|
68
|
+
options: z.array(InvoiceLineItemOption$inboundSchema).optional(),
|
|
69
|
+
images: z.array(InvoiceLineItemImageMetadata$inboundSchema).optional(),
|
|
59
70
|
});
|
|
60
71
|
/** @internal */
|
|
61
72
|
export type InvoiceLineItem$Outbound = {
|
|
62
73
|
name: string;
|
|
63
74
|
basePrice: AmountDecimal$Outbound;
|
|
64
75
|
quantity: number;
|
|
65
|
-
options?: Array<InvoiceLineItemOption$Outbound> | undefined;
|
|
66
76
|
productID?: string | undefined;
|
|
77
|
+
options?: Array<InvoiceLineItemOption$Outbound> | undefined;
|
|
78
|
+
images?: Array<InvoiceLineItemImageMetadata$Outbound> | undefined;
|
|
67
79
|
};
|
|
68
80
|
|
|
69
81
|
/** @internal */
|
|
@@ -75,8 +87,9 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
75
87
|
name: z.string(),
|
|
76
88
|
basePrice: AmountDecimal$outboundSchema,
|
|
77
89
|
quantity: z.number().int(),
|
|
78
|
-
options: z.array(InvoiceLineItemOption$outboundSchema).optional(),
|
|
79
90
|
productID: z.string().optional(),
|
|
91
|
+
options: z.array(InvoiceLineItemOption$outboundSchema).optional(),
|
|
92
|
+
images: z.array(InvoiceLineItemImageMetadata$outboundSchema).optional(),
|
|
80
93
|
});
|
|
81
94
|
|
|
82
95
|
export function invoiceLineItemToJSON(
|
|
@@ -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
|
+
|
|
10
|
+
export type InvoiceLineItemImageMetadata = {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for a image resource.
|
|
13
|
+
*/
|
|
14
|
+
imageID: string;
|
|
15
|
+
/**
|
|
16
|
+
* Alternative text for the image.
|
|
17
|
+
*/
|
|
18
|
+
altText?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The image's public URL.
|
|
21
|
+
*/
|
|
22
|
+
link: string;
|
|
23
|
+
/**
|
|
24
|
+
* A unique identifier for an image, used in public image links.
|
|
25
|
+
*/
|
|
26
|
+
publicID: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const InvoiceLineItemImageMetadata$inboundSchema: z.ZodType<
|
|
31
|
+
InvoiceLineItemImageMetadata,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
imageID: z.string(),
|
|
36
|
+
altText: z.string().optional(),
|
|
37
|
+
link: z.string(),
|
|
38
|
+
publicID: z.string(),
|
|
39
|
+
});
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type InvoiceLineItemImageMetadata$Outbound = {
|
|
42
|
+
imageID: string;
|
|
43
|
+
altText?: string | undefined;
|
|
44
|
+
link: string;
|
|
45
|
+
publicID: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const InvoiceLineItemImageMetadata$outboundSchema: z.ZodType<
|
|
50
|
+
InvoiceLineItemImageMetadata$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
InvoiceLineItemImageMetadata
|
|
53
|
+
> = z.object({
|
|
54
|
+
imageID: z.string(),
|
|
55
|
+
altText: z.string().optional(),
|
|
56
|
+
link: z.string(),
|
|
57
|
+
publicID: z.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function invoiceLineItemImageMetadataToJSON(
|
|
61
|
+
invoiceLineItemImageMetadata: InvoiceLineItemImageMetadata,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
InvoiceLineItemImageMetadata$outboundSchema.parse(
|
|
65
|
+
invoiceLineItemImageMetadata,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export function invoiceLineItemImageMetadataFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<InvoiceLineItemImageMetadata, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => InvoiceLineItemImageMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'InvoiceLineItemImageMetadata' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -19,9 +19,7 @@ import {
|
|
|
19
19
|
InvoiceTransferPayment$outboundSchema,
|
|
20
20
|
} from "./invoicetransferpayment.js";
|
|
21
21
|
|
|
22
|
-
export type InvoicePayment =
|
|
23
|
-
| (InvoiceExternalPayment & { paymentType: "external" })
|
|
24
|
-
| (InvoiceTransferPayment & { paymentType: "transfer" });
|
|
22
|
+
export type InvoicePayment = InvoiceTransferPayment | InvoiceExternalPayment;
|
|
25
23
|
|
|
26
24
|
/** @internal */
|
|
27
25
|
export const InvoicePayment$inboundSchema: z.ZodType<
|
|
@@ -29,21 +27,13 @@ export const InvoicePayment$inboundSchema: z.ZodType<
|
|
|
29
27
|
z.ZodTypeDef,
|
|
30
28
|
unknown
|
|
31
29
|
> = z.union([
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
),
|
|
30
|
+
InvoiceTransferPayment$inboundSchema,
|
|
31
|
+
InvoiceExternalPayment$inboundSchema,
|
|
42
32
|
]);
|
|
43
33
|
/** @internal */
|
|
44
34
|
export type InvoicePayment$Outbound =
|
|
45
|
-
|
|
|
46
|
-
|
|
|
35
|
+
| InvoiceTransferPayment$Outbound
|
|
36
|
+
| InvoiceExternalPayment$Outbound;
|
|
47
37
|
|
|
48
38
|
/** @internal */
|
|
49
39
|
export const InvoicePayment$outboundSchema: z.ZodType<
|
|
@@ -51,16 +41,8 @@ export const InvoicePayment$outboundSchema: z.ZodType<
|
|
|
51
41
|
z.ZodTypeDef,
|
|
52
42
|
InvoicePayment
|
|
53
43
|
> = z.union([
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
),
|
|
44
|
+
InvoiceTransferPayment$outboundSchema,
|
|
45
|
+
InvoiceExternalPayment$outboundSchema,
|
|
64
46
|
]);
|
|
65
47
|
|
|
66
48
|
export function invoicePaymentToJSON(invoicePayment: InvoicePayment): string {
|
|
@@ -4,39 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
9
|
|
|
11
|
-
export const PaymentType = {
|
|
12
|
-
Transfer: "transfer",
|
|
13
|
-
} as const;
|
|
14
|
-
export type PaymentType = ClosedEnum<typeof PaymentType>;
|
|
15
|
-
|
|
16
10
|
export type InvoiceTransferPayment = {
|
|
17
|
-
paymentType:
|
|
11
|
+
paymentType: "transfer";
|
|
18
12
|
transferID: string;
|
|
19
13
|
};
|
|
20
14
|
|
|
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
15
|
/** @internal */
|
|
29
16
|
export const InvoiceTransferPayment$inboundSchema: z.ZodType<
|
|
30
17
|
InvoiceTransferPayment,
|
|
31
18
|
z.ZodTypeDef,
|
|
32
19
|
unknown
|
|
33
20
|
> = z.object({
|
|
34
|
-
paymentType:
|
|
21
|
+
paymentType: z.literal("transfer"),
|
|
35
22
|
transferID: z.string(),
|
|
36
23
|
});
|
|
37
24
|
/** @internal */
|
|
38
25
|
export type InvoiceTransferPayment$Outbound = {
|
|
39
|
-
paymentType:
|
|
26
|
+
paymentType: "transfer";
|
|
40
27
|
transferID: string;
|
|
41
28
|
};
|
|
42
29
|
|
|
@@ -46,7 +33,7 @@ export const InvoiceTransferPayment$outboundSchema: z.ZodType<
|
|
|
46
33
|
z.ZodTypeDef,
|
|
47
34
|
InvoiceTransferPayment
|
|
48
35
|
> = z.object({
|
|
49
|
-
paymentType:
|
|
36
|
+
paymentType: z.literal("transfer"),
|
|
50
37
|
transferID: z.string(),
|
|
51
38
|
});
|
|
52
39
|
|