@flashbacktech/tsclient 0.4.52 → 0.4.54
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/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -251,6 +251,26 @@ var OrganizationClient = class {
|
|
|
251
251
|
const res = await this.http.put(`/organization/${orgId}`, { body });
|
|
252
252
|
return unwrapData(res);
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Fetch the org's default-notification-channel config: the per-event
|
|
256
|
+
* subscriptions, the notify channels available to route to, and whether the
|
|
257
|
+
* caller's org is the platform-admin org (which unlocks the cross-org
|
|
258
|
+
* `engine_failure` / `infra_outage` event types).
|
|
259
|
+
*/
|
|
260
|
+
async getNotifySubscriptions() {
|
|
261
|
+
const res = await this.http.get(
|
|
262
|
+
"/organization/notify-subscriptions"
|
|
263
|
+
);
|
|
264
|
+
return unwrapData(res);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Replace the org's notify subscriptions (replace-set). Each edge is
|
|
268
|
+
* validated server-side: the credential must be a notify channel in the org,
|
|
269
|
+
* and admin-only event types require a platform-admin caller.
|
|
270
|
+
*/
|
|
271
|
+
setNotifySubscriptions(body) {
|
|
272
|
+
return this.http.put("/organization/notify-subscriptions", { body });
|
|
273
|
+
}
|
|
254
274
|
async listUsers() {
|
|
255
275
|
const res = await this.http.get("/organization/users");
|
|
256
276
|
return res.data ?? [];
|