@ignos/api-client 20250725.0.12210-alpha → 20250728.0.12218-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.
@@ -2625,6 +2625,8 @@ export interface IWorkordersClient {
2625
2625
  deleteWorkOrderMappings(): Promise<void>;
2626
2626
  getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessage[]>;
2627
2627
  addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessage>;
2628
+ updateMessage(id: string, messageId: string, content: string): Promise<FileResponse>;
2629
+ deleteMessage(id: string, messageId: string): Promise<FileResponse>;
2628
2630
  }
2629
2631
  export declare class WorkordersClient extends AuthorizedApiBase implements IWorkordersClient {
2630
2632
  private http;
@@ -2758,6 +2760,10 @@ export declare class WorkordersClient extends AuthorizedApiBase implements IWork
2758
2760
  protected processGetDiscussionMessages(response: Response): Promise<WorkorderDiscussionMessage[]>;
2759
2761
  addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessage>;
2760
2762
  protected processAddDiscussionMessage(response: Response): Promise<WorkorderDiscussionMessage>;
2763
+ updateMessage(id: string, messageId: string, content: string): Promise<FileResponse>;
2764
+ protected processUpdateMessage(response: Response): Promise<FileResponse>;
2765
+ deleteMessage(id: string, messageId: string): Promise<FileResponse>;
2766
+ protected processDeleteMessage(response: Response): Promise<FileResponse>;
2761
2767
  }
