basyx-typescript-sdk 2.2.4 → 2.3.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.
- package/README.md +169 -0
- package/bundle/index.cjs +3484 -2149
- package/bundle/index.cjs.map +1 -1
- package/bundle/index.mjs +3484 -2149
- package/bundle/index.mjs.map +1 -1
- package/dist/clients/AasDiscoveryClient.d.ts +12 -5
- package/dist/clients/AasDiscoveryClient.js +104 -27
- package/dist/clients/AasRegistryClient.d.ts +32 -10
- package/dist/clients/AasRegistryClient.js +211 -61
- package/dist/clients/AasRepositoryClient.d.ts +231 -60
- package/dist/clients/AasRepositoryClient.js +1021 -353
- package/dist/clients/AasxFileClient.d.ts +29 -3
- package/dist/clients/AasxFileClient.js +122 -31
- package/dist/clients/ConceptDescriptionRepositoryClient.d.ts +14 -4
- package/dist/clients/ConceptDescriptionRepositoryClient.js +127 -35
- package/dist/clients/SubmodelRegistryClient.d.ts +14 -4
- package/dist/clients/SubmodelRegistryClient.js +117 -27
- package/dist/clients/SubmodelRepositoryClient.d.ts +339 -58
- package/dist/clients/SubmodelRepositoryClient.js +913 -269
- package/dist/generated/AasDiscoveryService/models/index.d.ts +2 -2
- package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.d.ts +1 -1
- package/dist/generated/AasRegistryService/apis/AssetAdministrationShellRegistryAPIApi.js +1 -1
- package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.d.ts +1 -1
- package/dist/generated/AasRegistryService/apis/DescriptionAPIApi.js +1 -1
- package/dist/generated/AasRegistryService/index.d.ts +1 -1
- package/dist/generated/AasRegistryService/index.js +1 -1
- package/dist/generated/AasRegistryService/models/index.d.ts +3 -3
- package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.d.ts +3 -3
- package/dist/generated/AasRepositoryService/apis/AssetAdministrationShellRepositoryAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.d.ts +1 -1
- package/dist/generated/AasRepositoryService/apis/DescriptionAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.d.ts +1 -1
- package/dist/generated/AasRepositoryService/apis/SerializationAPIApi.js +1 -1
- package/dist/generated/AasRepositoryService/index.d.ts +1 -1
- package/dist/generated/AasRepositoryService/index.js +1 -1
- package/dist/generated/AasRepositoryService/models/index.d.ts +7 -7
- package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.d.ts +5 -3
- package/dist/generated/AasxFileService/apis/AASXFileServerAPIApi.js +6 -0
- package/dist/generated/AasxFileService/apis/DescriptionAPIApi.d.ts +26 -0
- package/dist/generated/AasxFileService/apis/DescriptionAPIApi.js +40 -0
- package/dist/generated/AasxFileService/apis/index.d.ts +1 -0
- package/dist/generated/AasxFileService/apis/index.js +1 -0
- package/dist/generated/AasxFileService/models/index.d.ts +45 -0
- package/dist/generated/ConceptDescriptionRepositoryService/models/index.d.ts +2 -2
- package/dist/generated/SubmodelRegistryService/models/index.d.ts +2 -2
- package/dist/generated/SubmodelRepositoryService/models/index.d.ts +9 -9
- package/dist/generated/runtime.js +7 -0
- package/dist/lib/apiConfig.d.ts +2 -1
- package/dist/lib/apiConfig.js +27 -2
- package/dist/lib/conditionalRequests.d.ts +28 -0
- package/dist/lib/conditionalRequests.js +55 -0
- package/dist/lib/errorHandler.js +13 -2
- package/dist/models/api.d.ts +40 -2
- package/dist/services/AasService.d.ts +34 -4
- package/dist/services/AasService.js +159 -33
- package/dist/services/SubmodelService.d.ts +34 -4
- package/dist/services/SubmodelService.js +168 -28
- package/package.json +14 -3
- package/dist/generated/AasRegistryService/runtime.d.ts +0 -181
- package/dist/generated/AasRegistryService/runtime.js +0 -326
- package/dist/generated/AasRepositoryService/runtime.d.ts +0 -181
- package/dist/generated/AasRepositoryService/runtime.js +0 -326
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import type { ApiResult } from '../models/api';
|
|
1
|
+
import type { ApiResult, ConditionalApiResult } from '../models/api';
|
|
2
2
|
import { AasxFileService } from '../generated';
|
|
3
3
|
import { Configuration } from '../generated/runtime';
|
|
4
4
|
export declare class AasxFileClient {
|
|
5
|
+
private static requireIdentifier;
|
|
6
|
+
private static extractStatusCode;
|
|
5
7
|
/**
|
|
6
8
|
* Returns a list of available AASX packages at the server
|
|
7
9
|
*
|
|
8
10
|
* @param options Object containing:
|
|
9
11
|
* - configuration: The http request options
|
|
10
12
|
* - aasId?: The Asset Administration Shell’s unique id
|
|
13
|
+
* - limit?: The maximum number of elements in the response array
|
|
14
|
+
* - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
|
|
11
15
|
*
|
|
12
16
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
13
17
|
*/
|
|
14
18
|
getAllAASXPackageIds(options: {
|
|
15
19
|
configuration: Configuration;
|
|
16
20
|
aasId?: string;
|
|
21
|
+
limit?: number;
|
|
22
|
+
cursor?: string;
|
|
17
23
|
}): Promise<ApiResult<{
|
|
24
|
+
pagedResult: AasxFileService.PagedResultPagingMetadata | undefined;
|
|
18
25
|
result: AasxFileService.PackageDescription[];
|
|
19
26
|
}, AasxFileService.Result>>;
|
|
20
27
|
/**
|
|
@@ -40,13 +47,15 @@ export declare class AasxFileClient {
|
|
|
40
47
|
* @param options Object containing:
|
|
41
48
|
* - configuration: The http request options
|
|
42
49
|
* - packageId: The package Id (UTF8-BASE64-URL-encoded)
|
|
50
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; returns `{ success: true; notModified: true }` without data if the representation still has this `etag`
|
|
43
51
|
*
|
|
44
52
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
45
53
|
*/
|
|
46
|
-
getAASXByPackageId(options: {
|
|
54
|
+
getAASXByPackageId<IfNoneMatch extends string | undefined = undefined>(options: {
|
|
47
55
|
configuration: Configuration;
|
|
48
56
|
packageId: string;
|
|
49
|
-
|
|
57
|
+
ifNoneMatch?: IfNoneMatch;
|
|
58
|
+
}): Promise<ConditionalApiResult<Blob, AasxFileService.Result, IfNoneMatch>>;
|
|
50
59
|
/**
|
|
51
60
|
* Updates the AASX package at the server
|
|
52
61
|
*
|
|
@@ -56,6 +65,8 @@ export declare class AasxFileClient {
|
|
|
56
65
|
* - aasIds?: A list of Asset Administration Shells' unique ids
|
|
57
66
|
* - file: The file to upload
|
|
58
67
|
* - fileName: The name of the file
|
|
68
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
69
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
59
70
|
*
|
|
60
71
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
61
72
|
*/
|
|
@@ -65,6 +76,8 @@ export declare class AasxFileClient {
|
|
|
65
76
|
aasIds?: string[];
|
|
66
77
|
file: Blob;
|
|
67
78
|
fileName: string;
|
|
79
|
+
ifMatch?: string;
|
|
80
|
+
ifNoneMatch?: string;
|
|
68
81
|
}): Promise<ApiResult<void, AasxFileService.Result>>;
|
|
69
82
|
/**
|
|
70
83
|
* Deletes a specific AASX package from the server
|
|
@@ -72,11 +85,24 @@ export declare class AasxFileClient {
|
|
|
72
85
|
* @param options Object containing:
|
|
73
86
|
* - configuration: The http request options.
|
|
74
87
|
* - packageId: The package Id (UTF8-BASE64-URL-encoded)
|
|
88
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
75
89
|
*
|
|
76
90
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
77
91
|
*/
|
|
78
92
|
deleteAASXByPackageId(options: {
|
|
79
93
|
configuration: Configuration;
|
|
80
94
|
packageId: string;
|
|
95
|
+
ifMatch?: string;
|
|
81
96
|
}): Promise<ApiResult<void, AasxFileService.Result>>;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
99
|
+
*
|
|
100
|
+
* @param options Object containing:
|
|
101
|
+
* - configuration: The http request options
|
|
102
|
+
*
|
|
103
|
+
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
104
|
+
*/
|
|
105
|
+
getSelfDescription(options: {
|
|
106
|
+
configuration: Configuration;
|
|
107
|
+
}): Promise<ApiResult<AasxFileService.ServiceDescription, AasxFileService.Result>>;
|
|
82
108
|
}
|
|
@@ -1,33 +1,70 @@
|
|
|
1
1
|
import { AasxFileService } from '../generated';
|
|
2
|
+
import { RequiredError } from '../generated/runtime';
|
|
2
3
|
import { applyDefaults } from '../lib/apiConfig';
|
|
3
4
|
import { base64Encode } from '../lib/base64Url';
|
|
5
|
+
import { getConditionalErrorFields, getEtag, getNotModifiedResult } from '../lib/conditionalRequests';
|
|
4
6
|
import { handleApiError } from '../lib/errorHandler';
|
|
5
7
|
export class AasxFileClient {
|
|
8
|
+
static requireIdentifier(value, field) {
|
|
9
|
+
if (value === null || value === undefined || value.trim() === '') {
|
|
10
|
+
throw new RequiredError(field, `Required parameter "${field}" was null, undefined, or empty.`);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
static extractStatusCode(err, parsedError) {
|
|
15
|
+
const responseStatus = err?.response?.status;
|
|
16
|
+
if (typeof responseStatus === 'number') {
|
|
17
|
+
return responseStatus;
|
|
18
|
+
}
|
|
19
|
+
if (err instanceof RequiredError || err?.name === 'RequiredError') {
|
|
20
|
+
return 400;
|
|
21
|
+
}
|
|
22
|
+
const code = parsedError?.messages?.[0]?.code;
|
|
23
|
+
if (!code) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const parsedCode = Number.parseInt(code, 10);
|
|
27
|
+
return Number.isNaN(parsedCode) ? undefined : parsedCode;
|
|
28
|
+
}
|
|
6
29
|
/**
|
|
7
30
|
* Returns a list of available AASX packages at the server
|
|
8
31
|
*
|
|
9
32
|
* @param options Object containing:
|
|
10
33
|
* - configuration: The http request options
|
|
11
34
|
* - aasId?: The Asset Administration Shell’s unique id
|
|
35
|
+
* - limit?: The maximum number of elements in the response array
|
|
36
|
+
* - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
|
|
12
37
|
*
|
|
13
38
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
14
39
|
*/
|
|
15
40
|
async getAllAASXPackageIds(options) {
|
|
16
|
-
const { configuration, aasId } = options;
|
|
41
|
+
const { configuration, aasId, limit, cursor } = options;
|
|
17
42
|
try {
|
|
18
43
|
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration));
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
aasId:
|
|
44
|
+
const encodedAasIdentifier = aasId ? base64Encode(aasId) : undefined;
|
|
45
|
+
const response = await apiInstance.getAllAASXPackageIdsRaw({
|
|
46
|
+
aasId: encodedAasIdentifier,
|
|
47
|
+
limit: limit,
|
|
48
|
+
cursor: cursor,
|
|
22
49
|
});
|
|
50
|
+
const payload = await response.value();
|
|
51
|
+
const result = payload.result ?? [];
|
|
52
|
+
const pagedResult = payload.paging_metadata;
|
|
23
53
|
return {
|
|
24
54
|
success: true,
|
|
25
|
-
data: { result },
|
|
55
|
+
data: { pagedResult, result },
|
|
56
|
+
statusCode: response.raw.status,
|
|
57
|
+
etag: getEtag(response.raw),
|
|
26
58
|
};
|
|
27
59
|
}
|
|
28
60
|
catch (err) {
|
|
29
61
|
const customError = await handleApiError(err);
|
|
30
|
-
return {
|
|
62
|
+
return {
|
|
63
|
+
success: false,
|
|
64
|
+
error: customError,
|
|
65
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
66
|
+
...getConditionalErrorFields(err),
|
|
67
|
+
};
|
|
31
68
|
}
|
|
32
69
|
}
|
|
33
70
|
/**
|
|
@@ -45,18 +82,22 @@ export class AasxFileClient {
|
|
|
45
82
|
const { configuration, aasIds, file, fileName } = options;
|
|
46
83
|
try {
|
|
47
84
|
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration));
|
|
48
|
-
|
|
49
|
-
//const encodedFileName = base64Encode(fileName);
|
|
50
|
-
const result = await apiInstance.postAASXPackage({
|
|
85
|
+
const response = await apiInstance.postAASXPackageRaw({
|
|
51
86
|
aasIds: aasIds,
|
|
52
87
|
file: file,
|
|
53
88
|
fileName: fileName,
|
|
54
89
|
});
|
|
55
|
-
|
|
90
|
+
const result = await response.value();
|
|
91
|
+
return { success: true, data: result, statusCode: response.raw.status, etag: getEtag(response.raw) };
|
|
56
92
|
}
|
|
57
93
|
catch (err) {
|
|
58
94
|
const customError = await handleApiError(err);
|
|
59
|
-
return {
|
|
95
|
+
return {
|
|
96
|
+
success: false,
|
|
97
|
+
error: customError,
|
|
98
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
99
|
+
...getConditionalErrorFields(err),
|
|
100
|
+
};
|
|
60
101
|
}
|
|
61
102
|
}
|
|
62
103
|
/**
|
|
@@ -65,22 +106,33 @@ export class AasxFileClient {
|
|
|
65
106
|
* @param options Object containing:
|
|
66
107
|
* - configuration: The http request options
|
|
67
108
|
* - packageId: The package Id (UTF8-BASE64-URL-encoded)
|
|
109
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; returns `{ success: true; notModified: true }` without data if the representation still has this `etag`
|
|
68
110
|
*
|
|
69
111
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
70
112
|
*/
|
|
71
113
|
async getAASXByPackageId(options) {
|
|
72
|
-
const { configuration, packageId } = options;
|
|
114
|
+
const { configuration, packageId, ifNoneMatch } = options;
|
|
73
115
|
try {
|
|
74
|
-
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration));
|
|
75
|
-
const encodedPackageId = base64Encode(packageId);
|
|
76
|
-
const
|
|
116
|
+
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration, { ifNoneMatch }));
|
|
117
|
+
const encodedPackageId = base64Encode(AasxFileClient.requireIdentifier(packageId, 'packageId'));
|
|
118
|
+
const response = await apiInstance.getAASXByPackageIdRaw({
|
|
77
119
|
packageId: encodedPackageId,
|
|
78
120
|
});
|
|
79
|
-
|
|
121
|
+
const result = await response.value();
|
|
122
|
+
return { success: true, data: result, statusCode: response.raw.status, etag: getEtag(response.raw) };
|
|
80
123
|
}
|
|
81
124
|
catch (err) {
|
|
125
|
+
const notModified = getNotModifiedResult(err, ifNoneMatch);
|
|
126
|
+
if (notModified) {
|
|
127
|
+
return notModified;
|
|
128
|
+
}
|
|
82
129
|
const customError = await handleApiError(err);
|
|
83
|
-
return {
|
|
130
|
+
return {
|
|
131
|
+
success: false,
|
|
132
|
+
error: customError,
|
|
133
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
134
|
+
...getConditionalErrorFields(err),
|
|
135
|
+
};
|
|
84
136
|
}
|
|
85
137
|
}
|
|
86
138
|
/**
|
|
@@ -92,27 +144,33 @@ export class AasxFileClient {
|
|
|
92
144
|
* - aasIds?: A list of Asset Administration Shells' unique ids
|
|
93
145
|
* - file: The file to upload
|
|
94
146
|
* - fileName: The name of the file
|
|
147
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
148
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
95
149
|
*
|
|
96
150
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
97
151
|
*/
|
|
98
152
|
async putAASXByPackageId(options) {
|
|
99
|
-
const { configuration, packageId, aasIds, file, fileName } = options;
|
|
153
|
+
const { configuration, packageId, aasIds, file, fileName, ifMatch, ifNoneMatch } = options;
|
|
100
154
|
try {
|
|
101
|
-
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration));
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
//const encodedFileName = base64Encode(fileName);
|
|
105
|
-
const result = await apiInstance.putAASXByPackageId({
|
|
155
|
+
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration, { ifMatch, ifNoneMatch }));
|
|
156
|
+
const encodedPackageId = base64Encode(AasxFileClient.requireIdentifier(packageId, 'packageId'));
|
|
157
|
+
const response = await apiInstance.putAASXByPackageIdRaw({
|
|
106
158
|
packageId: encodedPackageId,
|
|
107
159
|
aasIds: aasIds,
|
|
108
160
|
file: file,
|
|
109
161
|
fileName: fileName,
|
|
110
162
|
});
|
|
111
|
-
|
|
163
|
+
const result = await response.value();
|
|
164
|
+
return { success: true, data: result, statusCode: response.raw.status, etag: getEtag(response.raw) };
|
|
112
165
|
}
|
|
113
166
|
catch (err) {
|
|
114
167
|
const customError = await handleApiError(err);
|
|
115
|
-
return {
|
|
168
|
+
return {
|
|
169
|
+
success: false,
|
|
170
|
+
error: customError,
|
|
171
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
172
|
+
...getConditionalErrorFields(err),
|
|
173
|
+
};
|
|
116
174
|
}
|
|
117
175
|
}
|
|
118
176
|
/**
|
|
@@ -121,22 +179,55 @@ export class AasxFileClient {
|
|
|
121
179
|
* @param options Object containing:
|
|
122
180
|
* - configuration: The http request options.
|
|
123
181
|
* - packageId: The package Id (UTF8-BASE64-URL-encoded)
|
|
182
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
124
183
|
*
|
|
125
184
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
126
185
|
*/
|
|
127
186
|
async deleteAASXByPackageId(options) {
|
|
128
|
-
const { configuration, packageId } = options;
|
|
187
|
+
const { configuration, packageId, ifMatch } = options;
|
|
129
188
|
try {
|
|
130
|
-
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration));
|
|
131
|
-
const encodedPackageId = base64Encode(packageId);
|
|
132
|
-
const
|
|
189
|
+
const apiInstance = new AasxFileService.AASXFileServerAPIApi(applyDefaults(configuration, { ifMatch }));
|
|
190
|
+
const encodedPackageId = base64Encode(AasxFileClient.requireIdentifier(packageId, 'packageId'));
|
|
191
|
+
const response = await apiInstance.deleteAASXByPackageIdRaw({
|
|
133
192
|
packageId: encodedPackageId,
|
|
134
193
|
});
|
|
135
|
-
|
|
194
|
+
const result = await response.value();
|
|
195
|
+
return { success: true, data: result, statusCode: response.raw.status, etag: getEtag(response.raw) };
|
|
136
196
|
}
|
|
137
197
|
catch (err) {
|
|
138
198
|
const customError = await handleApiError(err);
|
|
139
|
-
return {
|
|
199
|
+
return {
|
|
200
|
+
success: false,
|
|
201
|
+
error: customError,
|
|
202
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
203
|
+
...getConditionalErrorFields(err),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Returns the self-describing information of a network resource (ServiceDescription)
|
|
209
|
+
*
|
|
210
|
+
* @param options Object containing:
|
|
211
|
+
* - configuration: The http request options
|
|
212
|
+
*
|
|
213
|
+
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
214
|
+
*/
|
|
215
|
+
async getSelfDescription(options) {
|
|
216
|
+
const { configuration } = options;
|
|
217
|
+
try {
|
|
218
|
+
const apiInstance = new AasxFileService.DescriptionAPIApi(applyDefaults(configuration));
|
|
219
|
+
const response = await apiInstance.getSelfDescriptionRaw();
|
|
220
|
+
const result = await response.value();
|
|
221
|
+
return { success: true, data: result, statusCode: response.raw.status, etag: getEtag(response.raw) };
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
const customError = await handleApiError(err);
|
|
225
|
+
return {
|
|
226
|
+
success: false,
|
|
227
|
+
error: customError,
|
|
228
|
+
statusCode: AasxFileClient.extractStatusCode(err, customError),
|
|
229
|
+
...getConditionalErrorFields(err),
|
|
230
|
+
};
|
|
140
231
|
}
|
|
141
232
|
}
|
|
142
233
|
}
|
|
@@ -1,33 +1,39 @@
|
|
|
1
1
|
import type { ConceptDescription } from '@aas-core-works/aas-core3.1-typescript/types';
|
|
2
|
-
import type { ApiResult } from '../models/api';
|
|
2
|
+
import type { ApiResult, ConditionalApiResult } from '../models/api';
|
|
3
3
|
import { ConceptDescriptionRepositoryService } from '../generated';
|
|
4
4
|
import { Configuration } from '../generated/runtime';
|
|
5
5
|
export declare class ConceptDescriptionRepositoryClient {
|
|
6
|
+
private static requireIdentifier;
|
|
7
|
+
private static extractStatusCode;
|
|
6
8
|
/**
|
|
7
9
|
* Returns a specific Concept Description
|
|
8
10
|
*
|
|
9
11
|
* @param options Object containing:
|
|
10
12
|
* - configuration: The http request options
|
|
11
13
|
* - cdIdentifier: The Concept Description’s unique id
|
|
14
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; returns `{ success: true; notModified: true }` without data if the representation still has this `etag`
|
|
12
15
|
*
|
|
13
16
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
14
17
|
*/
|
|
15
|
-
getConceptDescriptionById(options: {
|
|
18
|
+
getConceptDescriptionById<IfNoneMatch extends string | undefined = undefined>(options: {
|
|
16
19
|
configuration: Configuration;
|
|
17
20
|
cdIdentifier: string;
|
|
18
|
-
|
|
21
|
+
ifNoneMatch?: IfNoneMatch;
|
|
22
|
+
}): Promise<ConditionalApiResult<ConceptDescription, ConceptDescriptionRepositoryService.Result, IfNoneMatch>>;
|
|
19
23
|
/**
|
|
20
24
|
* Deletes a Concept Description
|
|
21
25
|
*
|
|
22
26
|
* @param options Object containing:
|
|
23
27
|
* - configuration: The http request options
|
|
24
28
|
* - cdIdentifier: The Concept Description’s unique id
|
|
29
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
25
30
|
*
|
|
26
31
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
27
32
|
*/
|
|
28
33
|
deleteConceptDescriptionById(options: {
|
|
29
34
|
configuration: Configuration;
|
|
30
35
|
cdIdentifier: string;
|
|
36
|
+
ifMatch?: string;
|
|
31
37
|
}): Promise<ApiResult<void, ConceptDescriptionRepositoryService.Result>>;
|
|
32
38
|
/**
|
|
33
39
|
* Updates an existing Concept Description
|
|
@@ -36,6 +42,8 @@ export declare class ConceptDescriptionRepositoryClient {
|
|
|
36
42
|
* - configuration: The http request options
|
|
37
43
|
* - cdIdentifier: The Concept Description’s unique id
|
|
38
44
|
* - conceptDescription: Concept Description object
|
|
45
|
+
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
46
|
+
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
39
47
|
*
|
|
40
48
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
41
49
|
*/
|
|
@@ -43,6 +51,8 @@ export declare class ConceptDescriptionRepositoryClient {
|
|
|
43
51
|
configuration: Configuration;
|
|
44
52
|
cdIdentifier: string;
|
|
45
53
|
conceptDescription: ConceptDescription;
|
|
54
|
+
ifMatch?: string;
|
|
55
|
+
ifNoneMatch?: string;
|
|
46
56
|
}): Promise<ApiResult<ConceptDescription | void, ConceptDescriptionRepositoryService.Result>>;
|
|
47
57
|
/**
|
|
48
58
|
* Returns all Concept Descriptions
|
|
@@ -53,7 +63,7 @@ export declare class ConceptDescriptionRepositoryClient {
|
|
|
53
63
|
* - isCaseOf?: IsCaseOf reference (UTF8-BASE64-URL-encoded)
|
|
54
64
|
* - dataSpecificationRef?: DataSpecification reference (UTF8-BASE64-URL-encoded)
|
|
55
65
|
* - limit?: The maximum number of elements in the response array
|
|
56
|
-
* - cursor?: A server-generated identifier retrieved from
|
|
66
|
+
* - cursor?: A server-generated identifier retrieved from paging_metadata that specifies from which position the result listing should continue
|
|
57
67
|
*
|
|
58
68
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
59
69
|
*/
|