@vibiz/cli 0.3.2 → 0.3.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.
@@ -788,6 +788,29 @@ var Vibiz = class {
788
788
  `/projects/${projectId}/analytics?period=${opts.period ?? "7d"}`
789
789
  )
790
790
  };
791
+ /**
792
+ * Mission Control (docs: Mission Control and health checks): every business
793
+ * of the account with its health, worst first; one business's checks; and
794
+ * checking again now. Checks also run every hour on their own.
795
+ */
796
+ health = {
797
+ /** Every business, worst first. `status`: only those (`['fail']`, `['fail', 'warn']`). */
798
+ list: (opts = {}) => {
799
+ const q = new URLSearchParams();
800
+ if (opts.status?.length) q.set("status", opts.status.join(","));
801
+ if (opts.q) q.set("q", opts.q);
802
+ const qs2 = q.toString();
803
+ return this.request(`/health${qs2 ? `?${qs2}` : ""}`);
804
+ },
805
+ /** One business's checks (checked now if it never was). */
806
+ get: (projectId) => this.request(`/projects/${encodeURIComponent(projectId)}/health`),
807
+ /** Check one business again now and answer its checks. */
808
+ run: (projectId) => this.request(`/projects/${encodeURIComponent(projectId)}/health/run`, {
809
+ method: "POST"
810
+ }),
811
+ /** Check every business again, in the background (a few at a time). */
812
+ runAll: () => this.request("/health/run", { method: "POST" })
813
+ };
791
814
  /** Session replay. Start from `insights`; open single sessions with `get`. */
792
815
  replays = {
793
816
  /** Rule-based findings over recorded sessions: what broke and where people got stuck. */
@@ -1863,7 +1886,7 @@ function formatMinor(minor, currency) {
1863
1886
  }
1864
1887
 
1865
1888
  // packages/sdk/src/one-key.ts
1866
- var APP_SDK_VERSION = "0.3.2";
1889
+ var APP_SDK_VERSION = "0.3.4";
1867
1890
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
1868
1891
  function oneKeyMessage(url, host) {
1869
1892
  const where = host ?? "your host";