glitch-javascript-sdk 0.2.3 → 0.2.4

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.
@@ -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
  }());
@@ -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