Make tracker pattern displayName read-only
The displayName field was always predictable from pattern + matchType and allowing edits added unnecessary complexity. Remove displayName from UpdateTrackerPatternInput across all surfaces (GraphQL, MCP, CLI, n8n) and make the frontend show it as non-editable text. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -251,12 +251,11 @@ export function DetectionPatternRow({ patternKey, connectionId }: DetectionPatte
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSaveEdit = (data: { displayName: string; description: string; maxAgeSeconds: number | null }) => {
|
const handleSaveEdit = (data: { description: string; maxAgeSeconds: number | null }) => {
|
||||||
updatePattern({
|
updatePattern({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trackerPatternId: pattern.id,
|
trackerPatternId: pattern.id,
|
||||||
displayName: data.displayName,
|
|
||||||
description: data.description,
|
description: data.description,
|
||||||
maxAgeSeconds: data.maxAgeSeconds,
|
maxAgeSeconds: data.maxAgeSeconds,
|
||||||
},
|
},
|
||||||
@@ -278,7 +277,7 @@ export function DetectionPatternRow({ patternKey, connectionId }: DetectionPatte
|
|||||||
if (isEditing) {
|
if (isEditing) {
|
||||||
return (
|
return (
|
||||||
<DetectionPatternRowEdit
|
<DetectionPatternRowEdit
|
||||||
displayName={pattern.displayName}
|
pattern={pattern.displayName}
|
||||||
description={pattern.description}
|
description={pattern.description}
|
||||||
maxAgeSeconds={pattern.maxAgeSeconds ?? null}
|
maxAgeSeconds={pattern.maxAgeSeconds ?? null}
|
||||||
isUpdating={isUpdating}
|
isUpdating={isUpdating}
|
||||||
|
|||||||
@@ -18,22 +18,21 @@ import { Button, DurationInput, Input, Td, Tr } from "@probo/ui";
|
|||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
|
||||||
interface FormValues {
|
interface FormValues {
|
||||||
displayName: string;
|
|
||||||
duration: { value: string; unit: string };
|
duration: { value: string; unit: string };
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DetectionPatternRowEditProps {
|
interface DetectionPatternRowEditProps {
|
||||||
displayName: string;
|
pattern: string;
|
||||||
description: string;
|
description: string;
|
||||||
maxAgeSeconds: number | null;
|
maxAgeSeconds: number | null;
|
||||||
isUpdating: boolean;
|
isUpdating: boolean;
|
||||||
onSave: (data: { displayName: string; description: string; maxAgeSeconds: number | null }) => void;
|
onSave: (data: { description: string; maxAgeSeconds: number | null }) => void;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DetectionPatternRowEdit({
|
export function DetectionPatternRowEdit({
|
||||||
displayName,
|
pattern,
|
||||||
description,
|
description,
|
||||||
maxAgeSeconds,
|
maxAgeSeconds,
|
||||||
isUpdating,
|
isUpdating,
|
||||||
@@ -45,7 +44,6 @@ export function DetectionPatternRowEdit({
|
|||||||
|
|
||||||
const { register, handleSubmit, control } = useForm<FormValues>({
|
const { register, handleSubmit, control } = useForm<FormValues>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
displayName,
|
|
||||||
duration: initial,
|
duration: initial,
|
||||||
description,
|
description,
|
||||||
},
|
},
|
||||||
@@ -53,7 +51,6 @@ export function DetectionPatternRowEdit({
|
|||||||
|
|
||||||
const onSubmit = (data: FormValues) => {
|
const onSubmit = (data: FormValues) => {
|
||||||
onSave({
|
onSave({
|
||||||
displayName: data.displayName,
|
|
||||||
description: data.description,
|
description: data.description,
|
||||||
maxAgeSeconds: toMaxAgeSeconds(data.duration.value, data.duration.unit),
|
maxAgeSeconds: toMaxAgeSeconds(data.duration.value, data.duration.unit),
|
||||||
});
|
});
|
||||||
@@ -62,10 +59,7 @@ export function DetectionPatternRowEdit({
|
|||||||
return (
|
return (
|
||||||
<Tr>
|
<Tr>
|
||||||
<Td className="pr-3">
|
<Td className="pr-3">
|
||||||
<Input
|
<span className="font-medium">{pattern}</span>
|
||||||
{...register("displayName")}
|
|
||||||
placeholder={__("Cookie name")}
|
|
||||||
/>
|
|
||||||
</Td>
|
</Td>
|
||||||
<Td />
|
<Td />
|
||||||
<Td className="pr-3">
|
<Td className="pr-3">
|
||||||
|
|||||||
@@ -397,12 +397,10 @@ export function CategorySection({ categoryKey, connectionId }: CategorySectionPr
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSaveEditCookie = (patternId: string, cookie: CookieEntry) => {
|
const handleSaveEditCookie = (patternId: string, cookie: CookieEntry) => {
|
||||||
if (!cookie.name.trim()) return;
|
|
||||||
updatePattern({
|
updatePattern({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trackerPatternId: patternId,
|
trackerPatternId: patternId,
|
||||||
displayName: cookie.name,
|
|
||||||
maxAgeSeconds: cookie.maxAgeSeconds,
|
maxAgeSeconds: cookie.maxAgeSeconds,
|
||||||
description: cookie.description,
|
description: cookie.description,
|
||||||
excluded: cookie.excluded,
|
excluded: cookie.excluded,
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ export const editCookieRowFragment = graphql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
interface CookieFormValues {
|
interface CookieFormValues {
|
||||||
name: string;
|
|
||||||
duration: { value: string; unit: string };
|
duration: { value: string; unit: string };
|
||||||
description: string;
|
description: string;
|
||||||
excluded: boolean;
|
excluded: boolean;
|
||||||
@@ -58,7 +57,6 @@ export function EditCookieRow({
|
|||||||
|
|
||||||
const { register, handleSubmit, control } = useForm<CookieFormValues>({
|
const { register, handleSubmit, control } = useForm<CookieFormValues>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
name: cookie.displayName,
|
|
||||||
duration: initial,
|
duration: initial,
|
||||||
description: cookie.description,
|
description: cookie.description,
|
||||||
excluded: cookie.excluded,
|
excluded: cookie.excluded,
|
||||||
@@ -67,7 +65,7 @@ export function EditCookieRow({
|
|||||||
|
|
||||||
const onSubmit = (data: CookieFormValues) => {
|
const onSubmit = (data: CookieFormValues) => {
|
||||||
onSave({
|
onSave({
|
||||||
name: data.name,
|
name: cookie.displayName,
|
||||||
maxAgeSeconds: toMaxAgeSeconds(data.duration.value, data.duration.unit),
|
maxAgeSeconds: toMaxAgeSeconds(data.duration.value, data.duration.unit),
|
||||||
description: data.description,
|
description: data.description,
|
||||||
excluded: data.excluded,
|
excluded: data.excluded,
|
||||||
@@ -90,10 +88,7 @@ export function EditCookieRow({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Input
|
<code className="text-sm font-mono">{cookie.displayName}</code>
|
||||||
{...register("name")}
|
|
||||||
placeholder={__("Cookie name")}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</Td>
|
</Td>
|
||||||
<Td />
|
<Td />
|
||||||
|
|||||||
@@ -347,7 +347,6 @@ func TestCookieBannerVersioning_NoOpUpdates(t *testing.T) {
|
|||||||
err := owner.Execute(query, map[string]any{
|
err := owner.Execute(query, map[string]any{
|
||||||
"input": map[string]any{
|
"input": map[string]any{
|
||||||
"trackerPatternId": patternID,
|
"trackerPatternId": patternID,
|
||||||
"displayName": "GA Tracker",
|
|
||||||
"description": "Original description",
|
"description": "Original description",
|
||||||
},
|
},
|
||||||
}, &result)
|
}, &result)
|
||||||
@@ -379,7 +378,7 @@ func TestCookieBannerVersioning_ExcludedPattern(t *testing.T) {
|
|||||||
const query = `
|
const query = `
|
||||||
mutation UpdateTrackerPattern($input: UpdateTrackerPatternInput!) {
|
mutation UpdateTrackerPattern($input: UpdateTrackerPatternInput!) {
|
||||||
updateTrackerPattern(input: $input) {
|
updateTrackerPattern(input: $input) {
|
||||||
trackerPattern { id displayName description }
|
trackerPattern { id description }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
@@ -387,7 +386,6 @@ func TestCookieBannerVersioning_ExcludedPattern(t *testing.T) {
|
|||||||
var result struct {
|
var result struct {
|
||||||
UpdateTrackerPattern struct {
|
UpdateTrackerPattern struct {
|
||||||
TrackerPattern struct {
|
TrackerPattern struct {
|
||||||
DisplayName string `json:"displayName"`
|
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
} `json:"trackerPattern"`
|
} `json:"trackerPattern"`
|
||||||
} `json:"updateTrackerPattern"`
|
} `json:"updateTrackerPattern"`
|
||||||
@@ -396,12 +394,10 @@ func TestCookieBannerVersioning_ExcludedPattern(t *testing.T) {
|
|||||||
err := owner.Execute(query, map[string]any{
|
err := owner.Execute(query, map[string]any{
|
||||||
"input": map[string]any{
|
"input": map[string]any{
|
||||||
"trackerPatternId": patternID,
|
"trackerPatternId": patternID,
|
||||||
"displayName": "Renamed Excluded",
|
|
||||||
"description": "Now with notes",
|
"description": "Now with notes",
|
||||||
},
|
},
|
||||||
}, &result)
|
}, &result)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, "Renamed Excluded", result.UpdateTrackerPattern.TrackerPattern.DisplayName)
|
|
||||||
assert.Equal(t, "Now with notes", result.UpdateTrackerPattern.TrackerPattern.Description)
|
assert.Equal(t, "Now with notes", result.UpdateTrackerPattern.TrackerPattern.Description)
|
||||||
|
|
||||||
got := latestVersion(t, owner, bannerID)
|
got := latestVersion(t, owner, bannerID)
|
||||||
@@ -604,7 +600,7 @@ func TestCookieBannerVersioning_RealChangesStillBumpVersion(t *testing.T) {
|
|||||||
assert.Equal(t, "DRAFT", got.State)
|
assert.Equal(t, "DRAFT", got.State)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("UpdateTrackerPattern displayName change on visible pattern creates a new draft", func(t *testing.T) {
|
t.Run("UpdateTrackerPattern description change on visible pattern creates a new draft", func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||||
|
|
||||||
@@ -612,6 +608,7 @@ func TestCookieBannerVersioning_RealChangesStillBumpVersion(t *testing.T) {
|
|||||||
categoryID := factory.CreateCookieCategory(owner, bannerID, factory.Attrs{"slug": "real-change"})
|
categoryID := factory.CreateCookieCategory(owner, bannerID, factory.Attrs{"slug": "real-change"})
|
||||||
patternID := factory.CreateTrackerPattern(owner, categoryID, factory.Attrs{
|
patternID := factory.CreateTrackerPattern(owner, categoryID, factory.Attrs{
|
||||||
"displayName": "Original",
|
"displayName": "Original",
|
||||||
|
"description": "Original desc",
|
||||||
})
|
})
|
||||||
|
|
||||||
published := publishBanner(t, owner, bannerID)
|
published := publishBanner(t, owner, bannerID)
|
||||||
@@ -626,7 +623,7 @@ func TestCookieBannerVersioning_RealChangesStillBumpVersion(t *testing.T) {
|
|||||||
err := owner.Execute(query, map[string]any{
|
err := owner.Execute(query, map[string]any{
|
||||||
"input": map[string]any{
|
"input": map[string]any{
|
||||||
"trackerPatternId": patternID,
|
"trackerPatternId": patternID,
|
||||||
"displayName": "Renamed",
|
"description": "Updated desc",
|
||||||
},
|
},
|
||||||
}, &result)
|
}, &result)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ func TestTrackerPattern_Create(t *testing.T) {
|
|||||||
func TestTrackerPattern_Update(t *testing.T) {
|
func TestTrackerPattern_Update(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
t.Run("update displayName and description", func(t *testing.T) {
|
t.Run("update description", func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
owner := testutil.NewClient(t, testutil.RoleOwner)
|
owner := testutil.NewClient(t, testutil.RoleOwner)
|
||||||
|
|
||||||
@@ -234,14 +234,13 @@ func TestTrackerPattern_Update(t *testing.T) {
|
|||||||
err := owner.Execute(query, map[string]any{
|
err := owner.Execute(query, map[string]any{
|
||||||
"input": map[string]any{
|
"input": map[string]any{
|
||||||
"trackerPatternId": patternID,
|
"trackerPatternId": patternID,
|
||||||
"displayName": "Updated Name",
|
|
||||||
"description": "Updated description",
|
"description": "Updated description",
|
||||||
},
|
},
|
||||||
}, &result)
|
}, &result)
|
||||||
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, patternID, result.UpdateTrackerPattern.TrackerPattern.ID)
|
assert.Equal(t, patternID, result.UpdateTrackerPattern.TrackerPattern.ID)
|
||||||
assert.Equal(t, "Updated Name", result.UpdateTrackerPattern.TrackerPattern.DisplayName)
|
assert.Equal(t, "Original Name", result.UpdateTrackerPattern.TrackerPattern.DisplayName)
|
||||||
assert.Equal(t, "Updated description", result.UpdateTrackerPattern.TrackerPattern.Description)
|
assert.Equal(t, "Updated description", result.UpdateTrackerPattern.TrackerPattern.Description)
|
||||||
assert.Equal(t, bannerID, result.UpdateTrackerPattern.CookieBanner.ID)
|
assert.Equal(t, bannerID, result.UpdateTrackerPattern.CookieBanner.ID)
|
||||||
})
|
})
|
||||||
@@ -655,7 +654,7 @@ func TestTrackerPattern_RBAC(t *testing.T) {
|
|||||||
`, map[string]any{
|
`, map[string]any{
|
||||||
"input": map[string]any{
|
"input": map[string]any{
|
||||||
"trackerPatternId": patternID,
|
"trackerPatternId": patternID,
|
||||||
"displayName": "Updated by Viewer",
|
"description": "Updated by Viewer",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
testutil.RequireForbiddenError(t, err, "viewer should not be able to update tracker pattern")
|
testutil.RequireForbiddenError(t, err, "viewer should not be able to update tracker pattern")
|
||||||
|
|||||||
@@ -30,19 +30,6 @@ export const description: INodeProperties[] = [
|
|||||||
description: 'The ID of the tracker pattern to update',
|
description: 'The ID of the tracker pattern to update',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
displayName: 'Display Name',
|
|
||||||
name: 'displayName',
|
|
||||||
type: 'string',
|
|
||||||
displayOptions: {
|
|
||||||
show: {
|
|
||||||
resource: ['trackerPattern'],
|
|
||||||
operation: ['update'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
default: '',
|
|
||||||
description: 'The display name for the tracker pattern',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
displayName: 'Excluded',
|
displayName: 'Excluded',
|
||||||
name: 'excluded',
|
name: 'excluded',
|
||||||
@@ -115,7 +102,6 @@ export async function execute(
|
|||||||
itemIndex: number,
|
itemIndex: number,
|
||||||
): Promise<INodeExecutionData> {
|
): Promise<INodeExecutionData> {
|
||||||
const trackerPatternId = this.getNodeParameter('trackerPatternId', itemIndex) as string;
|
const trackerPatternId = this.getNodeParameter('trackerPatternId', itemIndex) as string;
|
||||||
const displayName = this.getNodeParameter('displayName', itemIndex, '') as string;
|
|
||||||
const excluded = this.getNodeParameter('excluded', itemIndex, '') as string;
|
const excluded = this.getNodeParameter('excluded', itemIndex, '') as string;
|
||||||
const patternDescription = this.getNodeParameter('patternDescription', itemIndex, '') as string;
|
const patternDescription = this.getNodeParameter('patternDescription', itemIndex, '') as string;
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {}) as {
|
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {}) as {
|
||||||
@@ -146,7 +132,6 @@ export async function execute(
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const input: Record<string, unknown> = { trackerPatternId };
|
const input: Record<string, unknown> = { trackerPatternId };
|
||||||
if (displayName) input.displayName = displayName;
|
|
||||||
if (excluded) input.excluded = excluded === 'true';
|
if (excluded) input.excluded = excluded === 'true';
|
||||||
if (patternDescription) input.description = patternDescription;
|
if (patternDescription) input.description = patternDescription;
|
||||||
if (additionalFields.maxAgeSeconds !== undefined) {
|
if (additionalFields.maxAgeSeconds !== undefined) {
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ type updateResponse struct {
|
|||||||
|
|
||||||
func NewCmdUpdate(f *cmdutil.Factory) *cobra.Command {
|
func NewCmdUpdate(f *cmdutil.Factory) *cobra.Command {
|
||||||
var (
|
var (
|
||||||
flagDisplayName string
|
|
||||||
flagDescription string
|
flagDescription string
|
||||||
flagMaxAge int
|
flagMaxAge int
|
||||||
flagExcluded bool
|
flagExcluded bool
|
||||||
@@ -79,9 +78,6 @@ func NewCmdUpdate(f *cmdutil.Factory) *cobra.Command {
|
|||||||
|
|
||||||
input := map[string]any{"trackerPatternId": args[0]}
|
input := map[string]any{"trackerPatternId": args[0]}
|
||||||
|
|
||||||
if cmd.Flags().Changed("display-name") {
|
|
||||||
input["displayName"] = flagDisplayName
|
|
||||||
}
|
|
||||||
if cmd.Flags().Changed("description") {
|
if cmd.Flags().Changed("description") {
|
||||||
input["description"] = flagDescription
|
input["description"] = flagDescription
|
||||||
}
|
}
|
||||||
@@ -113,7 +109,6 @@ func NewCmdUpdate(f *cmdutil.Factory) *cobra.Command {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().StringVar(&flagDisplayName, "display-name", "", "Display name")
|
|
||||||
cmd.Flags().StringVar(&flagDescription, "description", "", "Description")
|
cmd.Flags().StringVar(&flagDescription, "description", "", "Description")
|
||||||
cmd.Flags().IntVar(&flagMaxAge, "max-age-seconds", 0, "Maximum age in seconds")
|
cmd.Flags().IntVar(&flagMaxAge, "max-age-seconds", 0, "Maximum age in seconds")
|
||||||
cmd.Flags().BoolVar(&flagExcluded, "excluded", false, "Exclude pattern from consent banner")
|
cmd.Flags().BoolVar(&flagExcluded, "excluded", false, "Exclude pattern from consent banner")
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ type (
|
|||||||
|
|
||||||
UpdateTrackerPatternRequest struct {
|
UpdateTrackerPatternRequest struct {
|
||||||
TrackerPatternID gid.GID
|
TrackerPatternID gid.GID
|
||||||
DisplayName *string
|
|
||||||
MaxAgeSeconds **int
|
MaxAgeSeconds **int
|
||||||
Description *string
|
Description *string
|
||||||
Excluded *bool
|
Excluded *bool
|
||||||
@@ -357,9 +356,6 @@ func (r *UpdateTrackerPatternRequest) Validate() error {
|
|||||||
v := validator.New()
|
v := validator.New()
|
||||||
|
|
||||||
v.Check(r.TrackerPatternID, "tracker_pattern_id", validator.Required(), validator.GID(coredata.TrackerPatternEntityType))
|
v.Check(r.TrackerPatternID, "tracker_pattern_id", validator.Required(), validator.GID(coredata.TrackerPatternEntityType))
|
||||||
if r.DisplayName != nil {
|
|
||||||
v.Check(*r.DisplayName, "display_name", validator.Required(), validator.SafeTextNoNewLine(255))
|
|
||||||
}
|
|
||||||
if r.Description != nil {
|
if r.Description != nil {
|
||||||
v.Check(*r.Description, "description", validator.SafeText(1000))
|
v.Check(*r.Description, "description", validator.SafeText(1000))
|
||||||
}
|
}
|
||||||
@@ -2258,20 +2254,16 @@ func (s *Service) UpdateTrackerPattern(
|
|||||||
return fmt.Errorf("cannot load tracker pattern: %w", err)
|
return fmt.Errorf("cannot load tracker pattern: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
displayNameChanged := req.DisplayName != nil && *req.DisplayName != pattern.DisplayName
|
|
||||||
maxAgeChanged := req.MaxAgeSeconds != nil && !ptrEqual(*req.MaxAgeSeconds, pattern.MaxAgeSeconds)
|
maxAgeChanged := req.MaxAgeSeconds != nil && !ptrEqual(*req.MaxAgeSeconds, pattern.MaxAgeSeconds)
|
||||||
descChanged := req.Description != nil && *req.Description != pattern.Description
|
descChanged := req.Description != nil && *req.Description != pattern.Description
|
||||||
excludedChanged := req.Excluded != nil && *req.Excluded != pattern.Excluded
|
excludedChanged := req.Excluded != nil && *req.Excluded != pattern.Excluded
|
||||||
|
|
||||||
if !displayNameChanged && !maxAgeChanged && !descChanged && !excludedChanged {
|
if !maxAgeChanged && !descChanged && !excludedChanged {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
staysExcluded := pattern.Excluded && (req.Excluded == nil || *req.Excluded)
|
staysExcluded := pattern.Excluded && (req.Excluded == nil || *req.Excluded)
|
||||||
|
|
||||||
if req.DisplayName != nil {
|
|
||||||
pattern.DisplayName = *req.DisplayName
|
|
||||||
}
|
|
||||||
if req.MaxAgeSeconds != nil {
|
if req.MaxAgeSeconds != nil {
|
||||||
pattern.MaxAgeSeconds = *req.MaxAgeSeconds
|
pattern.MaxAgeSeconds = *req.MaxAgeSeconds
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -823,7 +823,6 @@ func (r *mutationResolver) UpdateTrackerPattern(ctx context.Context, input types
|
|||||||
scope,
|
scope,
|
||||||
cookiebanner.UpdateTrackerPatternRequest{
|
cookiebanner.UpdateTrackerPatternRequest{
|
||||||
TrackerPatternID: input.TrackerPatternID,
|
TrackerPatternID: input.TrackerPatternID,
|
||||||
DisplayName: input.DisplayName,
|
|
||||||
MaxAgeSeconds: gqlutils.UnwrapOmittable(input.MaxAgeSeconds),
|
MaxAgeSeconds: gqlutils.UnwrapOmittable(input.MaxAgeSeconds),
|
||||||
Description: input.Description,
|
Description: input.Description,
|
||||||
Excluded: input.Excluded,
|
Excluded: input.Excluded,
|
||||||
|
|||||||
@@ -517,7 +517,6 @@ input CreateTrackerPatternInput {
|
|||||||
|
|
||||||
input UpdateTrackerPatternInput {
|
input UpdateTrackerPatternInput {
|
||||||
trackerPatternId: ID!
|
trackerPatternId: ID!
|
||||||
displayName: String
|
|
||||||
maxAgeSeconds: Int @goField(omittable: true)
|
maxAgeSeconds: Int @goField(omittable: true)
|
||||||
description: String
|
description: String
|
||||||
excluded: Boolean
|
excluded: Boolean
|
||||||
|
|||||||
@@ -4917,9 +4917,6 @@ func (r *Resolver) UpdateTrackerPatternTool(ctx context.Context, req *mcp.CallTo
|
|||||||
r.MustAuthorize(ctx, input.ID, probo.ActionTrackerPatternUpdate)
|
r.MustAuthorize(ctx, input.ID, probo.ActionTrackerPatternUpdate)
|
||||||
scope := coredata.NewScopeFromObjectID(input.ID)
|
scope := coredata.NewScopeFromObjectID(input.ID)
|
||||||
updateReq := cookiebanner.UpdateTrackerPatternRequest{TrackerPatternID: input.ID}
|
updateReq := cookiebanner.UpdateTrackerPatternRequest{TrackerPatternID: input.ID}
|
||||||
if v := UnwrapOmittable(input.DisplayName); v != nil && *v != nil {
|
|
||||||
updateReq.DisplayName = *v
|
|
||||||
}
|
|
||||||
if input.MaxAgeSeconds.IsSet() {
|
if input.MaxAgeSeconds.IsSet() {
|
||||||
val, _ := input.MaxAgeSeconds.Value()
|
val, _ := input.MaxAgeSeconds.Value()
|
||||||
updateReq.MaxAgeSeconds = &val
|
updateReq.MaxAgeSeconds = &val
|
||||||
|
|||||||
@@ -10012,11 +10012,6 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
$ref: "#/components/schemas/GID"
|
$ref: "#/components/schemas/GID"
|
||||||
display_name:
|
|
||||||
type:
|
|
||||||
- string
|
|
||||||
- "null"
|
|
||||||
go.probo.inc/mcpgen/omittable: true
|
|
||||||
max_age_seconds:
|
max_age_seconds:
|
||||||
type:
|
type:
|
||||||
- integer
|
- integer
|
||||||
|
|||||||
Reference in New Issue
Block a user