@@ -5,7 +5,7 @@ import * as models from 'powerbi-models';
55
66/**
77 * A Page node within a report hierarchy
8- *
8+ *
99 * @export
1010 * @interface IPageNode
1111 */
@@ -16,7 +16,7 @@ export interface IPageNode {
1616
1717/**
1818 * A Power BI report page
19- *
19+ *
2020 * @export
2121 * @class Page
2222 * @implements {IPageNode}
@@ -25,65 +25,79 @@ export interface IPageNode {
2525export class Page implements IPageNode , IFilterable {
2626 /**
2727 * The parent Power BI report that this page is a member of
28- *
28+ *
2929 * @type {IReportNode }
3030 */
3131 report : IReportNode ;
3232 /**
3333 * The report page name
34- *
34+ *
3535 * @type {string }
3636 */
3737 name : string ;
3838
3939 /**
4040 * The user defined display name of the report page, which is undefined if the page is created manually
41- *
41+ *
4242 * @type {string }
4343 */
4444 displayName : string ;
4545
4646 /**
4747 * Is this page is the active page
48- *
48+ *
4949 * @type {boolean }
5050 */
51- isActive : boolean ;
51+ isActive : boolean ;
5252
5353 /**
5454 * The visibility of the page.
5555 * 0 - Always Visible
5656 * 1 - Hidden in View Mode
57- *
57+ *
5858 * @type {models.SectionVisibility }
5959 */
6060 visibility : models . SectionVisibility ;
6161
62+ /**
63+ * Page size as saved in the report.
64+ * @type {models.ICustomPageSize }
65+ */
66+ defaultSize : models . ICustomPageSize ;
67+
68+ /**
69+ * Page display options as saved in the report.
70+ * @type {models.ICustomPageSize }
71+ */
72+ defaultDisplayOption : models . DisplayOption ;
73+
6274 /**
6375 * Creates an instance of a Power BI report page.
64- *
76+ *
6577 * @param {IReportNode } report
6678 * @param {string } name
6779 * @param {string } [displayName]
6880 * @param {boolean } [isActivePage]
6981 * @param {models.SectionVisibility } [visibility]
7082 */
71- constructor ( report : IReportNode , name : string , displayName ?: string , isActivePage ?: boolean , visibility ?: models . SectionVisibility ) {
83+ constructor ( report : IReportNode , name : string , displayName ?: string , isActivePage ?: boolean , visibility ?: models . SectionVisibility , defaultSize ?: models . ICustomPageSize , defaultDisplayOption ?: models . DisplayOption ) {
7284 this . report = report ;
7385 this . name = name ;
7486 this . displayName = displayName ;
7587 this . isActive = isActivePage ;
7688 this . visibility = visibility ;
89+ this . defaultSize = defaultSize ;
90+ this . defaultDisplayOption = defaultDisplayOption ;
7791 }
7892
7993 /**
8094 * Gets all page level filters within the report.
81- *
95+ *
8296 * ```javascript
8397 * page.getFilters()
8498 * .then(filters => { ... });
8599 * ```
86- *
100+ *
87101 * @returns {(Promise<models.IFilter[]>) }
88102 */
89103 getFilters ( ) : Promise < models . IFilter [ ] > {
@@ -96,11 +110,11 @@ export class Page implements IPageNode, IFilterable {
96110
97111 /**
98112 * Removes all filters from this page of the report.
99- *
113+ *
100114 * ```javascript
101115 * page.removeFilters();
102116 * ```
103- *
117+ *
104118 * @returns {Promise<void> }
105119 */
106120 removeFilters ( ) : Promise < void > {
@@ -109,11 +123,11 @@ export class Page implements IPageNode, IFilterable {
109123
110124 /**
111125 * Makes the current page the active page of the report.
112- *
126+ *
113127 * ```javascripot
114128 * page.setActive();
115129 * ```
116- *
130+ *
117131 * @returns {Promise<void> }
118132 */
119133 setActive ( ) : Promise < void > {
@@ -131,12 +145,12 @@ export class Page implements IPageNode, IFilterable {
131145
132146 /**
133147 * Sets all filters on the current page.
134- *
148+ *
135149 * ```javascript
136150 * page.setFilters(filters);
137151 * .catch(errors => { ... });
138152 * ```
139- *
153+ *
140154 * @param {(models.IFilter[]) } filters
141155 * @returns {Promise<void> }
142156 */
@@ -149,12 +163,12 @@ export class Page implements IPageNode, IFilterable {
149163
150164 /**
151165 * Gets all the visuals on the page.
152- *
166+ *
153167 * ```javascript
154168 * page.getVisuals()
155169 * .then(visuals => { ... });
156170 * ```
157- *
171+ *
158172 * @returns {Promise<VisualDescriptor[]> }
159173 */
160174 getVisuals ( ) : Promise < VisualDescriptor [ ] > {
@@ -171,12 +185,12 @@ export class Page implements IPageNode, IFilterable {
171185
172186 /**
173187 * Checks if page has layout.
174- *
188+ *
175189 * ```javascript
176190 * page.hasLayout(layoutType)
177191 * .then(hasLayout: boolean => { ... });
178192 * ```
179- *
193+ *
180194 * @returns {(Promise<boolean>) }
181195 */
182196 hasLayout ( layoutType ) : Promise < boolean > {
0 commit comments