Skip to content

Commit bb484fa

Browse files
authored
fix for the changed mapping behavior which now supports nullable strings (#239)
* fix: "null" in unit field #238 * chore: version patch * 3.11.2
1 parent 44fa12e commit bb484fa

File tree

8 files changed

+23
-15
lines changed

8 files changed

+23
-15
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.11.2 - (Sandcastle Vienna) - March 2021
4+
5+
### Bugfixes and Improvements 3.11.2
6+
7+
- Fix for the changed mapping behavior which now supports nullable strings [[#238](https://github.com/mindsphere/mindconnect-nodejs/issues/238)]
8+
39
## 3.11.1 - (Sandcastle Vienna) - March 2021
410

511
### Bugfixes and Improvements 3.11.1

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mindconnect/mindconnect-nodejs",
3-
"version": "3.11.1",
3+
"version": "3.11.2",
44
"description": "MindConnect Library for NodeJS (community based)",
55
"main": "./dist/src/index.js",
66
"browser": "./dist/src/index.bundle.js",

src/api/mindconnect-models.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ export interface DataPoint {
370370
* @type {string}
371371
* @memberof DataPoint
372372
*/
373-
unit: string;
373+
// ! this had to be manually patched due to unitless mapping
374+
unit?: string;
374375
/**
375376
* A list of string tuples. Max 5 tuples allowed.
376377
* @type {{ [key: string]: string; }}

src/api/sdk/agent/agent-models.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export namespace AgentManagementModels {
100100
*/
101101
export enum SecurityProfileEnum {
102102
SHAREDSECRET = <any>"SHARED_SECRET",
103-
RSA3072 = <any>"RSA_3072"
103+
RSA3072 = <any>"RSA_3072",
104104
}
105105
}
106106

@@ -218,15 +218,15 @@ export namespace AgentManagementModels {
218218
*/
219219
export enum GrantTypesEnum {
220220
SHAREDSECRET = <any>"SHARED_SECRET",
221-
RSA3072 = <any>"RSA_3072"
221+
RSA3072 = <any>"RSA_3072",
222222
}
223223
/**
224224
* @export
225225
* @enum {string}
226226
*/
227227
export enum TokenEndpointAuthMethodEnum {
228228
ClientSecretJwt = <any>"client_secret_jwt",
229-
PrivateKeyJwt = <any>"private_key_jwt"
229+
PrivateKeyJwt = <any>"private_key_jwt",
230230
}
231231
}
232232

@@ -305,7 +305,8 @@ export namespace AgentManagementModels {
305305
* @type {string}
306306
* @memberof DataPoint
307307
*/
308-
unit: string;
308+
// ! this had to be manually patched because of unitless mapping
309+
unit?: string;
309310
/**
310311
* A list of string tuples. Max 5 tuples allowed.
311312
* @type {{ [key: string]: string; }}
@@ -328,7 +329,7 @@ export namespace AgentManagementModels {
328329
LONG = <any>"LONG",
329330
DOUBLE = <any>"DOUBLE",
330331
BOOLEAN = <any>"BOOLEAN",
331-
STRING = <any>"STRING"
332+
STRING = <any>"STRING",
332333
}
333334
}
334335

@@ -587,7 +588,7 @@ export namespace AgentManagementModels {
587588
export enum StatusEnum {
588589
NOTONBOARDED = <any>"NOT_ONBOARDED",
589590
ONBOARDING = <any>"ONBOARDING",
590-
ONBOARDED = <any>"ONBOARDED"
591+
ONBOARDED = <any>"ONBOARDED",
591592
}
592593
}
593594

@@ -622,7 +623,7 @@ export namespace AgentManagementModels {
622623
*/
623624
export enum StatusEnum {
624625
ONLINE = <any>"ONLINE",
625-
OFFLINE = <any>"OFFLINE"
626+
OFFLINE = <any>"OFFLINE",
626627
}
627628
}
628629

@@ -681,7 +682,7 @@ export namespace AgentManagementModels {
681682
*/
682683
export enum DirectionEnum {
683684
ASC = <any>"ASC",
684-
DESC = <any>"DESC"
685+
DESC = <any>"DESC",
685686
}
686687
/**
687688
* @export
@@ -690,7 +691,7 @@ export namespace AgentManagementModels {
690691
export enum NullHandlingEnum {
691692
NATIVE = <any>"NATIVE",
692693
NULLSFIRST = <any>"NULLS_FIRST",
693-
NULLSLAST = <any>"NULLS_LAST"
694+
NULLSLAST = <any>"NULLS_LAST",
694695
}
695696
}
696697

src/api/sdk/mcapi/mcapi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export class MindConnectApiClient extends SdkClient {
404404
: `DP-${variable!.name!.substr(0, 33)}`,
405405
name: variable!.name!.substr(0, 64),
406406
type: (variable.dataType as unknown) as DataPoint.TypeEnum,
407-
unit: `${variable.unit}`,
407+
unit: variable.unit,
408408
customData: {
409409
variable: `${variable.name}`,
410410
},

src/cli/commands/html/sc/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h4 class="notification__title">
320320

321321
<script type="text/javascript">
322322
_msb.init({
323-
title: "mindconnect-nodejs 3.11.1",
323+
title: "mindconnect-nodejs 3.11.2",
324324
appId: "_mdspcontent",
325325
appInfoPath: "/app-info.json",
326326
polyfills: {

src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const MC_VERSION = "3.11.1";
1+
export const MC_VERSION = "3.11.2";
22
export const MC_NAME = "mindconnect-nodejs";

0 commit comments

Comments
 (0)