basyx-typescript-sdk 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/clients/AasRepositoryClient.d.ts +3 -3
- package/dist/clients/AasRepositoryClient.js +6 -6
- package/dist/generated/sdk.gen.d.ts +822 -0
- package/dist/generated/sdk.gen.js +1705 -0
- package/dist/generated/types.gen.d.ts +10829 -0
- package/dist/lib/convertAasTypes.d.ts +2 -2
- package/dist/lib/convertAasTypes.js +13 -3
- package/dist/lib/createAasRepoClient.d.ts +1 -1
- package/dist/models/aas-repository.d.ts +1 -1
- package/package.json +3 -4
- package/dist/generated/aas-repository/sdk.gen.d.ts +0 -210
- package/dist/generated/aas-repository/sdk.gen.js +0 -430
- package/dist/generated/aas-repository/types.gen.d.ts +0 -3380
- package/src/clients/AasRepositoryClient.ts +0 -501
- package/src/clients/index.ts +0 -1
- package/src/generated/aas-repository/index.ts +0 -3
- package/src/generated/aas-repository/sdk.gen.ts +0 -620
- package/src/generated/aas-repository/types.gen.ts +0 -3786
- package/src/index.ts +0 -1
- package/src/lib/convertAasTypes.ts +0 -123
- package/src/lib/createAasRepoClient.ts +0 -16
- package/src/models/aas-repository.ts +0 -12
- package/src/tests/clients/AasRepositoryClient.test.ts +0 -270
- package/src/tests/lib/convertAasTypes.test.ts +0 -201
- package/src/tests/lib/createAasRepoClient.test.ts +0 -55
- package/src/tests/models/.gitkeep +0 -0
- package/src/tests/utils/.gitkeep +0 -0
- package/src/utils/.gitkeep +0 -0
- /package/dist/generated/{aas-repository/index.d.ts → index.d.ts} +0 -0
- /package/dist/generated/{aas-repository/index.js → index.js} +0 -0
- /package/dist/generated/{aas-repository/types.gen.js → types.gen.js} +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
1
6
|
# basyx-typescript-sdk
|
|
2
7
|
|
|
3
8
|
BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)
|
|
@@ -22,6 +27,8 @@ Utility functions for working with AAS data:
|
|
|
22
27
|
npm install basyx-typescript-sdk
|
|
23
28
|
```
|
|
24
29
|
|
|
30
|
+
> See https://www.npmjs.com/package/basyx-typescript-sdk
|
|
31
|
+
|
|
25
32
|
## Usage
|
|
26
33
|
|
|
27
34
|
```typescript
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AssetAdministrationShell, AssetInformation, Reference } from '@aas-core-works/aas-core3.0-typescript/types';
|
|
2
|
-
import { AssetinformationThumbnailBody } from '../generated/
|
|
2
|
+
import { AssetinformationThumbnailBody } from '../generated/types.gen';
|
|
3
3
|
import { GetAllAssetAdministrationShellsResponse, getAllSubmodelReferencesResponse } from '../models/aas-repository';
|
|
4
4
|
export declare class AasRepositoryClient {
|
|
5
5
|
/**
|
|
@@ -125,12 +125,12 @@ export declare class AasRepositoryClient {
|
|
|
125
125
|
* @function getAllSubmodelReferences
|
|
126
126
|
* @param baseURL The API base URL
|
|
127
127
|
* @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
|
|
128
|
+
* @param headers Request headers
|
|
128
129
|
* @param limit The maximum number of elements in the response array
|
|
129
130
|
* @param cursor A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
|
|
130
|
-
* @param headers Request headers
|
|
131
131
|
* @returns {Promise<getAllSubmodelReferencesResponse>} Requested submodel references
|
|
132
132
|
*/
|
|
133
|
-
getAllSubmodelReferences(baseURL: string, aasIdentifier: string, limit?: number, cursor?: string
|
|
133
|
+
getAllSubmodelReferences(baseURL: string, aasIdentifier: string, headers?: Headers, limit?: number, cursor?: string): Promise<getAllSubmodelReferencesResponse>;
|
|
134
134
|
/**
|
|
135
135
|
* Creates a submodel reference at the Asset Administration Shell
|
|
136
136
|
*
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.AasRepositoryClient = void 0;
|
|
46
|
-
const AasRepository = __importStar(require("../generated
|
|
46
|
+
const AasRepository = __importStar(require("../generated"));
|
|
47
47
|
const convertAasTypes_1 = require("../lib/convertAasTypes");
|
|
48
48
|
const createAasRepoClient_1 = require("../lib/createAasRepoClient");
|
|
49
49
|
class AasRepositoryClient {
|
|
@@ -373,12 +373,12 @@ class AasRepositoryClient {
|
|
|
373
373
|
* @function getAllSubmodelReferences
|
|
374
374
|
* @param baseURL The API base URL
|
|
375
375
|
* @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
|
|
376
|
+
* @param headers Request headers
|
|
376
377
|
* @param limit The maximum number of elements in the response array
|
|
377
378
|
* @param cursor A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
|
|
378
|
-
* @param headers Request headers
|
|
379
379
|
* @returns {Promise<getAllSubmodelReferencesResponse>} Requested submodel references
|
|
380
380
|
*/
|
|
381
|
-
getAllSubmodelReferences(baseURL, aasIdentifier, limit, cursor
|
|
381
|
+
getAllSubmodelReferences(baseURL, aasIdentifier, headers, limit, cursor) {
|
|
382
382
|
return __awaiter(this, void 0, void 0, function* () {
|
|
383
383
|
var _a;
|
|
384
384
|
try {
|
|
@@ -402,7 +402,7 @@ class AasRepositoryClient {
|
|
|
402
402
|
};
|
|
403
403
|
}
|
|
404
404
|
catch (error) {
|
|
405
|
-
console.error('Error fetching
|
|
405
|
+
console.error('Error fetching Submodel References:', error);
|
|
406
406
|
throw error;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -434,7 +434,7 @@ class AasRepositoryClient {
|
|
|
434
434
|
return (0, convertAasTypes_1.convertApiReferenceToCoreReference)(data);
|
|
435
435
|
}
|
|
436
436
|
catch (error) {
|
|
437
|
-
console.error('Error creating
|
|
437
|
+
console.error('Error creating Submodel Reference:', error);
|
|
438
438
|
throw error;
|
|
439
439
|
}
|
|
440
440
|
});
|
|
@@ -465,7 +465,7 @@ class AasRepositoryClient {
|
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
467
|
catch (error) {
|
|
468
|
-
console.error('Error deleting
|
|
468
|
+
console.error('Error deleting Submodel Reference:', error);
|
|
469
469
|
throw error;
|
|
470
470
|
}
|
|
471
471
|
});
|