Skip to content

eclipse-basyx/basyx-typescript-sdk

Repository files navigation

GitHub Actions Workflow Status NPM Downloads NPM Version GitHub License

basyx-typescript-sdk

BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)

Features

Clients for the AAS API components:

  • AAS Repository
  • Submodel Repository
  • Concept Description Repository
  • AAS Registry
  • Submodel Registry
  • AAS Discovery Service
  • AASX File Service

Utility functions for working with AAS data:

  • Utils for Descriptors
  • Utils for KeyTypes
  • Utils for MultiLanguageProperties
  • Utils for Referables
  • Utils for References
  • Utils for SemanticIds

Installation

npm install basyx-typescript-sdk
# or
yarn add basyx-typescript-sdk

See https://www.npmjs.com/package/basyx-typescript-sdk


Important

Make sure to also install @aas-core-works/aas-core3.0-typescript in your project:

npm install @aas-core-works/aas-core3.0-typescript
# or
yarn add @aas-core-works/aas-core3.0-typescript

Usage Example

import { AasRepositoryClient, Configuration } from 'basyx-typescript-sdk';

async function getAllShells() {
    const client = new AasRepositoryClient();
    const configuration = new Configuration({
        basePath: 'http://localhost:8081',
    });

    try {
        const response = await client.getAllAssetAdministrationShells({ configuration });

        if (response.success) {
            console.log('Asset Administration Shells fetched successfully:', response.data);
            // You can now use the response data as needed
        } else {
            console.error('Failed to fetch Asset Administration Shells:', response.error);
        }
    } catch (error) {
        console.error('Error fetching Asset Administration Shells:', error);
    }
}

getAllShells();

About

BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 6