@adobe/spacecat-shared-data-access 2.54.0 → 2.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-data-access-v2.56.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.55.0...@adobe/spacecat-shared-data-access-v2.56.0) (2025-08-20)
2
+
3
+
4
+ ### Features
5
+
6
+ * add cdn filters in llmo config ([#925](https://github.com/adobe/spacecat-shared/issues/925)) ([021110b](https://github.com/adobe/spacecat-shared/commit/021110bbf7da221d41a808af54ed43f5e5f513ea))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v2.55.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.54.0...@adobe/spacecat-shared-data-access-v2.55.0) (2025-08-20)
9
+
10
+
11
+ ### Features
12
+
13
+ * add scrape-client destination ([#913](https://github.com/adobe/spacecat-shared/issues/913)) ([e208a87](https://github.com/adobe/spacecat-shared/commit/e208a87214874a2708ac2d7614fcfd4c0770fe17))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v2.54.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.53.0...@adobe/spacecat-shared-data-access-v2.54.0) (2025-08-13)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.54.0",
3
+ "version": "2.56.0",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -73,6 +73,7 @@ class Audit extends BaseModel {
73
73
  static AUDIT_STEP_DESTINATIONS = {
74
74
  CONTENT_SCRAPER: 'content-scraper',
75
75
  IMPORT_WORKER: 'import-worker',
76
+ SCRAPE_CLIENT: 'scrape-client',
76
77
  };
77
78
 
78
79
  /**
@@ -86,7 +87,9 @@ class Audit extends BaseModel {
86
87
  * [Audit.AUDIT_STEP_DESTINATIONS.IMPORT_WORKER]: {
87
88
  * getQueueUrl: function,
88
89
  * formatPayload: function
89
- * }
90
+ * },
91
+ * [Audit.AUDIT_STEP_DESTINATIONS.SCRAPE_CLIENT]: {
92
+ * formatPayload: function
90
93
  * }}
91
94
  */
92
95
  static AUDIT_STEP_DESTINATION_CONFIGS = {
@@ -153,6 +156,26 @@ class Audit extends BaseModel {
153
156
  auditContext,
154
157
  }),
155
158
  },
159
+ [Audit.AUDIT_STEP_DESTINATIONS.SCRAPE_CLIENT]: {
160
+ /**
161
+ *
162
+ * @param stepResult - The result of the audit step.
163
+ * @param auditContext - The audit context.
164
+ * @param context - The context object.
165
+ * @returns {object} - The formatted payload for the scrape client.
166
+ */
167
+ formatPayload: (stepResult, auditContext, context) => ({
168
+ urls: stepResult.urls.map((urlObj) => urlObj.url),
169
+ processingType: stepResult.processingType || 'default',
170
+ options: stepResult.options || {},
171
+ maxScrapeAge: stepResult.maxScrapeAge || 24,
172
+ auditData: {
173
+ siteId: stepResult.siteId,
174
+ completionQueueUrl: stepResult.completionQueueUrl || context.env?.AUDIT_JOBS_QUEUE_URL,
175
+ auditContext,
176
+ },
177
+ }),
178
+ },
156
179
  };
157
180
 
158
181
  /**
@@ -269,6 +269,13 @@ export const configSchema = Joi.object({
269
269
  }),
270
270
  ).optional(),
271
271
  tags: Joi.array().items(Joi.string()).optional(),
272
+ cdnlogsFilter: Joi.array().items(
273
+ Joi.object({
274
+ key: Joi.string().required(),
275
+ value: Joi.array().items(Joi.string()).required(),
276
+ type: Joi.string().valid('include', 'exclude').optional(),
277
+ }),
278
+ ).optional(),
272
279
  }).optional(),
273
280
  cdnLogsConfig: Joi.object({
274
281
  bucketName: Joi.string().required(),
@@ -384,6 +391,7 @@ export const Config = (data = {}) => {
384
391
  const llmoConfig = self.getLlmoConfig();
385
392
  return llmoConfig?.customerIntent || [];
386
393
  };
394
+ self.getLlmoCdnlogsFilter = () => state?.llmo?.cdnlogsFilter;
387
395
 
388
396
  self.updateSlackConfig = (channel, workspace, invitedUserCount) => {
389
397
  state.slack = {
@@ -525,6 +533,11 @@ export const Config = (data = {}) => {
525
533
  );
526
534
  };
527
535
 
536
+ self.updateLlmoCdnlogsFilter = (cdnlogsFilter) => {
537
+ state.llmo = state.llmo || {};
538
+ state.llmo.cdnlogsFilter = cdnlogsFilter;
539
+ };
540
+
528
541
  self.updateImports = (imports) => {
529
542
  state.imports = imports;
530
543
  };