@@ -8,7 +8,7 @@ import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCo
88import { SharePointQueryableSecurable } from "./sharepointqueryablesecurable" ;
99import { Util } from "../utils/util" ;
1010import { TypedHash } from "../collections/collections" ;
11- import { ControlMode , RenderListData , ChangeQuery , CamlQuery , ChangeLogitemQuery , ListFormData } from "./types" ;
11+ import { ControlMode , RenderListData , ChangeQuery , CamlQuery , ChangeLogitemQuery , ListFormData , RenderListDataParameters } from "./types" ;
1212import { UserCustomActions } from "./usercustomactions" ;
1313import { spExtractODataId } from "./odata" ;
1414import { NotSupportedInBatchException } from "../utils/exceptions" ;
@@ -379,6 +379,28 @@ export class List extends SharePointQueryableSecurable {
379379 } ) ;
380380 }
381381
382+ /**
383+ * Returns the data for the specified query view
384+ *
385+ * @param parameters The parameters to be used to render list data as JSON string.
386+ * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.
387+ */
388+ public renderListDataAsStream ( parameters : RenderListDataParameters , overrideParameters : any = null ) : Promise < any > {
389+
390+ const postBody = {
391+ overrideParameters : Util . extend ( {
392+ "__metadata" : { "type" : "SP.RenderListDataOverrideParameters" } ,
393+ } , overrideParameters ) ,
394+ parameters : Util . extend ( {
395+ "__metadata" : { "type" : "SP.RenderListDataParameters" } ,
396+ } , parameters ) ,
397+ } ;
398+
399+ return this . clone ( List , "RenderListDataAsStream" , true ) . postCore ( {
400+ body : JSON . stringify ( postBody ) ,
401+ } ) ;
402+ }
403+
382404 /**
383405 * Gets the field values and field schema attributes for a list item.
384406 */
0 commit comments