misc: added cert alerts to doc

This commit is contained in:
Sheen Capadngan
2025-11-26 04:29:24 +08:00
parent 1531048d25
commit d434d4ec70
6 changed files with 20 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "Create a new PKI alert",
tags: [ApiDocsTags.PkiAlerting],
body: CreatePkiAlertV2Schema.extend({
@@ -90,6 +91,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "List PKI alerts for a project",
tags: [ApiDocsTags.PkiAlerting],
querystring: z.object({
@@ -150,6 +152,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "Get a PKI alert by ID",
tags: [ApiDocsTags.PkiAlerting],
params: z.object({
@@ -214,6 +217,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "Update a PKI alert",
tags: [ApiDocsTags.PkiAlerting],
params: z.object({
@@ -283,6 +287,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "Delete a PKI alert",
tags: [ApiDocsTags.PkiAlerting],
params: z.object({
@@ -347,6 +352,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "List certificates that match an alert's filter rules",
tags: [ApiDocsTags.PkiAlerting],
params: z.object({
@@ -397,6 +403,7 @@ export const registerPkiAlertRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
description: "Preview certificates that would match the given filter rules",
tags: [ApiDocsTags.PkiAlerting],
body: z.object({

View File

@@ -1,4 +1,4 @@
---
title: "Create"
openapi: "POST /api/v2/pki/alerts"
openapi: "POST /api/v1/cert-manager/alerts"
---

View File

@@ -1,4 +1,4 @@
---
title: "Delete"
openapi: "DELETE /api/v2/pki/alerts/{alertId}"
openapi: "DELETE /api/v1/cert-manager/alerts/{alertId}"
---

View File

@@ -1,4 +1,4 @@
---
title: "Retrieve"
openapi: "GET /api/v2/pki/alerts/{alertId}"
openapi: "GET /api/v1/cert-manager/alerts/{alertId}"
---

View File

@@ -1,4 +1,4 @@
---
title: "Update"
openapi: "PATCH /api/v2/pki/alerts/{alertId}"
openapi: "PATCH /api/v1/cert-manager/alerts/{alertId}"
---

View File

@@ -2581,6 +2581,15 @@
"api-reference/endpoints/certificate-profiles/get-latest-active-bundle"
]
},
{
"group": "Certificate Alerts",
"pages": [
"api-reference/endpoints/pki-alerts/create",
"api-reference/endpoints/pki-alerts/read",
"api-reference/endpoints/pki-alerts/update",
"api-reference/endpoints/pki-alerts/delete"
]
},
{
"group": "Certificate Syncs",
"pages": [