Sync excluded field to MCP and CLI
Add excluded boolean to the MCP CookiePattern schema and UpdateCookiePatternInput. Expose it in CLI cookie-pattern view, list, and update commands. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -5093,6 +5093,9 @@ func (r *Resolver) UpdateCookiePatternTool(ctx context.Context, req *mcp.CallToo
|
||||
if v := UnwrapOmittable(input.Description); v != nil && *v != nil {
|
||||
updateReq.Description = *v
|
||||
}
|
||||
if v := UnwrapOmittable(input.Excluded); v != nil && *v != nil {
|
||||
updateReq.Excluded = *v
|
||||
}
|
||||
pattern, err := r.cookieBanner.UpdateCookiePattern(ctx, scope, updateReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateCookiePatternOutput{}, fmt.Errorf("cannot update cookie pattern: %w", err)
|
||||
|
||||
@@ -9320,6 +9320,7 @@ components:
|
||||
- display_name
|
||||
- description
|
||||
- source
|
||||
- excluded
|
||||
- created_at
|
||||
- updated_at
|
||||
properties:
|
||||
@@ -9357,6 +9358,9 @@ components:
|
||||
type: string
|
||||
enum: [SCRIPT, PRE_EXISTING]
|
||||
description: How the pattern was discovered
|
||||
excluded:
|
||||
type: boolean
|
||||
description: Whether this pattern is excluded from the consent banner
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -9889,6 +9893,11 @@ components:
|
||||
- string
|
||||
- "null"
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
excluded:
|
||||
type:
|
||||
- boolean
|
||||
- "null"
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
|
||||
UpdateCookiePatternOutput:
|
||||
type: object
|
||||
|
||||
@@ -31,6 +31,7 @@ func NewCookiePattern(p *coredata.CookiePattern) *CookiePattern {
|
||||
MaxAgeSeconds: p.MaxAgeSeconds,
|
||||
Description: p.Description,
|
||||
Source: CookiePatternSource(p.Source),
|
||||
Excluded: p.Excluded,
|
||||
CreatedAt: p.CreatedAt,
|
||||
UpdatedAt: p.UpdatedAt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user