glitch-javascript-sdk 0.2.3 → 0.2.5
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.
- package/dist/cjs/index.js +14 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +8 -0
- package/dist/esm/index.js +14 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/package.json +1 -1
- package/src/api/Communities.ts +12 -1
- package/src/api/Templates.ts +1 -1
- package/src/routes/CommunitiesRoute.ts +2 -1
|
@@ -197,5 +197,13 @@ declare class Communities {
|
|
|
197
197
|
* @returns promise
|
|
198
198
|
*/
|
|
199
199
|
static removetUser<T>(community_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
200
|
+
/**
|
|
201
|
+
* Finds a community either by its subdomain or cname. The cname must be active.
|
|
202
|
+
*
|
|
203
|
+
* @param domain The subcname of the community.
|
|
204
|
+
*
|
|
205
|
+
* @returns promise
|
|
206
|
+
*/
|
|
207
|
+
static findByDomain<T>(domain: string): AxiosPromise<Response<T>>;
|
|
200
208
|
}
|
|
201
209
|
export default Communities;
|
package/dist/esm/index.js
CHANGED
|
@@ -30718,7 +30718,8 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
30718
30718
|
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
30719
30719
|
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
30720
30720
|
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
30721
|
-
removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE }
|
|
30721
|
+
removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
|
|
30722
|
+
findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET }
|
|
30722
30723
|
};
|
|
30723
30724
|
return CommunitiesRoute;
|
|
30724
30725
|
}());
|
|
@@ -30759,7 +30760,7 @@ var Communities = /** @class */ (function () {
|
|
|
30759
30760
|
* @returns promise
|
|
30760
30761
|
*/
|
|
30761
30762
|
Communities.update = function (community_id, data) {
|
|
30762
|
-
return Requests.processRoute(CommunitiesRoute.routes.
|
|
30763
|
+
return Requests.processRoute(CommunitiesRoute.routes.update, data, { community_id: community_id });
|
|
30763
30764
|
};
|
|
30764
30765
|
/**
|
|
30765
30766
|
* Retrieve the information for a single community.
|
|
@@ -30966,6 +30967,16 @@ var Communities = /** @class */ (function () {
|
|
|
30966
30967
|
Communities.removetUser = function (community_id, user_id) {
|
|
30967
30968
|
return Requests.processRoute(CommunitiesRoute.routes.removeUser, {}, { community_id: community_id, user_id: user_id });
|
|
30968
30969
|
};
|
|
30970
|
+
/**
|
|
30971
|
+
* Finds a community either by its subdomain or cname. The cname must be active.
|
|
30972
|
+
*
|
|
30973
|
+
* @param domain The subcname of the community.
|
|
30974
|
+
*
|
|
30975
|
+
* @returns promise
|
|
30976
|
+
*/
|
|
30977
|
+
Communities.findByDomain = function (domain) {
|
|
30978
|
+
return Requests.processRoute(CommunitiesRoute.routes.findByDomain, {}, { domain: domain });
|
|
30979
|
+
};
|
|
30969
30980
|
return Communities;
|
|
30970
30981
|
}());
|
|
30971
30982
|
|
|
@@ -31841,7 +31852,7 @@ var Templates = /** @class */ (function () {
|
|
|
31841
31852
|
* @returns promise
|
|
31842
31853
|
*/
|
|
31843
31854
|
Templates.update = function (template_id, data) {
|
|
31844
|
-
return Requests.processRoute(TemplatesRoute.routes.
|
|
31855
|
+
return Requests.processRoute(TemplatesRoute.routes.update, data, { template_id: template_id });
|
|
31845
31856
|
};
|
|
31846
31857
|
/**
|
|
31847
31858
|
* Retrieve the information for a single template.
|