# @xenit/alfresco-data-model

> This Typescript library provides access to the Alfresco metadata model.

Latest version **0.4.1** (published 2021-01-07) · LGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @xenit/alfresco-data-model
pnpm add @xenit/alfresco-data-model
yarn add @xenit/alfresco-data-model
bun add @xenit/alfresco-data-model
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2021-01-07 |
| First published | 2021-01-04 |
| Weekly downloads | 0 |
| License | LGPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 5 |
| Unpacked size | 476.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Xenit |
| Maintainers | xenit-jenkins |

## Links

- npm: https://www.npmjs.com/package/@xenit/alfresco-data-model
- npm.io page: https://npm.io/package/@xenit/alfresco-data-model

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^4.1.1
- [tslib](https://npm.io/package/tslib.md) ^2.0.3
- [@types/debug](https://npm.io/package/@types/debug.md) ^4.1.5
- [tiny-warning](https://npm.io/package/tiny-warning.md) ^1.0.3
- [tiny-invariant](https://npm.io/package/tiny-invariant.md) ^1.1.0

## Recent versions

- 0.4.1 (latest) — 2021-01-07
- 0.4.0 — 2021-01-06
- 0.3.0 — 2021-01-06
- 0.2.0 — 2021-01-05
- 0.1.1 — 2021-01-05
- 0.1.0 — 2021-01-04

## 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.

---
_Source: https://npm.io/package/@xenit/alfresco-data-model · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
