BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)
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
npm install basyx-typescript-sdk
# or
yarn add 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
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();