@flashbacktech/tsclient 0.4.55 → 0.4.56

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 CHANGED
@@ -597,6 +597,35 @@ var CredentialsClient = class {
597
597
  delete(credentialId) {
598
598
  return this.http.delete(`/credentials/${credentialId}`);
599
599
  }
600
+ /**
601
+ * listOrgNotify returns the org-scoped notification credentials (Slack /
602
+ * Teams / PagerDuty / SMTP, workspaceId NULL) — the channels the org owns
603
+ * for platform-event notifications, managed on Settings → System
604
+ * notifications. Distinct from project-scoped notify credentials.
605
+ */
606
+ async listOrgNotify() {
607
+ const res = await this.http.get(
608
+ "/credentials/org-notify"
609
+ );
610
+ return res.credentials ?? res.data ?? [];
611
+ }
612
+ /**
613
+ * createOrgNotify creates an org-scoped notification credential. The body is
614
+ * the universal credential shape minus projectId/workspaceId (the server
615
+ * pins workspaceId to NULL); provider must be a notify transport.
616
+ */
617
+ async createOrgNotify(body) {
618
+ const res = await this.http.post(
619
+ "/credentials/org-notify",
620
+ { body }
621
+ );
622
+ const value = res.data ?? res.credential;
623
+ if (!value) throw new Error("createOrgNotify response missing body.");
624
+ return value;
625
+ }
626
+ deleteOrgNotify(credentialId) {
627
+ return this.http.delete(`/credentials/org-notify/${credentialId}`);
628
+ }
600
629
  /**
601
630
  * providers fetches the server-side catalog. The tsclient ships its
602
631
  * own catalog mirror in ./providers.ts that the frontend can use