curtain-web-api 1.0.56 → 1.0.58

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.
@@ -52,6 +52,14 @@ export declare class CurtainWebAPI {
52
52
  getRandomDataCiteSuffix(): Promise<import("axios").AxiosResponse<any, any>>;
53
53
  submitDataCite(data: any): Promise<import("axios").AxiosResponse<any, any>>;
54
54
  getDataCite(id: number): Promise<import("axios").AxiosResponse<any, any>>;
55
+ getDataCites(url?: string, title?: string, status?: string, limit?: number, offset?: number, manage?: boolean): Promise<import("axios").AxiosResponse<any, any>>;
55
56
  getDataCiteTimeLimitedPermissionToken(suffix: string): Promise<import("axios").AxiosResponse<any, any>>;
56
57
  getDataCiteProxyOrcidPublicRecord(orcid: string): Promise<import("axios").AxiosResponse<any, any>>;
58
+ getDataCiteQuota(): Promise<import("axios").AxiosResponse<{
59
+ quota: number;
60
+ max_quota: number;
61
+ }, any>>;
62
+ updateDataCite(id: number, data: any): Promise<import("axios").AxiosResponse<any, any>>;
63
+ deleteDataCite(id: number): Promise<import("axios").AxiosResponse<any, any>>;
64
+ changeDataCiteStatus(id: number, status: string): Promise<import("axios").AxiosResponse<any, any>>;
57
65
  }
@@ -577,6 +577,26 @@ class CurtainWebAPI {
577
577
  headers["Accept"] = "application/json";
578
578
  return this.axiosInstance.get(this.baseURL + "datacite/" + id + "/", { headers: headers, responseType: "json" });
579
579
  }
580
+ getDataCites(url, title, status, limit = 10, offset = 0, manage = false) {
581
+ let headers = new axios_1.AxiosHeaders();
582
+ headers["Accept"] = "application/json";
583
+ let params = new URLSearchParams();
584
+ if (url !== undefined) {
585
+ params.append("url", url);
586
+ }
587
+ if (title !== undefined) {
588
+ params.append("title", title);
589
+ }
590
+ if (status !== undefined) {
591
+ params.append("status", status);
592
+ }
593
+ if (manage !== undefined) {
594
+ params.append("manage", manage.toString());
595
+ }
596
+ params.append("limit", limit.toString());
597
+ params.append("offset", offset.toString());
598
+ return this.axiosInstance.get(this.baseURL + "datacite/", { headers: headers, params: params, responseType: "json" });
599
+ }
580
600
  getDataCiteTimeLimitedPermissionToken(suffix) {
581
601
  let headers = new axios_1.AxiosHeaders();
582
602
  headers["Accept"] = "application/json";
@@ -587,5 +607,27 @@ class CurtainWebAPI {
587
607
  headers["Accept"] = "application/json";
588
608
  return this.axiosInstance.get(this.baseURL + "datacite/proxy_orcid/?orcid=" + orcid, { headers: headers, responseType: "json" });
589
609
  }
610
+ getDataCiteQuota() {
611
+ let headers = new axios_1.AxiosHeaders();
612
+ headers["Accept"] = "application/json";
613
+ return this.axiosInstance.get(this.baseURL + "datacite/get_quota/", { headers: headers, responseType: "json" });
614
+ }
615
+ updateDataCite(id, data) {
616
+ let headers = new axios_1.AxiosHeaders();
617
+ headers["Accept"] = "application/json";
618
+ headers["Content-Type"] = "application/json";
619
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/", data, { headers: headers, responseType: "json" });
620
+ }
621
+ deleteDataCite(id) {
622
+ let headers = new axios_1.AxiosHeaders();
623
+ headers["Accept"] = "application/json";
624
+ return this.axiosInstance.delete(this.baseURL + "datacite/" + id + "/", { headers: headers, responseType: "json" });
625
+ }
626
+ changeDataCiteStatus(id, status) {
627
+ let headers = new axios_1.AxiosHeaders();
628
+ headers["Accept"] = "application/json";
629
+ headers["Content-Type"] = "application/json";
630
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", { status: status }, { headers: headers, responseType: "json" });
631
+ }
590
632
  }
591
633
  exports.CurtainWebAPI = CurtainWebAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -591,6 +591,27 @@ export class CurtainWebAPI {
591
591
  return this.axiosInstance.get(this.baseURL + "datacite/" + id + "/", {headers: headers, responseType: "json"})
592
592
  }
593
593
 
594
+ getDataCites(url?: string, title?: string, status?: string, limit: number = 10, offset = 0, manage: boolean = false) {
595
+ let headers = new AxiosHeaders()
596
+ headers["Accept"] = "application/json"
597
+ let params = new URLSearchParams()
598
+ if (url !== undefined) {
599
+ params.append("url", url)
600
+ }
601
+ if (title !== undefined) {
602
+ params.append("title", title)
603
+ }
604
+ if (status !== undefined) {
605
+ params.append("status", status)
606
+ }
607
+ if (manage !== undefined) {
608
+ params.append("manage", manage.toString())
609
+ }
610
+ params.append("limit", limit.toString())
611
+ params.append("offset", offset.toString())
612
+ return this.axiosInstance.get(this.baseURL + "datacite/", {headers: headers, params: params, responseType: "json"})
613
+ }
614
+
594
615
  getDataCiteTimeLimitedPermissionToken(suffix: string) {
595
616
  let headers = new AxiosHeaders()
596
617
  headers["Accept"] = "application/json"
@@ -602,5 +623,31 @@ export class CurtainWebAPI {
602
623
  headers["Accept"] = "application/json"
603
624
  return this.axiosInstance.get(this.baseURL + "datacite/proxy_orcid/?orcid=" + orcid, {headers: headers, responseType: "json"})
604
625
  }
626
+
627
+ getDataCiteQuota() {
628
+ let headers = new AxiosHeaders()
629
+ headers["Accept"] = "application/json"
630
+ return this.axiosInstance.get<{quota: number, max_quota: number}>(this.baseURL + "datacite/get_quota/", {headers: headers, responseType: "json"})
631
+ }
632
+
633
+ updateDataCite(id: number, data: any) {
634
+ let headers = new AxiosHeaders()
635
+ headers["Accept"] = "application/json"
636
+ headers["Content-Type"] = "application/json"
637
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/", data, {headers: headers, responseType: "json"})
638
+ }
639
+
640
+ deleteDataCite(id: number) {
641
+ let headers = new AxiosHeaders()
642
+ headers["Accept"] = "application/json"
643
+ return this.axiosInstance.delete(this.baseURL + "datacite/" + id + "/", {headers: headers, responseType: "json"})
644
+ }
645
+
646
+ changeDataCiteStatus(id: number, status: string) {
647
+ let headers = new AxiosHeaders()
648
+ headers["Accept"] = "application/json"
649
+ headers["Content-Type"] = "application/json"
650
+ return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", {status: status}, {headers: headers, responseType: "json"})
651
+ }
605
652
  }
606
653