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.
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Communities.d.ts +8 -0
- package/dist/esm/index.js +12 -1
- 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 +11 -0
- package/src/routes/CommunitiesRoute.ts +2 -1
package/dist/cjs/index.js
CHANGED
|
@@ -16496,7 +16496,8 @@ var CommunitiesRoute = /** @class */ (function () {
|
|
|
16496
16496
|
addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
|
|
16497
16497
|
showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
|
|
16498
16498
|
updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
|
|
16499
|
-
removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE }
|
|
16499
|
+
removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
|
|
16500
|
+
findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET }
|
|
16500
16501
|
};
|
|
16501
16502
|
return CommunitiesRoute;
|
|
16502
16503
|
}());
|
|
@@ -16744,6 +16745,16 @@ var Communities = /** @class */ (function () {
|
|
|
16744
16745
|
Communities.removetUser = function (community_id, user_id) {
|
|
16745
16746
|
return Requests.processRoute(CommunitiesRoute.routes.removeUser, {}, { community_id: community_id, user_id: user_id });
|
|
16746
16747
|
};
|
|
16748
|
+
/**
|
|
16749
|
+
* Finds a community either by its subdomain or cname. The cname must be active.
|
|
16750
|
+
*
|
|
16751
|
+
* @param domain The subcname of the community.
|
|
16752
|
+
*
|
|
16753
|
+
* @returns promise
|
|
16754
|
+
*/
|
|
16755
|
+
Communities.findByDomain = function (domain) {
|
|
16756
|
+
return Requests.processRoute(CommunitiesRoute.routes.findByDomain, {}, { domain: domain });
|
|
16757
|
+
};
|
|
16747
16758
|
return Communities;
|
|
16748
16759
|
}());
|
|
16749
16760
|
|