Add excluded field to cookie pattern operations
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -134,6 +134,7 @@ export async function execute(
|
|||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
source
|
||||||
|
excluded
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export async function execute(
|
|||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
source
|
||||||
|
excluded
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export async function execute(
|
|||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
source
|
||||||
|
excluded
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export async function execute(
|
|||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
source
|
||||||
|
excluded
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,33 @@ export const description: INodeProperties[] = [
|
|||||||
default: 0,
|
default: 0,
|
||||||
description: 'The maximum age of the cookie in seconds (0 to clear)',
|
description: 'The maximum age of the cookie in seconds (0 to clear)',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Excluded',
|
||||||
|
name: 'excluded',
|
||||||
|
type: 'options',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: ['cookiePattern'],
|
||||||
|
operation: ['update'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: '(Unchanged)',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'False',
|
||||||
|
value: 'false',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'True',
|
||||||
|
value: 'true',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
description: 'Whether the cookie pattern is excluded from the banner',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Description',
|
displayName: 'Description',
|
||||||
name: 'patternDescription',
|
name: 'patternDescription',
|
||||||
@@ -78,6 +105,7 @@ export async function execute(
|
|||||||
const cookiePatternId = this.getNodeParameter('cookiePatternId', itemIndex) as string;
|
const cookiePatternId = this.getNodeParameter('cookiePatternId', itemIndex) as string;
|
||||||
const displayName = this.getNodeParameter('displayName', itemIndex, '') as string;
|
const displayName = this.getNodeParameter('displayName', itemIndex, '') as string;
|
||||||
const maxAgeSeconds = this.getNodeParameter('maxAgeSeconds', itemIndex, 0) as number;
|
const maxAgeSeconds = this.getNodeParameter('maxAgeSeconds', itemIndex, 0) as number;
|
||||||
|
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 query = `
|
const query = `
|
||||||
@@ -91,6 +119,7 @@ export async function execute(
|
|||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
source
|
||||||
|
excluded
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
@@ -107,6 +136,7 @@ export async function execute(
|
|||||||
if (maxAgeSeconds !== undefined) {
|
if (maxAgeSeconds !== undefined) {
|
||||||
input.maxAgeSeconds = maxAgeSeconds === 0 ? null : maxAgeSeconds;
|
input.maxAgeSeconds = maxAgeSeconds === 0 ? null : maxAgeSeconds;
|
||||||
}
|
}
|
||||||
|
if (excluded) input.excluded = excluded === 'true';
|
||||||
if (patternDescription) input.description = patternDescription;
|
if (patternDescription) input.description = patternDescription;
|
||||||
|
|
||||||
const responseData = await proboApiRequest.call(this, query, { input });
|
const responseData = await proboApiRequest.call(this, query, { input });
|
||||||
|
|||||||
Reference in New Issue
Block a user