Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xenit-eu/alfresco-data-model-ts
Typescript library that provides access to the Alfresco metadata model
https://github.com/xenit-eu/alfresco-data-model-ts
alfresco typescript
Last synced: 6 days ago
JSON representation
Typescript library that provides access to the Alfresco metadata model
- Host: GitHub
- URL: https://github.com/xenit-eu/alfresco-data-model-ts
- Owner: xenit-eu
- License: lgpl-3.0
- Created: 2020-12-21T13:18:48.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:37:57.000Z (11 months ago)
- Last Synced: 2024-04-16T13:05:13.587Z (7 months ago)
- Topics: alfresco, typescript
- Language: TypeScript
- Homepage:
- Size: 374 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Alfresco Datamodel for Typescript
This Typescript library provides access to the Alfresco metadata model.
## Usage
This library defines a set of interfaces for classes (types & aspects), properties and associations.
The whole data model should be loaded from Alfresco and then inserted into a [`Dictionary`](docs/alfresco-data-model.dictionary.md) object.
Retrieving the data from Alfresco and converting it to the proper representation is outside the scope of this package.
```ts
import { QNameFactory, IDictionary, Dictionary } from "@xenit/alfresco-data-model";async function getDictionary(): IDictionary {
const qnameFactory = new QNameFactory();
for(const namespace of await getNamespacesAndPrefixes()) {
qnameFactory.registerPrefix(namespace.prefix, namespace.uri);
}
const dictionary: IDictionary = new Dictionary(await getClasses(), await getProperties(), await getAssociations(), qnameFactory);
return dictionary;
}
```## Continuous integration
Tests and releases are performed with Github Actions.
To create a new release, simply tag a commit with a version and push.
Tags must start with `v`, followed by a version number.* Release versions are published to npm with the `latest` dist-tag.
* Pre-release versions are published to npm with the `next` dist-tag.