add auth and payment api

This commit is contained in:
ItsMalma
2025-11-19 23:53:56 +07:00
parent 8f91994f29
commit 7e7a865368
64 changed files with 9067 additions and 2662 deletions

View File

@@ -16,5 +16,41 @@ export const _env = z
DATABASE_USERNAME: z.string("Must be string.").nonempty("Must not empty."),
DATABASE_PASSWORD: z.string("Must be string.").nonempty("Must not empty."),
DATABASE_NAME: z.string("Must be string.").nonempty("Must not empty."),
JWT_SECRET: z.string("Must be string.").nonempty("Must not empty."),
JWT_ALGORITHM: z.enum(
[
"HS256",
"HS384",
"HS512",
"RS256",
"RS384",
"RS512",
"ES256",
"ES384",
"ES512",
"PS256",
"PS384",
"PS512",
],
"Invalid value.",
),
JWT_ISSUER: z.string("Must be string.").nonempty("Must not empty."),
MIDTRANS_BASE_URL: z.url("Must be valid URL.").nonempty("Must not empty."),
MIDTRANS_MERCHANT_ID: z
.string("Must be string.")
.nonempty("Must not empty."),
MIDTRANS_SERVER_KEY: z
.string("Must be string.")
.nonempty("Must not empty."),
MAIL_HOST: z.string("Must be string.").nonempty("Must not empty."),
MAIL_PORT: z.coerce
.number("Must be number.")
.int("Must be integer.")
.min(0, "Min 0."),
MAIL_USERNAME: z.string("Must be string.").nonempty("Must not empty."),
MAIL_PASSWORD: z.string("Must be string.").nonempty("Must not empty."),
})
.parse(Bun.env);