@internxt/sdk 1.10.2 → 1.10.3
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.
|
@@ -34,6 +34,13 @@ export declare class HttpClient {
|
|
|
34
34
|
* @param headers
|
|
35
35
|
*/
|
|
36
36
|
post<Response>(url: URL, params: Parameters, headers: Headers): Promise<Response>;
|
|
37
|
+
/**
|
|
38
|
+
* Requests a POST FORM
|
|
39
|
+
* @param url
|
|
40
|
+
* @param params
|
|
41
|
+
* @param headers
|
|
42
|
+
*/
|
|
43
|
+
postForm<Response>(url: URL, params: Parameters, headers: Headers): Promise<Response>;
|
|
37
44
|
/**
|
|
38
45
|
* Requests a POST with option to cancel
|
|
39
46
|
* @param url
|
|
@@ -72,6 +72,17 @@ var HttpClient = /** @class */ (function () {
|
|
|
72
72
|
headers: headers,
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* Requests a POST FORM
|
|
77
|
+
* @param url
|
|
78
|
+
* @param params
|
|
79
|
+
* @param headers
|
|
80
|
+
*/
|
|
81
|
+
HttpClient.prototype.postForm = function (url, params, headers) {
|
|
82
|
+
return this.axios.postForm(url, params, {
|
|
83
|
+
headers: headers,
|
|
84
|
+
});
|
|
85
|
+
};
|
|
75
86
|
/**
|
|
76
87
|
* Requests a POST with option to cancel
|
|
77
88
|
* @param url
|
package/dist/workspaces/index.js
CHANGED
|
@@ -84,9 +84,9 @@ var Workspaces = /** @class */ (function () {
|
|
|
84
84
|
* @returns The response from the server.
|
|
85
85
|
*/
|
|
86
86
|
Workspaces.prototype.uploadWorkspaceAvatar = function (workspaceId, avatar) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
return this.client.postForm("workspaces/".concat(workspaceId, "/avatar"), {
|
|
88
|
+
file: avatar,
|
|
89
|
+
}, this.headers());
|
|
90
90
|
};
|
|
91
91
|
Workspaces.prototype.deleteWorkspaceAvatar = function (workspaceId) {
|
|
92
92
|
return this.client.delete("workspaces/".concat(workspaceId, "/avatar"), this.headers());
|
|
@@ -102,9 +102,9 @@ var Workspaces = /** @class */ (function () {
|
|
|
102
102
|
return this.client.patch("workspaces/".concat(workspaceId), details, this.headers());
|
|
103
103
|
};
|
|
104
104
|
Workspaces.prototype.updateAvatar = function (workspaceId, payload) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
return this.client.postForm("workspaces/".concat(workspaceId, "/avatar"), {
|
|
106
|
+
file: payload.avatar,
|
|
107
|
+
}, this.headers());
|
|
108
108
|
};
|
|
109
109
|
Workspaces.prototype.deleteAvatar = function (workspaceId) {
|
|
110
110
|
return this.client.delete("workspaces/".concat(workspaceId, "/avatar"), this.headers());
|