2762
2768
  export declare class AzureRegionDto implements IAzureRegionDto {
2763
2769
  displayName: string;
@@ -14448,6 +14454,8 @@ export declare class WorkorderDiscussionMessage extends TableEntityBase implemen
14448
14454
  content?: string;
14449
14455
  senderUpn?: string;
14450
14456
  senderName?: string;
14457
+ operationId?: string | null;
14458
+ resourceId?: string | null;
14451
14459
  constructor(data?: IWorkorderDiscussionMessage);
14452
14460
  init(_data?: any): void;
14453
14461
  static fromJS(data: any): WorkorderDiscussionMessage;
@@ -14457,6 +14465,8 @@ export interface IWorkorderDiscussionMessage extends ITableEntityBase {
14457
14465
  content?: string;
14458
14466
  senderUpn?: string;
14459
14467
  senderName?: string;
14468
+ operationId?: string | null;
14469
+ resourceId?: string | null;
14460
14470
  }
14461
14471
  /** Represents an HTTP ETag. */
14462
14472
  export declare class ETag implements IETag {
@@ -14484,6 +14494,8 @@ export interface IAuditInfo {
14484
14494
  }
14485
14495
  export declare class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest {
14486
14496
  message?: string;
14497
+ operationId?: string | null;
14498
+ resourceId?: string | null;
14487
14499
  constructor(data?: IAddDiscussionMessageRequest);
14488
14500
  init(_data?: any): void;
14489
14501
  static fromJS(data: any): AddDiscussionMessageRequest;
@@ -14491,6 +14503,8 @@ export declare class AddDiscussionMessageRequest implements IAddDiscussionMessag
14491
14503
  }
14492
14504
  export interface IAddDiscussionMessageRequest {
14493
14505
  message?: string;
14506
+ operationId?: string | null;
14507
+ resourceId?: string | null;
14494
14508
  }
14495
14509
  export interface FileParameter {
14496
14510
  data: any;
@@ -22809,6 +22809,105 @@ export class WorkordersClient extends AuthorizedApiBase {
22809
22809
  }
22810
22810
  return Promise.resolve(null);
22811
22811
  }
22812
+ updateMessage(id, messageId, content) {
22813
+ let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
22814
+ if (id === undefined || id === null)
22815
+ throw new Error("The parameter 'id' must be defined.");
22816
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
22817
+ if (messageId === undefined || messageId === null)
22818
+ throw new Error("The parameter 'messageId' must be defined.");
22819
+ url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
22820
+ url_ = url_.replace(/[?&]$/, "");
22821
+ const content_ = JSON.stringify(content);
22822
+ let options_ = {
22823
+ body: content_,
22824
+ method: "PUT",
22825
+ headers: {
22826
+ "Content-Type": "application/json",
22827
+ "Accept": "application/octet-stream"
22828
+ }
22829
+ };
22830
+ return this.transformOptions(options_).then(transformedOptions_ => {
22831
+ return this.http.fetch(url_, transformedOptions_);
22832
+ }).then((_response) => {
22833
+ return this.processUpdateMessage(_response);
22834
+ });
22835
+ }
22836
+ processUpdateMessage(response) {
22837
+ const status = response.status;
22838
+ let _headers = {};
22839
+ if (response.headers && response.headers.forEach) {
22840
+ response.headers.forEach((v, k) => _headers[k] = v);
22841
+ }
22842
+ ;
22843
+ if (status === 200 || status === 206) {
22844
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
22845
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
22846
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
22847
+ if (fileName) {
22848
+ fileName = decodeURIComponent(fileName);
22849
+ }
22850
+ else {
22851
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
22852
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
22853
+ }
22854
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
22855
+ }
22856
+ else if (status !== 200 && status !== 204) {
22857
+ return response.text().then((_responseText) => {
22858
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22859
+ });
22860
+ }
22861
+ return Promise.resolve(null);
22862
+ }
22863
+ deleteMessage(id, messageId) {
22864
+ let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
22865
+ if (id === undefined || id === null)
22866
+ throw new Error("The parameter 'id' must be defined.");
22867
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
22868
+ if (messageId === undefined || messageId === null)
22869
+ throw new Error("The parameter 'messageId' must be defined.");
22870
+ url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
22871
+ url_ = url_.replace(/[?&]$/, "");
22872
+ let options_ = {
22873
+ method: "DELETE",
22874
+ headers: {
22875
+ "Accept": "application/octet-stream"
22876
+ }
22877
+ };
22878
+ return this.transformOptions(options_).then(transformedOptions_ => {
22879
+ return this.http.fetch(url_, transformedOptions_);
22880
+ }).then((_response) => {
22881
+ return this.processDeleteMessage(_response);
22882
+ });
22883
+ }
22884
+ processDeleteMessage(response) {
22885
+ const status = response.status;
22886
+ let _headers = {};
22887
+ if (response.headers && response.headers.forEach) {
22888
+ response.headers.forEach((v, k) => _headers[k] = v);
22889
+ }
22890
+ ;
22891
+ if (status === 200 || status === 206) {
22892
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
22893
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
22894
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
22895
+ if (fileName) {
22896
+ fileName = decodeURIComponent(fileName);
22897
+ }
22898
+ else {
22899
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
22900
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
22901
+ }
22902
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
22903
+ }
22904
+ else if (status !== 200 && status !== 204) {
22905
+ return response.text().then((_responseText) => {
22906
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
22907
+ });
22908
+ }
22909
+ return Promise.resolve(null);
22910
+ }
22812
22911
  }
22813
22912
  export class AzureRegionDto {
22814
22913
  constructor(data) {
@@ -46738,6 +46837,8 @@ export class WorkorderDiscussionMessage extends TableEntityBase {
46738
46837
  this.content = _data["content"];
46739
46838
  this.senderUpn = _data["senderUpn"];
46740
46839
  this.senderName = _data["senderName"];
46840
+ this.operationId = _data["operationId"];
46841
+ this.resourceId = _data["resourceId"];
46741
46842
  }
46742
46843
  }
46743
46844
  static fromJS(data) {
@@ -46751,6 +46852,8 @@ export class WorkorderDiscussionMessage extends TableEntityBase {
46751
46852
  data["content"] = this.content;
46752
46853
  data["senderUpn"] = this.senderUpn;
46753
46854
  data["senderName"] = this.senderName;
46855
+ data["operationId"] = this.operationId;
46856
+ data["resourceId"] = this.resourceId;
46754
46857
  super.toJSON(data);
46755
46858
  return data;
46756
46859
  }
@@ -46820,6 +46923,8 @@ export class AddDiscussionMessageRequest {
46820
46923
  init(_data) {
46821
46924
  if (_data) {
46822
46925
  this.message = _data["message"];
46926
+ this.operationId = _data["operationId"];
46927
+ this.resourceId = _data["resourceId"];
46823
46928
  }
46824
46929
  }
46825
46930
  static fromJS(data) {
@@ -46831,6 +46936,8 @@ export class AddDiscussionMessageRequest {
46831
46936
  toJSON(data) {
46832
46937
  data = typeof data === 'object' ? data : {};
46833
46938
  data["message"] = this.message;
46939
+ data["operationId"] = this.operationId;
46940
+ data["resourceId"] = this.resourceId;
46834
46941
  return data;
46835
46942
  }
46836
46943
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250725.0.12210-alpha",
3
+ "version": "20250728.0.12218-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -23187,6 +23187,10 @@ export interface IWorkordersClient {
23187
23187
  getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessage[]>;
23188
23188
 
23189
23189
  addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessage>;
23190
+
23191
+ updateMessage(id: string, messageId: string, content: string): Promise<FileResponse>;
23192
+
23193
+ deleteMessage(id: string, messageId: string): Promise<FileResponse>;
23190
23194
  }
23191
23195
 
23192
23196
  export class WorkordersClient extends AuthorizedApiBase implements IWorkordersClient {
@@ -24352,6 +24356,102 @@ export class WorkordersClient extends AuthorizedApiBase implements IWorkordersCl
24352
24356
  }
24353
24357
  return Promise.resolve<WorkorderDiscussionMessage>(null as any);
24354
24358
  }
24359
+
24360
+ updateMessage(id: string, messageId: string, content: string): Promise<FileResponse> {
24361
+ let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
24362
+ if (id === undefined || id === null)
24363
+ throw new Error("The parameter 'id' must be defined.");
24364
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
24365
+ if (messageId === undefined || messageId === null)
24366
+ throw new Error("The parameter 'messageId' must be defined.");
24367
+ url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
24368
+ url_ = url_.replace(/[?&]$/, "");
24369
+
24370
+ const content_ = JSON.stringify(content);
24371
+
24372
+ let options_: RequestInit = {
24373
+ body: content_,
24374
+ method: "PUT",
24375
+ headers: {
24376
+ "Content-Type": "application/json",
24377
+ "Accept": "application/octet-stream"
24378
+ }
24379
+ };
24380
+
24381
+ return this.transformOptions(options_).then(transformedOptions_ => {
24382
+ return this.http.fetch(url_, transformedOptions_);
24383
+ }).then((_response: Response) => {
24384
+ return this.processUpdateMessage(_response);
24385
+ });
24386
+ }
24387
+
24388
+ protected processUpdateMessage(response: Response): Promise<FileResponse> {
24389
+ const status = response.status;
24390
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24391
+ if (status === 200 || status === 206) {
24392
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
24393
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
24394
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
24395
+ if (fileName) {
24396
+ fileName = decodeURIComponent(fileName);
24397
+ } else {
24398
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
24399
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
24400
+ }
24401
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
24402
+ } else if (status !== 200 && status !== 204) {
24403
+ return response.text().then((_responseText) => {
24404
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24405
+ });
24406
+ }
24407
+ return Promise.resolve<FileResponse>(null as any);
24408
+ }
24409
+
24410
+ deleteMessage(id: string, messageId: string): Promise<FileResponse> {
24411
+ let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
24412
+ if (id === undefined || id === null)
24413
+ throw new Error("The parameter 'id' must be defined.");
24414
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
24415
+ if (messageId === undefined || messageId === null)
24416
+ throw new Error("The parameter 'messageId' must be defined.");
24417
+ url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
24418
+ url_ = url_.replace(/[?&]$/, "");
24419
+
24420
+ let options_: RequestInit = {
24421
+ method: "DELETE",
24422
+ headers: {
24423
+ "Accept": "application/octet-stream"
24424
+ }
24425
+ };
24426
+
24427
+ return this.transformOptions(options_).then(transformedOptions_ => {
24428
+ return this.http.fetch(url_, transformedOptions_);
24429
+ }).then((_response: Response) => {
24430
+ return this.processDeleteMessage(_response);
24431
+ });
24432
+ }
24433
+
24434
+ protected processDeleteMessage(response: Response): Promise<FileResponse> {
24435
+ const status = response.status;
24436
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24437
+ if (status === 200 || status === 206) {
24438
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
24439
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
24440
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
24441
+ if (fileName) {
24442
+ fileName = decodeURIComponent(fileName);
24443
+ } else {
24444
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
24445
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
24446
+ }
24447
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
24448
+ } else if (status !== 200 && status !== 204) {
24449
+ return response.text().then((_responseText) => {
24450
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24451
+ });
24452
+ }
24453
+ return Promise.resolve<FileResponse>(null as any);
24454
+ }
24355
24455
  }
24356
24456
 
24357
24457
  export class AzureRegionDto implements IAzureRegionDto {
@@ -60012,6 +60112,8 @@ export class WorkorderDiscussionMessage extends TableEntityBase implements IWork
60012
60112
  content?: string;
60013
60113
  senderUpn?: string;
60014
60114
  senderName?: string;
60115
+ operationId?: string | null;
60116
+ resourceId?: string | null;
60015
60117
 
60016
60118
  constructor(data?: IWorkorderDiscussionMessage) {
60017
60119
  super(data);
@@ -60023,6 +60125,8 @@ export class WorkorderDiscussionMessage extends TableEntityBase implements IWork
60023
60125
  this.content = _data["content"];
60024
60126
  this.senderUpn = _data["senderUpn"];
60025
60127
  this.senderName = _data["senderName"];
60128
+ this.operationId = _data["operationId"];
60129
+ this.resourceId = _data["resourceId"];
60026
60130
  }
60027
60131
  }
60028
60132
 
@@ -60038,6 +60142,8 @@ export class WorkorderDiscussionMessage extends TableEntityBase implements IWork
60038
60142
  data["content"] = this.content;
60039
60143
  data["senderUpn"] = this.senderUpn;
60040
60144
  data["senderName"] = this.senderName;
60145
+ data["operationId"] = this.operationId;
60146
+ data["resourceId"] = this.resourceId;
60041
60147
  super.toJSON(data);
60042
60148
  return data;
60043
60149
  }
@@ -60047,6 +60153,8 @@ export interface IWorkorderDiscussionMessage extends ITableEntityBase {
60047
60153
  content?: string;
60048
60154
  senderUpn?: string;
60049
60155
  senderName?: string;
60156
+ operationId?: string | null;
60157
+ resourceId?: string | null;
60050
60158
  }
60051
60159
 
60052
60160
  /** Represents an HTTP ETag. */
@@ -60127,6 +60235,8 @@ export interface IAuditInfo {
60127
60235
 
60128
60236
  export class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest {
60129
60237
  message?: string;
60238
+ operationId?: string | null;
60239
+ resourceId?: string | null;
60130
60240
 
60131
60241
  constructor(data?: IAddDiscussionMessageRequest) {
60132
60242
  if (data) {
@@ -60140,6 +60250,8 @@ export class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest
60140
60250
  init(_data?: any) {
60141
60251
  if (_data) {
60142
60252
  this.message = _data["message"];
60253
+ this.operationId = _data["operationId"];
60254
+ this.resourceId = _data["resourceId"];
60143
60255
  }
60144
60256
  }
60145
60257
 
@@ -60153,12 +60265,16 @@ export class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest
60153
60265
  toJSON(data?: any) {
60154
60266
  data = typeof data === 'object' ? data : {};
60155
60267
  data["message"] = this.message;
60268
+ data["operationId"] = this.operationId;
60269
+ data["resourceId"] = this.resourceId;
60156
60270
  return data;
60157
60271
  }
60158
60272
  }
60159
60273
 
60160
60274
  export interface IAddDiscussionMessageRequest {
60161
60275
  message?: string;
60276
+ operationId?: string | null;
60277
+ resourceId?: string | null;
60162
60278
  }
60163
60279
 
60164
60280
  function formatDate(d: Date) {