# @sap-ux/odata-annotation-core-types

> Annotation Core types

Latest version **1.0.3** (published 2026-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @sap-ux/odata-annotation-core-types
pnpm add @sap-ux/odata-annotation-core-types
yarn add @sap-ux/odata-annotation-core-types
bun add @sap-ux/odata-annotation-core-types
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2026-09-22 |
| First published | 2023-11-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 158 |
| Author | SAP SE |
| Maintainers | tqueck, kranthie.sap, sap_extncrepos, sap-ospo-admin, devinea |

## Links

- npm: https://www.npmjs.com/package/@sap-ux/odata-annotation-core-types
- Repository: https://github.com/SAP/open-ux-tools
- Issues: https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aodata-annotation-core-types
- npm.io page: https://npm.io/package/@sap-ux/odata-annotation-core-types

## Recent versions

- 1.0.3 (latest) — 2026-09-22
- 1.0.2 — 2026-08-25
- 1.0.1 — 2026-06-04
- 1.0.0 — 2026-05-30
- 0.6.1 — 2026-05-20
- 0.6.0 — 2026-05-15
- 0.5.8 — 2026-04-30
- 0.5.7 — 2026-03-16
- 0.5.6 — 2026-03-04
- 0.5.5 — 2026-02-23
- 0.5.4 — 2026-02-10
- 0.5.3 — 2026-01-29
- 0.5.2 — 2025-12-15
- 0.5.1 — 2025-11-05
- 0.5.0 — 2025-09-23
- … 13 more at https://npm.io/package/@sap-ux/odata-annotation-core-types/versions

## README

[![Changelog](https://img.shields.io/badge/changelog-8A2BE2)](https://github.com/SAP/open-ux-tools/blob/main/packages/odata-annotation-core-types/CHANGELOG.md) [![Github repo](https://img.shields.io/badge/github-repo-blue)](https://github.com/SAP/open-ux-tools/tree/main/packages/odata-annotation-core-types)

# [OData Annotation Core Types](https://github.com/SAP/open-ux-tools/tree/main/packages/odata-annotation-core-types)

Package containing common types for working with OData annotations.

## Installation
Npm
`npm install --save @sap-ux/odata-annotation-core-types`

Yarn
`yarn add @sap-ux/odata-annotation-core-types`

Pnpm
`pnpm add @sap-ux/odata-annotation-core-types`

## Usage

### Annotation file creation
```Typescript
import {
    createElementNode,
    createTarget,
    createReference,
    createNamespace,
    AnnotationFile,
    Target,
    Reference,
    Element
} from '@sap-ux/odata-annotations-core-types';

const file: AnnotationFile = {
    uri: 'annotations.xml',
    type: 'annotation-file',
    namespace: createNamespace('MyNameSpace'),
    references: [],
    targets: []
};

const reference: Reference = createReference(
    'com.sap.vocabularies.UI.v1',
    'UI',
    'https://sap.github.io/odata-vocabularies/vocabularies/UI.xml'
);
file.references.push(reference);

const target: Target = createTarget('MyNamespace.MyEntityType');

const term: Element = createElementNode({
    name: 'UI.LineItem',
    attributes: {
        Qualifier: {
            name: 'Qualifier',
            type: 'attribute',
            value: 'mainList'
        }
    },
    content: [{ type: 'element', name: 'Collection', attributes: {}, content: [] }]
});
target.terms.push(term);
file.targets.push(target);

```

For other usage examples see unit tests in `odata-annotation-core-types/test`.

## Keywords
SAP ODATA annotations

---
_Source: https://npm.io/package/@sap-ux/odata-annotation-core-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
