@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.d.cts CHANGED
@@ -762,6 +762,20 @@ declare class CredentialsClient {
762
762
  create(body: CreateCredentialRequest): Promise<Credential>;
763
763
  update(credentialId: string, body: UpdateCredentialRequest): Promise<Credential>;
764
764
  delete(credentialId: string): Promise<SimpleKeysResponse>;
765
+ /**
766
+ * listOrgNotify returns the org-scoped notification credentials (Slack /
767
+ * Teams / PagerDuty / SMTP, workspaceId NULL) — the channels the org owns
768
+ * for platform-event notifications, managed on Settings → System
769
+ * notifications. Distinct from project-scoped notify credentials.
770
+ */
771
+ listOrgNotify(): Promise<Credential[]>;
772
+ /**
773
+ * createOrgNotify creates an org-scoped notification credential. The body is
774
+ * the universal credential shape minus projectId/workspaceId (the server
775
+ * pins workspaceId to NULL); provider must be a notify transport.
776
+ */
777
+ createOrgNotify(body: Omit<CreateCredentialRequest, 'projectId' | 'workspaceId'>): Promise<Credential>;
778
+ deleteOrgNotify(credentialId: string): Promise<SimpleKeysResponse>;
765
779
  /**
766
780
  * providers fetches the server-side catalog. The tsclient ships its
767
781
  * own catalog mirror in ./providers.ts that the frontend can use
package/dist/index.d.ts CHANGED
@@ -762,6 +762,20 @@ declare class CredentialsClient {
762
762
  create(body: CreateCredentialRequest): Promise<Credential>;
763
763
  update(credentialId: string, body: UpdateCredentialRequest): Promise<Credential>;
764
764
  delete(credentialId: string): Promise<SimpleKeysResponse>;
765
+ /**
766
+ * listOrgNotify returns the org-scoped notification credentials (Slack /
767
+ * Teams / PagerDuty / SMTP, workspaceId NULL) — the channels the org owns
768
+ * for platform-event notifications, managed on Settings → System
769
+ * notifications. Distinct from project-scoped notify credentials.
770
+ */
771
+ listOrgNotify(): Promise<Credential[]>;
772
+ /**
773
+ * createOrgNotify creates an org-scoped notification credential. The body is
774
+ * the universal credential shape minus projectId/workspaceId (the server
775
+ * pins workspaceId to NULL); provider must be a notify transport.
776
+ */
777
+ createOrgNotify(body: Omit<CreateCredentialRequest, 'projectId' | 'workspaceId'>): Promise<Credential>;
778
+ deleteOrgNotify(credentialId: string): Promise<SimpleKeysResponse>;
765
779
  /**
766
780
  * providers fetches the server-side catalog. The tsclient ships its
767
781
  * own catalog mirror in ./providers.ts that the frontend can use
package/dist/index.js CHANGED
@@ -595,6 +595,35 @@ var CredentialsClient = class {
595
595
  delete(credentialId) {
596
596
  return this.http.delete(`/credentials/${credentialId}`);
597
597
  }
598
+ /**
599
+ * listOrgNotify returns the org-scoped notification credentials (Slack /
600
+ * Teams / PagerDuty / SMTP, workspaceId NULL) — the channels the org owns
601
+ * for platform-event notifications, managed on Settings → System
602
+ * notifications. Distinct from project-scoped notify credentials.
603
+ */
604
+ async listOrgNotify() {
605
+ const res = await this.http.get(
606
+ "/credentials/org-notify"
607
+ );
608
+ return res.credentials ?? res.data ?? [];
609
+ }
610
+ /**
611
+ * createOrgNotify creates an org-scoped notification credential. The body is
612
+ * the universal credential shape minus projectId/workspaceId (the server
613
+ * pins workspaceId to NULL); provider must be a notify transport.
614
+ */
615
+ async createOrgNotify(body) {
616
+ const res = await this.http.post(
617
+ "/credentials/org-notify",
618
+ { body }
619
+ );
620
+ const value = res.data ?? res.credential;
621
+ if (!value) throw new Error("createOrgNotify response missing body.");
622
+ return value;
623
+ }
624
+ deleteOrgNotify(credentialId) {
625
+ return this.http.delete(`/credentials/org-notify/${credentialId}`);
626
+ }
598
627
  /**
599
628
  * providers fetches the server-side catalog. The tsclient ships its
600
629
  * own catalog mirror in ./providers.ts that the frontend can use