@ignos/api-client 20260607.147.1 → 20260611.149.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.
@@ -11,14 +11,18 @@ export class AuthorizedApiBase {
11
11
  return options;
12
12
  };
13
13
  this.jsonParseReviver = (_, value) => {
14
- // Matches starts with "2025-12-09T13:19:39"
15
- // Will also match "2025-12-09T13:19:39.4576289+00:00"
16
14
  if (typeof value !== "string")
17
15
  return value;
16
+ // Matches starts with "2025-12-09T13:19:39"
17
+ // Will also match "2025-12-09T13:19:39.4576289+00:00"
18
18
  const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
19
19
  if (!regex.test(value))
20
20
  return value;
21
- const date = new Date(value);
21
+ // JS Date only supports millisecond precision (3 fractional digits).
22
+ // Timestamps with microseconds or higher (e.g. ".4576289") produce Invalid Date.
23
+ // Truncate any excess fractional digits before parsing.
24
+ const normalized = value.replace(/(\.\d{3})\d+/, "$1");
25
+ const date = new Date(normalized);
22
26
  // Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
23
27
  // (values not starting with an ISO date-time are already filtered out by the regex above)
24
28
  return isNaN(date.getTime()) ? value : date;
@@ -4223,6 +4223,9 @@ export interface ShiftSettingsPeriodDto {
4223
4223
  effectiveTo?: string | null;
4224
4224
  targetPercent: number;
4225
4225
  comment?: string | null;
4226
+ hoursPerWeekday: {
4227
+ [key in DayOfWeek]?: number;
4228
+ };
4226
4229
  }
4227
4230
  export interface AddShiftSettingPeriods {
4228
4231
  resourceExternalIds: string[];
@@ -4369,7 +4372,6 @@ export interface PartDto {
4369
4372
  drawingRevision?: string | null;
4370
4373
  material?: string | null;
4371
4374
  planner?: UserDto | null;
4372
- documentRequirements?: string[] | null;
4373
4375
  }
4374
4376
  export interface WorkorderCustomerOrderReferenceDto {
4375
4377
  customerOrder?: string | null;
@@ -7684,6 +7686,7 @@ export interface WorkorderDto {
7684
7686
  project?: WorkOrderProjectDto | null;
7685
7687
  planner?: UserDto | null;
7686
7688
  projectLeader?: UserDto | null;
7689
+ documentRequirements?: string[];
7687
7690
  }
7688
7691
  export interface WorkorderOperationDto {
7689
7692
  operation: number;
@@ -7715,6 +7718,7 @@ export interface WorkorderMaterialDto {
7715
7718
  usedQuantity: number;
7716
7719
  unit: string;
7717
7720
  traceType: TraceType;
7721
+ documentRequirements?: string[];
7718
7722
  }
7719
7723
  export interface ListOrderScheduleRequest {
7720
7724
  projectId?: string | null;
@@ -8403,7 +8407,6 @@ export interface Part {
8403
8407
  drawingReference?: string | null;
8404
8408
  material?: string | null;
8405
8409
  planner?: User | null;
8406
- documentRequirements?: string[];
8407
8410
  }
8408
8411
  export interface User {
8409
8412
  id?: string | null;
@@ -9392,7 +9395,8 @@ export interface CustomerOrderLineDto {
9392
9395
  status: CustomerOrderLineStatus;
9393
9396
  part: PartDto;
9394
9397
  deliveryDate?: Date | null;
9395
- workorderHiearchy: WorkorderHierarchyDto[];
9398
+ workorderHierarchy: WorkorderHierarchyDto[];
9399
+ workorderHiearchy?: WorkorderHierarchyDto[] | null;
9396
9400
  }
9397
9401
  export type CustomerOrderLineStatus = "Draft" | "Ready" | "Ongoing" | "Completed" | "Deleted";
9398
9402
  export interface WorkorderHierarchyDto {
@@ -9490,6 +9494,7 @@ export interface UpsertWorkorderV2 {
9490
9494
  endDate?: Date | null;
9491
9495
  bomPosition?: string | null;
9492
9496
  traceType?: TraceType | null;
9497
+ documentRequirements?: string[];
9493
9498
  }
9494
9499
  export interface UpsertWorkOrderConsumptionsRequest {
9495
9500
  materialConsumptions: MaterialConsumptionDto[];
@@ -18,14 +18,18 @@ export class AuthorizedApiBase {
18
18
  return options;
19
19
  };
20
20
  this.jsonParseReviver = (_, value) => {
21
- // Matches starts with "2025-12-09T13:19:39"
22
- // Will also match "2025-12-09T13:19:39.4576289+00:00"
23
21
  if (typeof value !== "string")
24
22
  return value;
23
+ // Matches starts with "2025-12-09T13:19:39"
24
+ // Will also match "2025-12-09T13:19:39.4576289+00:00"
25
25
  const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
26
26
  if (!regex.test(value))
27
27
  return value;
28
- const date = new Date(value);
28
+ // JS Date only supports millisecond precision (3 fractional digits).
29
+ // Timestamps with microseconds or higher (e.g. ".4576289") produce Invalid Date.
30
+ // Truncate any excess fractional digits before parsing.
31
+ const normalized = value.replace(/(\.\d{3})\d+/, "$1");
32
+ const date = new Date(normalized);
29
33
  // Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
30
34
  // (values not starting with an ISO date-time are already filtered out by the regex above)
31
35
  return isNaN(date.getTime()) ? value : date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20260607.147.1",
3
+ "version": "20260611.149.1",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21,7 +21,8 @@ export class AuthorizedApiBase {
21
21
  protected transformOptions = async (options: any): Promise<any> => {
22
22
  options.headers = {
23
23
  ...options.headers,
24
- Authorization: "Bearer " + (await this.config.accessTokenProvider.getAccessToken()),
24
+ Authorization:
25
+ "Bearer " + (await this.config.accessTokenProvider.getAccessToken()),
25
26
  };
26
27
 
27
28
  const tenantId = this.config.tenantIdProvider.getTenantId();
@@ -31,14 +32,18 @@ export class AuthorizedApiBase {
31
32
  };
32
33
 
33
34
  protected jsonParseReviver = (_: any, value: any) => {
34
- // Matches starts with "2025-12-09T13:19:39"
35
- // Will also match "2025-12-09T13:19:39.4576289+00:00"
36
35
  if (typeof value !== "string") return value;
37
36
 
37
+ // Matches starts with "2025-12-09T13:19:39"
38
+ // Will also match "2025-12-09T13:19:39.4576289+00:00"
38
39
  const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
39
40
  if (!regex.test(value)) return value;
40
41
 
41
- const date = new Date(value);
42
+ // JS Date only supports millisecond precision (3 fractional digits).
43
+ // Timestamps with microseconds or higher (e.g. ".4576289") produce Invalid Date.
44
+ // Truncate any excess fractional digits before parsing.
45
+ const normalized = value.replace(/(\.\d{3})\d+/, "$1");
46
+ const date = new Date(normalized);
42
47
 
43
48
  // Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
44
49
  // (values not starting with an ISO date-time are already filtered out by the regex above)
@@ -17,7 +17,8 @@ export class AuthorizedApiBase {
17
17
  protected transformOptions = async (options: any): Promise<any> => {
18
18
  options.headers = {
19
19
  ...options.headers,
20
- Authorization: "Bearer " + (await this.config.accessTokenProvider.getAccessToken()),
20
+ Authorization:
21
+ "Bearer " + (await this.config.accessTokenProvider.getAccessToken()),
21
22
  };
22
23
 
23
24
  const tenantId = this.config.tenantIdProvider.getTenantId();
@@ -27,14 +28,18 @@ export class AuthorizedApiBase {
27
28
  };
28
29
 
29
30
  protected jsonParseReviver = (_: any, value: any) => {
30
- // Matches starts with "2025-12-09T13:19:39"
31
- // Will also match "2025-12-09T13:19:39.4576289+00:00"
32
31
  if (typeof value !== "string") return value;
33
32
 
33
+ // Matches starts with "2025-12-09T13:19:39"
34
+ // Will also match "2025-12-09T13:19:39.4576289+00:00"
34
35
  const regex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/;
35
36
  if (!regex.test(value)) return value;
36
37
 
37
- const date = new Date(value);
38
+ // JS Date only supports millisecond precision (3 fractional digits).
39
+ // Timestamps with microseconds or higher (e.g. ".4576289") produce Invalid Date.
40
+ // Truncate any excess fractional digits before parsing.
41
+ const normalized = value.replace(/(\.\d{3})\d+/, "$1");
42
+ const date = new Date(normalized);
38
43
 
39
44
  // Prevent values like "2025-12-09T13:19:39.4576289+00:00 bla bla bla" from being parsed as Date
40
45
  // (values not starting with an ISO date-time are already filtered out by the regex above)
@@ -31196,6 +31201,7 @@ export interface ShiftSettingsPeriodDto {
31196
31201
  effectiveTo?: string | null;
31197
31202
  targetPercent: number;
31198
31203
  comment?: string | null;
31204
+ hoursPerWeekday: { [key in DayOfWeek]?: number; };
31199
31205
  }
31200
31206
 
31201
31207
  export interface AddShiftSettingPeriods {
@@ -31366,7 +31372,6 @@ export interface PartDto {
31366
31372
  drawingRevision?: string | null;
31367
31373
  material?: string | null;
31368
31374
  planner?: UserDto | null;
31369
- documentRequirements?: string[] | null;
31370
31375
  }
31371
31376
 
31372
31377
  export interface WorkorderCustomerOrderReferenceDto {
@@ -35137,6 +35142,7 @@ export interface WorkorderDto {
35137
35142
  project?: WorkOrderProjectDto | null;
35138
35143
  planner?: UserDto | null;
35139
35144
  projectLeader?: UserDto | null;
35145
+ documentRequirements?: string[];
35140
35146
  }
35141
35147
 
35142
35148
  export interface WorkorderOperationDto {
@@ -35170,6 +35176,7 @@ export interface WorkorderMaterialDto {
35170
35176
  usedQuantity: number;
35171
35177
  unit: string;
35172
35178
  traceType: TraceType;
35179
+ documentRequirements?: string[];
35173
35180
  }
35174
35181
 
35175
35182
  export interface ListOrderScheduleRequest {
@@ -35948,7 +35955,6 @@ export interface Part {
35948
35955
  drawingReference?: string | null;
35949
35956
  material?: string | null;
35950
35957
  planner?: User | null;
35951
- documentRequirements?: string[];
35952
35958
  }
35953
35959
 
35954
35960
  export interface User {
@@ -37063,7 +37069,8 @@ export interface CustomerOrderLineDto {
37063
37069
  status: CustomerOrderLineStatus;
37064
37070
  part: PartDto;
37065
37071
  deliveryDate?: Date | null;
37066
- workorderHiearchy: WorkorderHierarchyDto[];
37072
+ workorderHierarchy: WorkorderHierarchyDto[];
37073
+ workorderHiearchy?: WorkorderHierarchyDto[] | null;
37067
37074
  }
37068
37075
 
37069
37076
  export type CustomerOrderLineStatus = "Draft" | "Ready" | "Ongoing" | "Completed" | "Deleted";
@@ -37177,6 +37184,7 @@ export interface UpsertWorkorderV2 {
37177
37184
  endDate?: Date | null;
37178
37185
  bomPosition?: string | null;
37179
37186
  traceType?: TraceType | null;
37187
+ documentRequirements?: string[];
37180
37188
  }
37181
37189
 
37182
37190
  export interface UpsertWorkOrderConsumptionsRequest {