@ignos/api-client 20261015.308.1 → 20261019.310.1-alpha

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.
@@ -2947,6 +2947,10 @@ export interface IInspectSchemaCreatorClient {
2947
2947
  */
2948
2948
  createSchemaCreatorState(schemaVersionId: string, state: SchemaCreatorStateDto): Promise<SchemaCreatorStateDto>;
2949
2949
  updateSchemaCreatorState(schemaVersionId: string, state: SchemaCreatorStateDto): Promise<SchemaCreatorStateDto>;
2950
+ /**
2951
+ * Saves only what changed; the response is the whole state with server-derived values.
2952
+ */
2953
+ applySchemaCreatorChanges(schemaVersionId: string, changes: SchemaCreatorChangesDto): Promise<SchemaCreatorStateDto>;
2950
2954
  /**
2951
2955
  * Geometry only (no values), derived from the schema's retained
2952
2956
  InspectionXpert XML - used to seed a not-yet-created state with real
@@ -2988,6 +2992,11 @@ export declare class InspectSchemaCreatorClient extends AuthorizedApiBase implem
2988
2992
  protected processCreateSchemaCreatorState(response: Response): Promise<SchemaCreatorStateDto>;
2989
2993
  updateSchemaCreatorState(schemaVersionId: string, state: SchemaCreatorStateDto): Promise<SchemaCreatorStateDto>;
2990
2994
  protected processUpdateSchemaCreatorState(response: Response): Promise<SchemaCreatorStateDto>;
2995
+ /**
2996
+ * Saves only what changed; the response is the whole state with server-derived values.
2997
+ */
2998
+ applySchemaCreatorChanges(schemaVersionId: string, changes: SchemaCreatorChangesDto): Promise<SchemaCreatorStateDto>;
2999
+ protected processApplySchemaCreatorChanges(response: Response): Promise<SchemaCreatorStateDto>;
2991
3000
  /**
2992
3001
  * Geometry only (no values), derived from the schema's retained
2993
3002
  InspectionXpert XML - used to seed a not-yet-created state with real
@@ -9580,6 +9589,13 @@ export interface SchemaCreatorXmlGeometryDto {
9580
9589
  balloon: SchemaCreatorPointDto;
9581
9590
  pageIndex: number;
9582
9591
  }
9592
+ export interface SchemaCreatorChangesDto {
9593
+ upserts?: SchemaCreatorElementDto[];
9594
+ deletes?: string[];
9595
+ order?: string[] | null;
9596
+ settings?: SchemaCreatorSettingsDto | null;
9597
+ recalculateGeneralTolerances?: boolean;
9598
+ }
9583
9599
  export interface MeasurementFormSchemaDto {
9584
9600
  id: string;
9585
9601
  versionId: number;
@@ -24893,6 +24893,51 @@ export class InspectSchemaCreatorClient extends AuthorizedApiBase {
24893
24893
  }
24894
24894
  return Promise.resolve(null);
24895
24895
  }
24896
+ /**
24897
+ * Saves only what changed; the response is the whole state with server-derived values.
24898
+ */
24899
+ applySchemaCreatorChanges(schemaVersionId, changes) {
24900
+ let url_ = this.baseUrl + "/measurementforms/schemas/{schemaVersionId}/creatorstate";
24901
+ if (schemaVersionId === undefined || schemaVersionId === null)
24902
+ throw new globalThis.Error("The parameter 'schemaVersionId' must be defined.");
24903
+ url_ = url_.replace("{schemaVersionId}", encodeURIComponent("" + schemaVersionId));
24904
+ url_ = url_.replace(/[?&]$/, "");
24905
+ const content_ = JSON.stringify(changes);
24906
+ let options_ = {
24907
+ body: content_,
24908
+ method: "PATCH",
24909
+ headers: {
24910
+ "Content-Type": "application/json",
24911
+ "Accept": "application/json"
24912
+ }
24913
+ };
24914
+ return this.transformOptions(options_).then(transformedOptions_ => {
24915
+ return this.http.fetch(url_, transformedOptions_);
24916
+ }).then((_response) => {
24917
+ return this.processApplySchemaCreatorChanges(_response);
24918
+ });
24919
+ }
24920
+ processApplySchemaCreatorChanges(response) {
24921
+ const status = response.status;
24922
+ let _headers = {};
24923
+ if (response.headers && response.headers.forEach) {
24924
+ response.headers.forEach((v, k) => _headers[k] = v);
24925
+ }
24926
+ ;
24927
+ if (status === 200) {
24928
+ return response.text().then((_responseText) => {
24929
+ let result200 = null;
24930
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
24931
+ return result200;
24932
+ });
24933
+ }
24934
+ else if (status !== 200 && status !== 204) {
24935
+ return response.text().then((_responseText) => {
24936
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24937
+ });
24938
+ }
24939
+ return Promise.resolve(null);
24940
+ }
24896
24941
  /**
24897
24942
  * Geometry only (no values), derived from the schema's retained
24898
24943
  InspectionXpert XML - used to seed a not-yet-created state with real
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261015.308.1",
3
+ "version": "20261019.310.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -26286,6 +26286,11 @@ export interface IInspectSchemaCreatorClient {
26286
26286
 
26287
26287
  updateSchemaCreatorState(schemaVersionId: string, state: SchemaCreatorStateDto): Promise<SchemaCreatorStateDto>;
26288
26288
 
26289
+ /**
26290
+ * Saves only what changed; the response is the whole state with server-derived values.
26291
+ */
26292
+ applySchemaCreatorChanges(schemaVersionId: string, changes: SchemaCreatorChangesDto): Promise<SchemaCreatorStateDto>;
26293
+
26289
26294
  /**
26290
26295
  * Geometry only (no values), derived from the schema's retained
26291
26296
  InspectionXpert XML - used to seed a not-yet-created state with real
@@ -26457,6 +26462,51 @@ export class InspectSchemaCreatorClient extends AuthorizedApiBase implements IIn
26457
26462
  return Promise.resolve<SchemaCreatorStateDto>(null as any);
26458
26463
  }
26459
26464
 
26465
+ /**
26466
+ * Saves only what changed; the response is the whole state with server-derived values.
26467
+ */
26468
+ applySchemaCreatorChanges(schemaVersionId: string, changes: SchemaCreatorChangesDto): Promise<SchemaCreatorStateDto> {
26469
+ let url_ = this.baseUrl + "/measurementforms/schemas/{schemaVersionId}/creatorstate";
26470
+ if (schemaVersionId === undefined || schemaVersionId === null)
26471
+ throw new globalThis.Error("The parameter 'schemaVersionId' must be defined.");
26472
+ url_ = url_.replace("{schemaVersionId}", encodeURIComponent("" + schemaVersionId));
26473
+ url_ = url_.replace(/[?&]$/, "");
26474
+
26475
+ const content_ = JSON.stringify(changes);
26476
+
26477
+ let options_: RequestInit = {
26478
+ body: content_,
26479
+ method: "PATCH",
26480
+ headers: {
26481
+ "Content-Type": "application/json",
26482
+ "Accept": "application/json"
26483
+ }
26484
+ };
26485
+
26486
+ return this.transformOptions(options_).then(transformedOptions_ => {
26487
+ return this.http.fetch(url_, transformedOptions_);
26488
+ }).then((_response: Response) => {
26489
+ return this.processApplySchemaCreatorChanges(_response);
26490
+ });
26491
+ }
26492
+
26493
+ protected processApplySchemaCreatorChanges(response: Response): Promise<SchemaCreatorStateDto> {
26494
+ const status = response.status;
26495
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
26496
+ if (status === 200) {
26497
+ return response.text().then((_responseText) => {
26498
+ let result200: any = null;
26499
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as SchemaCreatorStateDto;
26500
+ return result200;
26501
+ });
26502
+ } else if (status !== 200 && status !== 204) {
26503
+ return response.text().then((_responseText) => {
26504
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
26505
+ });
26506
+ }
26507
+ return Promise.resolve<SchemaCreatorStateDto>(null as any);
26508
+ }
26509
+
26460
26510
  /**
26461
26511
  * Geometry only (no values), derived from the schema's retained
26462
26512
  InspectionXpert XML - used to seed a not-yet-created state with real
@@ -39476,6 +39526,14 @@ export interface SchemaCreatorXmlGeometryDto {
39476
39526
  pageIndex: number;
39477
39527
  }
39478
39528
 
39529
+ export interface SchemaCreatorChangesDto {
39530
+ upserts?: SchemaCreatorElementDto[];
39531
+ deletes?: string[];
39532
+ order?: string[] | null;
39533
+ settings?: SchemaCreatorSettingsDto | null;
39534
+ recalculateGeneralTolerances?: boolean;
39535
+ }
39536
+
39479
39537
  export interface MeasurementFormSchemaDto {
39480
39538
  id: string;
39481
39539
  versionId: number;