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
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
|
}());
|
|
@@ -16537,7 +16538,7 @@ var Communities = /** @class */ (function () {
|
|
|
16537
16538
|
* @returns promise
|
|
16538
16539
|
*/
|
|
16539
16540
|
Communities.update = function (community_id, data) {
|
|
16540
|
-
return Requests.processRoute(CommunitiesRoute.routes.
|
|
16541
|
+
return Requests.processRoute(CommunitiesRoute.routes.update, data, { community_id: community_id });
|
|
16541
16542
|
};
|
|
16542
16543
|
/**
|
|
16543
16544
|
* Retrieve the information for a single community.
|
|
@@ -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
|
|
|
@@ -17619,7 +17630,7 @@ var Templates = /** @class */ (function () {
|
|
|
17619
17630
|
* @returns promise
|
|
17620
17631
|
*/
|
|
17621
17632
|
Templates.update = function (template_id, data) {
|
|
17622
|
-
return Requests.processRoute(TemplatesRoute.routes.
|
|
17633
|
+
return Requests.processRoute(TemplatesRoute.routes.update, data, { template_id: template_id });
|
|
17623
17634
|
};
|
|
17624
17635
|
/**
|
|
17625
17636
|
* Retrieve the information for a single template.
|