@hydrafetch/node-sdk 0.7.0 → 0.7.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/README.md CHANGED
@@ -127,7 +127,7 @@ tells the model which one you meant. The same works in a plain JSON Schema with
127
127
 
128
128
  ```ts
129
129
  const { links } = await hf.map('https://example.com', { limit: 1000 });
130
- const docs = links.filter((url) => url.includes('/docs/'));
130
+ const docs = links.map((l) => l.url).filter((url) => url.includes('/docs/'));
131
131
  ```
132
132
 
133
133
  `batchAndWait` and `crawlAndWait` submit a job and poll until it finishes.
package/dist/index.d.cts CHANGED
@@ -67,9 +67,14 @@ interface MapOptions {
67
67
  includeSubdomains?: boolean;
68
68
  ignoreQueryParameters?: boolean;
69
69
  }
70
+ interface MapLink {
71
+ url: string;
72
+ /** When the site's sitemap says the page last changed, or null when it does not say. */
73
+ lastmod: string | null;
74
+ }
70
75
  interface MapResult {
71
76
  url: string;
72
- links: string[];
77
+ links: MapLink[];
73
78
  count: number;
74
79
  total?: number;
75
80
  truncated?: boolean;
@@ -423,4 +428,4 @@ declare class HydrafetchTimeoutError extends HydrafetchError {
423
428
  constructor(message: string);
424
429
  }
425
430
 
426
- export { type BatchOptions, type BrandOptions, type BrandResult, type CompanyHiringChanges, type CrawlOptions, type ExtractItem, type ExtractOptions, type ExtractResult, type ExtractSchema, type Format, type HiringChangePosting, type HiringChangesOptions, type HiringCounts, Hydrafetch, HydrafetchError, type HydrafetchOptions, HydrafetchTimeoutError, type ImagesResult, type JobPage, type JobPay, type JobResult, type JobStatus, type Location, type LogoResult, type MapOptions, type MapResult, type NewsArticle, type NewsOptions, type NewsResult, type NewsTimeRange, type OpenJob, type PageImage, type PageMetadata, type RateResultInput, type RateResultResponse, type ResultFeedbackReason, type ResultRating, type ScrapeBase, type ScrapeContent, type ScrapeOptions, type ScrapeResult, type ScreenshotOptions, type ScreenshotResult, type SearchJobsOptions, type SearchOptions, type SearchResult, type SearchResultItem, type StyleguideOptions, type StyleguideResult, type Usage, type WaitOptions, type ZodLike };
431
+ export { type BatchOptions, type BrandOptions, type BrandResult, type CompanyHiringChanges, type CrawlOptions, type ExtractItem, type ExtractOptions, type ExtractResult, type ExtractSchema, type Format, type HiringChangePosting, type HiringChangesOptions, type HiringCounts, Hydrafetch, HydrafetchError, type HydrafetchOptions, HydrafetchTimeoutError, type ImagesResult, type JobPage, type JobPay, type JobResult, type JobStatus, type Location, type LogoResult, type MapLink, type MapOptions, type MapResult, type NewsArticle, type NewsOptions, type NewsResult, type NewsTimeRange, type OpenJob, type PageImage, type PageMetadata, type RateResultInput, type RateResultResponse, type ResultFeedbackReason, type ResultRating, type ScrapeBase, type ScrapeContent, type ScrapeOptions, type ScrapeResult, type ScreenshotOptions, type ScreenshotResult, type SearchJobsOptions, type SearchOptions, type SearchResult, type SearchResultItem, type StyleguideOptions, type StyleguideResult, type Usage, type WaitOptions, type ZodLike };
package/dist/index.d.ts CHANGED
@@ -67,9 +67,14 @@ interface MapOptions {
67
67
  includeSubdomains?: boolean;
68
68
  ignoreQueryParameters?: boolean;
69
69
  }
70
+ interface MapLink {
71
+ url: string;
72
+ /** When the site's sitemap says the page last changed, or null when it does not say. */
73
+ lastmod: string | null;
74
+ }
70
75
  interface MapResult {
71
76
  url: string;
72
- links: string[];
77
+ links: MapLink[];
73
78
  count: number;
74
79
  total?: number;
75
80
  truncated?: boolean;
@@ -423,4 +428,4 @@ declare class HydrafetchTimeoutError extends HydrafetchError {
423
428
  constructor(message: string);
424
429
  }
425
430
 
426
- export { type BatchOptions, type BrandOptions, type BrandResult, type CompanyHiringChanges, type CrawlOptions, type ExtractItem, type ExtractOptions, type ExtractResult, type ExtractSchema, type Format, type HiringChangePosting, type HiringChangesOptions, type HiringCounts, Hydrafetch, HydrafetchError, type HydrafetchOptions, HydrafetchTimeoutError, type ImagesResult, type JobPage, type JobPay, type JobResult, type JobStatus, type Location, type LogoResult, type MapOptions, type MapResult, type NewsArticle, type NewsOptions, type NewsResult, type NewsTimeRange, type OpenJob, type PageImage, type PageMetadata, type RateResultInput, type RateResultResponse, type ResultFeedbackReason, type ResultRating, type ScrapeBase, type ScrapeContent, type ScrapeOptions, type ScrapeResult, type ScreenshotOptions, type ScreenshotResult, type SearchJobsOptions, type SearchOptions, type SearchResult, type SearchResultItem, type StyleguideOptions, type StyleguideResult, type Usage, type WaitOptions, type ZodLike };
431
+ export { type BatchOptions, type BrandOptions, type BrandResult, type CompanyHiringChanges, type CrawlOptions, type ExtractItem, type ExtractOptions, type ExtractResult, type ExtractSchema, type Format, type HiringChangePosting, type HiringChangesOptions, type HiringCounts, Hydrafetch, HydrafetchError, type HydrafetchOptions, HydrafetchTimeoutError, type ImagesResult, type JobPage, type JobPay, type JobResult, type JobStatus, type Location, type LogoResult, type MapLink, type MapOptions, type MapResult, type NewsArticle, type NewsOptions, type NewsResult, type NewsTimeRange, type OpenJob, type PageImage, type PageMetadata, type RateResultInput, type RateResultResponse, type ResultFeedbackReason, type ResultRating, type ScrapeBase, type ScrapeContent, type ScrapeOptions, type ScrapeResult, type ScreenshotOptions, type ScreenshotResult, type SearchJobsOptions, type SearchOptions, type SearchResult, type SearchResultItem, type StyleguideOptions, type StyleguideResult, type Usage, type WaitOptions, type ZodLike };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydrafetch/node-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Official Node/TypeScript client for the Hydrafetch web data API. Turn any URL into clean Markdown and structured data.",
5
5
  "keywords": [
6
6
  "hydrafetch",