@adobe/spacecat-shared-data-access 2.19.3 → 2.19.4
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-data-access-v2.19.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.19.3...@adobe/spacecat-shared-data-access-v2.19.4) (2025-05-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* async job schema ([#756](https://github.com/adobe/spacecat-shared/issues/756)) ([1546cdd](https://github.com/adobe/spacecat-shared/commit/1546cdd07907b1f41684d6486b38004bd5e893d1))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v2.19.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.19.2...@adobe/spacecat-shared-data-access-v2.19.3) (2025-05-17)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
isObject, isValidUrl, isIsoDate, isArray,
|
|
15
|
+
} from '@adobe/spacecat-shared-utils';
|
|
14
16
|
import SchemaBuilder from '../base/schema.builder.js';
|
|
15
17
|
import AsyncJob from './async-job.model.js';
|
|
16
18
|
import AsyncJobCollection from './async-job.collection.js';
|
|
@@ -31,7 +33,7 @@ const schema = new SchemaBuilder(AsyncJob, AsyncJobCollection)
|
|
|
31
33
|
})
|
|
32
34
|
.addAttribute('result', {
|
|
33
35
|
type: 'any',
|
|
34
|
-
validate: (value) => !value || isObject(value),
|
|
36
|
+
validate: (value) => !value || isObject(value) || isArray(value),
|
|
35
37
|
})
|
|
36
38
|
.addAttribute('error', {
|
|
37
39
|
type: 'map',
|
|
@@ -16,14 +16,14 @@ export interface AsyncJob extends BaseModel {
|
|
|
16
16
|
getStatus(): string;
|
|
17
17
|
getResultLocation(): string;
|
|
18
18
|
getResultType(): string;
|
|
19
|
-
getResult(): object;
|
|
19
|
+
getResult(): object | [];
|
|
20
20
|
getError(): { code: string; message: string; details?: object } | null;
|
|
21
21
|
getMetadata(): object | null;
|
|
22
22
|
getRecordExpiressAt(): number;
|
|
23
23
|
setStatus(status: string): void;
|
|
24
24
|
setResultLocation(location: string): void;
|
|
25
25
|
setResultType(type: string): void;
|
|
26
|
-
setResult(result: object): void;
|
|
26
|
+
setResult(result: object | []): void;
|
|
27
27
|
setError(error: { code: string; message: string; details?: object }): void;
|
|
28
28
|
setMetadata(metadata: object): void;
|
|
29
29
|
setExpiresAt(expiresAt: number): void;
|