

import { zBase64Url, zOptionalToUndefined } from "../../../../../utils/zod.mjs";
import { vJwkCommon } from "../../jwk.mjs";
import { z } from "zod";

//#region src/modules/kms/jwk/kty/rsa/rsaJwk.ts
const zKmsJwkPrivateRsaOth = z.array(z.object({
	d: z.optional(zBase64Url),
	r: z.optional(zBase64Url),
	t: z.optional(zBase64Url)
}).passthrough());
const zKmsJwkPublicRsa = z.object({
	...vJwkCommon.shape,
	kty: z.literal("RSA"),
	n: zBase64Url,
	e: zBase64Url,
	d: z.optional(z.undefined()),
	p: z.optional(z.undefined()),
	q: z.optional(z.undefined()),
	dp: z.optional(z.undefined()),
	dq: z.optional(z.undefined()),
	qi: z.optional(z.undefined()),
	oth: z.optional(z.undefined())
});
const zKmsJwkPrivateToPublicRsa = z.object({
	...zKmsJwkPublicRsa.shape,
	d: zOptionalToUndefined(zBase64Url),
	p: zOptionalToUndefined(zBase64Url),
	q: zOptionalToUndefined(zBase64Url),
	dp: zOptionalToUndefined(zBase64Url),
	dq: zOptionalToUndefined(zBase64Url),
	qi: zOptionalToUndefined(zBase64Url),
	oth: zOptionalToUndefined(zKmsJwkPrivateRsaOth)
});
const zKmsJwkPrivateRsa = z.object({
	...zKmsJwkPublicRsa.shape,
	d: zBase64Url,
	p: zBase64Url,
	q: zBase64Url,
	dp: zBase64Url,
	dq: zBase64Url,
	qi: zBase64Url,
	oth: z.optional(zKmsJwkPrivateRsaOth)
});

//#endregion
export { zKmsJwkPrivateRsa, zKmsJwkPrivateToPublicRsa, zKmsJwkPublicRsa };
//# sourceMappingURL=rsaJwk.mjs.map