@ignos/api-client 20260604.145.1-alpha → 20260605.146.1
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/lib/AuthorizedApiBase.js
CHANGED
|
@@ -13,11 +13,15 @@ export class AuthorizedApiBase {
|
|
|
13
13
|
this.jsonParseReviver = (_, value) => {
|
|
14
14
|
// Matches starts with "2025-12-09T13:19:39"
|
|
15
15
|
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (typeof value !== "string")
|
|
17
|
+
return value;
|
|
18
|
+
const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
19
|
+
if (!regex.test(value))
|
|
20
|
+
return value;
|
|
21
|
+
const date = new Date(value);
|
|
22
|
+
// Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
|
|
23
|
+
// (values not starting with an ISO date-time are already filtered out by the regex above)
|
|
24
|
+
return isNaN(date.getTime()) ? value : date;
|
|
21
25
|
};
|
|
22
26
|
this.config = config;
|
|
23
27
|
}
|
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -1087,6 +1087,7 @@ export interface IMeasuringToolsClient {
|
|
|
1087
1087
|
createMeasuringToolSubType(typeId: string, request: CreateMeasuringToolSubTypeRequest): Promise<MeasuringToolSubTypeDto>;
|
|
1088
1088
|
updateMeasuringToolSubType(typeId: string, id: string, request: UpdateMeasuringToolSubTypeRequest): Promise<MeasuringToolSubTypeDto>;
|
|
1089
1089
|
deleteMeasuringToolSubType(typeId: string, id: string): Promise<void>;
|
|
1090
|
+
seedTypesAndSubTypes(): Promise<void>;
|
|
1090
1091
|
listMeasuringUnits(): Promise<MeasuringUnitDto[]>;
|
|
1091
1092
|
createMeasuringUnit(request: CreateMeasuringUnit): Promise<MeasuringUnitDto>;
|
|
1092
1093
|
deleteMeasuringUnit(id: string): Promise<void>;
|
|
@@ -1149,6 +1150,8 @@ export declare class MeasuringToolsClient extends AuthorizedApiBase implements I
|
|
|
1149
1150
|
protected processUpdateMeasuringToolSubType(response: Response): Promise<MeasuringToolSubTypeDto>;
|
|
1150
1151
|
deleteMeasuringToolSubType(typeId: string, id: string): Promise<void>;
|
|
1151
1152
|
protected processDeleteMeasuringToolSubType(response: Response): Promise<void>;
|
|
1153
|
+
seedTypesAndSubTypes(): Promise<void>;
|
|
1154
|
+
protected processSeedTypesAndSubTypes(response: Response): Promise<void>;
|
|
1152
1155
|
listMeasuringUnits(): Promise<MeasuringUnitDto[]>;
|
|
1153
1156
|
protected processListMeasuringUnits(response: Response): Promise<MeasuringUnitDto[]>;
|
|
1154
1157
|
createMeasuringUnit(request: CreateMeasuringUnit): Promise<MeasuringUnitDto>;
|
|
@@ -3445,6 +3448,7 @@ export interface CurrentCustomerDto {
|
|
|
3445
3448
|
export interface AvailableTenantDto {
|
|
3446
3449
|
tenantId?: string;
|
|
3447
3450
|
name?: string | null;
|
|
3451
|
+
customerName?: string;
|
|
3448
3452
|
environment?: TenantEnvironmentDto;
|
|
3449
3453
|
isRecommended?: boolean;
|
|
3450
3454
|
}
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -20,11 +20,15 @@ export class AuthorizedApiBase {
|
|
|
20
20
|
this.jsonParseReviver = (_, value) => {
|
|
21
21
|
// Matches starts with "2025-12-09T13:19:39"
|
|
22
22
|
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
if (typeof value !== "string")
|
|
24
|
+
return value;
|
|
25
|
+
const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
26
|
+
if (!regex.test(value))
|
|
27
|
+
return value;
|
|
28
|
+
const date = new Date(value);
|
|
29
|
+
// Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
|
|
30
|
+
// (values not starting with an ISO date-time are already filtered out by the regex above)
|
|
31
|
+
return isNaN(date.getTime()) ? value : date;
|
|
28
32
|
};
|
|
29
33
|
this.config = config;
|
|
30
34
|
}
|
|
@@ -8935,6 +8939,38 @@ export class MeasuringToolsClient extends AuthorizedApiBase {
|
|
|
8935
8939
|
}
|
|
8936
8940
|
return Promise.resolve(null);
|
|
8937
8941
|
}
|
|
8942
|
+
seedTypesAndSubTypes() {
|
|
8943
|
+
let url_ = this.baseUrl + "/measuringtools/types/seed";
|
|
8944
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
8945
|
+
let options_ = {
|
|
8946
|
+
method: "POST",
|
|
8947
|
+
headers: {}
|
|
8948
|
+
};
|
|
8949
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
8950
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
8951
|
+
}).then((_response) => {
|
|
8952
|
+
return this.processSeedTypesAndSubTypes(_response);
|
|
8953
|
+
});
|
|
8954
|
+
}
|
|
8955
|
+
processSeedTypesAndSubTypes(response) {
|
|
8956
|
+
const status = response.status;
|
|
8957
|
+
let _headers = {};
|
|
8958
|
+
if (response.headers && response.headers.forEach) {
|
|
8959
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
8960
|
+
}
|
|
8961
|
+
;
|
|
8962
|
+
if (status === 204) {
|
|
8963
|
+
return response.text().then((_responseText) => {
|
|
8964
|
+
return;
|
|
8965
|
+
});
|
|
8966
|
+
}
|
|
8967
|
+
else if (status !== 200 && status !== 204) {
|
|
8968
|
+
return response.text().then((_responseText) => {
|
|
8969
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
8970
|
+
});
|
|
8971
|
+
}
|
|
8972
|
+
return Promise.resolve(null);
|
|
8973
|
+
}
|
|
8938
8974
|
listMeasuringUnits() {
|
|
8939
8975
|
let url_ = this.baseUrl + "/measuringtools/units";
|
|
8940
8976
|
url_ = url_.replace(/[?&]$/, "");
|
package/package.json
CHANGED
package/src/AuthorizedApiBase.ts
CHANGED
|
@@ -33,12 +33,15 @@ export class AuthorizedApiBase {
|
|
|
33
33
|
protected jsonParseReviver = (_: any, value: any) => {
|
|
34
34
|
// Matches starts with "2025-12-09T13:19:39"
|
|
35
35
|
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
36
|
-
|
|
36
|
+
if (typeof value !== "string") return value;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
38
|
+
const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
39
|
+
if (!regex.test(value)) return value;
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
const date = new Date(value);
|
|
42
|
+
|
|
43
|
+
// Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
|
|
44
|
+
// (values not starting with an ISO date-time are already filtered out by the regex above)
|
|
45
|
+
return isNaN(date.getTime()) ? value : date;
|
|
43
46
|
};
|
|
44
47
|
}
|
package/src/ignosportal-api.ts
CHANGED
|
@@ -29,13 +29,16 @@ export class AuthorizedApiBase {
|
|
|
29
29
|
protected jsonParseReviver = (_: any, value: any) => {
|
|
30
30
|
// Matches starts with "2025-12-09T13:19:39"
|
|
31
31
|
// Will also match "2025-12-09T13:19:39.4576289+00:00"
|
|
32
|
-
|
|
32
|
+
if (typeof value !== "string") return value;
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
|
|
35
|
+
if (!regex.test(value)) return value;
|
|
36
|
+
|
|
37
|
+
const date = new Date(value);
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
// Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
|
|
40
|
+
// (values not starting with an ISO date-time are already filtered out by the regex above)
|
|
41
|
+
return isNaN(date.getTime()) ? value : date;
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -8827,6 +8830,8 @@ export interface IMeasuringToolsClient {
|
|
|
8827
8830
|
|
|
8828
8831
|
deleteMeasuringToolSubType(typeId: string, id: string): Promise<void>;
|
|
8829
8832
|
|
|
8833
|
+
seedTypesAndSubTypes(): Promise<void>;
|
|
8834
|
+
|
|
8830
8835
|
listMeasuringUnits(): Promise<MeasuringUnitDto[]>;
|
|
8831
8836
|
|
|
8832
8837
|
createMeasuringUnit(request: CreateMeasuringUnit): Promise<MeasuringUnitDto>;
|
|
@@ -9599,6 +9604,38 @@ export class MeasuringToolsClient extends AuthorizedApiBase implements IMeasurin
|
|
|
9599
9604
|
return Promise.resolve<void>(null as any);
|
|
9600
9605
|
}
|
|
9601
9606
|
|
|
9607
|
+
seedTypesAndSubTypes(): Promise<void> {
|
|
9608
|
+
let url_ = this.baseUrl + "/measuringtools/types/seed";
|
|
9609
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
9610
|
+
|
|
9611
|
+
let options_: RequestInit = {
|
|
9612
|
+
method: "POST",
|
|
9613
|
+
headers: {
|
|
9614
|
+
}
|
|
9615
|
+
};
|
|
9616
|
+
|
|
9617
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
9618
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
9619
|
+
}).then((_response: Response) => {
|
|
9620
|
+
return this.processSeedTypesAndSubTypes(_response);
|
|
9621
|
+
});
|
|
9622
|
+
}
|
|
9623
|
+
|
|
9624
|
+
protected processSeedTypesAndSubTypes(response: Response): Promise<void> {
|
|
9625
|
+
const status = response.status;
|
|
9626
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
9627
|
+
if (status === 204) {
|
|
9628
|
+
return response.text().then((_responseText) => {
|
|
9629
|
+
return;
|
|
9630
|
+
});
|
|
9631
|
+
} else if (status !== 200 && status !== 204) {
|
|
9632
|
+
return response.text().then((_responseText) => {
|
|
9633
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
9634
|
+
});
|
|
9635
|
+
}
|
|
9636
|
+
return Promise.resolve<void>(null as any);
|
|
9637
|
+
}
|
|
9638
|
+
|
|
9602
9639
|
listMeasuringUnits(): Promise<MeasuringUnitDto[]> {
|
|
9603
9640
|
let url_ = this.baseUrl + "/measuringtools/units";
|
|
9604
9641
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -30188,6 +30225,7 @@ export interface CurrentCustomerDto {
|
|
|
30188
30225
|
export interface AvailableTenantDto {
|
|
30189
30226
|
tenantId?: string;
|
|
30190
30227
|
name?: string | null;
|
|
30228
|
+
customerName?: string;
|
|
30191
30229
|
environment?: TenantEnvironmentDto;
|
|
30192
30230
|
isRecommended?: boolean;
|
|
30193
30231
|
}
|