Remove cookie_patterns legacy, migrate to tracker_patterns

Delete coredata.CookiePattern and all associated CRUD methods,
rename shared types (CookiePatternOrderField, CookiePatternFilter,
CookiePatternMatchType) to TrackerPattern equivalents, and migrate
all API surfaces (GraphQL, MCP, CLI, n8n) to tracker_pattern naming.

The worker was already migrated in the base branch; this commit
completes the removal by dropping the old GraphQL schema/resolvers,
service methods, CLI commands, and n8n operations that operated on
the legacy cookie_patterns table.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-06 10:21:33 +04:00
parent 21f92352d5
commit af6e420f54
39 changed files with 1008 additions and 2475 deletions

View File

@@ -116,11 +116,6 @@ export class Probo implements INodeType {
value: 'cookieConsentRecord',
description: 'View cookie consent records',
},
{
name: 'Cookie Pattern',
value: 'cookiePattern',
description: 'Manage cookie patterns',
},
{
name: 'Data',
value: 'datum',
@@ -206,6 +201,11 @@ export class Probo implements INodeType {
value: 'tia',
description: 'Manage transfer impact assessments',
},
{
name: 'Tracker Pattern',
value: 'trackerPattern',
description: 'Manage tracker patterns',
},
{
name: 'Trust Center',
value: 'trustCenter',

View File

@@ -21,7 +21,7 @@ import * as control from './control';
import * as cookieBanner from './cookieBanner';
import * as cookieCategory from './cookieCategory';
import * as cookieConsentRecord from './cookieConsentRecord';
import * as cookiePattern from './cookiePattern';
import * as trackerPattern from './trackerPattern';
import * as datum from './datum';
import * as document from './document';
import * as dpia from './dpia';
@@ -63,7 +63,7 @@ export const resources: Record<string, ResourceModule> = {
cookieBanner: cookieBanner as ResourceModule,
cookieCategory: cookieCategory as ResourceModule,
cookieConsentRecord: cookieConsentRecord as ResourceModule,
cookiePattern: cookiePattern as ResourceModule,
trackerPattern: trackerPattern as ResourceModule,
datum: datum as ResourceModule,
document: document as ResourceModule,
dpia: dpia as ResourceModule,

View File

@@ -22,7 +22,7 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
@@ -36,12 +36,12 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
default: '',
description: 'The cookie name pattern to match',
description: 'The tracker name pattern to match',
required: true,
},
{
@@ -50,7 +50,7 @@ export const description: INodeProperties[] = [
type: 'options',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
@@ -65,7 +65,7 @@ export const description: INodeProperties[] = [
},
],
default: 'EXACT',
description: 'How the pattern should be matched against cookie names',
description: 'How the pattern should be matched against tracker names',
required: true,
},
{
@@ -74,12 +74,12 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
default: '',
description: 'The display name for the cookie pattern',
description: 'The display name for the tracker pattern',
required: true,
},
{
@@ -88,12 +88,12 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
default: '',
description: 'The description of the cookie pattern',
description: 'The description of the tracker pattern',
required: true,
},
{
@@ -102,7 +102,7 @@ export const description: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['create'],
},
},
@@ -123,9 +123,9 @@ export async function execute(
const maxAgeSeconds = this.getNodeParameter('maxAgeSeconds', itemIndex, 0) as number;
const query = `
mutation CreateCookiePattern($input: CreateCookiePatternInput!) {
createCookiePattern(input: $input) {
cookiePatternEdge {
mutation CreateTrackerPattern($input: CreateTrackerPatternInput!) {
createTrackerPattern(input: $input) {
trackerPatternEdge {
node {
id
pattern

View File

@@ -17,17 +17,17 @@ import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Cookie Pattern ID',
name: 'cookiePatternId',
displayName: 'Tracker Pattern ID',
name: 'trackerPatternId',
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['delete'],
},
},
default: '',
description: 'The ID of the cookie pattern to delete',
description: 'The ID of the tracker pattern to delete',
required: true,
},
];
@@ -36,12 +36,12 @@ export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const cookiePatternId = this.getNodeParameter('cookiePatternId', itemIndex) as string;
const trackerPatternId = this.getNodeParameter('trackerPatternId', itemIndex) as string;
const query = `
mutation DeleteCookiePattern($input: DeleteCookiePatternInput!) {
deleteCookiePattern(input: $input) {
deletedCookiePatternId
mutation DeleteTrackerPattern($input: DeleteTrackerPatternInput!) {
deleteTrackerPattern(input: $input) {
deletedTrackerPatternId
cookieBanner {
id
name
@@ -50,7 +50,7 @@ export async function execute(
}
`;
const responseData = await proboApiRequest.call(this, query, { input: { cookiePatternId } });
const responseData = await proboApiRequest.call(this, query, { input: { trackerPatternId } });
return {
json: responseData,

View File

@@ -17,17 +17,17 @@ import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Cookie Pattern ID',
name: 'cookiePatternId',
displayName: 'Tracker Pattern ID',
name: 'trackerPatternId',
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['get'],
},
},
default: '',
description: 'The ID of the cookie pattern',
description: 'The ID of the tracker pattern',
required: true,
},
];
@@ -36,12 +36,12 @@ export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const cookiePatternId = this.getNodeParameter('cookiePatternId', itemIndex) as string;
const trackerPatternId = this.getNodeParameter('trackerPatternId', itemIndex) as string;
const query = `
query GetCookiePattern($cookiePatternId: ID!) {
node(id: $cookiePatternId) {
... on CookiePattern {
query GetTrackerPattern($trackerPatternId: ID!) {
node(id: $trackerPatternId) {
... on TrackerPattern {
id
pattern
matchType
@@ -58,7 +58,7 @@ export async function execute(
}
`;
const responseData = await proboApiRequest.call(this, query, { cookiePatternId });
const responseData = await proboApiRequest.call(this, query, { trackerPatternId });
return {
json: responseData,

View File

@@ -22,7 +22,7 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['getAll'],
},
},
@@ -36,7 +36,7 @@ export const description: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['getAll'],
},
},
@@ -49,7 +49,7 @@ export const description: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['getAll'],
returnAll: [false],
},
@@ -71,10 +71,10 @@ export async function execute(
const limit = this.getNodeParameter('limit', itemIndex, 50) as number;
const query = `
query GetCookiePatterns($cookieCategoryId: ID!, $first: Int, $after: CursorKey) {
query GetTrackerPatterns($cookieCategoryId: ID!, $first: Int, $after: CursorKey) {
node(id: $cookieCategoryId) {
... on CookieCategory {
cookiePatterns(first: $first, after: $after) {
trackerPatterns(first: $first, after: $after) {
edges {
node {
id
@@ -100,21 +100,21 @@ export async function execute(
}
`;
const cookiePatterns = await proboApiRequestAllItems.call(
const trackerPatterns = await proboApiRequestAllItems.call(
this,
query,
{ cookieCategoryId },
(response) => {
const data = response?.data as IDataObject | undefined;
const node = data?.node as IDataObject | undefined;
return node?.cookiePatterns as IDataObject | undefined;
return node?.trackerPatterns as IDataObject | undefined;
},
returnAll,
limit,
);
return {
json: { cookiePatterns },
json: { trackerPatterns },
pairedItem: { item: itemIndex },
};
}

View File

@@ -28,45 +28,45 @@ export const description: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new cookie pattern',
action: 'Create a cookie pattern',
description: 'Create a new tracker pattern',
action: 'Create a tracker pattern',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a cookie pattern',
action: 'Delete a cookie pattern',
description: 'Delete a tracker pattern',
action: 'Delete a tracker pattern',
},
{
name: 'Get',
value: 'get',
description: 'Get a cookie pattern',
action: 'Get a cookie pattern',
description: 'Get a tracker pattern',
action: 'Get a tracker pattern',
},
{
name: 'Get Many',
value: 'getAll',
description: 'Get many cookie patterns',
action: 'Get many cookie patterns',
description: 'Get many tracker patterns',
action: 'Get many tracker patterns',
},
{
name: 'Move',
value: 'move',
description: 'Move a cookie pattern to a different category',
action: 'Move a cookie pattern',
description: 'Move a tracker pattern to a different category',
action: 'Move a tracker pattern',
},
{
name: 'Update',
value: 'update',
description: 'Update an existing cookie pattern',
action: 'Update a cookie pattern',
description: 'Update an existing tracker pattern',
action: 'Update a tracker pattern',
},
],
default: 'create',

View File

@@ -17,17 +17,17 @@ import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Cookie Pattern ID',
name: 'cookiePatternId',
displayName: 'Tracker Pattern ID',
name: 'trackerPatternId',
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['move'],
},
},
default: '',
description: 'The ID of the cookie pattern to move',
description: 'The ID of the tracker pattern to move',
required: true,
},
{
@@ -36,7 +36,7 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['move'],
},
},
@@ -50,13 +50,13 @@ export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const cookiePatternId = this.getNodeParameter('cookiePatternId', itemIndex) as string;
const trackerPatternId = this.getNodeParameter('trackerPatternId', itemIndex) as string;
const targetCookieCategoryId = this.getNodeParameter('targetCookieCategoryId', itemIndex) as string;
const query = `
mutation MoveCookiePatternToCategory($input: MoveCookiePatternToCategoryInput!) {
moveCookiePatternToCategory(input: $input) {
cookiePattern {
mutation MoveTrackerPatternToCategory($input: MoveTrackerPatternToCategoryInput!) {
moveTrackerPatternToCategory(input: $input) {
trackerPattern {
id
pattern
matchType
@@ -77,7 +77,7 @@ export async function execute(
`;
const responseData = await proboApiRequest.call(this, query, {
input: { cookiePatternId, targetCookieCategoryId },
input: { trackerPatternId, targetCookieCategoryId },
});
return {

View File

@@ -17,17 +17,17 @@ import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Cookie Pattern ID',
name: 'cookiePatternId',
displayName: 'Tracker Pattern ID',
name: 'trackerPatternId',
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['update'],
},
},
default: '',
description: 'The ID of the cookie pattern to update',
description: 'The ID of the tracker pattern to update',
required: true,
},
{
@@ -36,12 +36,12 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['update'],
},
},
default: '',
description: 'The display name for the cookie pattern',
description: 'The display name for the tracker pattern',
},
{
displayName: 'Excluded',
@@ -49,7 +49,7 @@ export const description: INodeProperties[] = [
type: 'options',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['update'],
},
},
@@ -68,7 +68,7 @@ export const description: INodeProperties[] = [
},
],
default: '',
description: 'Whether the cookie pattern is excluded from the banner',
description: 'Whether the tracker pattern is excluded from the banner',
},
{
displayName: 'Description',
@@ -76,12 +76,12 @@ export const description: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['update'],
},
},
default: '',
description: 'The description of the cookie pattern',
description: 'The description of the tracker pattern',
},
{
displayName: 'Additional Fields',
@@ -91,7 +91,7 @@ export const description: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: ['cookiePattern'],
resource: ['trackerPattern'],
operation: ['update'],
},
},
@@ -114,7 +114,7 @@ export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const cookiePatternId = this.getNodeParameter('cookiePatternId', 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 patternDescription = this.getNodeParameter('patternDescription', itemIndex, '') as string;
@@ -123,9 +123,9 @@ export async function execute(
};
const query = `
mutation UpdateCookiePattern($input: UpdateCookiePatternInput!) {
updateCookiePattern(input: $input) {
cookiePattern {
mutation UpdateTrackerPattern($input: UpdateTrackerPatternInput!) {
updateTrackerPattern(input: $input) {
trackerPattern {
id
pattern
matchType
@@ -145,7 +145,7 @@ export async function execute(
}
`;
const input: Record<string, unknown> = { cookiePatternId };
const input: Record<string, unknown> = { trackerPatternId };
if (displayName) input.displayName = displayName;
if (excluded) input.excluded = excluded === 'true';
if (patternDescription) input.description = patternDescription;