@redonvn/redai-tool 1.0.0 → 1.0.1

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/index.d.mts CHANGED
@@ -27,6 +27,7 @@ interface RedaiToolClientConfig {
27
27
  interface RequestOptions {
28
28
  timeout?: number;
29
29
  headers?: Record<string, string>;
30
+ params?: Record<string, any>;
30
31
  signal?: AbortSignal;
31
32
  }
32
33
  interface BaseApiResponse<T = any> {
@@ -144,22 +145,45 @@ interface GoogleSearchDetailResponse {
144
145
  declare class GoogleSearchModule {
145
146
  private readonly http;
146
147
  constructor(http: AxiosInstance);
148
+ /**
149
+ * Chuẩn hóa kết quả cào từ phản hồi DirectSearchResponse của FastAPI
150
+ */
151
+ private normalizeScrapeResponse;
147
152
  /**
148
153
  * Tìm kiếm danh sách kết quả nhanh trên Google (không crawl sâu chi tiết)
154
+ * Chuẩn REST endpoint: POST /api/google-search/list
149
155
  */
150
156
  list(request: GoogleSearchListRequest, options?: RequestOptions): Promise<GoogleSearchListResponse>;
151
157
  /**
152
158
  * Tìm kiếm Google và bóc tách thông tin liên hệ đa kênh (Hotline, Zalo, FB, Shopee, App, Bộ Công Thương...)
159
+ * Chuẩn REST endpoint: POST /api/google-search/search
153
160
  */
154
161
  scrape(request: GoogleSearchScrapeRequest, options?: RequestOptions): Promise<GoogleSearchScrapeResponse>;
155
162
  /**
156
163
  * Bóc tách thông tin liên hệ và tóm tắt AI trực tiếp từ một danh sách các URL website
164
+ * Chuẩn REST endpoint: POST /api/google-search/detail
157
165
  */
158
166
  scrapeDetails(request: GoogleSearchDetailRequest, options?: RequestOptions): Promise<GoogleSearchDetailResponse>;
159
167
  /**
160
168
  * Stream SSE kết quả tìm kiếm và bóc tách theo thời gian thực
169
+ * Chuẩn REST endpoint: GET /api/google-search/stream
161
170
  */
162
171
  stream(request: GoogleSearchScrapeRequest, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
172
+ /**
173
+ * Tạo background job cào tìm kiếm Google
174
+ * Chuẩn REST endpoint: POST /api/google-search/jobs
175
+ */
176
+ createJob(request: GoogleSearchScrapeRequest, options?: RequestOptions): Promise<any>;
177
+ /**
178
+ * Kiểm tra trạng thái job cào tìm kiếm Google
179
+ * Chuẩn REST endpoint: GET /api/google-search/jobs/{job_id}
180
+ */
181
+ getJobStatus(jobId: string, options?: RequestOptions): Promise<any>;
182
+ /**
183
+ * Xuất file CSV/Excel kết quả cào tìm kiếm Google (trả về Buffer)
184
+ * Chuẩn REST endpoint: GET /api/google-search/jobs/{job_id}/export
185
+ */
186
+ exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
163
187
  }
164
188
 
165
189
  /**
@@ -204,22 +228,37 @@ interface GMapPlaceItem {
204
228
  }
205
229
  interface GMapJobCreateResponse {
206
230
  job_id: string;
207
- status: string;
231
+ status?: string;
208
232
  message?: string;
233
+ check_status_url?: string;
209
234
  }
210
235
  interface GMapJobStatusResponse {
236
+ job_id?: string;
211
237
  status: 'pending' | 'processing' | 'completed' | 'failed' | string;
238
+ query?: string;
212
239
  progress?: string;
213
240
  total_found?: number;
241
+ total_scraped?: number;
242
+ total_filtered?: number;
243
+ errors_count?: number;
244
+ data?: GMapPlaceItem[];
214
245
  error?: string;
215
246
  }
216
247
  interface GMapJobResultsResponse {
217
248
  job_id: string;
218
- total_results: number;
219
- places: GMapPlaceItem[];
249
+ status?: string;
250
+ query?: string;
251
+ total_found?: number;
252
+ total_scraped?: number;
253
+ total_filtered?: number;
254
+ total_results?: number;
255
+ places?: GMapPlaceItem[];
256
+ results?: GMapPlaceItem[];
220
257
  }
221
258
  interface GMapGeocodeAddressRequest {
222
259
  address: string;
260
+ origin?: string;
261
+ max_results?: number;
223
262
  }
224
263
  interface GMapGeocodeResponse {
225
264
  success: boolean;
@@ -234,13 +273,16 @@ interface GMapGeocodeResponse {
234
273
  raw?: any;
235
274
  }
236
275
  interface GMapReverseGeocodeRequest {
237
- latitude: number;
238
- longitude: number;
276
+ lat?: number | string;
277
+ lng?: number | string;
278
+ latitude?: number | string;
279
+ longitude?: number | string;
280
+ origin?: string;
239
281
  }
240
282
  interface GMapReverseGeocodeResponse {
241
283
  success: boolean;
242
- latitude: number;
243
- longitude: number;
284
+ latitude?: number;
285
+ longitude?: number;
244
286
  formatted_address?: string;
245
287
  ward?: string;
246
288
  district?: string;
@@ -253,14 +295,14 @@ interface GMapUniversalParseRequest {
253
295
  }
254
296
  interface GMapUniversalParseResponse {
255
297
  success: boolean;
256
- original: string;
257
- normalized?: string;
298
+ raw_address: string;
258
299
  house_number?: string;
259
300
  street?: string;
260
301
  ward?: string;
261
302
  district?: string;
303
+ city?: string;
262
304
  province?: string;
263
- country?: string;
305
+ standardized_address?: string;
264
306
  }
265
307
 
266
308
  declare class GoogleMapsModule {
@@ -268,40 +310,70 @@ declare class GoogleMapsModule {
268
310
  constructor(http: AxiosInstance);
269
311
  /**
270
312
  * Tạo background job cào dữ liệu Google Maps
313
+ * Chuẩn REST endpoint: POST /api/map/scrape/async
271
314
  */
272
315
  createJob(payload: GMapScrapeRequestPayload, options?: RequestOptions): Promise<GMapJobCreateResponse>;
273
316
  /**
274
317
  * Kiểm tra trạng thái và tiến độ của job cào Google Maps
318
+ * Chuẩn REST endpoint: GET /api/map/scrape/status/{job_id}
275
319
  */
276
320
  getJobStatus(jobId: string, options?: RequestOptions): Promise<GMapJobStatusResponse>;
277
321
  /**
278
322
  * Lấy danh sách kết quả địa điểm thu thập được từ job
323
+ * Dữ liệu nằm trong trường `data` của job status
279
324
  */
280
325
  getJobResults(jobId: string, options?: RequestOptions): Promise<GMapJobResultsResponse>;
281
326
  /**
282
- * Xuất kết quả cào Maps dạng file CSV (trả về Buffer)
327
+ * Stream SSE tiến độ cào Google Maps theo thời gian thực
328
+ * Chuẩn REST endpoint: POST /api/map/scrape/stream
283
329
  */
284
- exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
330
+ streamJob(payload: GMapScrapeRequestPayload, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
285
331
  /**
286
- * Xuất kết quả cào Maps dạng file Excel XLSX (trả về Buffer)
332
+ * Tìm kiếm & gợi ý tối đa 3 địa chỉ chuẩn hóa (Search & Suggest)
333
+ * Chuẩn REST endpoint: POST /api/map/search
287
334
  */
288
- exportExcel(jobId: string, options?: RequestOptions): Promise<Buffer>;
335
+ search(req: {
336
+ address: string;
337
+ origin?: string;
338
+ max_results?: number;
339
+ }, options?: RequestOptions): Promise<any>;
289
340
  /**
290
- * Stream SSE tiến độ cào Google Maps theo thời gian thực
341
+ * Giải mã tọa độ GPS sang địa chỉ Google & Goong Maps (Reverse Geocode)
342
+ * Chuẩn REST endpoint: POST /api/map/reverse
291
343
  */
292
- streamJob(jobId: string, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
344
+ reverse(req: {
345
+ lat?: number | string;
346
+ lng?: number | string;
347
+ latitude?: number | string;
348
+ longitude?: number | string;
349
+ origin?: string;
350
+ }, options?: RequestOptions): Promise<any>;
293
351
  /**
294
- * Geocode địa chỉ văn bản thành tọa độ và các cấp hành chính Việt Nam
352
+ * Tra cứu chi tiết địa điểm Place Details
353
+ * Chuẩn REST endpoint: POST /api/map/lookup
295
354
  */
296
- geocodeAddress(address: string | GMapGeocodeAddressRequest, options?: RequestOptions): Promise<GMapGeocodeResponse>;
355
+ lookup(req: {
356
+ place_id?: string;
357
+ url?: string;
358
+ query?: string;
359
+ origin?: string;
360
+ }, options?: RequestOptions): Promise<any>;
297
361
  /**
298
- * Reverse geocode tọa độ ra địa chỉ Việt Nam
362
+ * Lấy chi tiết địa điểm Google Maps
363
+ * Chuẩn REST endpoint: POST /api/map/place/detail
299
364
  */
300
- reverseGeocode(req: GMapReverseGeocodeRequest, options?: RequestOptions): Promise<GMapReverseGeocodeResponse>;
365
+ getPlaceDetail(req: {
366
+ url?: string;
367
+ place_id?: string;
368
+ }, options?: RequestOptions): Promise<any>;
369
+ /**
370
+ * Geocode địa chỉ văn bản thành tọa độ (Alias cho search)
371
+ */
372
+ geocodeAddress(address: string | GMapGeocodeAddressRequest, options?: RequestOptions): Promise<GMapGeocodeResponse>;
301
373
  /**
302
- * Chuẩn hóa và bóc tách địa chỉ đa năng (Số nhà, đường, phường xã, quận huyện, tỉnh thành)
374
+ * Reverse geocode tọa độ ra địa chỉ Việt Nam (Alias cho reverse)
303
375
  */
304
- parseAddressUniversal(req: GMapUniversalParseRequest, options?: RequestOptions): Promise<GMapUniversalParseResponse>;
376
+ reverseGeocode(req: GMapReverseGeocodeRequest, options?: RequestOptions): Promise<GMapReverseGeocodeResponse>;
305
377
  }
306
378
 
307
379
  /**
@@ -359,6 +431,7 @@ interface SocialTracerJobStatusResponse {
359
431
  interface SocialTracerJobResultsResponse {
360
432
  job_id: string;
361
433
  username: string;
434
+ status?: string;
362
435
  total_results: number;
363
436
  results: SocialTracerResultItem[];
364
437
  }
@@ -368,22 +441,27 @@ declare class SocialTracerModule {
368
441
  constructor(http: AxiosInstance);
369
442
  /**
370
443
  * Lấy danh sách hơn 400+ nền tảng mạng xã hội được hỗ trợ truy vết
444
+ * Chuẩn REST endpoint: GET /api/social-tracer/platforms
371
445
  */
372
446
  getPlatforms(options?: RequestOptions): Promise<SocialTracerPlatformsResponse>;
373
447
  /**
374
448
  * Truy vết đồng bộ danh tính mạng xã hội theo username trên hàng trăm trang
449
+ * Chuẩn REST endpoint: POST /api/social-tracer/search
375
450
  */
376
451
  traceSync(payload: SocialTracerSyncRequestPayload, options?: RequestOptions): Promise<SocialTracerSyncResponse>;
377
452
  /**
378
453
  * Stream SSE quá trình truy vết mạng xã hội thời gian thực
454
+ * Chuẩn REST endpoint: GET /api/social-tracer/stream
379
455
  */
380
456
  streamTrace(payload: SocialTracerSyncRequestPayload, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
381
457
  /**
382
458
  * Tạo background job truy vết danh tính mạng xã hội
459
+ * Chuẩn REST endpoint: POST /api/social-tracer/jobs
383
460
  */
384
461
  createJob(payload: SocialTracerJobCreatePayload, options?: RequestOptions): Promise<SocialTracerJobCreateResponse>;
385
462
  /**
386
463
  * Kiểm tra trạng thái job truy vết
464
+ * Chuẩn REST endpoint: GET /api/social-tracer/jobs/{job_id}
387
465
  */
388
466
  getJobStatus(jobId: string, options?: RequestOptions): Promise<SocialTracerJobStatusResponse>;
389
467
  /**
@@ -392,6 +470,7 @@ declare class SocialTracerModule {
392
470
  getJobResults(jobId: string, options?: RequestOptions): Promise<SocialTracerJobResultsResponse>;
393
471
  /**
394
472
  * Xuất file CSV kết quả truy vết mạng xã hội (trả về Buffer)
473
+ * Chuẩn REST endpoint: GET /api/social-tracer/jobs/{job_id}/export
395
474
  */
396
475
  exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
397
476
  }
@@ -566,10 +645,12 @@ declare class IpGeolocationModule {
566
645
  constructor(http: AxiosInstance);
567
646
  /**
568
647
  * Tra cứu vị trí địa lý, tọa độ GPS (lat, lon) và nhà mạng ISP từ 1 hoặc nhiều IP
648
+ * Chuẩn REST endpoint: POST /api/ip-location/check
569
649
  */
570
650
  lookup(request: string | string[] | IpLookupRequest, options?: RequestOptions): Promise<IpLocationResponse>;
571
651
  /**
572
652
  * Tự động lấy IP Public hiện tại của client / server và vị trí địa lý
653
+ * Chuẩn REST endpoint: GET /api/ip-location/my-ip
573
654
  */
574
655
  getMyPublicIp(options?: RequestOptions): Promise<IpLocationItem>;
575
656
  }
@@ -612,10 +693,12 @@ declare class ImageCompareModule {
612
693
  constructor(http: AxiosInstance);
613
694
  /**
614
695
  * So sánh nội dung & độ tương đồng giữa 2 bức ảnh (qua URL hoặc Base64)
696
+ * Chuẩn REST endpoint: POST /api/image-compare/compare
615
697
  */
616
698
  compare(request: CompareImagesRequest, options?: RequestOptions): Promise<CompareImagesResponse>;
617
699
  /**
618
700
  * Chụp màn hình 2 trang web và so sánh độ lệch UI (Visual Regression Testing)
701
+ * Chuẩn REST endpoint: POST /api/image-compare/compare-webpages
619
702
  */
620
703
  compareWebpages(request: CompareWebpagesRequest, options?: RequestOptions): Promise<CompareImagesResponse>;
621
704
  }
@@ -666,14 +749,21 @@ interface WebQaAuditResponse {
666
749
  declare class WebQaModule {
667
750
  private readonly http;
668
751
  constructor(http: AxiosInstance);
669
- /**
670
- * Hỏi đáp AI dựa trên nội dung được cào trực tiếp từ URL website
671
- */
672
- ask(request: WebQaAskRequest, options?: RequestOptions): Promise<WebQaAskResponse>;
673
752
  /**
674
753
  * Chạy audit toàn diện 5 lớp chuẩn QA/Tester cho website (SEO, Accessibility, Console errors, Broken links)
754
+ * Chuẩn REST endpoint: POST /api/web-qa/audit
675
755
  */
676
756
  audit(request: WebQaAuditRequest, options?: RequestOptions): Promise<WebQaAuditResponse>;
757
+ /**
758
+ * Thực thi kịch bản tương tác E2E (Click, Fill, Hover, Scroll) & Giám sát lỗi
759
+ * Chuẩn REST endpoint: POST /api/web-qa/interact
760
+ */
761
+ interact(request: any, options?: RequestOptions): Promise<any>;
762
+ /**
763
+ * Chaos Auto-Fuzzing: Tự động quét và click thử các nút/tab an toàn
764
+ * Chuẩn REST endpoint: POST /api/web-qa/fuzz
765
+ */
766
+ fuzz(request: any, options?: RequestOptions): Promise<any>;
677
767
  }
678
768
 
679
769
  /**
@@ -706,13 +796,15 @@ declare class ScreenshotModule {
706
796
  private readonly http;
707
797
  constructor(http: AxiosInstance);
708
798
  /**
709
- * Chụp ảnh màn hình website (hỗ trợ full-page, kích thước tùy chỉnh)
799
+ * Chụp ảnh màn hình website / MiniApp
800
+ * Chuẩn REST endpoint: POST /api/screenshot/capture
710
801
  */
711
802
  capture(request: PageScreenshotRequest, options?: RequestOptions): Promise<PageScreenshotResponse>;
712
803
  /**
713
- * Chụp ảnh màn hình và trả về trực tiếp binary Buffer ảnh
804
+ * Chẩn đoán F12 console logs & network trang web
805
+ * Chuẩn REST endpoint: POST /api/screenshot/diagnose
714
806
  */
715
- captureAsBuffer(request: PageScreenshotRequest, options?: RequestOptions): Promise<Buffer>;
807
+ diagnose(request: any, options?: RequestOptions): Promise<any>;
716
808
  }
717
809
 
718
810
  declare class RedaiToolClient {
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ interface RedaiToolClientConfig {
27
27
  interface RequestOptions {
28
28
  timeout?: number;
29
29
  headers?: Record<string, string>;
30
+ params?: Record<string, any>;
30
31
  signal?: AbortSignal;
31
32
  }
32
33
  interface BaseApiResponse<T = any> {
@@ -144,22 +145,45 @@ interface GoogleSearchDetailResponse {
144
145
  declare class GoogleSearchModule {
145
146
  private readonly http;
146
147
  constructor(http: AxiosInstance);
148
+ /**
149
+ * Chuẩn hóa kết quả cào từ phản hồi DirectSearchResponse của FastAPI
150
+ */
151
+ private normalizeScrapeResponse;
147
152
  /**
148
153
  * Tìm kiếm danh sách kết quả nhanh trên Google (không crawl sâu chi tiết)
154
+ * Chuẩn REST endpoint: POST /api/google-search/list
149
155
  */
150
156
  list(request: GoogleSearchListRequest, options?: RequestOptions): Promise<GoogleSearchListResponse>;
151
157
  /**
152
158
  * Tìm kiếm Google và bóc tách thông tin liên hệ đa kênh (Hotline, Zalo, FB, Shopee, App, Bộ Công Thương...)
159
+ * Chuẩn REST endpoint: POST /api/google-search/search
153
160
  */
154
161
  scrape(request: GoogleSearchScrapeRequest, options?: RequestOptions): Promise<GoogleSearchScrapeResponse>;
155
162
  /**
156
163
  * Bóc tách thông tin liên hệ và tóm tắt AI trực tiếp từ một danh sách các URL website
164
+ * Chuẩn REST endpoint: POST /api/google-search/detail
157
165
  */
158
166
  scrapeDetails(request: GoogleSearchDetailRequest, options?: RequestOptions): Promise<GoogleSearchDetailResponse>;
159
167
  /**
160
168
  * Stream SSE kết quả tìm kiếm và bóc tách theo thời gian thực
169
+ * Chuẩn REST endpoint: GET /api/google-search/stream
161
170
  */
162
171
  stream(request: GoogleSearchScrapeRequest, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
172
+ /**
173
+ * Tạo background job cào tìm kiếm Google
174
+ * Chuẩn REST endpoint: POST /api/google-search/jobs
175
+ */
176
+ createJob(request: GoogleSearchScrapeRequest, options?: RequestOptions): Promise<any>;
177
+ /**
178
+ * Kiểm tra trạng thái job cào tìm kiếm Google
179
+ * Chuẩn REST endpoint: GET /api/google-search/jobs/{job_id}
180
+ */
181
+ getJobStatus(jobId: string, options?: RequestOptions): Promise<any>;
182
+ /**
183
+ * Xuất file CSV/Excel kết quả cào tìm kiếm Google (trả về Buffer)
184
+ * Chuẩn REST endpoint: GET /api/google-search/jobs/{job_id}/export
185
+ */
186
+ exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
163
187
  }
164
188
 
165
189
  /**
@@ -204,22 +228,37 @@ interface GMapPlaceItem {
204
228
  }
205
229
  interface GMapJobCreateResponse {
206
230
  job_id: string;
207
- status: string;
231
+ status?: string;
208
232
  message?: string;
233
+ check_status_url?: string;
209
234
  }
210
235
  interface GMapJobStatusResponse {
236
+ job_id?: string;
211
237
  status: 'pending' | 'processing' | 'completed' | 'failed' | string;
238
+ query?: string;
212
239
  progress?: string;
213
240
  total_found?: number;
241
+ total_scraped?: number;
242
+ total_filtered?: number;
243
+ errors_count?: number;
244
+ data?: GMapPlaceItem[];
214
245
  error?: string;
215
246
  }
216
247
  interface GMapJobResultsResponse {
217
248
  job_id: string;
218
- total_results: number;
219
- places: GMapPlaceItem[];
249
+ status?: string;
250
+ query?: string;
251
+ total_found?: number;
252
+ total_scraped?: number;
253
+ total_filtered?: number;
254
+ total_results?: number;
255
+ places?: GMapPlaceItem[];
256
+ results?: GMapPlaceItem[];
220
257
  }
221
258
  interface GMapGeocodeAddressRequest {
222
259
  address: string;
260
+ origin?: string;
261
+ max_results?: number;
223
262
  }
224
263
  interface GMapGeocodeResponse {
225
264
  success: boolean;
@@ -234,13 +273,16 @@ interface GMapGeocodeResponse {
234
273
  raw?: any;
235
274
  }
236
275
  interface GMapReverseGeocodeRequest {
237
- latitude: number;
238
- longitude: number;
276
+ lat?: number | string;
277
+ lng?: number | string;
278
+ latitude?: number | string;
279
+ longitude?: number | string;
280
+ origin?: string;
239
281
  }
240
282
  interface GMapReverseGeocodeResponse {
241
283
  success: boolean;
242
- latitude: number;
243
- longitude: number;
284
+ latitude?: number;
285
+ longitude?: number;
244
286
  formatted_address?: string;
245
287
  ward?: string;
246
288
  district?: string;
@@ -253,14 +295,14 @@ interface GMapUniversalParseRequest {
253
295
  }
254
296
  interface GMapUniversalParseResponse {
255
297
  success: boolean;
256
- original: string;
257
- normalized?: string;
298
+ raw_address: string;
258
299
  house_number?: string;
259
300
  street?: string;
260
301
  ward?: string;
261
302
  district?: string;
303
+ city?: string;
262
304
  province?: string;
263
- country?: string;
305
+ standardized_address?: string;
264
306
  }
265
307
 
266
308
  declare class GoogleMapsModule {
@@ -268,40 +310,70 @@ declare class GoogleMapsModule {
268
310
  constructor(http: AxiosInstance);
269
311
  /**
270
312
  * Tạo background job cào dữ liệu Google Maps
313
+ * Chuẩn REST endpoint: POST /api/map/scrape/async
271
314
  */
272
315
  createJob(payload: GMapScrapeRequestPayload, options?: RequestOptions): Promise<GMapJobCreateResponse>;
273
316
  /**
274
317
  * Kiểm tra trạng thái và tiến độ của job cào Google Maps
318
+ * Chuẩn REST endpoint: GET /api/map/scrape/status/{job_id}
275
319
  */
276
320
  getJobStatus(jobId: string, options?: RequestOptions): Promise<GMapJobStatusResponse>;
277
321
  /**
278
322
  * Lấy danh sách kết quả địa điểm thu thập được từ job
323
+ * Dữ liệu nằm trong trường `data` của job status
279
324
  */
280
325
  getJobResults(jobId: string, options?: RequestOptions): Promise<GMapJobResultsResponse>;
281
326
  /**
282
- * Xuất kết quả cào Maps dạng file CSV (trả về Buffer)
327
+ * Stream SSE tiến độ cào Google Maps theo thời gian thực
328
+ * Chuẩn REST endpoint: POST /api/map/scrape/stream
283
329
  */
284
- exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
330
+ streamJob(payload: GMapScrapeRequestPayload, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
285
331
  /**
286
- * Xuất kết quả cào Maps dạng file Excel XLSX (trả về Buffer)
332
+ * Tìm kiếm & gợi ý tối đa 3 địa chỉ chuẩn hóa (Search & Suggest)
333
+ * Chuẩn REST endpoint: POST /api/map/search
287
334
  */
288
- exportExcel(jobId: string, options?: RequestOptions): Promise<Buffer>;
335
+ search(req: {
336
+ address: string;
337
+ origin?: string;
338
+ max_results?: number;
339
+ }, options?: RequestOptions): Promise<any>;
289
340
  /**
290
- * Stream SSE tiến độ cào Google Maps theo thời gian thực
341
+ * Giải mã tọa độ GPS sang địa chỉ Google & Goong Maps (Reverse Geocode)
342
+ * Chuẩn REST endpoint: POST /api/map/reverse
291
343
  */
292
- streamJob(jobId: string, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
344
+ reverse(req: {
345
+ lat?: number | string;
346
+ lng?: number | string;
347
+ latitude?: number | string;
348
+ longitude?: number | string;
349
+ origin?: string;
350
+ }, options?: RequestOptions): Promise<any>;
293
351
  /**
294
- * Geocode địa chỉ văn bản thành tọa độ và các cấp hành chính Việt Nam
352
+ * Tra cứu chi tiết địa điểm Place Details
353
+ * Chuẩn REST endpoint: POST /api/map/lookup
295
354
  */
296
- geocodeAddress(address: string | GMapGeocodeAddressRequest, options?: RequestOptions): Promise<GMapGeocodeResponse>;
355
+ lookup(req: {
356
+ place_id?: string;
357
+ url?: string;
358
+ query?: string;
359
+ origin?: string;
360
+ }, options?: RequestOptions): Promise<any>;
297
361
  /**
298
- * Reverse geocode tọa độ ra địa chỉ Việt Nam
362
+ * Lấy chi tiết địa điểm Google Maps
363
+ * Chuẩn REST endpoint: POST /api/map/place/detail
299
364
  */
300
- reverseGeocode(req: GMapReverseGeocodeRequest, options?: RequestOptions): Promise<GMapReverseGeocodeResponse>;
365
+ getPlaceDetail(req: {
366
+ url?: string;
367
+ place_id?: string;
368
+ }, options?: RequestOptions): Promise<any>;
369
+ /**
370
+ * Geocode địa chỉ văn bản thành tọa độ (Alias cho search)
371
+ */
372
+ geocodeAddress(address: string | GMapGeocodeAddressRequest, options?: RequestOptions): Promise<GMapGeocodeResponse>;
301
373
  /**
302
- * Chuẩn hóa và bóc tách địa chỉ đa năng (Số nhà, đường, phường xã, quận huyện, tỉnh thành)
374
+ * Reverse geocode tọa độ ra địa chỉ Việt Nam (Alias cho reverse)
303
375
  */
304
- parseAddressUniversal(req: GMapUniversalParseRequest, options?: RequestOptions): Promise<GMapUniversalParseResponse>;
376
+ reverseGeocode(req: GMapReverseGeocodeRequest, options?: RequestOptions): Promise<GMapReverseGeocodeResponse>;
305
377
  }
306
378
 
307
379
  /**
@@ -359,6 +431,7 @@ interface SocialTracerJobStatusResponse {
359
431
  interface SocialTracerJobResultsResponse {
360
432
  job_id: string;
361
433
  username: string;
434
+ status?: string;
362
435
  total_results: number;
363
436
  results: SocialTracerResultItem[];
364
437
  }
@@ -368,22 +441,27 @@ declare class SocialTracerModule {
368
441
  constructor(http: AxiosInstance);
369
442
  /**
370
443
  * Lấy danh sách hơn 400+ nền tảng mạng xã hội được hỗ trợ truy vết
444
+ * Chuẩn REST endpoint: GET /api/social-tracer/platforms
371
445
  */
372
446
  getPlatforms(options?: RequestOptions): Promise<SocialTracerPlatformsResponse>;
373
447
  /**
374
448
  * Truy vết đồng bộ danh tính mạng xã hội theo username trên hàng trăm trang
449
+ * Chuẩn REST endpoint: POST /api/social-tracer/search
375
450
  */
376
451
  traceSync(payload: SocialTracerSyncRequestPayload, options?: RequestOptions): Promise<SocialTracerSyncResponse>;
377
452
  /**
378
453
  * Stream SSE quá trình truy vết mạng xã hội thời gian thực
454
+ * Chuẩn REST endpoint: GET /api/social-tracer/stream
379
455
  */
380
456
  streamTrace(payload: SocialTracerSyncRequestPayload, handlers: SseStreamHandlers, options?: RequestOptions): Promise<void>;
381
457
  /**
382
458
  * Tạo background job truy vết danh tính mạng xã hội
459
+ * Chuẩn REST endpoint: POST /api/social-tracer/jobs
383
460
  */
384
461
  createJob(payload: SocialTracerJobCreatePayload, options?: RequestOptions): Promise<SocialTracerJobCreateResponse>;
385
462
  /**
386
463
  * Kiểm tra trạng thái job truy vết
464
+ * Chuẩn REST endpoint: GET /api/social-tracer/jobs/{job_id}
387
465
  */
388
466
  getJobStatus(jobId: string, options?: RequestOptions): Promise<SocialTracerJobStatusResponse>;
389
467
  /**
@@ -392,6 +470,7 @@ declare class SocialTracerModule {
392
470
  getJobResults(jobId: string, options?: RequestOptions): Promise<SocialTracerJobResultsResponse>;
393
471
  /**
394
472
  * Xuất file CSV kết quả truy vết mạng xã hội (trả về Buffer)
473
+ * Chuẩn REST endpoint: GET /api/social-tracer/jobs/{job_id}/export
395
474
  */
396
475
  exportCsv(jobId: string, options?: RequestOptions): Promise<Buffer>;
397
476
  }
@@ -566,10 +645,12 @@ declare class IpGeolocationModule {
566
645
  constructor(http: AxiosInstance);
567
646
  /**
568
647
  * Tra cứu vị trí địa lý, tọa độ GPS (lat, lon) và nhà mạng ISP từ 1 hoặc nhiều IP
648
+ * Chuẩn REST endpoint: POST /api/ip-location/check
569
649
  */
570
650
  lookup(request: string | string[] | IpLookupRequest, options?: RequestOptions): Promise<IpLocationResponse>;
571
651
  /**
572
652
  * Tự động lấy IP Public hiện tại của client / server và vị trí địa lý
653
+ * Chuẩn REST endpoint: GET /api/ip-location/my-ip
573
654
  */
574
655
  getMyPublicIp(options?: RequestOptions): Promise<IpLocationItem>;
575
656
  }
@@ -612,10 +693,12 @@ declare class ImageCompareModule {
612
693
  constructor(http: AxiosInstance);
613
694
  /**
614
695
  * So sánh nội dung & độ tương đồng giữa 2 bức ảnh (qua URL hoặc Base64)
696
+ * Chuẩn REST endpoint: POST /api/image-compare/compare
615
697
  */
616
698
  compare(request: CompareImagesRequest, options?: RequestOptions): Promise<CompareImagesResponse>;
617
699
  /**
618
700
  * Chụp màn hình 2 trang web và so sánh độ lệch UI (Visual Regression Testing)
701
+ * Chuẩn REST endpoint: POST /api/image-compare/compare-webpages
619
702
  */
620
703
  compareWebpages(request: CompareWebpagesRequest, options?: RequestOptions): Promise<CompareImagesResponse>;
621
704
  }
@@ -666,14 +749,21 @@ interface WebQaAuditResponse {
666
749
  declare class WebQaModule {
667
750
  private readonly http;
668
751
  constructor(http: AxiosInstance);
669
- /**
670
- * Hỏi đáp AI dựa trên nội dung được cào trực tiếp từ URL website
671
- */
672
- ask(request: WebQaAskRequest, options?: RequestOptions): Promise<WebQaAskResponse>;
673
752
  /**
674
753
  * Chạy audit toàn diện 5 lớp chuẩn QA/Tester cho website (SEO, Accessibility, Console errors, Broken links)
754
+ * Chuẩn REST endpoint: POST /api/web-qa/audit
675
755
  */
676
756
  audit(request: WebQaAuditRequest, options?: RequestOptions): Promise<WebQaAuditResponse>;
757
+ /**
758
+ * Thực thi kịch bản tương tác E2E (Click, Fill, Hover, Scroll) & Giám sát lỗi
759
+ * Chuẩn REST endpoint: POST /api/web-qa/interact
760
+ */
761
+ interact(request: any, options?: RequestOptions): Promise<any>;
762
+ /**
763
+ * Chaos Auto-Fuzzing: Tự động quét và click thử các nút/tab an toàn
764
+ * Chuẩn REST endpoint: POST /api/web-qa/fuzz
765
+ */
766
+ fuzz(request: any, options?: RequestOptions): Promise<any>;
677
767
  }
678
768
 
679
769
  /**
@@ -706,13 +796,15 @@ declare class ScreenshotModule {
706
796
  private readonly http;
707
797
  constructor(http: AxiosInstance);
708
798
  /**
709
- * Chụp ảnh màn hình website (hỗ trợ full-page, kích thước tùy chỉnh)
799
+ * Chụp ảnh màn hình website / MiniApp
800
+ * Chuẩn REST endpoint: POST /api/screenshot/capture
710
801
  */
711
802
  capture(request: PageScreenshotRequest, options?: RequestOptions): Promise<PageScreenshotResponse>;
712
803
  /**
713
- * Chụp ảnh màn hình và trả về trực tiếp binary Buffer ảnh
804
+ * Chẩn đoán F12 console logs & network trang web
805
+ * Chuẩn REST endpoint: POST /api/screenshot/diagnose
714
806
  */
715
- captureAsBuffer(request: PageScreenshotRequest, options?: RequestOptions): Promise<Buffer>;
807
+ diagnose(request: any, options?: RequestOptions): Promise<any>;
716
808
  }
717
809
 
718
810
  declare class RedaiToolClient {