curtain-web-api 1.0.45 → 1.0.46

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.
@@ -45,4 +45,7 @@ export declare class CurtainWebAPI {
45
45
  getStatsSummary(lastNDays: number): Promise<import("axios").AxiosResponse<any, any>>;
46
46
  postEncryptionFactors(encryptedAESKey: string, encryptedIV: string, linkId: string): Promise<import("axios").AxiosResponse<any, any>>;
47
47
  getEncryptionFactors(linkId: string): Promise<import("axios").AxiosResponse<any, any>>;
48
+ createCurtainAPIKey(name: string): Promise<import("axios").AxiosResponse<any, any>>;
49
+ getCurtainAPIKeys(): Promise<import("axios").AxiosResponse<any, any>>;
50
+ deleteCurtainAPIKey(id: number): Promise<import("axios").AxiosResponse<any, any>>;
48
51
  }
@@ -521,5 +521,23 @@ class CurtainWebAPI {
521
521
  return yield this.axiosInstance.get(this.baseURL + "curtain/" + linkId + "/get_encryption_factors/", { headers: headers, responseType: "json" });
522
522
  });
523
523
  }
524
+ createCurtainAPIKey(name) {
525
+ let headers = new axios_1.AxiosHeaders();
526
+ headers["Accept"] = "application/json";
527
+ headers["Content-Type"] = "application/json";
528
+ return this.axiosInstance.post(this.baseURL + "api_key/", { name: name }, { headers: headers, responseType: "json" });
529
+ }
530
+ getCurtainAPIKeys() {
531
+ let headers = new axios_1.AxiosHeaders();
532
+ headers["Accept"] = "application/json";
533
+ headers["Content-Type"] = "application/json";
534
+ return this.axiosInstance.get(this.baseURL + "api_key/", { headers: headers, responseType: "json" });
535
+ }
536
+ deleteCurtainAPIKey(id) {
537
+ let headers = new axios_1.AxiosHeaders();
538
+ headers["Accept"] = "application/json";
539
+ headers["Content-Type"] = "application/json";
540
+ return this.axiosInstance.delete(this.baseURL + "api_key/" + id + "/", { headers: headers, responseType: "json" });
541
+ }
524
542
  }
525
543
  exports.CurtainWebAPI = CurtainWebAPI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -531,5 +531,26 @@ export class CurtainWebAPI {
531
531
  headers["Content-Type"] = "application/json";
532
532
  return await this.axiosInstance.get(this.baseURL + "curtain/" + linkId + "/get_encryption_factors/", {headers: headers, responseType: "json"})
533
533
  }
534
+
535
+ createCurtainAPIKey(name: string) {
536
+ let headers = new AxiosHeaders()
537
+ headers["Accept"] = "application/json"
538
+ headers["Content-Type"] = "application/json"
539
+ return this.axiosInstance.post(this.baseURL + "api_key/", {name: name}, {headers: headers, responseType: "json"})
540
+ }
541
+
542
+ getCurtainAPIKeys() {
543
+ let headers = new AxiosHeaders()
544
+ headers["Accept"] = "application/json"
545
+ headers["Content-Type"] = "application/json"
546
+ return this.axiosInstance.get(this.baseURL + "api_key/", {headers: headers, responseType: "json"})
547
+ }
548
+
549
+ deleteCurtainAPIKey(id: number) {
550
+ let headers = new AxiosHeaders()
551
+ headers["Accept"] = "application/json"
552
+ headers["Content-Type"] = "application/json"
553
+ return this.axiosInstance.delete(this.baseURL + "api_key/" + id + "/", {headers: headers, responseType: "json"})
554
+ }
534
555
  }
535
556