@adobe/spacecat-shared-utils 1.92.0 → 1.93.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,10 @@
1
+ # [@adobe/spacecat-shared-utils-v1.93.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.92.0...@adobe/spacecat-shared-utils-v1.93.0) (2026-02-10)
2
+
3
+
4
+ ### Features
5
+
6
+ * ignored field in llmo config ([#1326](https://github.com/adobe/spacecat-shared/issues/1326)) ([8a3e707](https://github.com/adobe/spacecat-shared/commit/8a3e70740bb8d08f4dfb946e4141f1526608b574))
7
+
1
8
  # [@adobe/spacecat-shared-utils-v1.92.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.91.0...@adobe/spacecat-shared-utils-v1.92.0) (2026-02-10)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.92.0",
3
+ "version": "1.93.0",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "exports": {
@@ -52,6 +52,9 @@ export function defaultConfig() {
52
52
  deleted: {
53
53
  prompts: {},
54
54
  },
55
+ ignored: {
56
+ prompts: {},
57
+ },
55
58
  };
56
59
  }
57
60
 
package/src/schemas.js CHANGED
@@ -38,6 +38,11 @@ const nonEmptyString = z.string().min(1);
38
38
 
39
39
  const region = z.string().length(2).regex(/^[a-z][a-z]$/i);
40
40
 
41
+ const auditFields = {
42
+ updatedBy: z.string().optional(),
43
+ updatedAt: z.string().optional(),
44
+ };
45
+
41
46
  const prompt = z.object({
42
47
  id: z.uuid().optional(),
43
48
  prompt: nonEmptyString,
@@ -45,8 +50,7 @@ const prompt = z.object({
45
50
  origin: z.union([z.literal('human'), z.literal('ai'), z.string()]),
46
51
  source: z.union([z.literal('config'), z.literal('api'), z.string()]),
47
52
  status: z.union([z.literal('completed'), z.literal('processing'), z.string()]).optional(),
48
- updatedBy: z.string().optional(),
49
- updatedAt: z.string().optional(),
53
+ ...auditFields,
50
54
  });
51
55
 
52
56
  const entity = z.object({
@@ -75,8 +79,7 @@ const category = z.object({
75
79
  region: z.union([region, z.array(region)]),
76
80
  origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
77
81
  urls: z.array(categoryUrl).optional(),
78
- updatedBy: z.string().optional(),
79
- updatedAt: z.string().optional(),
82
+ ...auditFields,
80
83
  });
81
84
 
82
85
  const topic = z.object({
@@ -91,6 +94,13 @@ const deletedPrompt = prompt.extend({
91
94
  categoryId: z.uuid().optional(),
92
95
  });
93
96
 
97
+ const ignoredPrompt = z.object({
98
+ prompt: nonEmptyString,
99
+ region,
100
+ source: z.union([z.literal('gsc'), z.string()]),
101
+ ...auditFields,
102
+ });
103
+
94
104
  export const llmoConfig = z.object({
95
105
  entities: z.record(z.uuid(), entity),
96
106
  categories: z.record(z.uuid(), category),
@@ -103,8 +113,7 @@ export const llmoConfig = z.object({
103
113
  category: z.uuid().optional(),
104
114
  region: z.union([region, z.array(region)]).optional(),
105
115
  aliasMode: z.union([z.literal('extend'), z.literal('replace')]).optional(),
106
- updatedBy: z.string().optional(),
107
- updatedAt: z.string().optional(),
116
+ ...auditFields,
108
117
  }),
109
118
  ),
110
119
  }),
@@ -116,8 +125,7 @@ export const llmoConfig = z.object({
116
125
  name: nonEmptyString,
117
126
  aliases: z.array(nonEmptyString),
118
127
  urls: z.array(z.url().optional()),
119
- updatedBy: z.string().optional(),
120
- updatedAt: z.string().optional(),
128
+ ...auditFields,
121
129
  }),
122
130
  ),
123
131
  }),
@@ -129,6 +137,9 @@ export const llmoConfig = z.object({
129
137
  allowedPaths: z.array(z.string()).optional(),
130
138
  cdnProvider: z.string(),
131
139
  }).optional(),
140
+ ignored: z.object({
141
+ prompts: z.record(z.uuid(), ignoredPrompt).optional(),
142
+ }).optional(),
132
143
  }).superRefine((value, ctx) => {
133
144
  const {
134
145
  categories, topics, brands, competitors,