@moovio/sdk 0.8.0 → 0.8.1
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 +185 -64
- package/bin/mcp-server.js.map +22 -18
- package/funcs/receiptsCreate.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/cardpresentpaymentpaymentmethod.d.ts +66 -0
- package/models/components/cardpresentpaymentpaymentmethod.d.ts.map +1 -0
- package/models/components/cardpresentpaymentpaymentmethod.js +93 -0
- package/models/components/cardpresentpaymentpaymentmethod.js.map +1 -0
- package/models/components/entrymode.d.ts +31 -0
- package/models/components/entrymode.d.ts.map +1 -0
- package/models/components/entrymode.js +63 -0
- package/models/components/entrymode.js.map +1 -0
- package/models/components/feeplan.d.ts +6 -0
- package/models/components/feeplan.d.ts.map +1 -1
- package/models/components/feeplan.js +3 -0
- package/models/components/feeplan.js.map +1 -1
- package/models/components/feeplanagreement.d.ts +6 -0
- package/models/components/feeplanagreement.d.ts.map +1 -1
- package/models/components/feeplanagreement.js +3 -0
- package/models/components/feeplanagreement.js.map +1 -1
- package/models/components/governmentid.d.ts +30 -30
- package/models/components/governmentid.d.ts.map +1 -1
- package/models/components/governmentid.js +38 -35
- package/models/components/governmentid.js.map +1 -1
- package/models/components/governmentiderror.d.ts +30 -30
- package/models/components/governmentiderror.d.ts.map +1 -1
- package/models/components/governmentiderror.js +35 -38
- package/models/components/governmentiderror.js.map +1 -1
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/minimumcommitment.d.ts +44 -0
- package/models/components/minimumcommitment.d.ts.map +1 -0
- package/models/components/minimumcommitment.js +71 -0
- package/models/components/minimumcommitment.js.map +1 -0
- package/models/components/partnerpricing.d.ts +6 -0
- package/models/components/partnerpricing.d.ts.map +1 -1
- package/models/components/partnerpricing.js +3 -0
- package/models/components/partnerpricing.js.map +1 -1
- package/models/components/partnerpricingagreement.d.ts +6 -0
- package/models/components/partnerpricingagreement.d.ts.map +1 -1
- package/models/components/partnerpricingagreement.js +3 -0
- package/models/components/partnerpricingagreement.js.map +1 -1
- package/models/components/paymentmethod.d.ts +5 -0
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +5 -0
- package/models/components/paymentmethod.js.map +1 -1
- package/models/components/paymentmethodtype.d.ts +3 -0
- package/models/components/paymentmethodtype.d.ts.map +1 -1
- package/models/components/paymentmethodtype.js +1 -0
- package/models/components/paymentmethodtype.js.map +1 -1
- package/models/components/taxid.d.ts +15 -15
- package/models/components/taxid.d.ts.map +1 -1
- package/models/components/taxid.js +20 -18
- package/models/components/taxid.js.map +1 -1
- package/models/components/taxidupdate.d.ts +15 -15
- package/models/components/taxidupdate.d.ts.map +1 -1
- package/models/components/taxidupdate.js +18 -20
- package/models/components/taxidupdate.js.map +1 -1
- package/models/components/terminalcard.d.ts +85 -0
- package/models/components/terminalcard.d.ts.map +1 -0
- package/models/components/terminalcard.js +91 -0
- package/models/components/terminalcard.js.map +1 -0
- package/package.json +1 -1
- package/src/funcs/receiptsCreate.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/cardpresentpaymentpaymentmethod.ts +124 -0
- package/src/models/components/entrymode.ts +36 -0
- package/src/models/components/feeplan.ts +13 -0
- package/src/models/components/feeplanagreement.ts +13 -0
- package/src/models/components/governmentid.ts +58 -76
- package/src/models/components/governmentiderror.ts +78 -58
- package/src/models/components/index.ts +4 -0
- package/src/models/components/minimumcommitment.ts +83 -0
- package/src/models/components/partnerpricing.ts +13 -0
- package/src/models/components/partnerpricingagreement.ts +13 -0
- package/src/models/components/paymentmethod.ts +22 -2
- package/src/models/components/paymentmethodtype.ts +1 -0
- package/src/models/components/taxid.ts +27 -33
- package/src/models/components/taxidupdate.ts +33 -27
- package/src/models/components/terminalcard.ts +153 -0
|
@@ -42,6 +42,12 @@ import {
|
|
|
42
42
|
CardPaymentPaymentMethod$Outbound,
|
|
43
43
|
CardPaymentPaymentMethod$outboundSchema,
|
|
44
44
|
} from "./cardpaymentpaymentmethod.js";
|
|
45
|
+
import {
|
|
46
|
+
CardPresentPaymentPaymentMethod,
|
|
47
|
+
CardPresentPaymentPaymentMethod$inboundSchema,
|
|
48
|
+
CardPresentPaymentPaymentMethod$Outbound,
|
|
49
|
+
CardPresentPaymentPaymentMethod$outboundSchema,
|
|
50
|
+
} from "./cardpresentpaymentpaymentmethod.js";
|
|
45
51
|
import {
|
|
46
52
|
MoovWalletPaymentMethod,
|
|
47
53
|
MoovWalletPaymentMethod$inboundSchema,
|
|
@@ -84,7 +90,10 @@ export type PaymentMethod =
|
|
|
84
90
|
| (CardPaymentPaymentMethod & { paymentMethodType: "card-payment" })
|
|
85
91
|
| (PushToCardPaymentMethod & { paymentMethodType: "push-to-card" })
|
|
86
92
|
| (PullFromCardPaymentMethod & { paymentMethodType: "pull-from-card" })
|
|
87
|
-
| (ApplePayPaymentMethod & { paymentMethodType: "apple-pay" })
|
|
93
|
+
| (ApplePayPaymentMethod & { paymentMethodType: "apple-pay" })
|
|
94
|
+
| (CardPresentPaymentPaymentMethod & {
|
|
95
|
+
paymentMethodType: "card-present-payment";
|
|
96
|
+
});
|
|
88
97
|
|
|
89
98
|
/** @internal */
|
|
90
99
|
export const PaymentMethod$inboundSchema: z.ZodType<
|
|
@@ -142,6 +151,10 @@ export const PaymentMethod$inboundSchema: z.ZodType<
|
|
|
142
151
|
paymentMethodType: v.paymentMethodType,
|
|
143
152
|
})),
|
|
144
153
|
),
|
|
154
|
+
CardPresentPaymentPaymentMethod$inboundSchema.and(
|
|
155
|
+
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
156
|
+
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
157
|
+
),
|
|
145
158
|
]);
|
|
146
159
|
|
|
147
160
|
/** @internal */
|
|
@@ -165,7 +178,10 @@ export type PaymentMethod$Outbound =
|
|
|
165
178
|
| (PullFromCardPaymentMethod$Outbound & {
|
|
166
179
|
paymentMethodType: "pull-from-card";
|
|
167
180
|
})
|
|
168
|
-
| (ApplePayPaymentMethod$Outbound & { paymentMethodType: "apple-pay" })
|
|
181
|
+
| (ApplePayPaymentMethod$Outbound & { paymentMethodType: "apple-pay" })
|
|
182
|
+
| (CardPresentPaymentPaymentMethod$Outbound & {
|
|
183
|
+
paymentMethodType: "card-present-payment";
|
|
184
|
+
});
|
|
169
185
|
|
|
170
186
|
/** @internal */
|
|
171
187
|
export const PaymentMethod$outboundSchema: z.ZodType<
|
|
@@ -223,6 +239,10 @@ export const PaymentMethod$outboundSchema: z.ZodType<
|
|
|
223
239
|
paymentMethodType: v.paymentMethodType,
|
|
224
240
|
})),
|
|
225
241
|
),
|
|
242
|
+
CardPresentPaymentPaymentMethod$outboundSchema.and(
|
|
243
|
+
z.object({ paymentMethodType: z.literal("card-present-payment") })
|
|
244
|
+
.transform((v) => ({ paymentMethodType: v.paymentMethodType })),
|
|
245
|
+
),
|
|
226
246
|
]);
|
|
227
247
|
|
|
228
248
|
/**
|
|
@@ -19,6 +19,7 @@ export const PaymentMethodType = {
|
|
|
19
19
|
PushToCard: "push-to-card",
|
|
20
20
|
PullFromCard: "pull-from-card",
|
|
21
21
|
ApplePay: "apple-pay",
|
|
22
|
+
CardPresentPayment: "card-present-payment",
|
|
22
23
|
} as const;
|
|
23
24
|
/**
|
|
24
25
|
* The payment method type that represents a payment rail and directionality
|
|
@@ -7,7 +7,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type Ein = {
|
|
11
11
|
number: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,68 +15,62 @@ export type TaxIDEin = {
|
|
|
15
15
|
* An EIN (employer identification number) for the business. For sole proprietors, an SSN can be used as the EIN.
|
|
16
16
|
*/
|
|
17
17
|
export type TaxID = {
|
|
18
|
-
ein:
|
|
18
|
+
ein: Ein;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
> = z.object({
|
|
27
|
-
number: z.string(),
|
|
28
|
-
});
|
|
22
|
+
export const Ein$inboundSchema: z.ZodType<Ein, z.ZodTypeDef, unknown> = z
|
|
23
|
+
.object({
|
|
24
|
+
number: z.string(),
|
|
25
|
+
});
|
|
29
26
|
|
|
30
27
|
/** @internal */
|
|
31
|
-
export type
|
|
28
|
+
export type Ein$Outbound = {
|
|
32
29
|
number: string;
|
|
33
30
|
};
|
|
34
31
|
|
|
35
32
|
/** @internal */
|
|
36
|
-
export const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
> = z.object({
|
|
41
|
-
number: z.string(),
|
|
42
|
-
});
|
|
33
|
+
export const Ein$outboundSchema: z.ZodType<Ein$Outbound, z.ZodTypeDef, Ein> = z
|
|
34
|
+
.object({
|
|
35
|
+
number: z.string(),
|
|
36
|
+
});
|
|
43
37
|
|
|
44
38
|
/**
|
|
45
39
|
* @internal
|
|
46
40
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
41
|
*/
|
|
48
|
-
export namespace
|
|
49
|
-
/** @deprecated use `
|
|
50
|
-
export const inboundSchema =
|
|
51
|
-
/** @deprecated use `
|
|
52
|
-
export const outboundSchema =
|
|
53
|
-
/** @deprecated use `
|
|
54
|
-
export type Outbound =
|
|
42
|
+
export namespace Ein$ {
|
|
43
|
+
/** @deprecated use `Ein$inboundSchema` instead. */
|
|
44
|
+
export const inboundSchema = Ein$inboundSchema;
|
|
45
|
+
/** @deprecated use `Ein$outboundSchema` instead. */
|
|
46
|
+
export const outboundSchema = Ein$outboundSchema;
|
|
47
|
+
/** @deprecated use `Ein$Outbound` instead. */
|
|
48
|
+
export type Outbound = Ein$Outbound;
|
|
55
49
|
}
|
|
56
50
|
|
|
57
|
-
export function
|
|
58
|
-
return JSON.stringify(
|
|
51
|
+
export function einToJSON(ein: Ein): string {
|
|
52
|
+
return JSON.stringify(Ein$outboundSchema.parse(ein));
|
|
59
53
|
}
|
|
60
54
|
|
|
61
|
-
export function
|
|
55
|
+
export function einFromJSON(
|
|
62
56
|
jsonString: string,
|
|
63
|
-
): SafeParseResult<
|
|
57
|
+
): SafeParseResult<Ein, SDKValidationError> {
|
|
64
58
|
return safeParse(
|
|
65
59
|
jsonString,
|
|
66
|
-
(x) =>
|
|
67
|
-
`Failed to parse '
|
|
60
|
+
(x) => Ein$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'Ein' from JSON`,
|
|
68
62
|
);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
/** @internal */
|
|
72
66
|
export const TaxID$inboundSchema: z.ZodType<TaxID, z.ZodTypeDef, unknown> = z
|
|
73
67
|
.object({
|
|
74
|
-
ein: z.lazy(() =>
|
|
68
|
+
ein: z.lazy(() => Ein$inboundSchema),
|
|
75
69
|
});
|
|
76
70
|
|
|
77
71
|
/** @internal */
|
|
78
72
|
export type TaxID$Outbound = {
|
|
79
|
-
ein:
|
|
73
|
+
ein: Ein$Outbound;
|
|
80
74
|
};
|
|
81
75
|
|
|
82
76
|
/** @internal */
|
|
@@ -85,7 +79,7 @@ export const TaxID$outboundSchema: z.ZodType<
|
|
|
85
79
|
z.ZodTypeDef,
|
|
86
80
|
TaxID
|
|
87
81
|
> = z.object({
|
|
88
|
-
ein: z.lazy(() =>
|
|
82
|
+
ein: z.lazy(() => Ein$outboundSchema),
|
|
89
83
|
});
|
|
90
84
|
|
|
91
85
|
/**
|
|
@@ -7,7 +7,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type TaxIDUpdateEin = {
|
|
11
11
|
number?: string | undefined;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,50 +15,56 @@ export type Ein = {
|
|
|
15
15
|
* An EIN (employer identification number) for the business. For sole proprietors, an SSN can be used as the EIN.
|
|
16
16
|
*/
|
|
17
17
|
export type TaxIDUpdate = {
|
|
18
|
-
ein?:
|
|
18
|
+
ein?: TaxIDUpdateEin | undefined;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
export const TaxIDUpdateEin$inboundSchema: z.ZodType<
|
|
23
|
+
TaxIDUpdateEin,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
number: z.string().optional(),
|
|
28
|
+
});
|
|
26
29
|
|
|
27
30
|
/** @internal */
|
|
28
|
-
export type
|
|
31
|
+
export type TaxIDUpdateEin$Outbound = {
|
|
29
32
|
number?: string | undefined;
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
/** @internal */
|
|
33
|
-
export const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
export const TaxIDUpdateEin$outboundSchema: z.ZodType<
|
|
37
|
+
TaxIDUpdateEin$Outbound,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
TaxIDUpdateEin
|
|
40
|
+
> = z.object({
|
|
41
|
+
number: z.string().optional(),
|
|
42
|
+
});
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* @internal
|
|
40
46
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
47
|
*/
|
|
42
|
-
export namespace
|
|
43
|
-
/** @deprecated use `
|
|
44
|
-
export const inboundSchema =
|
|
45
|
-
/** @deprecated use `
|
|
46
|
-
export const outboundSchema =
|
|
47
|
-
/** @deprecated use `
|
|
48
|
-
export type Outbound =
|
|
48
|
+
export namespace TaxIDUpdateEin$ {
|
|
49
|
+
/** @deprecated use `TaxIDUpdateEin$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = TaxIDUpdateEin$inboundSchema;
|
|
51
|
+
/** @deprecated use `TaxIDUpdateEin$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = TaxIDUpdateEin$outboundSchema;
|
|
53
|
+
/** @deprecated use `TaxIDUpdateEin$Outbound` instead. */
|
|
54
|
+
export type Outbound = TaxIDUpdateEin$Outbound;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
export function
|
|
52
|
-
return JSON.stringify(
|
|
57
|
+
export function taxIDUpdateEinToJSON(taxIDUpdateEin: TaxIDUpdateEin): string {
|
|
58
|
+
return JSON.stringify(TaxIDUpdateEin$outboundSchema.parse(taxIDUpdateEin));
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export function
|
|
61
|
+
export function taxIDUpdateEinFromJSON(
|
|
56
62
|
jsonString: string,
|
|
57
|
-
): SafeParseResult<
|
|
63
|
+
): SafeParseResult<TaxIDUpdateEin, SDKValidationError> {
|
|
58
64
|
return safeParse(
|
|
59
65
|
jsonString,
|
|
60
|
-
(x) =>
|
|
61
|
-
`Failed to parse '
|
|
66
|
+
(x) => TaxIDUpdateEin$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'TaxIDUpdateEin' from JSON`,
|
|
62
68
|
);
|
|
63
69
|
}
|
|
64
70
|
|
|
@@ -68,12 +74,12 @@ export const TaxIDUpdate$inboundSchema: z.ZodType<
|
|
|
68
74
|
z.ZodTypeDef,
|
|
69
75
|
unknown
|
|
70
76
|
> = z.object({
|
|
71
|
-
ein: z.lazy(() =>
|
|
77
|
+
ein: z.lazy(() => TaxIDUpdateEin$inboundSchema).optional(),
|
|
72
78
|
});
|
|
73
79
|
|
|
74
80
|
/** @internal */
|
|
75
81
|
export type TaxIDUpdate$Outbound = {
|
|
76
|
-
ein?:
|
|
82
|
+
ein?: TaxIDUpdateEin$Outbound | undefined;
|
|
77
83
|
};
|
|
78
84
|
|
|
79
85
|
/** @internal */
|
|
@@ -82,7 +88,7 @@ export const TaxIDUpdate$outboundSchema: z.ZodType<
|
|
|
82
88
|
z.ZodTypeDef,
|
|
83
89
|
TaxIDUpdate
|
|
84
90
|
> = z.object({
|
|
85
|
-
ein: z.lazy(() =>
|
|
91
|
+
ein: z.lazy(() => TaxIDUpdateEin$outboundSchema).optional(),
|
|
86
92
|
});
|
|
87
93
|
|
|
88
94
|
/**
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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
|
+
CardBrand,
|
|
11
|
+
CardBrand$inboundSchema,
|
|
12
|
+
CardBrand$outboundSchema,
|
|
13
|
+
} from "./cardbrand.js";
|
|
14
|
+
import {
|
|
15
|
+
CardExpiration,
|
|
16
|
+
CardExpiration$inboundSchema,
|
|
17
|
+
CardExpiration$Outbound,
|
|
18
|
+
CardExpiration$outboundSchema,
|
|
19
|
+
} from "./cardexpiration.js";
|
|
20
|
+
import {
|
|
21
|
+
CardType,
|
|
22
|
+
CardType$inboundSchema,
|
|
23
|
+
CardType$outboundSchema,
|
|
24
|
+
} from "./cardtype.js";
|
|
25
|
+
import {
|
|
26
|
+
EntryMode,
|
|
27
|
+
EntryMode$inboundSchema,
|
|
28
|
+
EntryMode$outboundSchema,
|
|
29
|
+
} from "./entrymode.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Describes payment card details captured with tap or in-person payment.
|
|
33
|
+
*/
|
|
34
|
+
export type TerminalCard = {
|
|
35
|
+
/**
|
|
36
|
+
* How the card information was entered into the point of sale terminal.
|
|
37
|
+
*/
|
|
38
|
+
entryMode?: EntryMode | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The card brand.
|
|
41
|
+
*/
|
|
42
|
+
brand?: CardBrand | undefined;
|
|
43
|
+
bin?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The type of the card.
|
|
46
|
+
*/
|
|
47
|
+
cardType?: CardType | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The expiration date of the card or token.
|
|
50
|
+
*/
|
|
51
|
+
expiration?: CardExpiration | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Uniquely identifies a linked payment card or token.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* For Apple Pay, the fingerprint is based on the tokenized card number and may vary based on the user's device.
|
|
57
|
+
* This field can be used to identify specific payment methods across multiple accounts on your platform.
|
|
58
|
+
*/
|
|
59
|
+
fingerprint?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The name of the cardholder as it appears on the card.
|
|
62
|
+
*/
|
|
63
|
+
holderName?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Financial institution that issued the card.
|
|
66
|
+
*/
|
|
67
|
+
issuer?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Country where the card was issued.
|
|
70
|
+
*/
|
|
71
|
+
issuerCountry?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Last four digits of the card number
|
|
74
|
+
*/
|
|
75
|
+
lastFourCardNumber?: string | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const TerminalCard$inboundSchema: z.ZodType<
|
|
80
|
+
TerminalCard,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
entryMode: EntryMode$inboundSchema.optional(),
|
|
85
|
+
brand: CardBrand$inboundSchema.optional(),
|
|
86
|
+
bin: z.string().optional(),
|
|
87
|
+
cardType: CardType$inboundSchema.optional(),
|
|
88
|
+
expiration: CardExpiration$inboundSchema.optional(),
|
|
89
|
+
fingerprint: z.string().optional(),
|
|
90
|
+
holderName: z.string().optional(),
|
|
91
|
+
issuer: z.string().optional(),
|
|
92
|
+
issuerCountry: z.string().optional(),
|
|
93
|
+
lastFourCardNumber: z.string().optional(),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export type TerminalCard$Outbound = {
|
|
98
|
+
entryMode?: string | undefined;
|
|
99
|
+
brand?: string | undefined;
|
|
100
|
+
bin?: string | undefined;
|
|
101
|
+
cardType?: string | undefined;
|
|
102
|
+
expiration?: CardExpiration$Outbound | undefined;
|
|
103
|
+
fingerprint?: string | undefined;
|
|
104
|
+
holderName?: string | undefined;
|
|
105
|
+
issuer?: string | undefined;
|
|
106
|
+
issuerCountry?: string | undefined;
|
|
107
|
+
lastFourCardNumber?: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const TerminalCard$outboundSchema: z.ZodType<
|
|
112
|
+
TerminalCard$Outbound,
|
|
113
|
+
z.ZodTypeDef,
|
|
114
|
+
TerminalCard
|
|
115
|
+
> = z.object({
|
|
116
|
+
entryMode: EntryMode$outboundSchema.optional(),
|
|
117
|
+
brand: CardBrand$outboundSchema.optional(),
|
|
118
|
+
bin: z.string().optional(),
|
|
119
|
+
cardType: CardType$outboundSchema.optional(),
|
|
120
|
+
expiration: CardExpiration$outboundSchema.optional(),
|
|
121
|
+
fingerprint: z.string().optional(),
|
|
122
|
+
holderName: z.string().optional(),
|
|
123
|
+
issuer: z.string().optional(),
|
|
124
|
+
issuerCountry: z.string().optional(),
|
|
125
|
+
lastFourCardNumber: z.string().optional(),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
131
|
+
*/
|
|
132
|
+
export namespace TerminalCard$ {
|
|
133
|
+
/** @deprecated use `TerminalCard$inboundSchema` instead. */
|
|
134
|
+
export const inboundSchema = TerminalCard$inboundSchema;
|
|
135
|
+
/** @deprecated use `TerminalCard$outboundSchema` instead. */
|
|
136
|
+
export const outboundSchema = TerminalCard$outboundSchema;
|
|
137
|
+
/** @deprecated use `TerminalCard$Outbound` instead. */
|
|
138
|
+
export type Outbound = TerminalCard$Outbound;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function terminalCardToJSON(terminalCard: TerminalCard): string {
|
|
142
|
+
return JSON.stringify(TerminalCard$outboundSchema.parse(terminalCard));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function terminalCardFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<TerminalCard, SDKValidationError> {
|
|
148
|
+
return safeParse(
|
|
149
|
+
jsonString,
|
|
150
|
+
(x) => TerminalCard$inboundSchema.parse(JSON.parse(x)),
|
|
151
|
+
`Failed to parse 'TerminalCard' from JSON`,
|
|
152
|
+
);
|
|
153
|
+
}
|