
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ardoq-sdk-js
Advanced tools
This is an, as of yet, small SDK for developing against the Ardoq API. It currently constist of two parts:
Please open an issue if there is any functionality you are missing, or if you find any bugs.
For complete usage examples, please see our repo with examples.
The following example demonstrates how to create a component with the api.
import { getAggregatedWorkspace, updateComponent } from 'ardoq-sdk-js';
const apiProps = {
authToken: '<authentication token>',
org: 'my-org',
url: 'https://app.ardoq.com/api/',
};
const main = async () => {
const workspace = await getAggregatedWorkspace(apiProps, '<workspace id>');
for (const component of workspace.components) {
await updateComponent(apiProps, {
...component,
description: (component.description || '') + '\nVisisted by script',
});
}
};
main();
The following example demonstrates most of the functionality of the graph
syncer. Notice that the sync
function will take care of creating the used
types and fields. Fields can be changed locally, and will lead to the components
remotely being updated as long as the customId
s stay the same.
import { sync, FieldType } from "ardoq-sdk-js";
const apiProps = {
authToken: "<authentication token>",
org: "my-org",
url: "https://app.ardoq.com/api/"
};
const fields = [
{
name: "excerciseValue",
label: "Excercise value",
type: FieldType.NUMBER
}
];
const workspaces = {
activities: "<workspace id>",
equipment: "<workspace id>",
};
const graph = {
components: [
{
customId: "walking",
workspace: "activities",
name: "Walking",
type: "Simple Activity",
fields: {
excerciseValue: 10
}
},
{
customId: "running",
workspace: "activities",
name: "Running",
type: "Simple Activity",
parent: 'walking',
fields: {
excerciseValue: 50
}
},
{
customId: "sailing",
workspace: "activities",
name: "Sailing",
type: "Complex Activity",
fields: {
excerciseValue: 15
}
},
{
customId: "dinghy",
workspace: "equipment",
name: "Dinghy",
type: "Equipment"
}
],
references: [
{
customId: "sailing-uses-dinghy",
source: "sailing",
type: "Uses",
target: "dinghy",
},
]
};
sync(apiProps, workspaces, graph, fields);
There are a few things that could use some work:
yarn start
will start continous building (very nice to combine with
yarn link
for live testing in another repo)yarn test --watch
will start continous testingyarn test
yarn publish
0.x.x
, make sure to bump the minor version on any change that could break
existing code.FAQs
A software development kit for integrating with Ardoq
The npm package ardoq-sdk-js receives a total of 135 weekly downloads. As such, ardoq-sdk-js popularity was classified as not popular.
We found that ardoq-sdk-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.