glitch-javascript-sdk 0.2.8 → 0.2.9

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.
@@ -205,5 +205,15 @@ declare class Communities {
205
205
  * @returns promise
206
206
  */
207
207
  static findByDomain<T>(domain: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
208
+ /**
209
+ * Has a user join a community. The join is executed using the current user's authentication token.
210
+ *
211
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
212
+ *
213
+ * @param community_id The id of the community to update.
214
+ *
215
+ * @returns promise
216
+ */
217
+ static join<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
208
218
  }
209
219
  export default Communities;
package/dist/esm/index.js CHANGED
@@ -30848,6 +30848,7 @@ var CommunitiesRoute = /** @class */ (function () {
30848
30848
  showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
30849
30849
  updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
30850
30850
  removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
30851
+ join: { url: '/communities/{community_id}/join', method: HTTP_METHODS.POST },
30851
30852
  findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET }
30852
30853
  };
30853
30854
  return CommunitiesRoute;
@@ -31106,6 +31107,18 @@ var Communities = /** @class */ (function () {
31106
31107
  Communities.findByDomain = function (domain, params) {
31107
31108
  return Requests.processRoute(CommunitiesRoute.routes.findByDomain, {}, { domain: domain }, params);
31108
31109
  };
31110
+ /**
31111
+ * Has a user join a community. The join is executed using the current user's authentication token.
31112
+ *
31113
+ * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage
31114
+ *
31115
+ * @param community_id The id of the community to update.
31116
+ *
31117
+ * @returns promise
31118
+ */
31119
+ Communities.join = function (community_id, data, params) {
31120
+ return Requests.processRoute(CommunitiesRoute.routes.join, data, { community_id: community_id }, params);
31121
+ };
31109
31122
  return Communities;
31110
31123
  }());
31111
31124