basyx-typescript-sdk 0.1.2 → 0.1.3
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/bundle/index.js +6555 -0
- package/bundle/index.js.map +1 -0
- package/package.json +14 -3
- package/dist/clients/AasRepositoryClient.d.ts +0 -158
- package/dist/clients/AasRepositoryClient.js +0 -474
- package/dist/clients/index.d.ts +0 -1
- package/dist/clients/index.js +0 -5
- package/dist/generated/index.d.ts +0 -2
- package/dist/generated/index.js +0 -19
- package/dist/generated/sdk.gen.d.ts +0 -822
- package/dist/generated/sdk.gen.js +0 -1705
- package/dist/generated/types.gen.d.ts +0 -10829
- package/dist/generated/types.gen.js +0 -3
- package/dist/index.js +0 -17
- package/dist/lib/convertAasTypes.d.ts +0 -50
- package/dist/lib/convertAasTypes.js +0 -121
- package/dist/lib/createAasRepoClient.d.ts +0 -9
- package/dist/lib/createAasRepoClient.js +0 -18
- package/dist/models/aas-repository.d.ts +0 -10
- package/dist/models/aas-repository.js +0 -2
package/dist/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./clients"), exports);
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { AssetAdministrationShell as CoreAssetAdministrationShell, AssetInformation as CoreAssetInformation, Reference as CoreReference } from '@aas-core-works/aas-core3.0-typescript/types';
|
|
2
|
-
import { AssetAdministrationShell as ApiAssetAdministrationShell, AssetInformation as ApiAssetInformation, Reference as ApiReference } from '../generated/types.gen';
|
|
3
|
-
/**
|
|
4
|
-
* Convert an API AssetAdministrationShell to a Core Works AssetAdministrationShell
|
|
5
|
-
*
|
|
6
|
-
* @function convertApiAasToCoreAas
|
|
7
|
-
* @param {ApiAssetAdministrationShell} aas - The API AssetAdministrationShell to convert
|
|
8
|
-
* @returns {CoreAssetAdministrationShell} The Core Works AssetAdministrationShell
|
|
9
|
-
*/
|
|
10
|
-
export declare function convertApiAasToCoreAas(aas: ApiAssetAdministrationShell): CoreAssetAdministrationShell;
|
|
11
|
-
/**
|
|
12
|
-
* Convert a Core Works AssetAdministrationShell to an API AssetAdministrationShell
|
|
13
|
-
*
|
|
14
|
-
* @function convertCoreAasToApiAas
|
|
15
|
-
* @param {CoreAssetAdministrationShell} aas - The Core Works AssetAdministrationShell to convert
|
|
16
|
-
* @returns {ApiAssetAdministrationShell} The API AssetAdministrationShell
|
|
17
|
-
*/
|
|
18
|
-
export declare function convertCoreAasToApiAas(aas: CoreAssetAdministrationShell): ApiAssetAdministrationShell;
|
|
19
|
-
/**
|
|
20
|
-
* Convert an API AssetInformation to a Core Works AssetInformation
|
|
21
|
-
*
|
|
22
|
-
* @function convertApiAssetInformationToCoreAssetInformation
|
|
23
|
-
* @param {ApiAssetInformation} assetInformation - The API AssetInformation to convert
|
|
24
|
-
* @returns {CoreAssetInformation} The Core Works AssetInformation
|
|
25
|
-
*/
|
|
26
|
-
export declare function convertApiAssetInformationToCoreAssetInformation(assetInformation: ApiAssetInformation): CoreAssetInformation;
|
|
27
|
-
/**
|
|
28
|
-
* Convert a Core Works AssetInformation to an API AssetInformation
|
|
29
|
-
*
|
|
30
|
-
* @function convertCoreAssetInformationToApiAssetInformation
|
|
31
|
-
* @param {CoreAssetInformation} assetInformation - The Core Works AssetInformation to convert
|
|
32
|
-
* @returns {ApiAssetInformation} The API AssetInformation
|
|
33
|
-
*/
|
|
34
|
-
export declare function convertCoreAssetInformationToApiAssetInformation(assetInformation: CoreAssetInformation): ApiAssetInformation;
|
|
35
|
-
/**
|
|
36
|
-
* Convert an API Reference to a Core Works Reference
|
|
37
|
-
*
|
|
38
|
-
* @function convertApiReferenceToCoreReference
|
|
39
|
-
* @param {ApiReference} reference - The API Reference to convert
|
|
40
|
-
* @returns {CoreReference} The Core Works Reference
|
|
41
|
-
*/
|
|
42
|
-
export declare function convertApiReferenceToCoreReference(reference: ApiReference): CoreReference;
|
|
43
|
-
/**
|
|
44
|
-
* Convert a Core Works Reference to an API Reference
|
|
45
|
-
*
|
|
46
|
-
* @function convertCoreReferenceToApiReference
|
|
47
|
-
* @param {CoreReference} reference - The Core Works Reference to convert
|
|
48
|
-
* @returns {ApiReference} The API Reference
|
|
49
|
-
*/
|
|
50
|
-
export declare function convertCoreReferenceToApiReference(reference: CoreReference): ApiReference;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertApiAasToCoreAas = convertApiAasToCoreAas;
|
|
4
|
-
exports.convertCoreAasToApiAas = convertCoreAasToApiAas;
|
|
5
|
-
exports.convertApiAssetInformationToCoreAssetInformation = convertApiAssetInformationToCoreAssetInformation;
|
|
6
|
-
exports.convertCoreAssetInformationToApiAssetInformation = convertCoreAssetInformationToApiAssetInformation;
|
|
7
|
-
exports.convertApiReferenceToCoreReference = convertApiReferenceToCoreReference;
|
|
8
|
-
exports.convertCoreReferenceToApiReference = convertCoreReferenceToApiReference;
|
|
9
|
-
const aas_core3_0_typescript_1 = require("@aas-core-works/aas-core3.0-typescript");
|
|
10
|
-
const types_1 = require("@aas-core-works/aas-core3.0-typescript/types");
|
|
11
|
-
/**
|
|
12
|
-
* Convert an API AssetAdministrationShell to a Core Works AssetAdministrationShell
|
|
13
|
-
*
|
|
14
|
-
* @function convertApiAasToCoreAas
|
|
15
|
-
* @param {ApiAssetAdministrationShell} aas - The API AssetAdministrationShell to convert
|
|
16
|
-
* @returns {CoreAssetAdministrationShell} The Core Works AssetAdministrationShell
|
|
17
|
-
*/
|
|
18
|
-
function convertApiAasToCoreAas(aas) {
|
|
19
|
-
// first stringify
|
|
20
|
-
let shell = JSON.stringify(aas);
|
|
21
|
-
// then parse
|
|
22
|
-
shell = JSON.parse(shell);
|
|
23
|
-
// then jsonize
|
|
24
|
-
const instanceOrError = aas_core3_0_typescript_1.jsonization.assetAdministrationShellFromJsonable(shell);
|
|
25
|
-
if (instanceOrError.error !== null) {
|
|
26
|
-
throw instanceOrError.error;
|
|
27
|
-
}
|
|
28
|
-
const instance = instanceOrError.mustValue();
|
|
29
|
-
// set the prototype
|
|
30
|
-
Object.setPrototypeOf(instance, types_1.AssetAdministrationShell.prototype);
|
|
31
|
-
return instance;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Convert a Core Works AssetAdministrationShell to an API AssetAdministrationShell
|
|
35
|
-
*
|
|
36
|
-
* @function convertCoreAasToApiAas
|
|
37
|
-
* @param {CoreAssetAdministrationShell} aas - The Core Works AssetAdministrationShell to convert
|
|
38
|
-
* @returns {ApiAssetAdministrationShell} The API AssetAdministrationShell
|
|
39
|
-
*/
|
|
40
|
-
function convertCoreAasToApiAas(aas) {
|
|
41
|
-
// first jsonize
|
|
42
|
-
const jsonableAas = aas_core3_0_typescript_1.jsonization.toJsonable(aas);
|
|
43
|
-
// then stringify
|
|
44
|
-
const shell = JSON.stringify(jsonableAas);
|
|
45
|
-
// then parse
|
|
46
|
-
return JSON.parse(shell);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Convert an API AssetInformation to a Core Works AssetInformation
|
|
50
|
-
*
|
|
51
|
-
* @function convertApiAssetInformationToCoreAssetInformation
|
|
52
|
-
* @param {ApiAssetInformation} assetInformation - The API AssetInformation to convert
|
|
53
|
-
* @returns {CoreAssetInformation} The Core Works AssetInformation
|
|
54
|
-
*/
|
|
55
|
-
function convertApiAssetInformationToCoreAssetInformation(assetInformation) {
|
|
56
|
-
// first stringify
|
|
57
|
-
let asset = JSON.stringify(assetInformation);
|
|
58
|
-
// then parse
|
|
59
|
-
asset = JSON.parse(asset);
|
|
60
|
-
// then jsonize
|
|
61
|
-
const instanceOrError = aas_core3_0_typescript_1.jsonization.assetInformationFromJsonable(asset);
|
|
62
|
-
if (instanceOrError.error !== null) {
|
|
63
|
-
throw instanceOrError.error;
|
|
64
|
-
}
|
|
65
|
-
const instance = instanceOrError.mustValue();
|
|
66
|
-
// set the prototype
|
|
67
|
-
Object.setPrototypeOf(instance, types_1.AssetInformation.prototype);
|
|
68
|
-
return instance;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Convert a Core Works AssetInformation to an API AssetInformation
|
|
72
|
-
*
|
|
73
|
-
* @function convertCoreAssetInformationToApiAssetInformation
|
|
74
|
-
* @param {CoreAssetInformation} assetInformation - The Core Works AssetInformation to convert
|
|
75
|
-
* @returns {ApiAssetInformation} The API AssetInformation
|
|
76
|
-
*/
|
|
77
|
-
function convertCoreAssetInformationToApiAssetInformation(assetInformation) {
|
|
78
|
-
// first jsonize
|
|
79
|
-
const jsonableAsset = aas_core3_0_typescript_1.jsonization.toJsonable(assetInformation);
|
|
80
|
-
// then stringify
|
|
81
|
-
const asset = JSON.stringify(jsonableAsset);
|
|
82
|
-
// then parse
|
|
83
|
-
return JSON.parse(asset);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Convert an API Reference to a Core Works Reference
|
|
87
|
-
*
|
|
88
|
-
* @function convertApiReferenceToCoreReference
|
|
89
|
-
* @param {ApiReference} reference - The API Reference to convert
|
|
90
|
-
* @returns {CoreReference} The Core Works Reference
|
|
91
|
-
*/
|
|
92
|
-
function convertApiReferenceToCoreReference(reference) {
|
|
93
|
-
// first stringify
|
|
94
|
-
let ref = JSON.stringify(reference);
|
|
95
|
-
// then parse
|
|
96
|
-
ref = JSON.parse(ref);
|
|
97
|
-
// then jsonize
|
|
98
|
-
const instanceOrError = aas_core3_0_typescript_1.jsonization.referenceFromJsonable(ref);
|
|
99
|
-
if (instanceOrError.error !== null) {
|
|
100
|
-
throw instanceOrError.error;
|
|
101
|
-
}
|
|
102
|
-
const instance = instanceOrError.mustValue();
|
|
103
|
-
// set the prototype
|
|
104
|
-
Object.setPrototypeOf(instance, types_1.Reference.prototype);
|
|
105
|
-
return instance;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Convert a Core Works Reference to an API Reference
|
|
109
|
-
*
|
|
110
|
-
* @function convertCoreReferenceToApiReference
|
|
111
|
-
* @param {CoreReference} reference - The Core Works Reference to convert
|
|
112
|
-
* @returns {ApiReference} The API Reference
|
|
113
|
-
*/
|
|
114
|
-
function convertCoreReferenceToApiReference(reference) {
|
|
115
|
-
// first jsonize
|
|
116
|
-
const jsonableRef = aas_core3_0_typescript_1.jsonization.toJsonable(reference);
|
|
117
|
-
// then stringify
|
|
118
|
-
const ref = JSON.stringify(jsonableRef);
|
|
119
|
-
// then parse
|
|
120
|
-
return JSON.parse(ref);
|
|
121
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a custom client configuration
|
|
3
|
-
*
|
|
4
|
-
* @function createCustomClient
|
|
5
|
-
* @param baseURL The base URL of the API
|
|
6
|
-
* @param headers The headers to be included in the request
|
|
7
|
-
* @returns {Client} The custom client
|
|
8
|
-
*/
|
|
9
|
-
export declare function createCustomClient(baseURL: string, headers?: Headers): import("@hey-api/client-fetch").Client;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCustomClient = createCustomClient;
|
|
4
|
-
const client_fetch_1 = require("@hey-api/client-fetch");
|
|
5
|
-
/**
|
|
6
|
-
* Creates a custom client configuration
|
|
7
|
-
*
|
|
8
|
-
* @function createCustomClient
|
|
9
|
-
* @param baseURL The base URL of the API
|
|
10
|
-
* @param headers The headers to be included in the request
|
|
11
|
-
* @returns {Client} The custom client
|
|
12
|
-
*/
|
|
13
|
-
function createCustomClient(baseURL, headers = new Headers()) {
|
|
14
|
-
return (0, client_fetch_1.createClient)({
|
|
15
|
-
baseUrl: baseURL,
|
|
16
|
-
headers,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AssetAdministrationShell, Reference } from '@aas-core-works/aas-core3.0-typescript/types';
|
|
2
|
-
import type { PagedResultPagingMetadata } from '../generated/types.gen';
|
|
3
|
-
export interface GetAllAssetAdministrationShellsResponse {
|
|
4
|
-
pagedResult: PagedResultPagingMetadata | undefined;
|
|
5
|
-
result: AssetAdministrationShell[] | undefined;
|
|
6
|
-
}
|
|
7
|
-
export interface getAllSubmodelReferencesResponse {
|
|
8
|
-
pagedResult: PagedResultPagingMetadata | undefined;
|
|
9
|
-
result: Reference[] | undefined;
|
|
10
|
-
}
|