@attlaz/client 1.109.0 → 1.110.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/dist/MarketPulse/Service/CrawlJobEndpoint.d.ts +4 -5
- package/dist/MarketPulse/Service/CrawlJobEndpoint.js +7 -9
- package/dist/MarketPulse/Service/IndexJobEndpoint.d.ts +5 -4
- package/dist/MarketPulse/Service/IndexJobEndpoint.js +8 -8
- package/dist/MarketPulse/Service/ProductMatchJobEndpoint.d.ts +5 -4
- package/dist/MarketPulse/Service/ProductMatchJobEndpoint.js +8 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -20,15 +20,14 @@ export declare class CrawlJobEndpoint extends Endpoint {
|
|
|
20
20
|
create(vendorId: string, isPartial?: boolean): Promise<CrawlJob>;
|
|
21
21
|
/** Update a crawl job's status ('started', 'finished', 'cancelled'). */
|
|
22
22
|
updateStatus(crawlJobId: string, status: CrawlJobStatus): Promise<CrawlJob>;
|
|
23
|
-
/** A vendor's crawl jobs (newest first), each with progress (`total` / `processed`). */
|
|
24
|
-
getByVendor(vendorId: string, pagination?: CursorPagination | null): Promise<CollectionResult<CrawlJob>>;
|
|
25
23
|
/**
|
|
26
|
-
* Crawl jobs across every competitor of a catalog (newest first)
|
|
24
|
+
* Crawl jobs across every competitor of a catalog (newest first), each with progress
|
|
25
|
+
* (`total` / `processed`). Pass `vendorId` to narrow to one competitor.
|
|
27
26
|
*
|
|
28
27
|
* A crawl job belongs to a vendor, not to a catalog — the API resolves the catalog's competitors
|
|
29
|
-
* and returns the jobs of their vendors.
|
|
28
|
+
* and returns the jobs of their vendors. A `vendorId` outside this catalog is rejected.
|
|
30
29
|
*/
|
|
31
|
-
getByCatalog(catalogId: CatalogId | string, pagination?: CursorPagination | null): Promise<CollectionResult<CrawlJob>>;
|
|
30
|
+
getByCatalog(catalogId: CatalogId | string, pagination?: CursorPagination | null, vendorId?: string | null): Promise<CollectionResult<CrawlJob>>;
|
|
32
31
|
/** The crawl job with this id, or null. */
|
|
33
32
|
getById(crawlJobId: string): Promise<CrawlJob | null>;
|
|
34
33
|
/** Register the pages this crawl will process (idempotent server-side). */
|
|
@@ -33,21 +33,19 @@ export class CrawlJobEndpoint extends Endpoint {
|
|
|
33
33
|
}
|
|
34
34
|
return job;
|
|
35
35
|
}
|
|
36
|
-
/** A vendor's crawl jobs (newest first), each with progress (`total` / `processed`). */
|
|
37
|
-
async getByVendor(vendorId, pagination = null) {
|
|
38
|
-
const queryString = new QueryString(path('/pulse/vendors/:vendorId/crawl-jobs', { vendorId }));
|
|
39
|
-
queryString.addPagination(pagination);
|
|
40
|
-
return await this.requestCollection(queryString, CrawlJob.parse);
|
|
41
|
-
}
|
|
42
36
|
/**
|
|
43
|
-
* Crawl jobs across every competitor of a catalog (newest first)
|
|
37
|
+
* Crawl jobs across every competitor of a catalog (newest first), each with progress
|
|
38
|
+
* (`total` / `processed`). Pass `vendorId` to narrow to one competitor.
|
|
44
39
|
*
|
|
45
40
|
* A crawl job belongs to a vendor, not to a catalog — the API resolves the catalog's competitors
|
|
46
|
-
* and returns the jobs of their vendors.
|
|
41
|
+
* and returns the jobs of their vendors. A `vendorId` outside this catalog is rejected.
|
|
47
42
|
*/
|
|
48
|
-
async getByCatalog(catalogId, pagination = null) {
|
|
43
|
+
async getByCatalog(catalogId, pagination = null, vendorId = null) {
|
|
49
44
|
const queryString = new QueryString(path('/pulse/catalogs/:catalogId/crawl-jobs', { catalogId: catalogId.toString() }));
|
|
50
45
|
queryString.addPagination(pagination);
|
|
46
|
+
if (vendorId !== null) {
|
|
47
|
+
queryString.set('vendor', vendorId);
|
|
48
|
+
}
|
|
51
49
|
return await this.requestCollection(queryString, CrawlJob.parse);
|
|
52
50
|
}
|
|
53
51
|
/** The crawl job with this id, or null. */
|
|
@@ -9,10 +9,11 @@ import { VendorStatus } from '../Model/VendorStatus.js';
|
|
|
9
9
|
* can be matched — and the resulting per-vendor freshness status.
|
|
10
10
|
*/
|
|
11
11
|
export declare class IndexJobEndpoint extends Endpoint {
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Index jobs across every competitor of a catalog, newest first. Pass `vendorId` to narrow to one
|
|
14
|
+
* competitor; a vendor outside this catalog is rejected.
|
|
15
|
+
*/
|
|
16
|
+
getByCatalog(catalogId: CatalogId | string, pagination?: CursorPagination | null, vendorId?: string | null): Promise<CollectionResult<IndexJob>>;
|
|
16
17
|
/** Queue a re-index of a competitor's products, so later matching sees current data. */
|
|
17
18
|
requestReindex(catalogId: CatalogId | string, vendorId: string): Promise<void>;
|
|
18
19
|
/** How fresh a competitor's index and matches are, plus any match job running right now. */
|
|
@@ -8,16 +8,16 @@ import { VendorStatus } from '../Model/VendorStatus.js';
|
|
|
8
8
|
* can be matched — and the resulting per-vendor freshness status.
|
|
9
9
|
*/
|
|
10
10
|
export class IndexJobEndpoint extends Endpoint {
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Index jobs across every competitor of a catalog, newest first. Pass `vendorId` to narrow to one
|
|
13
|
+
* competitor; a vendor outside this catalog is rejected.
|
|
14
|
+
*/
|
|
15
|
+
async getByCatalog(catalogId, pagination = null, vendorId = null) {
|
|
13
16
|
const queryString = new QueryString(path('/pulse/catalogs/:catalogId/index-jobs', { catalogId: catalogId.toString() }));
|
|
14
17
|
queryString.addPagination(pagination);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
async getByVendor(catalogId, vendorId, pagination = null) {
|
|
19
|
-
const queryString = new QueryString(path('/pulse/catalogs/:catalogId/vendors/:vendorId/index-jobs', { catalogId: catalogId.toString(), vendorId }));
|
|
20
|
-
queryString.addPagination(pagination);
|
|
18
|
+
if (vendorId !== null) {
|
|
19
|
+
queryString.set('vendor', vendorId);
|
|
20
|
+
}
|
|
21
21
|
return await this.requestCollection(queryString, IndexJob.parse);
|
|
22
22
|
}
|
|
23
23
|
/** Queue a re-index of a competitor's products, so later matching sees current data. */
|
|
@@ -8,10 +8,11 @@ import { Endpoint } from '../../Service/Endpoint.js';
|
|
|
8
8
|
* so they share {@link ProductMatchJob}.
|
|
9
9
|
*/
|
|
10
10
|
export declare class ProductMatchJobEndpoint extends Endpoint {
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Every match job of a catalog, newest first. Pass `vendorId` to narrow to one of its
|
|
13
|
+
* competitors; a vendor outside this catalog is rejected.
|
|
14
|
+
*/
|
|
15
|
+
getByCatalog(catalogId: CatalogId | string, pagination?: CursorPagination | null, vendorId?: string | null): Promise<CollectionResult<ProductMatchJob>>;
|
|
15
16
|
/** Queue a matching run of the catalog against one competitor. */
|
|
16
17
|
requestMatching(catalogId: CatalogId | string, vendorId: string): Promise<void>;
|
|
17
18
|
/** The match job with this id, or null. */
|
|
@@ -7,16 +7,16 @@ import { Endpoint } from '../../Service/Endpoint.js';
|
|
|
7
7
|
* so they share {@link ProductMatchJob}.
|
|
8
8
|
*/
|
|
9
9
|
export class ProductMatchJobEndpoint extends Endpoint {
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Every match job of a catalog, newest first. Pass `vendorId` to narrow to one of its
|
|
12
|
+
* competitors; a vendor outside this catalog is rejected.
|
|
13
|
+
*/
|
|
14
|
+
async getByCatalog(catalogId, pagination = null, vendorId = null) {
|
|
12
15
|
const queryString = new QueryString(path('/pulse/catalogs/:catalogId/match-jobs', { catalogId: catalogId.toString() }));
|
|
13
16
|
queryString.addPagination(pagination);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
async getByVendor(catalogId, vendorId, pagination = null) {
|
|
18
|
-
const queryString = new QueryString(path('/pulse/catalogs/:catalogId/vendors/:vendorId/match-jobs', { catalogId: catalogId.toString(), vendorId }));
|
|
19
|
-
queryString.addPagination(pagination);
|
|
17
|
+
if (vendorId !== null) {
|
|
18
|
+
queryString.set('vendor', vendorId);
|
|
19
|
+
}
|
|
20
20
|
return await this.requestCollection(queryString, ProductMatchJob.parse);
|
|
21
21
|
}
|
|
22
22
|
/** Queue a matching run of the catalog against one competitor. */
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.109.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.109.0";
|