eservices-core 1.0.294 → 1.0.295

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * eservices-core v1.0.294
2
+ * eservices-core v1.0.295
3
3
  * (c) 2022 ESERVICES
4
4
  */
5
5
  'use strict';
@@ -3178,6 +3178,18 @@ class dataService {
3178
3178
  }
3179
3179
  });
3180
3180
  }
3181
+ static updateById(entity, id, values, options) {
3182
+ return Request(`/close-api/data/entities/${entity}/id/${id}`, {
3183
+ method: 'PUT',
3184
+ headers: {
3185
+ 'Content-Type': 'application/json'
3186
+ },
3187
+ body: JSON.stringify({
3188
+ values,
3189
+ version: options === null || options === void 0 ? void 0 : options.version
3190
+ })
3191
+ });
3192
+ }
3181
3193
  }
3182
3194
 
3183
3195
  var script$t = {
@@ -1,8 +1,5 @@
1
1
  import { ValuesInterface } from "../types";
2
2
  import { MetadataResponse } from "../classes/Metadata";
3
- interface UpdateOptions {
4
- version?: number;
5
- }
6
3
  interface UpdateResponse {
7
4
  version: number;
8
5
  date: string;
@@ -44,6 +41,7 @@ export default class dataService {
44
41
  static test(): Promise<Response>;
45
42
  static read(entity: string, keys: string, options: ReadOptions): Promise<ReadResponse>;
46
43
  static readById(entity: string, id: number): Promise<any>;
44
+ static updateById(entity: string, id: number, values: ValuesInterface, options?: UpdateOptions): Promise<any>;
47
45
  }
48
46
  interface ReadOptions {
49
47
  metadata?: string;
@@ -54,4 +52,7 @@ interface ReadResponse {
54
52
  values: ValuesInterface;
55
53
  metadata: MetadataResponse;
56
54
  }
55
+ interface UpdateOptions {
56
+ version?: number;
57
+ }
57
58
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.294",
3
+ "version": "1.0.295",
4
4
  "description": "----",
5
5
  "author": "",
6
6
  "scripts": {