@mesh-sync/worker-backend-client 4.0.19 → 4.0.21
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/README.md +25 -0
- package/dist/client.d.ts +8 -0
- package/dist/client.js +10 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,6 +100,26 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
|
|
|
100
100
|
## Available Message Types
|
|
101
101
|
|
|
102
102
|
|
|
103
|
+
### analytics-collection-request
|
|
104
|
+
|
|
105
|
+
**Description:** Request to trigger a manual market data collection job.
|
|
106
|
+
Used for ad-hoc scraping of specific queries on marketplaces.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
**Method:** `client.analyticsCollectionRequest(data)`
|
|
110
|
+
|
|
111
|
+
**Payload Type:** `AnalyticsCollectionRequestMessage`
|
|
112
|
+
|
|
113
|
+
**Fields:**
|
|
114
|
+
|
|
115
|
+
- `marketplace` (string) [✗]: The marketplace to scrape (etsy, ebay, etc.)
|
|
116
|
+
|
|
117
|
+
- `query` (string) [✓]: The search query to use
|
|
118
|
+
|
|
119
|
+
- `options` (object) [✗]: Collection options (pages, filters, etc.)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
103
123
|
### backend-logging-event
|
|
104
124
|
|
|
105
125
|
**Description:** Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
|
|
@@ -1926,6 +1946,11 @@ new WorkerClient(config: WorkerClientConfig)
|
|
|
1926
1946
|
- Get the current status of a job
|
|
1927
1947
|
|
|
1928
1948
|
|
|
1949
|
+
- `analyticsCollectionRequest(data: AnalyticsCollectionRequestMessage): Promise<JobResponse>`
|
|
1950
|
+
- Request to trigger a manual market data collection job.
|
|
1951
|
+
Used for ad-hoc scraping of specific queries on marketplaces.
|
|
1952
|
+
|
|
1953
|
+
|
|
1929
1954
|
- `backendLoggingEvent(data: BackendLoggingEventMessage): Promise<JobResponse>`
|
|
1930
1955
|
- Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
|
|
1931
1956
|
This event is sent to ELK for centralized monitoring, alerting, and debugging.
|
package/dist/client.d.ts
CHANGED
|
@@ -37,6 +37,14 @@ export declare class WorkerClient {
|
|
|
37
37
|
* Get job status by job ID
|
|
38
38
|
*/
|
|
39
39
|
getJobStatus(jobId: string): Promise<JobStatus>;
|
|
40
|
+
/**
|
|
41
|
+
* Request to trigger a manual market data collection job.
|
|
42
|
+
Used for ad-hoc scraping of specific queries on marketplaces.
|
|
43
|
+
|
|
44
|
+
* @param data - The message payload
|
|
45
|
+
* @returns Job response with job ID
|
|
46
|
+
*/
|
|
47
|
+
analyticsCollectionRequest(data: types.AnalyticsCollectionRequestMessage): Promise<JobResponse>;
|
|
40
48
|
/**
|
|
41
49
|
* Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
|
|
42
50
|
This event is sent to ELK for centralized monitoring, alerting, and debugging.
|
package/dist/client.js
CHANGED
|
@@ -60,6 +60,16 @@ export class WorkerClient {
|
|
|
60
60
|
}
|
|
61
61
|
return await response.json();
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Request to trigger a manual market data collection job.
|
|
65
|
+
Used for ad-hoc scraping of specific queries on marketplaces.
|
|
66
|
+
|
|
67
|
+
* @param data - The message payload
|
|
68
|
+
* @returns Job response with job ID
|
|
69
|
+
*/
|
|
70
|
+
async analyticsCollectionRequest(data) {
|
|
71
|
+
return this.sendToQueue(types.MessageTypes.ANALYTICS_COLLECTION_REQUEST, data);
|
|
72
|
+
}
|
|
63
73
|
/**
|
|
64
74
|
* Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
|
|
65
75
|
This event is sent to ELK for centralized monitoring, alerting, and debugging.
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Message type constants
|
|
3
3
|
*/
|
|
4
4
|
export declare const MessageTypes: {
|
|
5
|
+
readonly ANALYTICS_COLLECTION_REQUEST: "analytics-collection-request";
|
|
5
6
|
readonly BACKEND_LOGGING_EVENT: "backend-logging-event";
|
|
6
7
|
readonly EKG_EDGE_BATCH_CREATE_COMPLETED: "ekg-edge-batch-create-completed";
|
|
7
8
|
readonly EKG_EDGE_BATCH_CREATE_REQUEST: "ekg-edge-batch-create-request";
|
|
@@ -61,6 +62,19 @@ export declare const MessageTypes: {
|
|
|
61
62
|
readonly WORKER_METRICS_ENRICHED_EVENT: "worker-metrics-enriched-event";
|
|
62
63
|
};
|
|
63
64
|
export type MessageType = typeof MessageTypes[keyof typeof MessageTypes];
|
|
65
|
+
/**
|
|
66
|
+
* Request to trigger a manual market data collection job.
|
|
67
|
+
Used for ad-hoc scraping of specific queries on marketplaces.
|
|
68
|
+
|
|
69
|
+
*/
|
|
70
|
+
export interface AnalyticsCollectionRequestMessage {
|
|
71
|
+
/** The marketplace to scrape (etsy, ebay, etc.) */
|
|
72
|
+
marketplace?: string;
|
|
73
|
+
/** The search query to use */
|
|
74
|
+
query: string;
|
|
75
|
+
/** Collection options (pages, filters, etc.) */
|
|
76
|
+
options?: Record<string, string | number | boolean>;
|
|
77
|
+
}
|
|
64
78
|
/**
|
|
65
79
|
* Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
|
|
66
80
|
This event is sent to ELK for centralized monitoring, alerting, and debugging.
|
package/dist/types.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Message type constants
|
|
4
4
|
*/
|
|
5
5
|
export const MessageTypes = {
|
|
6
|
+
ANALYTICS_COLLECTION_REQUEST: 'analytics-collection-request',
|
|
6
7
|
BACKEND_LOGGING_EVENT: 'backend-logging-event',
|
|
7
8
|
EKG_EDGE_BATCH_CREATE_COMPLETED: 'ekg-edge-batch-create-completed',
|
|
8
9
|
EKG_EDGE_BATCH_CREATE_REQUEST: 'ekg-edge-batch-create-request',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mesh-sync/worker-backend-client",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.21",
|
|
4
4
|
"description": "Auto-generated TypeScript client for worker-backend - provides type-safe methods for enqueueing jobs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|