curtain-web-api 1.0.70 → 1.0.71
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.
|
@@ -125,6 +125,7 @@ export declare class CurtainWebAPI {
|
|
|
125
125
|
getOwnership(linkId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
126
126
|
getOwners(linkId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
127
127
|
addOwner(linkId: string, owner: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
128
|
+
removeOwner(linkId: string, owner: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
128
129
|
getCurtainLinks(username: string, sessionDescription?: string, offset?: number, sessionType?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
129
130
|
getSiteProperties(): Promise<import("axios").AxiosResponse<SiteProperties, any, {}>>;
|
|
130
131
|
saveDataFilterList(name: string, data: string, category?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
@@ -381,7 +381,23 @@ export class CurtainWebAPI {
|
|
|
381
381
|
let headers = new AxiosHeaders();
|
|
382
382
|
headers["Accept"] = "application/json";
|
|
383
383
|
headers["Content-Type"] = "multipart/form-data";
|
|
384
|
-
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/add_owner/", form, {
|
|
384
|
+
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/add_owner/", form, {
|
|
385
|
+
headers: headers,
|
|
386
|
+
responseType: "json"
|
|
387
|
+
}).then((response) => {
|
|
388
|
+
return response;
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
removeOwner(linkId, owner) {
|
|
392
|
+
let form = new FormData();
|
|
393
|
+
form.append("username", owner);
|
|
394
|
+
let headers = new AxiosHeaders();
|
|
395
|
+
headers["Accept"] = "application/json";
|
|
396
|
+
headers["Content-Type"] = "multipart/form-data";
|
|
397
|
+
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/remove_owner/", form, {
|
|
398
|
+
headers: headers,
|
|
399
|
+
responseType: "json"
|
|
400
|
+
}).then((response) => {
|
|
385
401
|
return response;
|
|
386
402
|
});
|
|
387
403
|
}
|
package/package.json
CHANGED
|
@@ -514,7 +514,26 @@ export class CurtainWebAPI {
|
|
|
514
514
|
headers["Accept"] = "application/json";
|
|
515
515
|
headers["Content-Type"] = "multipart/form-data";
|
|
516
516
|
|
|
517
|
-
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/add_owner/", form, {
|
|
517
|
+
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/add_owner/", form, {
|
|
518
|
+
headers: headers,
|
|
519
|
+
responseType: "json"
|
|
520
|
+
}).then((response) => {
|
|
521
|
+
return response;
|
|
522
|
+
})
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
removeOwner(linkId: string, owner: string) {
|
|
526
|
+
let form = new FormData();
|
|
527
|
+
form.append("username", owner);
|
|
528
|
+
|
|
529
|
+
let headers = new AxiosHeaders();
|
|
530
|
+
headers["Accept"] = "application/json";
|
|
531
|
+
headers["Content-Type"] = "multipart/form-data";
|
|
532
|
+
|
|
533
|
+
return this.axiosInstance.patch(this.baseURL + "curtain/" + linkId + "/remove_owner/", form, {
|
|
534
|
+
headers: headers,
|
|
535
|
+
responseType: "json"
|
|
536
|
+
}).then((response) => {
|
|
518
537
|
return response;
|
|
519
538
|
})
|
|
520
539
|
}
|