![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
powerbi-models
Advanced tools
Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.
Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK.
For each model there is a TypeScript interface, a json schema definitions, and a validation function to ensure a given object is a valid model.
Install
npm install --save powerbi-models
Import
import * as models from 'powerbi-models';
Usage
Validation:
let testObject = { x: 1 };
const errors = models.validateLoad(testObject);
if(errors) {
console.warn(errors);
}
Would output to the console:
[
{
message: 'accessToken is required'
}
]
Creating filters:
const basicFilter: models.IBasicFilter = {
target: {
table: "Products",
column: "Version"
},
operator: "In",
values: [
1,
2,
3,
4
]
};
const advancedFilter: models.IAdvancedFilter = {
target: {
table: "Products",
column: "Name"
},
logicalOperator: "Or",
conditions: [
{
operator: "Contains",
value: "Power"
},
{
operator: "Contains",
value: "Microsoft"
}
]
};
Or use the constructor methods:
const advancedFilter = new models.AdvancedFilter(
{
table: "Products",
column: "Name"
},
"Or",
{
operator: "Contains",
value: "Power"
},
{
operator: "Contains",
value: "Microsoft"
}
);
Dates should be formated using ISO 8601 standard. Example: 2016-09-08T00:15:46.861Z
This is how dates are naturally serialized to JSON:
new Date().toJSON(); //=> 2016-09-08T00:15:46.861Z
An example filter using this Date format would look like the following:
{
"$schema": "http://powerbi.com/product/schema#advanced",
"target": {
"table": "Time",
"column": "Date"
},
"logicalOperator": "And",
"conditions": [
{
"operator": "GreaterThan",
"value": "2014-06-01T07:00:00.000Z"
}
]
}
FAQs
Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.
The npm package powerbi-models receives a total of 82,664 weekly downloads. As such, powerbi-models popularity was classified as popular.
We found that powerbi-models demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.