@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
package/src/lib/encodings.ts
CHANGED
|
@@ -427,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string {
|
|
|
427
427
|
type QueryEncoderOptions = {
|
|
428
428
|
explode?: boolean;
|
|
429
429
|
charEncoding?: "percent" | "none";
|
|
430
|
+
allowEmptyValue?: string[];
|
|
430
431
|
};
|
|
431
432
|
|
|
432
433
|
type QueryEncoder = (
|
|
@@ -451,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
|
|
|
451
452
|
charEncoding: options?.charEncoding ?? "percent",
|
|
452
453
|
};
|
|
453
454
|
|
|
455
|
+
const allowEmptySet = new Set(options?.allowEmptyValue ?? []);
|
|
456
|
+
|
|
454
457
|
const encoded = Object.entries(values).map(([key, value]) => {
|
|
458
|
+
if (allowEmptySet.has(key)) {
|
|
459
|
+
if (
|
|
460
|
+
value === undefined
|
|
461
|
+
|| value === null
|
|
462
|
+
|| value === ""
|
|
463
|
+
|| (Array.isArray(value) && value.length === 0)
|
|
464
|
+
) {
|
|
465
|
+
return `${encodeURIComponent(key)}=`;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
455
468
|
return f(key, value, opts);
|
|
456
469
|
});
|
|
457
470
|
return queryJoin(...encoded);
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -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 AchCreditSameDayPaymentMethodPaymentMethodType = {
|
|
18
|
-
AchCreditSameDay: "ach-credit-same-day",
|
|
19
|
-
} as const;
|
|
20
|
-
export type AchCreditSameDayPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof AchCreditSameDayPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type AchCreditSameDayPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "ach-credit-same-day";
|
|
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 AchCreditSameDayPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof AchCreditSameDayPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(AchCreditSameDayPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const AchCreditSameDayPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof AchCreditSameDayPaymentMethodPaymentMethodType> =
|
|
43
|
-
AchCreditSameDayPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const AchCreditSameDayPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
AchCreditSameDayPaymentMethod,
|
|
@@ -49,14 +32,13 @@ export const AchCreditSameDayPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
53
|
-
AchCreditSameDayPaymentMethodPaymentMethodType$inboundSchema,
|
|
35
|
+
paymentMethodType: z.literal("ach-credit-same-day"),
|
|
54
36
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
55
37
|
});
|
|
56
38
|
/** @internal */
|
|
57
39
|
export type AchCreditSameDayPaymentMethod$Outbound = {
|
|
58
40
|
paymentMethodID: string;
|
|
59
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "ach-credit-same-day";
|
|
60
42
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
61
43
|
};
|
|
62
44
|
|
|
@@ -67,8 +49,7 @@ export const AchCreditSameDayPaymentMethod$outboundSchema: z.ZodType<
|
|
|
67
49
|
AchCreditSameDayPaymentMethod
|
|
68
50
|
> = z.object({
|
|
69
51
|
paymentMethodID: z.string(),
|
|
70
|
-
paymentMethodType:
|
|
71
|
-
AchCreditSameDayPaymentMethodPaymentMethodType$outboundSchema,
|
|
52
|
+
paymentMethodType: z.literal("ach-credit-same-day"),
|
|
72
53
|
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
73
54
|
});
|
|
74
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 AchCreditStandardPaymentMethodPaymentMethodType = {
|
|
18
|
-
AchCreditStandard: "ach-credit-standard",
|
|
19
|
-
} as const;
|
|
20
|
-
export type AchCreditStandardPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof AchCreditStandardPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type AchCreditStandardPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "ach-credit-standard";
|
|
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 AchCreditStandardPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof AchCreditStandardPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(AchCreditStandardPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const AchCreditStandardPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof AchCreditStandardPaymentMethodPaymentMethodType> =
|
|
43
|
-
AchCreditStandardPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const AchCreditStandardPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
AchCreditStandardPaymentMethod,
|
|
@@ -49,14 +32,13 @@ export const AchCreditStandardPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
53
|
-
AchCreditStandardPaymentMethodPaymentMethodType$inboundSchema,
|
|
35
|
+
paymentMethodType: z.literal("ach-credit-standard"),
|
|
54
36
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
55
37
|
});
|
|
56
38
|
/** @internal */
|
|
57
39
|
export type AchCreditStandardPaymentMethod$Outbound = {
|
|
58
40
|
paymentMethodID: string;
|
|
59
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "ach-credit-standard";
|
|
60
42
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
61
43
|
};
|
|
62
44
|
|
|
@@ -67,8 +49,7 @@ export const AchCreditStandardPaymentMethod$outboundSchema: z.ZodType<
|
|
|
67
49
|
AchCreditStandardPaymentMethod
|
|
68
50
|
> = z.object({
|
|
69
51
|
paymentMethodID: z.string(),
|
|
70
|
-
paymentMethodType:
|
|
71
|
-
AchCreditStandardPaymentMethodPaymentMethodType$outboundSchema,
|
|
52
|
+
paymentMethodType: z.literal("ach-credit-standard"),
|
|
72
53
|
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
73
54
|
});
|
|
74
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 AchDebitCollectPaymentMethodPaymentMethodType = {
|
|
18
|
-
AchDebitCollect: "ach-debit-collect",
|
|
19
|
-
} as const;
|
|
20
|
-
export type AchDebitCollectPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof AchDebitCollectPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type AchDebitCollectPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "ach-debit-collect";
|
|
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 AchDebitCollectPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof AchDebitCollectPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(AchDebitCollectPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const AchDebitCollectPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof AchDebitCollectPaymentMethodPaymentMethodType> =
|
|
43
|
-
AchDebitCollectPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const AchDebitCollectPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
AchDebitCollectPaymentMethod,
|
|
@@ -49,14 +32,13 @@ export const AchDebitCollectPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
53
|
-
AchDebitCollectPaymentMethodPaymentMethodType$inboundSchema,
|
|
35
|
+
paymentMethodType: z.literal("ach-debit-collect"),
|
|
54
36
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
55
37
|
});
|
|
56
38
|
/** @internal */
|
|
57
39
|
export type AchDebitCollectPaymentMethod$Outbound = {
|
|
58
40
|
paymentMethodID: string;
|
|
59
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "ach-debit-collect";
|
|
60
42
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
61
43
|
};
|
|
62
44
|
|
|
@@ -67,8 +49,7 @@ export const AchDebitCollectPaymentMethod$outboundSchema: z.ZodType<
|
|
|
67
49
|
AchDebitCollectPaymentMethod
|
|
68
50
|
> = z.object({
|
|
69
51
|
paymentMethodID: z.string(),
|
|
70
|
-
paymentMethodType:
|
|
71
|
-
AchDebitCollectPaymentMethodPaymentMethodType$outboundSchema,
|
|
52
|
+
paymentMethodType: z.literal("ach-debit-collect"),
|
|
72
53
|
bankAccount: PaymentMethodsBankAccount$outboundSchema,
|
|
73
54
|
});
|
|
74
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 AchDebitFundPaymentMethodPaymentMethodType = {
|
|
18
|
-
AchDebitFund: "ach-debit-fund",
|
|
19
|
-
} as const;
|
|
20
|
-
export type AchDebitFundPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof AchDebitFundPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type AchDebitFundPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "ach-debit-fund";
|
|
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 AchDebitFundPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof AchDebitFundPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(AchDebitFundPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const AchDebitFundPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof AchDebitFundPaymentMethodPaymentMethodType> =
|
|
43
|
-
AchDebitFundPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const AchDebitFundPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
AchDebitFundPaymentMethod,
|
|
@@ -49,13 +32,13 @@ export const AchDebitFundPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
35
|
+
paymentMethodType: z.literal("ach-debit-fund"),
|
|
53
36
|
bankAccount: PaymentMethodsBankAccount$inboundSchema,
|
|
54
37
|
});
|
|
55
38
|
/** @internal */
|
|
56
39
|
export type AchDebitFundPaymentMethod$Outbound = {
|
|
57
40
|
paymentMethodID: string;
|
|
58
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "ach-debit-fund";
|
|
59
42
|
bankAccount: PaymentMethodsBankAccount$Outbound;
|
|
60
43
|
};
|
|
61
44
|
|
|
@@ -66,7 +49,7 @@ export const AchDebitFundPaymentMethod$outboundSchema: z.ZodType<
|
|
|
66
49
|
AchDebitFundPaymentMethod
|
|
67
50
|
> = z.object({
|
|
68
51
|
paymentMethodID: z.string(),
|
|
69
|
-
paymentMethodType:
|
|
52
|
+
paymentMethodType: z.literal("ach-debit-fund"),
|
|
70
53
|
bankAccount: PaymentMethodsBankAccount$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,35 +13,18 @@ import {
|
|
|
14
13
|
ApplePayResponse$outboundSchema,
|
|
15
14
|
} from "./applepayresponse.js";
|
|
16
15
|
|
|
17
|
-
export const ApplePayPaymentMethodPaymentMethodType = {
|
|
18
|
-
ApplePay: "apple-pay",
|
|
19
|
-
} as const;
|
|
20
|
-
export type ApplePayPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof ApplePayPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type ApplePayPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "apple-pay";
|
|
30
22
|
/**
|
|
31
23
|
* Describes an Apple Pay token on a Moov account.
|
|
32
24
|
*/
|
|
33
25
|
applePay: ApplePayResponse;
|
|
34
26
|
};
|
|
35
27
|
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const ApplePayPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof ApplePayPaymentMethodPaymentMethodType> = z.nativeEnum(
|
|
39
|
-
ApplePayPaymentMethodPaymentMethodType,
|
|
40
|
-
);
|
|
41
|
-
/** @internal */
|
|
42
|
-
export const ApplePayPaymentMethodPaymentMethodType$outboundSchema:
|
|
43
|
-
z.ZodNativeEnum<typeof ApplePayPaymentMethodPaymentMethodType> =
|
|
44
|
-
ApplePayPaymentMethodPaymentMethodType$inboundSchema;
|
|
45
|
-
|
|
46
28
|
/** @internal */
|
|
47
29
|
export const ApplePayPaymentMethod$inboundSchema: z.ZodType<
|
|
48
30
|
ApplePayPaymentMethod,
|
|
@@ -50,13 +32,13 @@ export const ApplePayPaymentMethod$inboundSchema: z.ZodType<
|
|
|
50
32
|
unknown
|
|
51
33
|
> = z.object({
|
|
52
34
|
paymentMethodID: z.string(),
|
|
53
|
-
paymentMethodType:
|
|
35
|
+
paymentMethodType: z.literal("apple-pay"),
|
|
54
36
|
applePay: ApplePayResponse$inboundSchema,
|
|
55
37
|
});
|
|
56
38
|
/** @internal */
|
|
57
39
|
export type ApplePayPaymentMethod$Outbound = {
|
|
58
40
|
paymentMethodID: string;
|
|
59
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "apple-pay";
|
|
60
42
|
applePay: ApplePayResponse$Outbound;
|
|
61
43
|
};
|
|
62
44
|
|
|
@@ -67,7 +49,7 @@ export const ApplePayPaymentMethod$outboundSchema: z.ZodType<
|
|
|
67
49
|
ApplePayPaymentMethod
|
|
68
50
|
> = z.object({
|
|
69
51
|
paymentMethodID: z.string(),
|
|
70
|
-
paymentMethodType:
|
|
52
|
+
paymentMethodType: z.literal("apple-pay"),
|
|
71
53
|
applePay: ApplePayResponse$outboundSchema,
|
|
72
54
|
});
|
|
73
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
|
PaymentMethodsCard$outboundSchema,
|
|
15
14
|
} from "./paymentmethodscard.js";
|
|
16
15
|
|
|
17
|
-
export const CardPaymentPaymentMethodPaymentMethodType = {
|
|
18
|
-
CardPayment: "card-payment",
|
|
19
|
-
} as const;
|
|
20
|
-
export type CardPaymentPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof CardPaymentPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
export type CardPaymentPaymentMethod = {
|
|
25
17
|
/**
|
|
26
18
|
* ID of the payment method.
|
|
27
19
|
*/
|
|
28
20
|
paymentMethodID: string;
|
|
29
|
-
paymentMethodType:
|
|
21
|
+
paymentMethodType: "card-payment";
|
|
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 CardPaymentPaymentMethodPaymentMethodType$inboundSchema:
|
|
38
|
-
z.ZodNativeEnum<typeof CardPaymentPaymentMethodPaymentMethodType> = z
|
|
39
|
-
.nativeEnum(CardPaymentPaymentMethodPaymentMethodType);
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const CardPaymentPaymentMethodPaymentMethodType$outboundSchema:
|
|
42
|
-
z.ZodNativeEnum<typeof CardPaymentPaymentMethodPaymentMethodType> =
|
|
43
|
-
CardPaymentPaymentMethodPaymentMethodType$inboundSchema;
|
|
44
|
-
|
|
45
28
|
/** @internal */
|
|
46
29
|
export const CardPaymentPaymentMethod$inboundSchema: z.ZodType<
|
|
47
30
|
CardPaymentPaymentMethod,
|
|
@@ -49,13 +32,13 @@ export const CardPaymentPaymentMethod$inboundSchema: z.ZodType<
|
|
|
49
32
|
unknown
|
|
50
33
|
> = z.object({
|
|
51
34
|
paymentMethodID: z.string(),
|
|
52
|
-
paymentMethodType:
|
|
35
|
+
paymentMethodType: z.literal("card-payment"),
|
|
53
36
|
card: PaymentMethodsCard$inboundSchema,
|
|
54
37
|
});
|
|
55
38
|
/** @internal */
|
|
56
39
|
export type CardPaymentPaymentMethod$Outbound = {
|
|
57
40
|
paymentMethodID: string;
|
|
58
|
-
paymentMethodType:
|
|
41
|
+
paymentMethodType: "card-payment";
|
|
59
42
|
card: PaymentMethodsCard$Outbound;
|
|
60
43
|
};
|
|
61
44
|
|
|
@@ -66,7 +49,7 @@ export const CardPaymentPaymentMethod$outboundSchema: z.ZodType<
|
|
|
66
49
|
CardPaymentPaymentMethod
|
|
67
50
|
> = z.object({
|
|
68
51
|
paymentMethodID: z.string(),
|
|
69
|
-
paymentMethodType:
|
|
52
|
+
paymentMethodType: z.literal("card-payment"),
|
|
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,13 +13,6 @@ import {
|
|
|
14
13
|
TerminalCard$outboundSchema,
|
|
15
14
|
} from "./terminalcard.js";
|
|
16
15
|
|
|
17
|
-
export const CardPresentPaymentPaymentMethodPaymentMethodType = {
|
|
18
|
-
CardPresentPayment: "card-present-payment",
|
|
19
|
-
} as const;
|
|
20
|
-
export type CardPresentPaymentPaymentMethodPaymentMethodType = ClosedEnum<
|
|
21
|
-
typeof CardPresentPaymentPaymentMethodPaymentMethodType
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
16
|
/**
|
|
25
17
|
* A card used at point of sale terminal for a card present transaction as contained within a payment method.
|
|
26
18
|
*/
|
|
@@ -29,22 +21,13 @@ export type CardPresentPaymentPaymentMethod = {
|
|
|
29
21
|
* ID of the payment method.
|
|
30
22
|
*/
|
|
31
23
|
paymentMethodID: string;
|
|
32
|
-
paymentMethodType:
|
|
24
|
+
paymentMethodType: "card-present-payment";
|
|
33
25
|
/**
|
|
34
26
|
* Describes payment card details captured with tap or in-person payment.
|
|
35
27
|
*/
|
|
36
28
|
terminalCard?: TerminalCard | undefined;
|
|
37
29
|
};
|
|
38
30
|
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const CardPresentPaymentPaymentMethodPaymentMethodType$inboundSchema:
|
|
41
|
-
z.ZodNativeEnum<typeof CardPresentPaymentPaymentMethodPaymentMethodType> = z
|
|
42
|
-
.nativeEnum(CardPresentPaymentPaymentMethodPaymentMethodType);
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const CardPresentPaymentPaymentMethodPaymentMethodType$outboundSchema:
|
|
45
|
-
z.ZodNativeEnum<typeof CardPresentPaymentPaymentMethodPaymentMethodType> =
|
|
46
|
-
CardPresentPaymentPaymentMethodPaymentMethodType$inboundSchema;
|
|
47
|
-
|
|
48
31
|
/** @internal */
|
|
49
32
|
export const CardPresentPaymentPaymentMethod$inboundSchema: z.ZodType<
|
|
50
33
|
CardPresentPaymentPaymentMethod,
|
|
@@ -52,14 +35,13 @@ export const CardPresentPaymentPaymentMethod$inboundSchema: z.ZodType<
|
|
|
52
35
|
unknown
|
|
53
36
|
> = z.object({
|
|
54
37
|
paymentMethodID: z.string(),
|
|
55
|
-
paymentMethodType:
|
|
56
|
-
CardPresentPaymentPaymentMethodPaymentMethodType$inboundSchema,
|
|
38
|
+
paymentMethodType: z.literal("card-present-payment"),
|
|
57
39
|
terminalCard: TerminalCard$inboundSchema.optional(),
|
|
58
40
|
});
|
|
59
41
|
/** @internal */
|
|
60
42
|
export type CardPresentPaymentPaymentMethod$Outbound = {
|
|
61
43
|
paymentMethodID: string;
|
|
62
|
-
paymentMethodType:
|
|
44
|
+
paymentMethodType: "card-present-payment";
|
|
63
45
|
terminalCard?: TerminalCard$Outbound | undefined;
|
|
64
46
|
};
|
|
65
47
|
|
|
@@ -70,8 +52,7 @@ export const CardPresentPaymentPaymentMethod$outboundSchema: z.ZodType<
|
|
|
70
52
|
CardPresentPaymentPaymentMethod
|
|
71
53
|
> = z.object({
|
|
72
54
|
paymentMethodID: z.string(),
|
|
73
|
-
paymentMethodType:
|
|
74
|
-
CardPresentPaymentPaymentMethodPaymentMethodType$outboundSchema,
|
|
55
|
+
paymentMethodType: z.literal("card-present-payment"),
|
|
75
56
|
terminalCard: TerminalCard$outboundSchema.optional(),
|
|
76
57
|
});
|
|
77
58
|
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
AmountDecimal$outboundSchema,
|
|
14
14
|
} from "./amountdecimal.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "./
|
|
16
|
+
CreateInvoiceLineItems,
|
|
17
|
+
CreateInvoiceLineItems$inboundSchema,
|
|
18
|
+
CreateInvoiceLineItems$Outbound,
|
|
19
|
+
CreateInvoiceLineItems$outboundSchema,
|
|
20
|
+
} from "./createinvoicelineitems.js";
|
|
21
21
|
|
|
22
22
|
export type CreateInvoice = {
|
|
23
23
|
customerAccountID: string;
|
|
@@ -25,7 +25,7 @@ export type CreateInvoice = {
|
|
|
25
25
|
/**
|
|
26
26
|
* A collection of line items for an invoice.
|
|
27
27
|
*/
|
|
28
|
-
lineItems:
|
|
28
|
+
lineItems: CreateInvoiceLineItems;
|
|
29
29
|
invoiceDate?: Date | undefined;
|
|
30
30
|
dueDate?: Date | undefined;
|
|
31
31
|
taxAmount?: AmountDecimal | undefined;
|
|
@@ -39,7 +39,7 @@ export const CreateInvoice$inboundSchema: z.ZodType<
|
|
|
39
39
|
> = z.object({
|
|
40
40
|
customerAccountID: z.string(),
|
|
41
41
|
description: z.string(),
|
|
42
|
-
lineItems:
|
|
42
|
+
lineItems: CreateInvoiceLineItems$inboundSchema,
|
|
43
43
|
invoiceDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
44
44
|
.optional(),
|
|
45
45
|
dueDate: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
@@ -50,7 +50,7 @@ export const CreateInvoice$inboundSchema: z.ZodType<
|
|
|
50
50
|
export type CreateInvoice$Outbound = {
|
|
51
51
|
customerAccountID: string;
|
|
52
52
|
description: string;
|
|
53
|
-
lineItems:
|
|
53
|
+
lineItems: CreateInvoiceLineItems$Outbound;
|
|
54
54
|
invoiceDate?: string | undefined;
|
|
55
55
|
dueDate?: string | undefined;
|
|
56
56
|
taxAmount?: AmountDecimal$Outbound | undefined;
|
|
@@ -64,7 +64,7 @@ export const CreateInvoice$outboundSchema: z.ZodType<
|
|
|
64
64
|
> = z.object({
|
|
65
65
|
customerAccountID: z.string(),
|
|
66
66
|
description: z.string(),
|
|
67
|
-
lineItems:
|
|
67
|
+
lineItems: CreateInvoiceLineItems$outboundSchema,
|
|
68
68
|
invoiceDate: z.date().transform(v => v.toISOString()).optional(),
|
|
69
69
|
dueDate: z.date().transform(v => v.toISOString()).optional(),
|
|
70
70
|
taxAmount: AmountDecimal$outboundSchema.optional(),
|