@adobe/spacecat-shared-utils 1.79.0 → 1.81.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 +14 -0
- package/package.json +1 -1
- package/src/schemas.js +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.81.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.80.0...@adobe/spacecat-shared-utils-v1.81.0) (2025-11-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add id to prompt in llmo config ([#1172](https://github.com/adobe/spacecat-shared/issues/1172)) ([c5a77dc](https://github.com/adobe/spacecat-shared/commit/c5a77dcaa6cf5f473882d2ba96ee7637961b452b))
|
|
7
|
+
|
|
8
|
+
# [@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)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* 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))
|
|
14
|
+
|
|
1
15
|
# [@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
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/schemas.js
CHANGED
|
@@ -39,11 +39,14 @@ const nonEmptyString = z.string().min(1);
|
|
|
39
39
|
const region = z.string().length(2).regex(/^[a-z][a-z]$/i);
|
|
40
40
|
|
|
41
41
|
const prompt = z.object({
|
|
42
|
+
id: z.uuid().optional(),
|
|
42
43
|
prompt: nonEmptyString,
|
|
43
44
|
regions: z.array(region),
|
|
44
45
|
origin: z.union([z.literal('human'), z.literal('ai'), z.string()]),
|
|
45
46
|
source: z.union([z.literal('config'), z.literal('api'), z.string()]),
|
|
46
47
|
status: z.union([z.literal('completed'), z.literal('processing'), z.string()]).optional(),
|
|
48
|
+
updatedBy: z.string().optional(),
|
|
49
|
+
updatedAt: z.string().optional(),
|
|
47
50
|
});
|
|
48
51
|
|
|
49
52
|
const entity = z.object({
|
|
@@ -72,6 +75,8 @@ const category = z.object({
|
|
|
72
75
|
region: z.union([region, z.array(region)]),
|
|
73
76
|
origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
|
|
74
77
|
urls: z.array(categoryUrl).optional(),
|
|
78
|
+
updatedBy: z.string().optional(),
|
|
79
|
+
updatedAt: z.string().optional(),
|
|
75
80
|
});
|
|
76
81
|
|
|
77
82
|
const topic = z.object({
|
|
@@ -97,6 +102,8 @@ export const llmoConfig = z.object({
|
|
|
97
102
|
category: z.uuid().optional(),
|
|
98
103
|
region: z.union([region, z.array(region)]).optional(),
|
|
99
104
|
aliasMode: z.union([z.literal('extend'), z.literal('replace')]).optional(),
|
|
105
|
+
updatedBy: z.string().optional(),
|
|
106
|
+
updatedAt: z.string().optional(),
|
|
100
107
|
}),
|
|
101
108
|
),
|
|
102
109
|
}),
|
|
@@ -108,6 +115,8 @@ export const llmoConfig = z.object({
|
|
|
108
115
|
name: nonEmptyString,
|
|
109
116
|
aliases: z.array(nonEmptyString),
|
|
110
117
|
urls: z.array(z.url().optional()),
|
|
118
|
+
updatedBy: z.string().optional(),
|
|
119
|
+
updatedAt: z.string().optional(),
|
|
111
120
|
}),
|
|
112
121
|
),
|
|
113
122
|
}),
|
|
@@ -119,7 +128,6 @@ export const llmoConfig = z.object({
|
|
|
119
128
|
allowedPaths: z.array(z.string()).optional(),
|
|
120
129
|
cdnProvider: z.string(),
|
|
121
130
|
}).optional(),
|
|
122
|
-
globalRegion: z.array(region).optional(),
|
|
123
131
|
}).superRefine((value, ctx) => {
|
|
124
132
|
const {
|
|
125
133
|
categories, topics, brands, competitors,
|
|
@@ -190,7 +198,7 @@ function validateTopicPromptRegions(categories, ctx, topics, topicsKey) {
|
|
|
190
198
|
* @param {z.RefinementCtx} ctx
|
|
191
199
|
* @param {string} id
|
|
192
200
|
* @param {Array<number | string>} path
|
|
193
|
-
|
|
201
|
+
*/
|
|
194
202
|
function ensureCategoryExists(categories, ctx, id, path) {
|
|
195
203
|
if (!categories[id]) {
|
|
196
204
|
ctx.addIssue({
|