@adobe/spacecat-shared-data-access 2.25.0 → 2.26.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,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.26.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.25.0...@adobe/spacecat-shared-data-access-v2.26.0) (2025-06-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added scrape client ([#814](https://github.com/adobe/spacecat-shared/issues/814)) ([fad6614](https://github.com/adobe/spacecat-shared/commit/fad6614672a046da5319e493cc7c26bfdc3993d2))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-data-access-v2.25.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.24.1...@adobe/spacecat-shared-data-access-v2.25.0) (2025-06-18)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -46,6 +46,7 @@ export interface ScrapeJob extends BaseModel {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface ScrapeJobCollection extends BaseCollection<ScrapeJob> {
|
|
49
|
+
allByBaseURL(baseURL: string): Promise<ScrapeJob[]>;
|
|
49
50
|
allByBaseURLAndProcessingType(baseURL: string, processingType: string): Promise<ScrapeJob[]>;
|
|
50
51
|
allByBaseURLAndProcessingTypeAndOptEnableJavascriptAndOptHideConsentBanner(
|
|
51
52
|
baseURL: string,
|
|
@@ -56,6 +57,7 @@ export interface ScrapeJobCollection extends BaseCollection<ScrapeJob> {
|
|
|
56
57
|
allByStartedAt(startDate: string): Promise<ScrapeJob[]>;
|
|
57
58
|
allByStatus(status: string): Promise<ScrapeJob[]>;
|
|
58
59
|
allByStatusAndUpdatedAt(status: string, updatedAt: string): Promise<ScrapeJob[]>;
|
|
60
|
+
findByBaseURL(baseURL: string): Promise<ScrapeJob[]>;
|
|
59
61
|
findByBaseURLAndProcessingType(baseURL: string, processingType: string): Promise<ScrapeJob[]>;
|
|
60
62
|
findByBaseURLAndProcessingTypeAndOptEnableJavascriptAndOptHideConsentBanner(
|
|
61
63
|
baseURL: string,
|
|
@@ -113,6 +113,10 @@ const schema = new SchemaBuilder(ScrapeJob, ScrapeJobCollection)
|
|
|
113
113
|
})
|
|
114
114
|
// access pattern: get all jobs sorted by startedAt
|
|
115
115
|
.addAllIndex(['startedAt'])
|
|
116
|
+
.addIndex(
|
|
117
|
+
{ composite: ['baseURL'] },
|
|
118
|
+
{ composite: ['processingType', 'startedAt'] },
|
|
119
|
+
)
|
|
116
120
|
// access pattern: get all jobs for a given baseURL and processingType,
|
|
117
121
|
// can be filtered by optEnableJavascript and optHideConsentBanner
|
|
118
122
|
// are solrted by startedAt
|