* Build HitPay app * Deleted a lint comment * Add redirect for iframe * Fix type check error * Fixed issue of payment pending * Update hitpay package.json * fix: fix lint issue in KeyInput and update zod * fix: fix issue of parsing string to number * fix: add default hitpay API links * fix: resolve atoms build error --------- Co-authored-by: kutsaniuk <kutsaniuk@gmail.com>
28 lines
735 B
TypeScript
28 lines
735 B
TypeScript
import { z } from "zod";
|
|
|
|
import { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";
|
|
|
|
export const PaypalPaymentOptions = [
|
|
{
|
|
label: "on_booking_option",
|
|
value: "ON_BOOKING",
|
|
},
|
|
];
|
|
|
|
type PaymentOption = (typeof PaypalPaymentOptions)[number]["value"];
|
|
const VALUES: [PaymentOption, ...PaymentOption[]] = [
|
|
PaypalPaymentOptions[0].value,
|
|
...PaypalPaymentOptions.slice(1).map((option) => option.value),
|
|
];
|
|
export const paymentOptionEnum = z.enum(VALUES);
|
|
|
|
export const appDataSchema = eventTypeAppCardZod.merge(
|
|
z.object({
|
|
price: z.number(),
|
|
currency: z.string(),
|
|
paymentOption: z.string().optional(),
|
|
enabled: z.boolean().optional(),
|
|
})
|
|
);
|
|
export const appKeysSchema = z.object({});
|