curtain-web-api 1.0.58 → 1.0.59

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.
@@ -62,4 +62,5 @@ export declare class CurtainWebAPI {
62
62
  updateDataCite(id: number, data: any): Promise<import("axios").AxiosResponse<any, any>>;
63
63
  deleteDataCite(id: number): Promise<import("axios").AxiosResponse<any, any>>;
64
64
  changeDataCiteStatus(id: number, status: string): Promise<import("axios").AxiosResponse<any, any>>;
65
+ lockDataCite(id: number, lock: boolean): Promise<import("axios").AxiosResponse<any, any>>;
65
66
  }
@@ -629,5 +629,11 @@ class CurtainWebAPI {
629
629
  headers["Content-Type"] = "application/json";
630
630
  return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", { status: status }, { headers: headers, responseType: "json" });
631
631
  }
632
+ lockDataCite(id, lock) {
633
+ let headers = new axios_1.AxiosHeaders();
634
+ headers["Accept"] = "application/json";
635
+ headers["Content-Type"] = "application/json";
636
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/lock/", { lock: lock }, { headers: headers, responseType: "json" });
637
+ }
632
638
  }
633
639
  exports.CurtainWebAPI = CurtainWebAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.58",
3
+ "version": "1.0.59",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -649,5 +649,12 @@ export class CurtainWebAPI {
649
649
  headers["Content-Type"] = "application/json"
650
650
  return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", {status: status}, {headers: headers, responseType: "json"})
651
651
  }
652
+
653
+ lockDataCite(id: number, lock: boolean) {
654
+ let headers = new AxiosHeaders()
655
+ headers["Accept"] = "application/json"
656
+ headers["Content-Type"] = "application/json"
657
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/lock/", {lock: lock}, {headers: headers, responseType: "json"})
658
+ }
652
659
  }
653
660