@adobe/spacecat-shared-utils 1.67.0 → 1.69.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-utils-v1.69.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.68.0...@adobe/spacecat-shared-utils-v1.69.0) (2025-10-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * update llmo schemas to store origin and status ([#1074](https://github.com/adobe/spacecat-shared/issues/1074)) ([a0a983c](https://github.com/adobe/spacecat-shared/commit/a0a983cc9f39c508498c0909336483c589e56068))
7
+
8
+ # [@adobe/spacecat-shared-utils-v1.68.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.67.0...@adobe/spacecat-shared-utils-v1.68.0) (2025-10-29)
9
+
10
+
11
+ ### Features
12
+
13
+ * add optional urls to categories | LLMO-845 ([#1055](https://github.com/adobe/spacecat-shared/issues/1055)) ([5d4d63e](https://github.com/adobe/spacecat-shared/commit/5d4d63e95e9d688c5334a0db66af419cc1aad858))
14
+
1
15
  # [@adobe/spacecat-shared-utils-v1.67.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.66.1...@adobe/spacecat-shared-utils-v1.67.0) (2025-10-29)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.67.0",
3
+ "version": "1.69.0",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "exports": {
package/src/schemas.js CHANGED
@@ -43,6 +43,7 @@ const prompt = z.object({
43
43
  regions: z.array(region),
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
+ status: z.union([z.literal('completed'), z.literal('processing'), z.string()]).optional(),
46
47
  });
47
48
 
48
49
  const entity = z.object({
@@ -50,22 +51,41 @@ const entity = z.object({
50
51
  name: nonEmptyString,
51
52
  });
52
53
 
54
+ const categoryUrl = z.object({
55
+ value: nonEmptyString,
56
+ type: z.union([z.literal('prefix'), z.literal('url')]),
57
+ }).superRefine((data, ctx) => {
58
+ // Validate URL format only for type 'url'
59
+ if (data.type === 'url') {
60
+ if (!URL.canParse(data.value)) {
61
+ ctx.addIssue({
62
+ code: 'custom',
63
+ path: ['value'],
64
+ message: 'Invalid URL format',
65
+ });
66
+ }
67
+ }
68
+ });
69
+
53
70
  const category = z.object({
54
71
  name: nonEmptyString,
55
72
  region: z.union([region, z.array(region)]),
56
73
  origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
74
+ urls: z.array(categoryUrl).optional(),
57
75
  });
58
76
 
59
77
  const topic = z.object({
60
78
  name: nonEmptyString,
61
79
  prompts: z.array(prompt).min(1),
62
80
  category: z.union([z.uuid(), nonEmptyString]),
81
+ origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
63
82
  });
64
83
 
65
84
  const deletedPrompt = prompt.extend({
66
85
  topic: nonEmptyString,
67
86
  category: nonEmptyString,
68
87
  regions: z.array(region).min(1),
88
+ origin: z.union([z.literal('human'), z.literal('ai'), z.string()]).optional(),
69
89
  });
70
90
 
71
91
  export const llmoConfig = z.object({