@moovio/sdk 0.21.17 → 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/bin/mcp-server.js +269 -193
- package/bin/mcp-server.js.map +38 -31
- package/examples/package-lock.json +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 +9 -0
- 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/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/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/index.d.ts +8 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -1
- 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 -4
- 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/paymentmethod.d.ts +2 -50
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +24 -24
- 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/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/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +13 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.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/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/index.ts +8 -1
- 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 -17
- package/src/models/components/invoicetransferpayment.ts +4 -17
- package/src/models/components/moovwalletpaymentmethod.ts +4 -21
- package/src/models/components/paymentmethod.ts +48 -118
- 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/errors/createinvoiceerror.ts +7 -5
- 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/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/invoicelineitemsupdate.ts +0 -63
|
@@ -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,34 +13,18 @@ import {
|
|
|
14
13
|
PaymentMethodsCard$outboundSchema,
|
|
15
14
|
} from "./paymentmethodscard.js";
|
|
16
15
|
|
|
17
|
-
export const PushToCardPaymentMethodPaymentMethodType = {
|
|
18
|
-
PushToCard: "push-to-card",
|
|
19
|
-
} as const;
|
|
20
|
-
export type PushToCardPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof PushToCardPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type PushToCardPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "push-to-card";
|
|
30
22
|
/**
|
|
31
23
|
* A card as contained within a payment method.
|
|
32
24
|
*/
|
|
33
25
|
card: PaymentMethodsCard;
|
|
34
26
|
};
|
|
35
27
|
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const PushToCardPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof PushToCardPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(PushToCardPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const PushToCardPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof PushToCardPaymentMethodPaymentMethodType> =
|
|
43
|
-
PushToCardPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const PushToCardPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
PushToCardPaymentMethod,
|
|
@@ -49,13 +32,13 @@ export const PushToCardPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
35
|
+
paymentMethodType: z.literal("push-to-card"),
|
|
53
36
|
card: PaymentMethodsCard$inboundSchema,
|
|
54
37
|
});
|
|
55
38
|
/** @internal */
|
|
56
39
|
export type PushToCardPaymentMethod$Outbound = {
|
|
57
40
|
paymentMethodID: string;
|
|
58
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "push-to-card";
|
|
59
42
|
card: PaymentMethodsCard$Outbound;
|
|
60
43
|
};
|
|
61
44
|
|
|
@@ -66,7 +49,7 @@ export const PushToCardPaymentMethod$outboundSchema: z.ZodType<
|
|
|
66
49
|
PushToCardPaymentMethod
|
|
67
50
|
> = z.object({
|
|
68
51
|
paymentMethodID: z.string(),
|
|
69
|
-
paymentMethodType:
|
|
52
|
+
paymentMethodType: z.literal("push-to-card"),
|
|
70
53
|
card: PaymentMethodsCard$outboundSchema,
|
|
71
54
|
});
|
|
72
55
|
|
|
@@ -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,34 +13,18 @@ import {
|
|
|
14
13
|
PaymentMethodsBankAccount$outboundSchema,
|
|
15
14
|
} from "./paymentmethodsbankaccount.js";
|
|
16
15
|
|
|
17
|
-
export const RtpCreditPaymentMethodPaymentMethodType = {
|
|
18
|
-
RtpCredit: "rtp-credit",
|
|
19
|
-
} as const;
|
|
20
|
-
export type RtpCreditPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof RtpCreditPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type RtpCreditPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "rtp-credit";
|
|
30
22
|
/**
|
|
31
23
|
* A bank account as contained within a payment method.
|
|
32
24
|
*/
|
|
33
25
|
bankAccount: PaymentMethodsBankAccount;
|
|
34
26
|
};
|
|
35
27
|
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const RtpCreditPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof RtpCreditPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(RtpCreditPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const RtpCreditPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof RtpCreditPaymentMethodPaymentMethodType> =
|
|
43
|
-
RtpCreditPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const RtpCreditPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
RtpCreditPaymentMethod,
|
|
@@ -49,13 +32,13 @@ export const RtpCreditPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
35
|
+
paymentMethodType: z.literal("rtp-credit"),
|
|
53
36
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
54
37
|
});
|
|
55
38
|
/** @internal */
|
|
56
39
|
export type RtpCreditPaymentMethod$Outbound = {
|
|
57
40
|
paymentMethodID: string;
|
|
58
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "rtp-credit";
|
|
59
42
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
60
43
|
};
|
|
61
44
|
|
|
@@ -66,7 +49,7 @@ export const RtpCreditPaymentMethod$outboundSchema: z.ZodType<
|
|
|
66
49
|
RtpCreditPaymentMethod
|
|
67
50
|
> = z.object({
|
|
68
51
|
paymentMethodID: z.string(),
|
|
69
|
-
paymentMethodType:
|
|
52
|
+
paymentMethodType: z.literal("rtp-credit"),
|
|
70
53
|
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
71
54
|
});
|
|
72
55
|
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
AmountDecimalUpdate$outboundSchema,
|
|
14
14
|
} from "./amountdecimalupdate.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "./
|
|
16
|
+
CreateInvoiceLineItemsUpdate,
|
|
17
|
+
CreateInvoiceLineItemsUpdate$inboundSchema,
|
|
18
|
+
CreateInvoiceLineItemsUpdate$Outbound,
|
|
19
|
+
CreateInvoiceLineItemsUpdate$outboundSchema,
|
|
20
|
+
} from "./createinvoicelineitemsupdate.js";
|
|
21
21
|
import {
|
|
22
22
|
InvoiceStatus,
|
|
23
23
|
InvoiceStatus$inboundSchema,
|
|
@@ -29,7 +29,7 @@ export type UpdateInvoice = {
|
|
|
29
29
|
/**
|
|
30
30
|
* A collection of line items for an invoice.
|
|
31
31
|
*/
|
|
32
|
-
lineItems?:
|
|
32
|
+
lineItems?: CreateInvoiceLineItemsUpdate | undefined;
|
|
33
33
|
invoiceDate?: Date | null | undefined;
|
|
34
34
|
dueDate?: Date | null | undefined;
|
|
35
35
|
/**
|
|
@@ -46,7 +46,7 @@ export const UpdateInvoice$inboundSchema: z.ZodType<
|
|
|
46
46
|
unknown
|
|
47
47
|
> = z.object({
|
|
48
48
|
description: z.string().optional(),
|
|
49
|
-
lineItems:
|
|
49
|
+
lineItems: CreateInvoiceLineItemsUpdate$inboundSchema.optional(),
|
|
50
50
|
invoiceDate: z.nullable(
|
|
51
51
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
52
52
|
).optional(),
|
|
@@ -59,7 +59,7 @@ export const UpdateInvoice$inboundSchema: z.ZodType<
|
|
|
59
59
|
/** @internal */
|
|
60
60
|
export type UpdateInvoice$Outbound = {
|
|
61
61
|
description?: string | undefined;
|
|
62
|
-
lineItems?:
|
|
62
|
+
lineItems?: CreateInvoiceLineItemsUpdate$Outbound | undefined;
|
|
63
63
|
invoiceDate?: string | null | undefined;
|
|
64
64
|
dueDate?: string | null | undefined;
|
|
65
65
|
status?: string | undefined;
|
|
@@ -73,7 +73,7 @@ export const UpdateInvoice$outboundSchema: z.ZodType<
|
|
|
73
73
|
UpdateInvoice
|
|
74
74
|
> = z.object({
|
|
75
75
|
description: z.string().optional(),
|
|
76
|
-
lineItems:
|
|
76
|
+
lineItems: CreateInvoiceLineItemsUpdate$outboundSchema.optional(),
|
|
77
77
|
invoiceDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
78
78
|
dueDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
79
79
|
status: InvoiceStatus$outboundSchema.optional(),
|
|
@@ -9,7 +9,7 @@ import { MoovError } from "./mooverror.js";
|
|
|
9
9
|
export type CreateInvoiceErrorData = {
|
|
10
10
|
customerAccountID?: string | undefined;
|
|
11
11
|
description?: string | undefined;
|
|
12
|
-
lineItems?: components.
|
|
12
|
+
lineItems?: components.CreateInvoiceLineItemsValidationError | undefined;
|
|
13
13
|
invoiceDate?: string | undefined;
|
|
14
14
|
dueDate?: string | undefined;
|
|
15
15
|
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
@@ -18,7 +18,7 @@ export type CreateInvoiceErrorData = {
|
|
|
18
18
|
export class CreateInvoiceError extends MoovError {
|
|
19
19
|
customerAccountID?: string | undefined;
|
|
20
20
|
description?: string | undefined;
|
|
21
|
-
lineItems?: components.
|
|
21
|
+
lineItems?: components.CreateInvoiceLineItemsValidationError | undefined;
|
|
22
22
|
invoiceDate?: string | undefined;
|
|
23
23
|
dueDate?: string | undefined;
|
|
24
24
|
taxAmount?: components.AmountDecimalValidationError | undefined;
|
|
@@ -56,7 +56,7 @@ export const CreateInvoiceError$inboundSchema: z.ZodType<
|
|
|
56
56
|
> = z.object({
|
|
57
57
|
customerAccountID: z.string().optional(),
|
|
58
58
|
description: z.string().optional(),
|
|
59
|
-
lineItems: components.
|
|
59
|
+
lineItems: components.CreateInvoiceLineItemsValidationError$inboundSchema
|
|
60
60
|
.optional(),
|
|
61
61
|
invoiceDate: z.string().optional(),
|
|
62
62
|
dueDate: z.string().optional(),
|
|
@@ -77,7 +77,9 @@ export const CreateInvoiceError$inboundSchema: z.ZodType<
|
|
|
77
77
|
export type CreateInvoiceError$Outbound = {
|
|
78
78
|
customerAccountID?: string | undefined;
|
|
79
79
|
description?: string | undefined;
|
|
80
|
-
lineItems?:
|
|
80
|
+
lineItems?:
|
|
81
|
+
| components.CreateInvoiceLineItemsValidationError$Outbound
|
|
82
|
+
| undefined;
|
|
81
83
|
invoiceDate?: string | undefined;
|
|
82
84
|
dueDate?: string | undefined;
|
|
83
85
|
taxAmount?: components.AmountDecimalValidationError$Outbound | undefined;
|
|
@@ -93,7 +95,7 @@ export const CreateInvoiceError$outboundSchema: z.ZodType<
|
|
|
93
95
|
.pipe(z.object({
|
|
94
96
|
customerAccountID: z.string().optional(),
|
|
95
97
|
description: z.string().optional(),
|
|
96
|
-
lineItems: components.
|
|
98
|
+
lineItems: components.CreateInvoiceLineItemsValidationError$outboundSchema
|
|
97
99
|
.optional(),
|
|
98
100
|
invoiceDate: z.string().optional(),
|
|
99
101
|
dueDate: z.string().optional(),
|
|
@@ -16,8 +16,16 @@ export function startCountingUnrecognized() {
|
|
|
16
16
|
refCount++;
|
|
17
17
|
const start = globalCount;
|
|
18
18
|
return {
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Ends counting and returns the delta.
|
|
21
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
22
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
23
|
+
* If not provided, records all counts since start().
|
|
24
|
+
*/
|
|
25
|
+
end: (delta?: number) => {
|
|
20
26
|
const count = globalCount - start;
|
|
27
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
28
|
+
globalCount = start + (delta ?? count);
|
|
21
29
|
if (--refCount === 0) globalCount = 0;
|
|
22
30
|
return count;
|
|
23
31
|
},
|
package/tsconfig.json
CHANGED
package/types/unrecognized.d.ts
CHANGED
|
@@ -4,7 +4,13 @@ export type Unrecognized<T> = T & {
|
|
|
4
4
|
};
|
|
5
5
|
declare function unrecognized<T>(value: T): Unrecognized<T>;
|
|
6
6
|
export declare function startCountingUnrecognized(): {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Ends counting and returns the delta.
|
|
9
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
10
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
11
|
+
* If not provided, records all counts since start().
|
|
12
|
+
*/
|
|
13
|
+
end: (delta?: number) => number;
|
|
8
14
|
};
|
|
9
15
|
export { unrecognized };
|
|
10
16
|
//# sourceMappingURL=unrecognized.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB
|
|
1
|
+
{"version":3,"file":"unrecognized.d.ts","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,CAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAEhE,iBAAS,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAGlD;AAID,wBAAgB,yBAAyB;IAIrC;;;;;OAKG;kBACW,MAAM;EAQvB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/types/unrecognized.js
CHANGED
|
@@ -15,8 +15,16 @@ function startCountingUnrecognized() {
|
|
|
15
15
|
refCount++;
|
|
16
16
|
const start = globalCount;
|
|
17
17
|
return {
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Ends counting and returns the delta.
|
|
20
|
+
* @param delta - If provided, only this amount is added to the parent counter
|
|
21
|
+
* (used for nested unions where we only want to record the winning option's count).
|
|
22
|
+
* If not provided, records all counts since start().
|
|
23
|
+
*/
|
|
24
|
+
end: (delta) => {
|
|
19
25
|
const count = globalCount - start;
|
|
26
|
+
// Reset globalCount back to start, then add only the specified delta
|
|
27
|
+
globalCount = start + (delta ?? count);
|
|
20
28
|
if (--refCount === 0)
|
|
21
29
|
globalCount = 0;
|
|
22
30
|
return count;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,
|
|
1
|
+
{"version":3,"file":"unrecognized.js","sourceRoot":"","sources":["../src/types/unrecognized.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,8DAkBC;AAEQ,oCAAY;AA3BrB,SAAS,YAAY,CAAI,KAAQ;IAC/B,WAAW,EAAE,CAAC;IACd,OAAO,KAAwB,CAAC;AAClC,CAAC;AAED,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAgB,yBAAyB;IACvC,QAAQ,EAAE,CAAC;IACX,MAAM,KAAK,GAAG,WAAW,CAAC;IAC1B,OAAO;QACL;;;;;WAKG;QACH,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE;YACtB,MAAM,KAAK,GAAG,WAAW,GAAG,KAAK,CAAC;YAClC,qEAAqE;YACrE,WAAW,GAAG,KAAK,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;YACvC,IAAI,EAAE,QAAQ,KAAK,CAAC;gBAAE,WAAW,GAAG,CAAC,CAAC;YACtC,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { InvoiceLineItem, InvoiceLineItem$Outbound } from "./invoicelineitem.js";
|
|
5
|
-
/**
|
|
6
|
-
* A collection of line items for an invoice.
|
|
7
|
-
*/
|
|
8
|
-
export type InvoiceLineItemsUpdate = {
|
|
9
|
-
/**
|
|
10
|
-
* The list of line items.
|
|
11
|
-
*/
|
|
12
|
-
items?: Array<InvoiceLineItem> | undefined;
|
|
13
|
-
};
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const InvoiceLineItemsUpdate$inboundSchema: z.ZodType<InvoiceLineItemsUpdate, z.ZodTypeDef, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type InvoiceLineItemsUpdate$Outbound = {
|
|
18
|
-
items?: Array<InvoiceLineItem$Outbound> | undefined;
|
|
19
|
-
};
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare const InvoiceLineItemsUpdate$outboundSchema: z.ZodType<InvoiceLineItemsUpdate$Outbound, z.ZodTypeDef, InvoiceLineItemsUpdate>;
|
|
22
|
-
export declare function invoiceLineItemsUpdateToJSON(invoiceLineItemsUpdate: InvoiceLineItemsUpdate): string;
|
|
23
|
-
export declare function invoiceLineItemsUpdateFromJSON(jsonString: string): SafeParseResult<InvoiceLineItemsUpdate, SDKValidationError>;
|
|
24
|
-
//# sourceMappingURL=invoicelineitemsupdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitemsupdate.d.ts","sourceRoot":"","sources":["../../src/models/components/invoicelineitemsupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,eAAe,EAEf,wBAAwB,EAEzB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AACH,gBAAgB;AAChB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;CACrD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,sBAAsB,CAGtB,CAAC;AAEH,wBAAgB,4BAA4B,CAC1C,sBAAsB,EAAE,sBAAsB,GAC7C,MAAM,CAIR;AACD,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoicelineitemsupdate.js","sourceRoot":"","sources":["../../src/models/components/invoicelineitemsupdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CH,oEAMC;AACD,wEAQC;AA1DD,0CAA4B;AAC5B,qDAAiD;AAGjD,6DAK8B;AAY9B,gBAAgB;AACH,QAAA,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,kDAA6B,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAMH,gBAAgB;AACH,QAAA,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,mDAA8B,CAAC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC;AAEH,SAAgB,4BAA4B,CAC1C,sBAA8C;IAE9C,OAAO,IAAI,CAAC,SAAS,CACnB,6CAAqC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CACpE,CAAC;AACJ,CAAC;AACD,SAAgB,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4CAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
InvoiceLineItem,
|
|
11
|
-
InvoiceLineItem$inboundSchema,
|
|
12
|
-
InvoiceLineItem$Outbound,
|
|
13
|
-
InvoiceLineItem$outboundSchema,
|
|
14
|
-
} from "./invoicelineitem.js";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* A collection of line items for an invoice.
|
|
18
|
-
*/
|
|
19
|
-
export type InvoiceLineItemsUpdate = {
|
|
20
|
-
/**
|
|
21
|
-
* The list of line items.
|
|
22
|
-
*/
|
|
23
|
-
items?: Array<InvoiceLineItem> | undefined;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const InvoiceLineItemsUpdate$inboundSchema: z.ZodType<
|
|
28
|
-
InvoiceLineItemsUpdate,
|
|
29
|
-
z.ZodTypeDef,
|
|
30
|
-
unknown
|
|
31
|
-
> = z.object({
|
|
32
|
-
items: z.array(InvoiceLineItem$inboundSchema).optional(),
|
|
33
|
-
});
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type InvoiceLineItemsUpdate$Outbound = {
|
|
36
|
-
items?: Array<InvoiceLineItem$Outbound> | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const InvoiceLineItemsUpdate$outboundSchema: z.ZodType<
|
|
41
|
-
InvoiceLineItemsUpdate$Outbound,
|
|
42
|
-
z.ZodTypeDef,
|
|
43
|
-
InvoiceLineItemsUpdate
|
|
44
|
-
> = z.object({
|
|
45
|
-
items: z.array(InvoiceLineItem$outboundSchema).optional(),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export function invoiceLineItemsUpdateToJSON(
|
|
49
|
-
invoiceLineItemsUpdate: InvoiceLineItemsUpdate,
|
|
50
|
-
): string {
|
|
51
|
-
return JSON.stringify(
|
|
52
|
-
InvoiceLineItemsUpdate$outboundSchema.parse(invoiceLineItemsUpdate),
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
export function invoiceLineItemsUpdateFromJSON(
|
|
56
|
-
jsonString: string,
|
|
57
|
-
): SafeParseResult<InvoiceLineItemsUpdate, SDKValidationError> {
|
|
58
|
-
return safeParse(
|
|
59
|
-
jsonString,
|
|
60
|
-
(x) => InvoiceLineItemsUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
-
`Failed to parse 'InvoiceLineItemsUpdate' from JSON`,
|
|
62
|
-
);
|
|
63
|
-
}
|