basyx-typescript-sdk 0.1.11 → 0.2.0

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.
@@ -1,158 +1,157 @@
1
1
  import type { AssetAdministrationShell, AssetInformation, Reference } from '@aas-core-works/aas-core3.0-typescript/types';
2
- import { AssetinformationThumbnailBody } from '../generated/types.gen';
3
- import { GetAllAssetAdministrationShellsResponse, getAllSubmodelReferencesResponse } from '../models/aas-repository';
2
+ import { AasIdentifierOptions, DeleteSubmodelReferenceByIdOptions, GetAllAssetAdministrationShellsOptions, GetAllAssetAdministrationShellsResponse, GetAllSubmodelReferencesOptions, GetAllSubmodelReferencesResponse, PostAssetAdministrationShellOptions, PostSubmodelReferenceOptions, PutAssetAdministrationShellOptions, PutAssetInformationOptions, PutThumbnailOptions } from '../models/aas-repository';
4
3
  export declare class AasRepositoryClient {
5
4
  /**
6
5
  * Returns all Asset Administration Shells
7
6
  *
8
- * @async
9
7
  * @function getAllAssetAdministrationShells
10
- * @param baseURL The API base URL
11
- * @param headers Request headers
12
- * @param assetIds A list of specific Asset identifiers. Every single value asset identifier is a base64-url-encoded
13
- * @param idShort The Asset Administration Shell’s IdShort
14
- * @param limit The maximum number of elements in the response array
15
- * @param cursor A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
8
+ * @param {GetAllAssetAdministrationShellsOptions} options - Options object.
9
+ * @param {string} options.baseUrl - The API base URL
10
+ * @param {Headers} [options.headers] - Request headers
11
+ * @param {string[]} [options.assetIds] - A list of specific Asset identifiers. Every single value asset identifier is a base64-url-encoded
12
+ * @param {string} [options.idShort] - The Asset Administration Shell's IdShort
13
+ * @param {number} [options.limit] - The maximum number of elements in the response array
14
+ * @param {string} [options.cursor] - A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
16
15
  * @returns {Promise<GetAllAssetAdministrationShellsResponse>} Requested Asset Administration Shells
17
16
  */
18
- getAllAssetAdministrationShells(baseURL: string, headers?: Headers, assetIds?: string[], idShort?: string, limit?: number, cursor?: string): Promise<GetAllAssetAdministrationShellsResponse>;
17
+ getAllAssetAdministrationShells({ baseUrl, headers, assetIds, idShort, limit, cursor, }: GetAllAssetAdministrationShellsOptions): Promise<GetAllAssetAdministrationShellsResponse>;
19
18
  /**
20
19
  * Creates a new Asset Administration Shell
21
20
  *
22
- * @async
23
21
  * @function postAssetAdministrationShell
24
- * @param baseURL The API base URL
25
- * @param assetAdministrationShell Asset Administration Shell object
26
- * @param headers Request headers
22
+ * @param {PostAssetAdministrationShellOptions} options - Options object.
23
+ * @param {string} options.baseUrl - The API base URL
24
+ * @param {AssetAdministrationShell} options.assetAdministrationShell - Asset Administration Shell object
25
+ * @param {Headers} [options.headers] - Request headers
27
26
  * @returns {Promise<AssetAdministrationShell>} Asset Administration Shell created successfully
28
27
  */
29
- postAssetAdministrationShell(baseURL: string, assetAdministrationShell: AssetAdministrationShell, headers?: Headers): Promise<AssetAdministrationShell>;
28
+ postAssetAdministrationShell({ baseUrl, assetAdministrationShell, headers, }: PostAssetAdministrationShellOptions): Promise<AssetAdministrationShell>;
30
29
  /**
31
30
  * Deletes an Asset Administration Shell
32
31
  *
33
- * @async
34
32
  * @function deleteAssetAdministrationShellById
35
- * @param baseURL The API base URL
36
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
37
- * @param headers Request headers
33
+ * @param {AasIdentifierOptions} options - Options object.
34
+ * @param {string} options.baseUrl - The API base URL
35
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
36
+ * @param {Headers} [options.headers] - Request headers
38
37
  * @returns {Promise<void>} Asset Administration Shell deleted successfully
39
38
  */
40
- deleteAssetAdministrationShellById(baseURL: string, aasIdentifier: string, headers?: Headers): Promise<void>;
39
+ deleteAssetAdministrationShellById({ baseUrl, aasIdentifier, headers }: AasIdentifierOptions): Promise<void>;
41
40
  /**
42
41
  * Returns a specific Asset Administration Shell
43
42
  *
44
- * @async
45
43
  * @function getAssetAdministrationShellById
46
- * @param baseURL The API base URL
47
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
48
- * @param headers Request headers
44
+ * @param {AasIdentifierOptions} options - Options object.
45
+ * @param {string} options.baseUrl - The API base URL
46
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
47
+ * @param {Headers} [options.headers] - Request headers
49
48
  * @returns {Promise<AssetAdministrationShell>} Requested Asset Administration Shell
50
49
  */
51
- getAssetAdministrationShellById(baseURL: string, aasIdentifier: string, headers?: Headers): Promise<AssetAdministrationShell>;
50
+ getAssetAdministrationShellById({ baseUrl, aasIdentifier, headers, }: AasIdentifierOptions): Promise<AssetAdministrationShell>;
52
51
  /**
53
52
  * Updates an existing Asset Administration Shell
54
53
  *
55
- * @async
56
54
  * @function putAssetAdministrationShellById
57
- * @param baseURL The API base URL
58
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
59
- * @param assetAdministrationShell Asset Administration Shell object
60
- * @param headers Request headers
55
+ * @param {PutAssetAdministrationShellOptions} options - Options object.
56
+ * @param {string} options.baseUrl - The API base URL
57
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
58
+ * @param {AssetAdministrationShell} options.assetAdministrationShell - Asset Administration Shell object
59
+ * @param {Headers} [options.headers] - Request headers
61
60
  * @returns {Promise<void>} Asset Administration Shell updated successfully
62
61
  */
63
- putAssetAdministrationShellById(baseURL: string, aasIdentifier: string, assetAdministrationShell: AssetAdministrationShell, headers?: Headers): Promise<void>;
62
+ putAssetAdministrationShellById({ baseUrl, aasIdentifier, assetAdministrationShell, headers, }: PutAssetAdministrationShellOptions): Promise<void>;
64
63
  /**
65
64
  * Returns the Asset Information
66
65
  *
67
- * @async
68
66
  * @function getAssetInformation
69
- * @param baseURL The API base URL
70
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
71
- * @param headers Request headers
67
+ * @param {AasIdentifierOptions} options - Options object.
68
+ * @param {string} options.baseUrl - The API base URL
69
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
70
+ * @param {Headers} [options.headers] - Request headers
72
71
  * @returns {Promise<AssetInformation>} Requested Asset Information
73
72
  */
74
- getAssetInformation(baseURL: string, aasIdentifier: string, headers?: Headers): Promise<AssetInformation>;
73
+ getAssetInformation({ baseUrl, aasIdentifier, headers }: AasIdentifierOptions): Promise<AssetInformation>;
75
74
  /**
76
75
  * Updates the Asset Information
77
76
  *
78
- * @async
79
77
  * @function putAssetInformation
80
- * @param baseURL The API base URL
81
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
82
- * @param assetInformation Asset Information object
83
- * @param headers Request headers
78
+ * @param {PutAssetInformationOptions} options - Options object.
79
+ * @param {string} options.baseUrl - The API base URL
80
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
81
+ * @param {AssetInformation} options.assetInformation - Asset Information object
82
+ * @param {Headers} [options.headers] - Request headers
84
83
  * @returns {Promise<void>} Asset Information updated successfully
85
84
  */
86
- putAssetInformation(baseURL: string, aasIdentifier: string, assetInformation: AssetInformation, headers?: Headers): Promise<void>;
85
+ putAssetInformation({ baseUrl, aasIdentifier, assetInformation, headers, }: PutAssetInformationOptions): Promise<void>;
87
86
  /**
88
87
  * Deletes the Thumbnail
89
88
  *
90
- * @async
91
89
  * @function deleteThumbnail
92
- * @param baseURL The API base URL
93
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
94
- * @param headers Request headers
90
+ * @param {AasIdentifierOptions} options - Options object.
91
+ * @param {string} options.baseUrl - The API base URL
92
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
93
+ * @param {Headers} [options.headers] - Request headers
95
94
  * @returns {Promise<void>} Thumbnail deletion successful
96
95
  */
97
- deleteThumbnail(baseURL: string, aasIdentifier: string, headers?: Headers): Promise<void>;
96
+ deleteThumbnail({ baseUrl, aasIdentifier, headers }: AasIdentifierOptions): Promise<void>;
98
97
  /**
99
98
  * Returns the Thumbnail
100
99
  *
101
- * @async
102
100
  * @function getThumbnail
103
- * @param baseURL The API base URL
104
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
105
- * @param headers Request headers
101
+ * @param {AasIdentifierOptions} options - Options object.
102
+ * @param {string} options.baseUrl - The API base URL
103
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
104
+ * @param {Headers} [options.headers] - Request headers
106
105
  * @returns {Promise<Blob | File>} The thumbnail of the Asset Information.
107
106
  */
108
- getThumbnail(baseURL: string, aasIdentifier: string, headers?: Headers): Promise<Blob | File>;
107
+ getThumbnail({ baseUrl, aasIdentifier, headers }: AasIdentifierOptions): Promise<Blob | File>;
109
108
  /**
110
109
  * Updates the Thumbnail
111
110
  *
112
- * @async
113
111
  * @function putThumbnail
114
- * @param baseURL The API base URL
115
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
116
- * @param thumbnail Thumbnail to upload
117
- * @param headers Request headers
112
+ * @param {PutThumbnailOptions} options - Options object.
113
+ * @param {string} options.baseUrl - The API base URL
114
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
115
+ * @param {AssetinformationThumbnailBody} options.thumbnail - Thumbnail to upload
116
+ * @param {Headers} [options.headers] - Request headers
118
117
  * @returns {Promise<void>} Thumbnail updated successfully
119
118
  */
120
- putThumbnail(baseURL: string, aasIdentifier: string, thumbnail: AssetinformationThumbnailBody, headers?: Headers): Promise<void>;
119
+ putThumbnail({ baseUrl, aasIdentifier, thumbnail, headers }: PutThumbnailOptions): Promise<void>;
121
120
  /**
122
121
  * Returns all submodel references
123
122
  *
124
- * @async
125
123
  * @function getAllSubmodelReferences
126
- * @param baseURL The API base URL
127
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
128
- * @param headers Request headers
129
- * @param limit The maximum number of elements in the response array
130
- * @param cursor A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
131
- * @returns {Promise<getAllSubmodelReferencesResponse>} Requested submodel references
124
+ * @param {GetAllSubmodelReferencesOptions} options - Options object.
125
+ * @param {string} options.baseUrl - The API base URL
126
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
127
+ * @param {Headers} [options.headers] - Request headers
128
+ * @param {number} [options.limit] - The maximum number of elements in the response array
129
+ * @param {string} [options.cursor] - A server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
130
+ * @returns {Promise<GetAllSubmodelReferencesResponse>} Requested submodel references
132
131
  */
133
- getAllSubmodelReferences(baseURL: string, aasIdentifier: string, headers?: Headers, limit?: number, cursor?: string): Promise<getAllSubmodelReferencesResponse>;
132
+ getAllSubmodelReferences({ baseUrl, aasIdentifier, headers, limit, cursor, }: GetAllSubmodelReferencesOptions): Promise<GetAllSubmodelReferencesResponse>;
134
133
  /**
135
134
  * Creates a submodel reference at the Asset Administration Shell
136
135
  *
137
- * @async
138
136
  * @function postSubmodelReference
139
- * @param baseURL The API base URL
140
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
141
- * @param submodelReference Reference to the Submodel
142
- * @param headers Request headers
143
- * @returns {promise<Reference>} Submodel reference created successfully
137
+ * @param {PostSubmodelReferenceOptions} options - Options object.
138
+ * @param {string} options.baseUrl - The API base URL
139
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
140
+ * @param {Reference} options.submodelReference - Reference to the Submodel
141
+ * @param {Headers} [options.headers] - Request headers
142
+ * @returns {Promise<Reference>} Submodel reference created successfully
144
143
  */
145
- postSubmodelReference(baseURL: string, aasIdentifier: string, submodelReference: Reference, headers?: Headers): Promise<Reference>;
144
+ postSubmodelReference({ baseUrl, aasIdentifier, submodelReference, headers, }: PostSubmodelReferenceOptions): Promise<Reference>;
146
145
  /**
147
146
  * Deletes the submodel reference from the Asset Administration Shell. Does not delete the submodel itself!
148
147
  *
149
- * @async
150
148
  * @function deleteSubmodelReferenceById
151
- * @param baseURL The API base URL
152
- * @param aasIdentifier The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
153
- * @param submodelIdentifier The Submodel’s unique id (UTF8-BASE64-URL-encoded)
154
- * @param headers Request headers
149
+ * @param {DeleteSubmodelReferenceByIdOptions} options - Options object.
150
+ * @param {string} options.baseUrl - The API base URL
151
+ * @param {string} options.aasIdentifier - The Asset Administration Shell's unique id
152
+ * @param {string} options.submodelIdentifier - The Submodel's unique id
153
+ * @param {Headers} [options.headers] - Request headers
155
154
  * @returns {Promise<void>} Submodel reference deleted successfully
156
155
  */
157
- deleteSubmodelReferenceById(baseURL: string, aasIdentifier: string, submodelIdentifier: string, headers?: Headers): Promise<void>;
156
+ deleteSubmodelReferenceById({ baseUrl, aasIdentifier, submodelIdentifier, headers, }: DeleteSubmodelReferenceByIdOptions): Promise<void>;
158
157
  }