|
| 1 | +/** |
| 2 | + * SuiteScript SuiteAnalytics APIs |
| 3 | + */ |
| 4 | + |
| 5 | + |
| 6 | +/** |
| 7 | + * Creates an instance of a report definition object. |
| 8 | + * |
| 9 | + * The report is built on this object using subsequent methods. The report definition can be used |
| 10 | + * to create a form for rendering the pivot table report in a browser, or the pivot table APIs |
| 11 | + * can be used to extract the values of the individual rows and columns of the pivot table. |
| 12 | + * |
| 13 | + * @return {nlobjReportDefinition} |
| 14 | + * @since 2012.2 |
| 15 | + */ |
| 16 | +function nlapiCreateReportDefinition() { |
| 17 | +} |
| 18 | + |
| 19 | +/** |
| 20 | + * Creates an nlobjReportForm object to render the report definition. |
| 21 | + * |
| 22 | + * @param {string} title The title of the form |
| 23 | + * |
| 24 | + * @return {nlobjReportForm} |
| 25 | + * @since 2012.2 |
| 26 | + */ |
| 27 | +function nlapiCreateReportForm(title) { |
| 28 | +} |
| 29 | + |
| 30 | +/** |
| 31 | + * Object used to encapsulate a pivot table column |
| 32 | + * |
| 33 | + * @constructor |
| 34 | + * @since 2012.2 |
| 35 | + */ |
| 36 | +function nlobjPivotColumn() { |
| 37 | +} |
| 38 | + |
| 39 | +/** |
| 40 | + * @return {string} |
| 41 | + * @since 2012.2 |
| 42 | + */ |
| 43 | +nlobjPivotColumn.prototype.getAlias = function() { |
| 44 | +}; |
| 45 | + |
| 46 | +/** |
| 47 | + * @return {nlobjPivotColumn|null} |
| 48 | + * @since 2012.2 |
| 49 | + */ |
| 50 | +nlobjPivotColumn.prototype.getParent = function() { |
| 51 | +}; |
| 52 | + |
| 53 | +/** |
| 54 | + * @return {string} |
| 55 | + * @since 2012.2 |
| 56 | + */ |
| 57 | +nlobjPivotColumn.prototype.getLabel = function() { |
| 58 | +}; |
| 59 | + |
| 60 | +/** |
| 61 | + * @return {nlobjPivotColumn|null} |
| 62 | + * @since 2012.2 |
| 63 | + */ |
| 64 | +nlobjPivotColumn.prototype.getSummaryLine = function() { |
| 65 | +}; |
| 66 | + |
| 67 | +/** |
| 68 | + * @return {Object} |
| 69 | + * @since 2012.2 |
| 70 | + */ |
| 71 | +nlobjPivotColumn.prototype.getValue = function() { |
| 72 | +}; |
| 73 | + |
| 74 | +/** |
| 75 | + * @return {nlobjPivotColumn[]|null} Null if no children columns exist |
| 76 | + * @since 2012.2 |
| 77 | + */ |
| 78 | +nlobjPivotColumn.prototype.getVisibleChildren = function() { |
| 79 | +}; |
| 80 | + |
| 81 | +/** |
| 82 | + * @return {boolean} |
| 83 | + * @since 2012.2 |
| 84 | + */ |
| 85 | +nlobjPivotColumn.prototype.isHidden = function() { |
| 86 | +}; |
| 87 | + |
| 88 | +/** |
| 89 | + * Object used to encapsulate a pivot table row |
| 90 | + * |
| 91 | + * @constructor |
| 92 | + * @since 2012.2 |
| 93 | + */ |
| 94 | +function nlobjPivotRow() { |
| 95 | +} |
| 96 | + |
| 97 | +/** |
| 98 | + * @return {string} |
| 99 | + * @since 2012.2 |
| 100 | + */ |
| 101 | +nlobjPivotRow.prototype.getAlias = function() { |
| 102 | +}; |
| 103 | + |
| 104 | +/** |
| 105 | + * @return {nlobjPivotRow[]|null} Null if the row is a detail line or if there are no children |
| 106 | + * @since 2012.2 |
| 107 | + */ |
| 108 | +nlobjPivotRow.prototype.getChildren = function() { |
| 109 | +}; |
| 110 | + |
| 111 | +/** |
| 112 | + * @return {string} |
| 113 | + * @since 2012.2 |
| 114 | + */ |
| 115 | +nlobjPivotRow.prototype.getLabel = function() { |
| 116 | +}; |
| 117 | + |
| 118 | +/** |
| 119 | + * @return {nlobjPivotRow|null} Null if the row does not exist |
| 120 | + * @since 2012.2 |
| 121 | + */ |
| 122 | +nlobjPivotRow.prototype.getParent = function() { |
| 123 | +}; |
| 124 | + |
| 125 | +/** |
| 126 | + * @return {nlobjPivotRow|null} Null if the row is a detail line |
| 127 | + * @since 2012.2 |
| 128 | + */ |
| 129 | +nlobjPivotRow.prototype.getSummaryLine = function() { |
| 130 | +}; |
| 131 | + |
| 132 | +/** |
| 133 | + * @param {nlobjPivotColumn} [pivotColumn] |
| 134 | + * |
| 135 | + * @return {Object|null} The value of the row hierarchy, or null if isDetailLine returns false |
| 136 | + * @since 2012.2 |
| 137 | + */ |
| 138 | +nlobjPivotRow.prototype.getValue = function(pivotColumn) { |
| 139 | +}; |
| 140 | + |
| 141 | +/** |
| 142 | + * @return {boolean} |
| 143 | + * @since 2012.2 |
| 144 | + */ |
| 145 | +nlobjPivotRow.prototype.isDetailLine = function() { |
| 146 | +}; |
| 147 | + |
| 148 | +/** |
| 149 | + * @constructor |
| 150 | + * @since 2012.2 |
| 151 | + */ |
| 152 | +function nlobjPivotTable() { |
| 153 | +} |
| 154 | + |
| 155 | +/** |
| 156 | + * @return {nlobjPivotRow} |
| 157 | + * @since 2012.2 |
| 158 | + */ |
| 159 | +nlobjPivotTable.prototype.getColumnHierarchy = function() { |
| 160 | +}; |
| 161 | + |
| 162 | +/** |
| 163 | + * @return {nlobjPivotRow} |
| 164 | + * @since 2012.2 |
| 165 | + */ |
| 166 | +nlobjPivotTable.prototype.getRowHierarchy = function() { |
| 167 | +}; |
| 168 | + |
| 169 | +/** |
| 170 | + * Handle to the pivot table object. A handle is a reference which points to the pivot table |
| 171 | + * |
| 172 | + * @constructor |
| 173 | + * @since 2012.2 |
| 174 | + */ |
| 175 | +function nlobjPivotTableHandle() { |
| 176 | +} |
| 177 | + |
| 178 | +/** |
| 179 | + * Get the pivot table object from the report definition |
| 180 | + * |
| 181 | + * Note: This is a blocking call and it will wait until the report definition execution has finished. |
| 182 | + * Using isReady() is recommended to check execution state if blocking is unacceptable. |
| 183 | + * |
| 184 | + * @return {nlobjPivotTable} |
| 185 | + * @since 2012.2 |
| 186 | + */ |
| 187 | +nlobjPivotTableHandle.prototype.getPivotTable = function() { |
| 188 | +}; |
| 189 | + |
| 190 | +/** |
| 191 | + * Returns the completion status flag of the report definition execution |
| 192 | + * |
| 193 | + * @return {boolean} |
| 194 | + * @since 2012.2 |
| 195 | + */ |
| 196 | +nlobjPivotTableHandle.prototype.isReady = function() { |
| 197 | +}; |
| 198 | + |
| 199 | +/** |
| 200 | + * Object used to encapsulate a report column on a pivot report. |
| 201 | + * |
| 202 | + * @constructor |
| 203 | + * @since 2012.2 |
| 204 | + */ |
| 205 | +function nlobjReportColumn() { |
| 206 | +} |
| 207 | + |
| 208 | +/** |
| 209 | + * @return {string|null} |
| 210 | + * @since 2012.2 |
| 211 | + */ |
| 212 | +nlobjReportColumn.prototype.getFormula = function() { |
| 213 | +}; |
| 214 | + |
| 215 | +/** |
| 216 | + * @return {nlobjReportColumnHierarchy} |
| 217 | + * @since 2012.2 |
| 218 | + */ |
| 219 | +nlobjReportColumn.prototype.getParent = function() { |
| 220 | +}; |
| 221 | + |
| 222 | +/** |
| 223 | + * @return {boolean} |
| 224 | + * @since 2012.2 |
| 225 | + */ |
| 226 | +nlobjReportColumn.prototype.isMeasure = function() { |
| 227 | +}; |
| 228 | + |
| 229 | +/** |
| 230 | + * Object used to encapsulate the report column hierarchy |
| 231 | + * |
| 232 | + * @constructor |
| 233 | + * @since 2012.2 |
| 234 | + */ |
| 235 | +function nlobjReportColumnHierarchy() { |
| 236 | +} |
| 237 | + |
| 238 | +/** |
| 239 | + * Get the children reference of this column hierarchy |
| 240 | + * |
| 241 | + * @return {nlobjReportColumnHierarchy} |
| 242 | + * @since 2012.2 |
| 243 | + */ |
| 244 | +nlobjReportColumnHierarchy.prototype.getChildren = function() { |
| 245 | +}; |
| 246 | + |
| 247 | +/** |
| 248 | + * @return {nlobjReportColumnHierarchy|null} |
| 249 | + * @since 2012.2 |
| 250 | + */ |
| 251 | +nlobjReportColumnHierarchy.prototype.getParent = function() { |
| 252 | +}; |
| 253 | + |
| 254 | +/** |
| 255 | + * The primary object that contains the definition of the report |
| 256 | + * |
| 257 | + * @constructor |
| 258 | + * @since 2012.2 |
| 259 | + */ |
| 260 | +function nlobjReportDefinition() { |
| 261 | +} |
| 262 | + |
| 263 | +/** |
| 264 | + * Add a column to the report definition |
| 265 | + * |
| 266 | + * @param {string} alias |
| 267 | + * @param {boolean} isMeasure |
| 268 | + * @param {string} label The column label that will be displayed on the report. |
| 269 | + * @param {nlobjReportColumnHierarchy} [parent] The reference to the parent column in the hierarchy. |
| 270 | + * If null, then this column will not be associated with a parent column. |
| 271 | + * @param {string} format The data type that this column represents. |
| 272 | + * @param {string} [formula] A string which describes a mathematical formula in the format |
| 273 | + * of “F(x,y,z) = mathematical function”, where x,y,z are previously defined |
| 274 | + * aliases from addRowHierarchy, addColumnHierarchy, or addColumn calls. |
| 275 | + * |
| 276 | + * @return {nlobjReportColumn} The reference to the nlobjReportColumn object. |
| 277 | + * @since 2012.2 |
| 278 | + */ |
| 279 | +nlobjReportDefinition.prototype.addColumn = function(alias, isMeasure, label, parent, format, formula) { |
| 280 | +}; |
| 281 | + |
| 282 | +/** |
| 283 | + * |
| 284 | + * @param {string} alias |
| 285 | + * @param {string} label |
| 286 | + * @param {nlobjReportColumnHierarchy} [parent] The reference of the parent column in the hierarchy. |
| 287 | + * If null, then this column will be the root (top level) column. |
| 288 | + * @param {string} format |
| 289 | + * |
| 290 | + * @return {nlobjReportColumnHierarchy} The reference to the nlobjReportColumnHierarchy object. |
| 291 | + * @since 2012.2 |
| 292 | + */ |
| 293 | +nlobjReportDefinition.prototype.addColumnHierarchy = function(alias, label, parent, format) { |
| 294 | +}; |
| 295 | + |
| 296 | +/** |
| 297 | + * |
| 298 | + * @param {string} alias |
| 299 | + * @param {string} label |
| 300 | + * @param {string} format |
| 301 | + * |
| 302 | + * @return {nlobjReportRowHierarchy} The reference to the nlobjReportRowHierarchy object. |
| 303 | + * @since 2012.2 |
| 304 | + */ |
| 305 | +nlobjReportDefinition.prototype.addRowHierarchy = function(alias, label, format) { |
| 306 | +}; |
| 307 | + |
| 308 | +/** |
| 309 | + * Attaches a search as a data source to the report definition. |
| 310 | + * |
| 311 | + * @param {string} searchType |
| 312 | + * @param {string} id The internal id if you are using a saved search as a data source. |
| 313 | + * @param {nlobjSearchFilter[]} filters Note: Search filter expression as filters parameter is currently not supported. |
| 314 | + * @param {nlobjSearchColumn[]} columns |
| 315 | + * @param {string} map The mapping of rows/columns of the search to the report. |
| 316 | + * |
| 317 | + * @return {void} |
| 318 | + * @since 2012.2 |
| 319 | + */ |
| 320 | +nlobjReportDefinition.prototype.addSearchDatasource = function(searchType, id, filters, columns, map) { |
| 321 | +}; |
| 322 | + |
| 323 | +/** |
| 324 | + * Creates the form for rendering from the report definition |
| 325 | + * |
| 326 | + * Note: Only one synchronous pivot table execution is allowed at a time. |
| 327 | + * If a second synchronous execution is called, it will invalidate the first pivot table. |
| 328 | + * |
| 329 | + * @param {nlobjReportForm} [form] The form object created with nlapiCreateReportForm. |
| 330 | + * If not specified the call waits until the execution is finished (synchronous) |
| 331 | + * and an nlobjPivotTable will be available from the handle. If the parameter is set, |
| 332 | + * the call returns immediately and the returned value references the nlobjReportForm |
| 333 | + * - a pivot table handle will not be available in this case. |
| 334 | + * |
| 335 | + * @return {nlobjPivotTableHandle} The identifier of the pivot table handle, or nlobjReportForm |
| 336 | + * @since 2012.2 |
| 337 | + */ |
| 338 | +nlobjReportDefinition.prototype.executeReport = function(form) { |
| 339 | +}; |
| 340 | + |
| 341 | +/** |
| 342 | + * |
| 343 | + * @param {string} [title] |
| 344 | + * |
| 345 | + * @return {void} |
| 346 | + * @since 2012.2 |
| 347 | + */ |
| 348 | +nlobjReportDefinition.prototype.setTitle = function(title) { |
| 349 | +}; |
| 350 | + |
| 351 | +/** |
| 352 | + * Object used to encapsulate the report form and render the report in HTML |
| 353 | + * |
| 354 | + * @constructor |
| 355 | + * @since 2012.2 |
| 356 | + */ |
| 357 | +function nlobjReportForm() { |
| 358 | +} |
| 359 | + |
| 360 | +/** |
| 361 | + * Object used to encapsulate the report row hierarchy |
| 362 | + * |
| 363 | + * @constructor |
| 364 | + * @since 2012.2 |
| 365 | + */ |
| 366 | +function nlobjReportRowHierarchy() { |
| 367 | +} |
| 368 | + |
| 369 | +/** |
| 370 | + * @return {nlobjReportRowHierarchy} The child reference to the nlobjReportRowHierarchy object |
| 371 | + * @since 2012.2 |
| 372 | + */ |
| 373 | +nlobjReportRowHierarchy.prototype.getChildren = function() { |
| 374 | +}; |
| 375 | + |
| 376 | +/** |
| 377 | + * @return {nlobjReportRowHierarchy|null} Either the parent reference to the nlobjReportRowHierarchy object or null. |
| 378 | + * @since 2012.2 |
| 379 | + */ |
| 380 | +nlobjReportRowHierarchy.prototype.getChildren = function() { |
| 381 | +}; |
0 commit comments