Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ import frescopaDataGeneration from './frescopa-data-generation/handler.js';
import semanticValueVisibility from './semantic-value-visibility/handler.js';
import semanticValueVisibilityGuidance from './semantic-value-visibility/guidance-handler.js';
import drsPromptGeneration from './drs-prompt-generation/handler.js';
import offsiteBrandPresence from './offsite-brand-presence/handler.js';

const HANDLERS = {
accessibility,
Expand Down Expand Up @@ -222,6 +223,7 @@ const HANDLERS = {
'semantic-value-visibility': semanticValueVisibility,
'guidance:semantic-value-visibility': semanticValueVisibilityGuidance,
'drs:prompt_generation_base_url': drsPromptGeneration,
'offsite-brand-presence': offsiteBrandPresence,
dummy: (message) => ok(message),
};

Expand Down
57 changes: 57 additions & 0 deletions src/offsite-brand-presence/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright 2026 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import { SCRAPE_DATASET_IDS } from '@adobe/spacecat-shared-drs-client';

export const PROVIDERS = Object.freeze([
'ai-mode',
'all',
'chatgpt',
'copilot',
'gemini',
'google-ai-overview',
'perplexity',
]);

export const PROVIDERS_SET = new Set(PROVIDERS);
export const BRAND_PRESENCE_REGEX = /brandpresence-(.+?)-w(\d{1,2})-(\d{4})-.*\.json$/;

export const URL_STORE_STATUS = Object.freeze({
CREATED: 'created',
FAILED: 'failed',
});

export const OFFSITE_DOMAINS = Object.freeze({
'youtube.com': {
auditType: 'youtube-analysis',
datasetIds: [SCRAPE_DATASET_IDS.YOUTUBE_VIDEOS, SCRAPE_DATASET_IDS.YOUTUBE_COMMENTS],
},
'reddit.com': {
auditType: 'reddit-analysis',
datasetIds: [SCRAPE_DATASET_IDS.REDDIT_POSTS, SCRAPE_DATASET_IDS.REDDIT_COMMENTS],
},
'wikipedia.org': {
auditType: 'wikipedia-analysis',
datasetIds: [SCRAPE_DATASET_IDS.WIKIPEDIA],
},
});

export const DRS_TOP_URLS_LIMIT = 100;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD if we should increase/decrease this.

export const FETCH_PAGE_SIZE = 80000;
export const FETCH_TIMEOUT_MS = 60000;
export const INCLUDE_COLUMNS = ['Sources', 'Region', 'answer_contains_brandname', 'Mentions', 'Citations', 'Prompt'].join(',');
export const REDDIT_COMMENTS_DAYS_BACK = 30;
export const TOP_CITED_URLS_LIMIT = 100;
export const TOP_CITED_DRS_CONFIG = Object.freeze({
auditType: 'top-cited-analysis',
datasetIds: [SCRAPE_DATASET_IDS.TOP_CITED],
});
Loading
Loading