This commit is contained in:
Fang-Pen Lin
2025-11-04 16:15:00 -08:00
parent 4791b16b00
commit e02afc5eef
3 changed files with 5 additions and 4 deletions

View File

@@ -3,6 +3,8 @@
* https://datatracker.ietf.org/doc/html/rfc8555#section-6.7
*/
/* eslint-disable max-classes-per-file */
// RFC 8555 Section 6.7 - Error Types
export enum AcmeErrorType {
AccountDoesNotExist = "accountDoesNotExist",

View File

@@ -1,7 +1,7 @@
import { Knex } from "knex";
import { TDbClient } from "@app/db";
import { TableName, TPkiAcmeAuths, TPkiAcmeOrderAuths } from "@app/db/schemas";
import { TableName } from "@app/db/schemas";
import { DatabaseError } from "@app/lib/errors";
import { ormify, selectAllTableCols, sqlNestRelationships } from "@app/lib/knex";

View File

@@ -1,6 +1,5 @@
import { z } from "zod";
import { TPkiAcmeChallenges } from "@app/db/schemas";
import { JWSHeaderParameters } from "jose";
import {
AcmeOrderResourceSchema,
@@ -51,7 +50,7 @@ export type TAcmeResponse<TPayload> = {
export type TPkiAcmeServiceFactory = {
validateJwsPayload: <
TSchema extends z.ZodSchema<any> | undefined = undefined,
TSchema extends z.ZodSchema<unknown> | undefined = undefined,
T = TSchema extends z.ZodSchema<infer R> ? R : string
>({
url,
@@ -72,7 +71,7 @@ export type TPkiAcmeServiceFactory = {
rawJwsPayload: TRawJwsPayload;
}) => Promise<TJwsPayload<TCreateAcmeAccountPayload>>;
validateExistingAccountJwsPayload: <
TSchema extends z.ZodSchema<any> | undefined = undefined,
TSchema extends z.ZodSchema<unknown> | undefined = undefined,
T = TSchema extends z.ZodSchema<infer R> ? R : string
>({
url,