Add audit start and end dates to audits
ISO audits often span a window distinct from certificate validity. Store optional audit_start_date and audit_end_date on the audit record and expose them through GraphQL, MCP, CLI, n8n, and console. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
committed by
Bryan Frimin
parent
dcb7ffa945
commit
fe215efbd1
@@ -1499,6 +1499,8 @@ func (r *Resolver) AddAuditTool(ctx context.Context, req *mcp.CallToolRequest, i
|
||||
Name: input.Name,
|
||||
ValidFrom: input.ValidFrom,
|
||||
ValidUntil: input.ValidUntil,
|
||||
AuditStartDate: input.AuditStartDate,
|
||||
AuditEndDate: input.AuditEndDate,
|
||||
State: input.State,
|
||||
FrameworkID: input.FrameworkID,
|
||||
},
|
||||
@@ -1527,6 +1529,8 @@ func (r *Resolver) UpdateAuditTool(ctx context.Context, req *mcp.CallToolRequest
|
||||
Name: UnwrapOmittable(input.Name),
|
||||
ValidFrom: input.ValidFrom,
|
||||
ValidUntil: input.ValidUntil,
|
||||
AuditStartDate: input.AuditStartDate,
|
||||
AuditEndDate: input.AuditEndDate,
|
||||
State: input.State,
|
||||
CompliancePortalVisibility: input.CompliancePortalVisibility,
|
||||
},
|
||||
|
||||
@@ -4674,6 +4674,18 @@ components:
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Valid until date
|
||||
audit_start_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Audit start date
|
||||
audit_end_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Audit end date
|
||||
state:
|
||||
$ref: "#/components/schemas/AuditState"
|
||||
description: Audit state
|
||||
@@ -4791,6 +4803,14 @@ components:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Valid until date
|
||||
audit_start_date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Audit start date
|
||||
audit_end_date:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Audit end date
|
||||
state:
|
||||
$ref: "#/components/schemas/AuditState"
|
||||
description: Audit state
|
||||
@@ -4827,6 +4847,18 @@ components:
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Valid until date
|
||||
audit_start_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Audit start date
|
||||
audit_end_date:
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Audit end date
|
||||
state:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/AuditState"
|
||||
|
||||
@@ -36,6 +36,8 @@ func NewAudit(a *coredata.Audit, file *coredata.File) *Audit {
|
||||
HasReport: a.ReportFileID != nil,
|
||||
ValidFrom: a.ValidFrom,
|
||||
ValidUntil: a.ValidUntil,
|
||||
AuditStartDate: a.AuditStartDate,
|
||||
AuditEndDate: a.AuditEndDate,
|
||||
CreatedAt: a.CreatedAt,
|
||||
UpdatedAt: a.UpdatedAt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user