@@ -28,6 +28,7 @@ import {Change, CreateChangeCallback, CreateChangeRequest} from './change';
2828import { Record , RecordMetadata , RecordObject } from './record' ;
2929import { DNS } from '.' ;
3030import * as r from 'request' ;
31+ import { Readable } from 'stream' ;
3132
3233/**
3334 * Config to set for the change.
@@ -164,6 +165,9 @@ export interface ZoneExportCallback {
164165 * const zone = dns.zone('zone-id');
165166 */
166167class Zone extends ServiceObject {
168+ name : string ;
169+ getRecordsStream : ( query ?: GetRecordsRequest | string | string [ ] ) => Readable ;
170+ getChangesStream : ( query ?: GetChangesRequest ) => Readable ;
167171 constructor ( dns : DNS , name : string ) {
168172 const methods = {
169173 /**
@@ -336,6 +340,8 @@ class Zone extends ServiceObject {
336340 * @type {string }
337341 */
338342 this . name = name ;
343+ this . getRecordsStream = paginator . streamify ( 'getRecords' ) ;
344+ this . getChangesStream = paginator . streamify ( 'getChanges' ) ;
339345 }
340346
341347 /**
@@ -1169,7 +1175,6 @@ import(localPath: string, callback?: CreateChangeCallback): void|Promise<CreateC
11691175 * this.end();
11701176 * });
11711177 */
1172- Zone . prototype . getChangesStream = paginator . streamify ( 'getChanges' ) ;
11731178
11741179/**
11751180 * Get the list of {module:dns/record} objects for this zone as a readable
@@ -1203,7 +1208,6 @@ Zone.prototype.getChangesStream = paginator.streamify('getChanges');
12031208 * this.end();
12041209 * });
12051210 */
1206- Zone . prototype . getRecordsStream = paginator . streamify ( 'getRecords' ) ;
12071211
12081212/*! Developer Documentation
12091213 *
0 commit comments