@adobe/spacecat-shared-utils 1.79.0 → 1.80.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 +7 -0
- package/package.json +1 -1
- package/src/schemas.js +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.80.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.79.0...@adobe/spacecat-shared-utils-v1.80.0) (2025-11-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* update schema to store user id and timestamp ([#1170](https://github.com/adobe/spacecat-shared/issues/1170)) ([ad64b9c](https://github.com/adobe/spacecat-shared/commit/ad64b9cbbc581883c16099529e0cd73ca9bfb088))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.79.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.78.1...@adobe/spacecat-shared-utils-v1.79.0) (2025-11-25)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/schemas.js
CHANGED
|
@@ -44,6 +44,8 @@ const prompt = z.object({
|
|
|
44
44
|
origin: z.union([z.literal('human'), z.literal('ai'), z.string()]),
|
|
45
45
|
source: z.union([z.literal('config'), z.literal('api'), z.string()]),
|
|
46
46
|
status: z.union([z.literal('completed'), z.literal('processing'), z.string()]).optional(),
|
|
47
|
+
updatedBy: z.string().optional(),
|
|
48
|
+
updatedAt: z.string().optional(),
|
|
47
49
|
});
|
|
48
50
|
|
|
49
51
|
const entity = z.object({
|
|
@@ -72,6 +74,8 @@ const category = z.object({
|
|
|
72
74
|
region: z.union([region, z.array(region)]),
|
|
73
75
|
origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
|
|
74
76
|
urls: z.array(categoryUrl).optional(),
|
|
77
|
+
updatedBy: z.string().optional(),
|
|
78
|
+
updatedAt: z.string().optional(),
|
|
75
79
|
});
|
|
76
80
|
|
|
77
81
|
const topic = z.object({
|
|
@@ -97,6 +101,8 @@ export const llmoConfig = z.object({
|
|
|
97
101
|
category: z.uuid().optional(),
|
|
98
102
|
region: z.union([region, z.array(region)]).optional(),
|
|
99
103
|
aliasMode: z.union([z.literal('extend'), z.literal('replace')]).optional(),
|
|
104
|
+
updatedBy: z.string().optional(),
|
|
105
|
+
updatedAt: z.string().optional(),
|
|
100
106
|
}),
|
|
101
107
|
),
|
|
102
108
|
}),
|
|
@@ -108,6 +114,8 @@ export const llmoConfig = z.object({
|
|
|
108
114
|
name: nonEmptyString,
|
|
109
115
|
aliases: z.array(nonEmptyString),
|
|
110
116
|
urls: z.array(z.url().optional()),
|
|
117
|
+
updatedBy: z.string().optional(),
|
|
118
|
+
updatedAt: z.string().optional(),
|
|
111
119
|
}),
|
|
112
120
|
),
|
|
113
121
|
}),
|
|
@@ -119,7 +127,6 @@ export const llmoConfig = z.object({
|
|
|
119
127
|
allowedPaths: z.array(z.string()).optional(),
|
|
120
128
|
cdnProvider: z.string(),
|
|
121
129
|
}).optional(),
|
|
122
|
-
globalRegion: z.array(region).optional(),
|
|
123
130
|
}).superRefine((value, ctx) => {
|
|
124
131
|
const {
|
|
125
132
|
categories, topics, brands, competitors,
|
|
@@ -190,7 +197,7 @@ function validateTopicPromptRegions(categories, ctx, topics, topicsKey) {
|
|
|
190
197
|
* @param {z.RefinementCtx} ctx
|
|
191
198
|
* @param {string} id
|
|
192
199
|
* @param {Array<number | string>} path
|
|
193
|
-
|
|
200
|
+
*/
|
|
194
201
|
function ensureCategoryExists(categories, ctx, id, path) {
|
|
195
202
|
if (!categories[id]) {
|
|
196
203
|
ctx.addIssue({
|