1 |
|
2 | import { Transform, TransformOptions, TransformCallback } from 'stream';
|
3 | import { IndexItem, SitemapItemLoose, ErrorLevel } from './types';
|
4 | import { SitemapStream } from './sitemap-stream';
|
5 | import { WriteStream } from 'fs';
|
6 | export declare enum IndexTagNames {
|
7 | sitemap = "sitemap",
|
8 | loc = "loc",
|
9 | lastmod = "lastmod"
|
10 | }
|
11 | export interface SitemapIndexStreamOptions extends TransformOptions {
|
12 | level?: ErrorLevel;
|
13 | xslUrl?: string;
|
14 | }
|
15 | export declare class SitemapIndexStream extends Transform {
|
16 | level: ErrorLevel;
|
17 | xslUrl?: string;
|
18 | private hasHeadOutput;
|
19 | constructor(opts?: SitemapIndexStreamOptions);
|
20 | _transform(item: IndexItem | string, encoding: string, callback: TransformCallback): void;
|
21 | _flush(cb: TransformCallback): void;
|
22 | }
|
23 | declare type getSitemapStream = (i: number) => [IndexItem | string, SitemapStream, WriteStream];
|
24 | export interface SitemapAndIndexStreamOptions extends SitemapIndexStreamOptions {
|
25 | level?: ErrorLevel;
|
26 | limit?: number;
|
27 | getSitemapStream: getSitemapStream;
|
28 | }
|
29 | export declare class SitemapAndIndexStream extends SitemapIndexStream {
|
30 | private i;
|
31 | private getSitemapStream;
|
32 | private currentSitemap;
|
33 | private currentSitemapPipeline?;
|
34 | private idxItem;
|
35 | private limit;
|
36 | constructor(opts: SitemapAndIndexStreamOptions);
|
37 | _writeSMI(item: SitemapItemLoose): void;
|
38 | _transform(item: SitemapItemLoose, encoding: string, callback: TransformCallback): void;
|
39 | _flush(cb: TransformCallback): void;
|
40 | }
|
41 | export {};
|