basyx-typescript-sdk 2.4.0 → 2.4.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/bundle/index.cjs +83 -30
- package/bundle/index.cjs.map +1 -1
- package/bundle/index.mjs +83 -30
- package/bundle/index.mjs.map +1 -1
- package/dist/clients/AasRepositoryClient.d.ts +13 -5
- package/dist/clients/AasRepositoryClient.js +26 -8
- package/dist/clients/AasxFileClient.d.ts +2 -2
- package/dist/clients/AasxFileClient.js +5 -4
- package/dist/clients/SubmodelRepositoryClient.d.ts +14 -8
- package/dist/clients/SubmodelRepositoryClient.js +24 -14
- package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.d.ts +0 -2
- package/dist/generated/SubmodelRepositoryService/apis/SubmodelRepositoryAPIApi.js +2 -8
- package/dist/lib/multipartFile.d.ts +11 -0
- package/dist/lib/multipartFile.js +18 -0
- package/dist/lib/operationHandle.d.ts +10 -0
- package/dist/lib/operationHandle.js +26 -0
- package/dist/models/api.d.ts +10 -0
- package/package.json +1 -1
package/bundle/index.mjs
CHANGED
|
@@ -2671,7 +2671,6 @@ var SubmodelRepositoryAPIApi = class extends BaseAPI {
|
|
|
2671
2671
|
* Asynchronously invokes an Operation at a specified path
|
|
2672
2672
|
*/
|
|
2673
2673
|
async invokeOperationAsyncValueOnlyRaw(requestParameters, initOverrides) {
|
|
2674
|
-
if (requestParameters["aasIdentifier"] == null) throw new RequiredError("aasIdentifier", "Required parameter \"aasIdentifier\" was null or undefined when calling invokeOperationAsyncValueOnly().");
|
|
2675
2674
|
if (requestParameters["submodelIdentifier"] == null) throw new RequiredError("submodelIdentifier", "Required parameter \"submodelIdentifier\" was null or undefined when calling invokeOperationAsyncValueOnly().");
|
|
2676
2675
|
if (requestParameters["idShortPath"] == null) throw new RequiredError("idShortPath", "Required parameter \"idShortPath\" was null or undefined when calling invokeOperationAsyncValueOnly().");
|
|
2677
2676
|
if (requestParameters["operationRequestValueOnly"] == null) throw new RequiredError("operationRequestValueOnly", "Required parameter \"operationRequestValueOnly\" was null or undefined when calling invokeOperationAsyncValueOnly().");
|
|
@@ -2679,7 +2678,7 @@ var SubmodelRepositoryAPIApi = class extends BaseAPI {
|
|
|
2679
2678
|
const headerParameters = {};
|
|
2680
2679
|
headerParameters["Content-Type"] = "application/json";
|
|
2681
2680
|
return new VoidApiResponse(await this.request({
|
|
2682
|
-
path: `/submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/invoke-async/$value`.replace(`{
|
|
2681
|
+
path: `/submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/invoke-async/$value`.replace(`{submodelIdentifier}`, encodeURIComponent(String(requestParameters["submodelIdentifier"]))).replace(`{idShortPath}`, encodeURIComponent(String(requestParameters["idShortPath"]))),
|
|
2683
2682
|
method: "POST",
|
|
2684
2683
|
headers: headerParameters,
|
|
2685
2684
|
query: queryParameters,
|
|
@@ -2720,7 +2719,6 @@ var SubmodelRepositoryAPIApi = class extends BaseAPI {
|
|
|
2720
2719
|
* Synchronously invokes an Operation at a specified path
|
|
2721
2720
|
*/
|
|
2722
2721
|
async invokeOperationValueOnlyRaw(requestParameters, initOverrides) {
|
|
2723
|
-
if (requestParameters["aasIdentifier"] == null) throw new RequiredError("aasIdentifier", "Required parameter \"aasIdentifier\" was null or undefined when calling invokeOperationValueOnly().");
|
|
2724
2722
|
if (requestParameters["submodelIdentifier"] == null) throw new RequiredError("submodelIdentifier", "Required parameter \"submodelIdentifier\" was null or undefined when calling invokeOperationValueOnly().");
|
|
2725
2723
|
if (requestParameters["idShortPath"] == null) throw new RequiredError("idShortPath", "Required parameter \"idShortPath\" was null or undefined when calling invokeOperationValueOnly().");
|
|
2726
2724
|
if (requestParameters["operationRequestValueOnly"] == null) throw new RequiredError("operationRequestValueOnly", "Required parameter \"operationRequestValueOnly\" was null or undefined when calling invokeOperationValueOnly().");
|
|
@@ -2728,7 +2726,7 @@ var SubmodelRepositoryAPIApi = class extends BaseAPI {
|
|
|
2728
2726
|
const headerParameters = {};
|
|
2729
2727
|
headerParameters["Content-Type"] = "application/json";
|
|
2730
2728
|
return new JSONApiResponse(await this.request({
|
|
2731
|
-
path: `/submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/invoke/$value`.replace(`{
|
|
2729
|
+
path: `/submodels/{submodelIdentifier}/submodel-elements/{idShortPath}/invoke/$value`.replace(`{submodelIdentifier}`, encodeURIComponent(String(requestParameters["submodelIdentifier"]))).replace(`{idShortPath}`, encodeURIComponent(String(requestParameters["idShortPath"]))),
|
|
2732
2730
|
method: "POST",
|
|
2733
2731
|
headers: headerParameters,
|
|
2734
2732
|
query: queryParameters,
|
|
@@ -7921,7 +7919,7 @@ function base64Decode$1(text) {
|
|
|
7921
7919
|
*
|
|
7922
7920
|
* @remarks
|
|
7923
7921
|
* The value is an URI that can represent an absolute or relative path.
|
|
7924
|
-
*/ var File = class extends Class {
|
|
7922
|
+
*/ var File$1 = class extends Class {
|
|
7925
7923
|
/**
|
|
7926
7924
|
* Indicate the runtime model type of the instance.
|
|
7927
7925
|
*/ modelType() {
|
|
@@ -11918,7 +11916,7 @@ const AS_DATA_ELEMENT_TRANSFORMER = new AsDataElementTransformer();
|
|
|
11918
11916
|
* @param that - instance to be type-checked
|
|
11919
11917
|
* @returns `true` if the type check is successful
|
|
11920
11918
|
*/ function isFile(that) {
|
|
11921
|
-
return that instanceof File;
|
|
11919
|
+
return that instanceof File$1;
|
|
11922
11920
|
}
|
|
11923
11921
|
/**
|
|
11924
11922
|
* Check the type of `that` instance.
|
|
@@ -17458,7 +17456,7 @@ function fileFromJsonable(jsonable) {
|
|
|
17458
17456
|
}
|
|
17459
17457
|
if (setter.modelType === null) return newDeserializationError("The required property 'modelType' is missing");
|
|
17460
17458
|
else if (setter.modelType != "File") return newDeserializationError(`Expected model type 'File', but got: ${setter.modelType}`);
|
|
17461
|
-
return new Either(new File(setter.extensions, setter.category, setter.idShort, setter.displayName, setter.description, setter.semanticId, setter.supplementalSemanticIds, setter.qualifiers, setter.embeddedDataSpecifications, setter.value, setter.contentType), null);
|
|
17459
|
+
return new Either(new File$1(setter.extensions, setter.category, setter.idShort, setter.displayName, setter.description, setter.semanticId, setter.supplementalSemanticIds, setter.qualifiers, setter.embeddedDataSpecifications, setter.value, setter.contentType), null);
|
|
17462
17460
|
}
|
|
17463
17461
|
/**
|
|
17464
17462
|
* Provide de-serialize & set methods for properties
|
|
@@ -27997,6 +27995,53 @@ function convertCoreSubmodelElementToApiSubmodelElement(submodelElement) {
|
|
|
27997
27995
|
return JSON.parse(submodelElementStr);
|
|
27998
27996
|
}
|
|
27999
27997
|
//#endregion
|
|
27998
|
+
//#region dist/lib/multipartFile.js
|
|
27999
|
+
/**
|
|
28000
|
+
* Names a file for a multipart upload, so that the name is sent as the `filename` parameter of the
|
|
28001
|
+
* file part's `Content-Disposition` header. AAS Part 2 V3.2 reads the file name only from there;
|
|
28002
|
+
* a plain `Blob` would otherwise be sent with the default name `blob`.
|
|
28003
|
+
*
|
|
28004
|
+
* @function withFileName
|
|
28005
|
+
* @param {Blob} file - The file content to upload.
|
|
28006
|
+
* @param {string} [fileName] - The requested file name. Without a name, the file is returned unchanged.
|
|
28007
|
+
* @returns {Blob} A `File` with the requested name and the content type of the given file.
|
|
28008
|
+
*/
|
|
28009
|
+
function withFileName(file, fileName) {
|
|
28010
|
+
const name = fileName?.trim();
|
|
28011
|
+
if (!name) return file;
|
|
28012
|
+
if (file instanceof File && file.name === name) return file;
|
|
28013
|
+
return new File([file], name, { type: file.type });
|
|
28014
|
+
}
|
|
28015
|
+
//#endregion
|
|
28016
|
+
//#region dist/lib/operationHandle.js
|
|
28017
|
+
const OPERATION_STATUS_SEGMENT = /(?:^|\/)operation-status\/([^/?#]+)\/?(?:[?#].*)?$/;
|
|
28018
|
+
/**
|
|
28019
|
+
* Returns the handle of an asynchronously invoked Operation from the `Location` header of the `202 Accepted`
|
|
28020
|
+
* response, or `undefined` if the header is missing or does not point to an `operation-status` resource.
|
|
28021
|
+
*
|
|
28022
|
+
* The `Location` header may be absolute or a relative reference (RFC 9110, section 10.2.2), e.g.
|
|
28023
|
+
* `operation-status/{handleId}` relative to the invocation URL. It is returned unchanged. The handle id is
|
|
28024
|
+
* URL-decoded, so it can be passed to `getOperationAsyncStatus` and `getOperationAsyncResult` as is.
|
|
28025
|
+
*/
|
|
28026
|
+
function getOperationHandle(response) {
|
|
28027
|
+
const headers = response?.headers;
|
|
28028
|
+
if (typeof headers?.get !== "function") return;
|
|
28029
|
+
const location = headers.get("Location");
|
|
28030
|
+
const encodedHandleId = location?.match(OPERATION_STATUS_SEGMENT)?.[1];
|
|
28031
|
+
if (location == null || encodedHandleId === void 0) return;
|
|
28032
|
+
try {
|
|
28033
|
+
return {
|
|
28034
|
+
handleId: decodeURIComponent(encodedHandleId),
|
|
28035
|
+
location
|
|
28036
|
+
};
|
|
28037
|
+
} catch {
|
|
28038
|
+
return {
|
|
28039
|
+
handleId: encodedHandleId,
|
|
28040
|
+
location
|
|
28041
|
+
};
|
|
28042
|
+
}
|
|
28043
|
+
}
|
|
28044
|
+
//#endregion
|
|
28000
28045
|
//#region dist/clients/AasRepositoryClient.js
|
|
28001
28046
|
var AasRepositoryClient = class AasRepositoryClient {
|
|
28002
28047
|
static requireIdentifier(value, field) {
|
|
@@ -28464,7 +28509,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
28464
28509
|
* @param options Object containing:
|
|
28465
28510
|
* - configuration: The http request options
|
|
28466
28511
|
* - aasIdentifier: The Asset Administration Shell’s unique id
|
|
28467
|
-
* - fileName: The name of the file
|
|
28512
|
+
* - fileName: The name of the file, sent as filename of the file part and as `fileName` field
|
|
28468
28513
|
* - file: The file to upload
|
|
28469
28514
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
28470
28515
|
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
@@ -28482,7 +28527,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
28482
28527
|
const response = await apiInstance.putThumbnailAasRepositoryRaw({
|
|
28483
28528
|
aasIdentifier: encodedAasIdentifier,
|
|
28484
28529
|
fileName,
|
|
28485
|
-
file
|
|
28530
|
+
file: withFileName(file, fileName)
|
|
28486
28531
|
});
|
|
28487
28532
|
return {
|
|
28488
28533
|
success: true,
|
|
@@ -29902,7 +29947,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
29902
29947
|
* - aasIdentifier: The Asset Administration Shell’s unique id
|
|
29903
29948
|
* - submodelIdentifier: The Submodel’s unique id
|
|
29904
29949
|
* - idShortPath: IdShort path to the submodel element (dot-separated)
|
|
29905
|
-
* - fileName: The name of the file
|
|
29950
|
+
* - fileName: The name of the file, sent as filename of the file part and as `fileName` field
|
|
29906
29951
|
* - file: The file to upload
|
|
29907
29952
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
29908
29953
|
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
@@ -29923,7 +29968,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
29923
29968
|
submodelIdentifier: encodedSubmodelIdentifier,
|
|
29924
29969
|
idShortPath,
|
|
29925
29970
|
fileName,
|
|
29926
|
-
file
|
|
29971
|
+
file: withFileName(file, fileName)
|
|
29927
29972
|
});
|
|
29928
29973
|
return {
|
|
29929
29974
|
success: true,
|
|
@@ -30074,6 +30119,10 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
30074
30119
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
30075
30120
|
*
|
|
30076
30121
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
30122
|
+
* `data` is the handle of the invocation, taken from the `Location` header, for
|
|
30123
|
+
* `getOperationAsyncStatusAasRepository` and `getOperationAsyncResultAasRepository`. It is `undefined` if the server
|
|
30124
|
+
* sends no `Location` header or the client cannot read it (in browsers, the server must list `Location` in
|
|
30125
|
+
* `Access-Control-Expose-Headers`).
|
|
30077
30126
|
*/
|
|
30078
30127
|
async invokeOperationAsyncAasRepository(options) {
|
|
30079
30128
|
const { configuration, aasIdentifier, submodelIdentifier, idShortPath, operationRequest, ifMatch } = options;
|
|
@@ -30089,7 +30138,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
30089
30138
|
});
|
|
30090
30139
|
return {
|
|
30091
30140
|
success: true,
|
|
30092
|
-
data:
|
|
30141
|
+
data: getOperationHandle(response.raw),
|
|
30093
30142
|
statusCode: response.raw.status,
|
|
30094
30143
|
etag: getEtag(response.raw)
|
|
30095
30144
|
};
|
|
@@ -30115,6 +30164,10 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
30115
30164
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
30116
30165
|
*
|
|
30117
30166
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
30167
|
+
* `data` is the handle of the invocation, taken from the `Location` header, for
|
|
30168
|
+
* `getOperationAsyncStatusAasRepository` and `getOperationAsyncResultAasRepository`. It is `undefined` if the server
|
|
30169
|
+
* sends no `Location` header or the client cannot read it (in browsers, the server must list `Location` in
|
|
30170
|
+
* `Access-Control-Expose-Headers`).
|
|
30118
30171
|
*/
|
|
30119
30172
|
async invokeOperationAsyncValueOnlyAasRepository(options) {
|
|
30120
30173
|
const { configuration, aasIdentifier, submodelIdentifier, idShortPath, operationRequestValueOnly, ifMatch } = options;
|
|
@@ -30130,7 +30183,7 @@ var AasRepositoryClient = class AasRepositoryClient {
|
|
|
30130
30183
|
});
|
|
30131
30184
|
return {
|
|
30132
30185
|
success: true,
|
|
30133
|
-
data:
|
|
30186
|
+
data: getOperationHandle(response.raw),
|
|
30134
30187
|
statusCode: response.raw.status,
|
|
30135
30188
|
etag: getEtag(response.raw)
|
|
30136
30189
|
};
|
|
@@ -30396,7 +30449,7 @@ var AasxFileClient = class AasxFileClient {
|
|
|
30396
30449
|
* - configuration: The http request options.
|
|
30397
30450
|
* - aasIds?: A list of Asset Administration Shells' unique ids
|
|
30398
30451
|
* - file: The file to upload
|
|
30399
|
-
* - fileName: The name of the file
|
|
30452
|
+
* - fileName: The name of the file, sent as filename of the file part and as `fileName` field
|
|
30400
30453
|
*
|
|
30401
30454
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
30402
30455
|
*/
|
|
@@ -30405,7 +30458,7 @@ var AasxFileClient = class AasxFileClient {
|
|
|
30405
30458
|
try {
|
|
30406
30459
|
const response = await new AASXFileServerAPIApi(applyDefaults(configuration)).postAASXPackageRaw({
|
|
30407
30460
|
aasIds,
|
|
30408
|
-
file,
|
|
30461
|
+
file: withFileName(file, fileName),
|
|
30409
30462
|
fileName
|
|
30410
30463
|
});
|
|
30411
30464
|
return {
|
|
@@ -30466,7 +30519,7 @@ var AasxFileClient = class AasxFileClient {
|
|
|
30466
30519
|
* - packageId: The package Id (UTF8-BASE64-URL-encoded)
|
|
30467
30520
|
* - aasIds?: A list of Asset Administration Shells' unique ids
|
|
30468
30521
|
* - file: The file to upload
|
|
30469
|
-
* - fileName: The name of the file
|
|
30522
|
+
* - fileName: The name of the file, sent as filename of the file part and as `fileName` field
|
|
30470
30523
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
30471
30524
|
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
30472
30525
|
*
|
|
@@ -30483,7 +30536,7 @@ var AasxFileClient = class AasxFileClient {
|
|
|
30483
30536
|
const response = await apiInstance.putAASXByPackageIdRaw({
|
|
30484
30537
|
packageId: encodedPackageId,
|
|
30485
30538
|
aasIds,
|
|
30486
|
-
file,
|
|
30539
|
+
file: withFileName(file, fileName),
|
|
30487
30540
|
fileName
|
|
30488
30541
|
});
|
|
30489
30542
|
return {
|
|
@@ -32571,7 +32624,7 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32571
32624
|
* - configuration: The http request options
|
|
32572
32625
|
* - submodelIdentifier: The Submodel's unique id
|
|
32573
32626
|
* - idShortPath: IdShort path to the submodel element (dot-separated)
|
|
32574
|
-
* - fileName?: Name of the uploaded file
|
|
32627
|
+
* - fileName?: Name of the uploaded file, sent as filename of the file part and as `fileName` field
|
|
32575
32628
|
* - file?: File content
|
|
32576
32629
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
32577
32630
|
* - ifNoneMatch?: Sent as `If-None-Match` header; use `*` to only create the resource (fails with `preconditionFailed` if it exists)
|
|
@@ -32590,7 +32643,7 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32590
32643
|
submodelIdentifier: encodedSubmodelIdentifier,
|
|
32591
32644
|
idShortPath,
|
|
32592
32645
|
fileName,
|
|
32593
|
-
file
|
|
32646
|
+
file: file && withFileName(file, fileName)
|
|
32594
32647
|
});
|
|
32595
32648
|
return {
|
|
32596
32649
|
success: true,
|
|
@@ -32688,7 +32741,6 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32688
32741
|
*
|
|
32689
32742
|
* @param options Object containing:
|
|
32690
32743
|
* - configuration: The http request options.
|
|
32691
|
-
* - aasIdentifier: The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
|
|
32692
32744
|
* - submodelIdentifier: The Submodel’s unique id
|
|
32693
32745
|
* - idShortPath: IdShort path to the submodel element (dot-separated)
|
|
32694
32746
|
* - operationRequestValueOnly: Operation request object
|
|
@@ -32697,13 +32749,11 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32697
32749
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
32698
32750
|
*/
|
|
32699
32751
|
async postInvokeOperationValueOnly(options) {
|
|
32700
|
-
const { configuration,
|
|
32752
|
+
const { configuration, submodelIdentifier, idShortPath, operationRequestValueOnly, ifMatch } = options;
|
|
32701
32753
|
try {
|
|
32702
32754
|
const apiInstance = new SubmodelRepositoryAPIApi(applyDefaults(configuration, { ifMatch }));
|
|
32703
|
-
const encodedAasIdentifier = base64Encode(SubmodelRepositoryClient.requireIdentifier(aasIdentifier, "aasIdentifier"));
|
|
32704
32755
|
const encodedSubmodelIdentifier = base64Encode(SubmodelRepositoryClient.requireIdentifier(submodelIdentifier, "submodelIdentifier"));
|
|
32705
32756
|
const response = await apiInstance.invokeOperationValueOnlyRaw({
|
|
32706
|
-
aasIdentifier: encodedAasIdentifier,
|
|
32707
32757
|
submodelIdentifier: encodedSubmodelIdentifier,
|
|
32708
32758
|
idShortPath,
|
|
32709
32759
|
operationRequestValueOnly
|
|
@@ -32735,6 +32785,9 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32735
32785
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
32736
32786
|
*
|
|
32737
32787
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
32788
|
+
* `data` is the handle of the invocation, taken from the `Location` header, for `getOperationAsyncStatus` and
|
|
32789
|
+
* `getOperationAsyncResult`. It is `undefined` if the server sends no `Location` header or the client cannot read it
|
|
32790
|
+
* (in browsers, the server must list `Location` in `Access-Control-Expose-Headers`).
|
|
32738
32791
|
*/
|
|
32739
32792
|
async postInvokeOperationAsync(options) {
|
|
32740
32793
|
const { configuration, submodelIdentifier, idShortPath, operationRequest, ifMatch } = options;
|
|
@@ -32748,7 +32801,7 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32748
32801
|
});
|
|
32749
32802
|
return {
|
|
32750
32803
|
success: true,
|
|
32751
|
-
data:
|
|
32804
|
+
data: getOperationHandle(response.raw),
|
|
32752
32805
|
statusCode: response.raw.status,
|
|
32753
32806
|
etag: getEtag(response.raw)
|
|
32754
32807
|
};
|
|
@@ -32767,29 +32820,29 @@ var SubmodelRepositoryClient = class SubmodelRepositoryClient {
|
|
|
32767
32820
|
*
|
|
32768
32821
|
* @param options Object containing:
|
|
32769
32822
|
* - configuration: The http request options.
|
|
32770
|
-
* - aasIdentifier: The Asset Administration Shell’s unique id (UTF8-BASE64-URL-encoded)
|
|
32771
32823
|
* - submodelIdentifier: The Submodel’s unique id
|
|
32772
32824
|
* - idShortPath: IdShort path to the submodel element (dot-separated)
|
|
32773
32825
|
* - operationRequestValueOnly: Operation request object
|
|
32774
32826
|
* - ifMatch?: Sent as `If-Match` header; the request fails with `preconditionFailed` if the resource has changed since the `etag` was issued
|
|
32775
32827
|
*
|
|
32776
32828
|
* @returns Either `{ success: true; data: ... }` or `{ success: false; error: ... }`.
|
|
32829
|
+
* `data` is the handle of the invocation, taken from the `Location` header, for `getOperationAsyncStatus` and
|
|
32830
|
+
* `getOperationAsyncResult`. It is `undefined` if the server sends no `Location` header or the client cannot read it
|
|
32831
|
+
* (in browsers, the server must list `Location` in `Access-Control-Expose-Headers`).
|
|
32777
32832
|
*/
|
|
32778
32833
|
async postInvokeOperationAsyncValueOnly(options) {
|
|
32779
|
-
const { configuration,
|
|
32834
|
+
const { configuration, submodelIdentifier, idShortPath, operationRequestValueOnly, ifMatch } = options;
|
|
32780
32835
|
try {
|
|
32781
32836
|
const apiInstance = new SubmodelRepositoryAPIApi(applyDefaults(configuration, { ifMatch }));
|
|
32782
|
-
const encodedAasIdentifier = base64Encode(SubmodelRepositoryClient.requireIdentifier(aasIdentifier, "aasIdentifier"));
|
|
32783
32837
|
const encodedSubmodelIdentifier = base64Encode(SubmodelRepositoryClient.requireIdentifier(submodelIdentifier, "submodelIdentifier"));
|
|
32784
32838
|
const response = await apiInstance.invokeOperationAsyncValueOnlyRaw({
|
|
32785
|
-
aasIdentifier: encodedAasIdentifier,
|
|
32786
32839
|
submodelIdentifier: encodedSubmodelIdentifier,
|
|
32787
32840
|
idShortPath,
|
|
32788
32841
|
operationRequestValueOnly
|
|
32789
32842
|
});
|
|
32790
32843
|
return {
|
|
32791
32844
|
success: true,
|
|
32792
|
-
data:
|
|
32845
|
+
data: getOperationHandle(response.raw),
|
|
32793
32846
|
statusCode: response.raw.status,
|
|
32794
32847
|
etag: getEtag(response.raw)
|
|
32795
32848
|
};
|
|
@@ -36215,7 +36268,7 @@ function parseBlob(data) {
|
|
|
36215
36268
|
return new Blob$1(data.extensions?.extension ? data.extensions.extension.map(parseExtension) : void 0, data.category || void 0, data.idShort || void 0, data.displayName?.langStringNameType ? data.displayName.langStringNameType.map(parseLangStringNameType) : void 0, data.description?.langStringTextType ? data.description.langStringTextType.map(parseLangStringTextType) : void 0, data.semanticId ? parseReference(data.semanticId) : void 0, data.supplementalSemanticIds?.reference ? data.supplementalSemanticIds.reference.map(parseReference) : void 0, data.qualifiers?.qualifier ? data.qualifiers.qualifier.map(parseQualifier) : void 0, data.embeddedDataSpecifications?.embeddedDataSpecification ? data.embeddedDataSpecifications.embeddedDataSpecification.map(parseEmbeddedDataSpecification) : void 0, data.value || void 0, data.contentType);
|
|
36216
36269
|
}
|
|
36217
36270
|
function parseFile(data) {
|
|
36218
|
-
return new File(data.extensions?.extension ? data.extensions.extension.map(parseExtension) : void 0, data.category || void 0, data.idShort || void 0, data.displayName?.langStringNameType ? data.displayName.langStringNameType.map(parseLangStringNameType) : void 0, data.description?.langStringTextType ? data.description.langStringTextType.map(parseLangStringTextType) : void 0, data.semanticId ? parseReference(data.semanticId) : void 0, data.supplementalSemanticIds?.reference ? data.supplementalSemanticIds.reference.map(parseReference) : void 0, data.qualifiers?.qualifier ? data.qualifiers.qualifier.map(parseQualifier) : void 0, data.embeddedDataSpecifications?.embeddedDataSpecification ? data.embeddedDataSpecifications.embeddedDataSpecification.map(parseEmbeddedDataSpecification) : void 0, data.value || void 0, data.contentType);
|
|
36271
|
+
return new File$1(data.extensions?.extension ? data.extensions.extension.map(parseExtension) : void 0, data.category || void 0, data.idShort || void 0, data.displayName?.langStringNameType ? data.displayName.langStringNameType.map(parseLangStringNameType) : void 0, data.description?.langStringTextType ? data.description.langStringTextType.map(parseLangStringTextType) : void 0, data.semanticId ? parseReference(data.semanticId) : void 0, data.supplementalSemanticIds?.reference ? data.supplementalSemanticIds.reference.map(parseReference) : void 0, data.qualifiers?.qualifier ? data.qualifiers.qualifier.map(parseQualifier) : void 0, data.embeddedDataSpecifications?.embeddedDataSpecification ? data.embeddedDataSpecifications.embeddedDataSpecification.map(parseEmbeddedDataSpecification) : void 0, data.value || void 0, data.contentType);
|
|
36219
36272
|
}
|
|
36220
36273
|
function parseEntity(data) {
|
|
36221
36274
|
const entityType = data.entityType ? entityTypeFromJsonable(data.entityType).value ?? data.entityType : void 0;
|