@adobe/spacecat-shared-data-access 1.57.0 → 1.57.2
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 +3 -3
- package/src/v2/models/index.d.ts +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v1.57.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.57.1...@adobe/spacecat-shared-data-access-v1.57.2) (2024-11-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([#454](https://github.com/adobe/spacecat-shared/issues/454)) ([325cf8d](https://github.com/adobe/spacecat-shared/commit/325cf8dded5fcabadaf7d8fdd510d33aeafd08a7))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v1.57.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.57.0...@adobe/spacecat-shared-data-access-v1.57.1) (2024-11-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* multi status create result type ([#453](https://github.com/adobe/spacecat-shared/issues/453)) ([c8df70b](https://github.com/adobe/spacecat-shared/commit/c8df70bb8606162fcb9cee16603b349ab55e1d09))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v1.57.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v1.56.0...@adobe/spacecat-shared-data-access-v1.57.0) (2024-11-22)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-data-access",
|
|
3
|
-
"version": "1.57.
|
|
3
|
+
"version": "1.57.2",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@adobe/spacecat-shared-dynamo": "1.3.49",
|
|
38
38
|
"@adobe/spacecat-shared-utils": "1.23.0",
|
|
39
|
-
"@aws-sdk/client-dynamodb": "3.
|
|
40
|
-
"@aws-sdk/lib-dynamodb": "3.
|
|
39
|
+
"@aws-sdk/client-dynamodb": "3.699.0",
|
|
40
|
+
"@aws-sdk/lib-dynamodb": "3.699.0",
|
|
41
41
|
"@types/joi": "17.2.3",
|
|
42
42
|
"aws-xray-sdk": "3.10.2",
|
|
43
43
|
"electrodb": "3.0.1",
|
package/src/v2/models/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import type { ValidationError } from '../index.d.ts';
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* Interface representing a base model for interacting with a data entity.
|
|
15
17
|
*/
|
|
@@ -21,12 +23,16 @@ export interface BaseModel {
|
|
|
21
23
|
save(): Promise<this>;
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
export interface MultiStatusCreateResult<T> {
|
|
27
|
+
createdItems: T[],
|
|
28
|
+
errorItems: { item: object, error: ValidationError }[],
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
* Interface representing an Opportunity model, extending BaseModel.
|
|
26
33
|
*/
|
|
27
|
-
export interface Opportunity extends BaseModel {
|
|
28
|
-
|
|
29
|
-
addSuggestions(suggestions: object[]): Promise<Suggestion[]>;
|
|
34
|
+
export interface Opportunity extends BaseModel { /* eslint-disable no-use-before-define */
|
|
35
|
+
addSuggestions(suggestions: object[]): Promise<MultiStatusCreateResult<Suggestion>>;
|
|
30
36
|
// eslint-disable-next-line no-use-before-define
|
|
31
37
|
getSuggestions(): Promise<Suggestion[]>;
|
|
32
38
|
getSiteId(): string;
|
|
@@ -76,7 +82,7 @@ export interface Suggestion extends BaseModel {
|
|
|
76
82
|
export interface BaseCollection<T extends BaseModel> {
|
|
77
83
|
findById(id: string): Promise<T>;
|
|
78
84
|
create(item: object): Promise<T>;
|
|
79
|
-
createMany(items: object[]): Promise<T
|
|
85
|
+
createMany(items: object[]): Promise<MultiStatusCreateResult<T>>;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
/**
|