@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
18 lines (17 loc) • 861 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.paymentProviderDataSchema = exports.paymentStatusSchema = exports.paymentProviderNameSchema = void 0;
const zod_1 = require("zod");
const Payment_const_1 = require("./Payment.const");
exports.paymentProviderNameSchema = zod_1.z.enum(Payment_const_1.PAYMENT_PROVIDERS);
exports.paymentStatusSchema = zod_1.z.enum(Payment_const_1.PAYMENT_STATUSES);
exports.paymentProviderDataSchema = zod_1.z.object({
provider: exports.paymentProviderNameSchema,
paymentIntentId: zod_1.z.string().optional(),
transactionId: zod_1.z.string(),
amountPaid: zod_1.z.number(),
currency: zod_1.z.string(),
paymentStatus: exports.paymentStatusSchema,
paymentMethod: zod_1.z.string().optional(),
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
});