@vibiz/sdk 0.3.4 → 0.3.6

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/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ActionInfo, ActionResult, ActionRun, ActionRunList, ActionRunsQuery, ActionUsage, AdminMetrics, AiJob, AiModelInfo, AiProviderKey, AiProviderKeyInput, AiProviderKeyList, AiSettings, AnalyticsPeriod, AnalyticsReport, ApiKey, AppKeyInfo, AppStoreAccount, AppStoreConnectLink, AppStoreSetup, AppStoreSetupInput, AppStoreState, AuthEnvironment, AuthProviderId, AuthProviderInput, AuthSettings, AuthSettingsPatch, Automation, AutomationEnrollment, AutomationInput, AutomationTrigger, Billing, BillingCharge, BillingCheckout, BillingEntry, BillingEntryKind, BillingList, BillingUpdate, Broadcast, BroadcastInput, BroadcastRecipient, BroadcastReview, BroadcastStatus, ChatChunk, ChatCompletion, ChatRequest, Checkout, CheckoutBrandPatch, CheckoutInput, Company, CompanyAddressFields, CompanyCatalog, CompanyDraft, CompanyEnvironment, CompanyLink, Connector, ConnectorApproval, ConnectorCall, ConnectorCallInput, ConnectorCheck, ConnectorEnvironment, ConnectorImport, ConnectorInput, ConnectorPatch, ConnectorResponse, ContactPropertyValue, ContactStatus, DashboardLink, DeployFile, Deployment, DeploymentFiles, DesignSectionRead, DesignSpec, DevEnvironment, DnsRecord, DnsRecordInput, DnsRecordList, Domain, DomainBuyInput, DomainList, DomainOwnerContact, DomainOwnerDetails, DomainQuote, DomainSearch, DomainUse, DomainUseInput, EmailContact, EmailContactInput, EmailContactList, EmailContactPatch, EmailForwarding, EmailForwardingLog, EmailForwardingRule, EmailImportInput, EmailImportReport, EmailList, EmailMarketing, EmailMarketingPatch, EmailPage, EmailPreview, EmailSegment, EmailTestResult, EnvTargetInfo, EnvVarInfo, ExportInput, FileEnvironment, FileList, FileListOptions, FileUploadOptions, HealthList, HealthRun, HealthStatus, HostKind, ImageRequest, ImageResult, InboxSettings, KeyAccess, LedgerEntry, Mailbox, MailboxInput, MailDomain, MailFolder, MailReplyInput, MailSendInput, MailThreadDetail, MailThreadList, MailView, MetricsReport, Operation, OwnAccountLink, OwnedDomain, OwnedDomainList, OwnerStripe, OwnerStripeApply, OwnerStripeDisconnect, OwnerStripeLink, Payment, PaymentPrice, PaymentPriceInput, PaymentProduct, PaymentSubscription, PaymentsAccount, PaymentsEnvironment, PaymentsList, PaymentsSimulation, PhoneAnsweringInput, PhoneCall, PhoneCallInput, PhoneCallList, PhoneMessage, PhoneMessageList, PhoneNumber, PhoneNumberList, PhoneQuote, PhoneRegistrationInput, PhoneRegistrationRequirements, PhoneSearch, PhoneSendInput, PhoneThreadList, Project, ProjectExport, ProjectHealth, ReplayDetail, ReplayFrames, ReplayFramesOptions, ReplayInsights, ReplayListOptions, ReplayPeriod, ReplayStatus, ReplaySummary, Resource, ResourceType, SecretLink, SegmentFilter, SendEmailInput, SendEmailOutput, SocialAccount, SocialAccountAnalytics, SocialAdCampaign, SocialAdChange, SocialAdChangeInput, SocialCampaignCreateInput, SocialConnectLink, SocialEnvironment, SocialMedia, SocialOverview, SocialPost, SocialPostAnalytics, SocialPostInput, SpeechRequest, Transcription, UsageOptions, UsagePeriod, UsageReport, VersionDiff, VersionList, VersionRestore, VibizFile, WebDesignInput, WebhookDelivery, WebhookEventType, Withdrawal } from './types.js';
1
+ import type { ActionInfo, ActionResult, ActionRun, ActionRunList, ActionRunsQuery, ActionUsage, AdminMetrics, AiJob, AiModelInfo, AiProviderKey, AiProviderKeyInput, AiProviderKeyList, AiSettings, AnalyticsPeriod, AnalyticsReport, ApiKey, AppKeyInfo, AppStoreAccount, AppStoreConnectLink, AppStoreSetup, AppStoreSetupInput, AppStoreState, AuthEnvironment, AuthProviderId, AuthProviderInput, AuthSettings, AuthSettingsPatch, Automation, AutomationEnrollment, AutomationInput, AutomationTrigger, Billing, BillingCharge, BillingCheckout, BillingEntry, BillingEntryKind, BillingList, BillingUpdate, Broadcast, BroadcastInput, BroadcastRecipient, BroadcastReview, BroadcastStatus, ChatChunk, ChatCompletion, ChatRequest, Checkout, CheckoutBrandPatch, CheckoutInput, Company, CompanyAddressFields, CompanyCatalog, CompanyDraft, CompanyEnvironment, CompanyLink, Connector, ConnectorApproval, ConnectorCall, ConnectorCallInput, ConnectorCheck, ConnectorEnvironment, ConnectorImport, ConnectorInput, ConnectorPatch, ConnectorResponse, ContactPropertyValue, ContactStatus, DashboardLink, DeployFile, Deployment, DeploymentFiles, DesignSectionRead, DesignSpec, DevEnvironment, DnsRecord, DnsRecordInput, DnsRecordList, Domain, DomainBuyInput, DomainList, DomainOwnerContact, DomainOwnerDetails, DomainQuote, DomainSearch, DomainUse, DomainUseInput, EmailContact, EmailContactInput, EmailContactList, EmailContactPatch, EmailForwarding, EmailForwardingLog, EmailForwardingRule, EmailImportInput, EmailImportReport, EmailList, EmailMarketing, EmailMarketingPatch, EmailPage, EmailPreview, EmailSegment, EmailTestResult, EnvTargetInfo, EnvVarInfo, ExportInput, FileEnvironment, FileList, FileListOptions, FileUploadOptions, HealthList, HealthRun, HealthStatus, HostKind, ImageRequest, ImageResult, InboxSettings, KeyAccess, LedgerEntry, Mailbox, MailboxInput, MailDomain, MailFolder, MailReplyInput, MailSendInput, MailThreadDetail, MailThreadList, MailView, MetricsReport, MissionControl, MissionControlLayout, Operation, OwnAccountLink, OwnedDomain, OwnedDomainList, OwnerStripe, OwnerStripeApply, OwnerStripeDisconnect, OwnerStripeLink, Payment, PaymentPrice, PaymentPriceInput, PaymentProduct, PaymentSubscription, PaymentsAccount, PaymentsEnvironment, PaymentsList, PaymentsSimulation, PhoneAnsweringInput, PhoneCall, PhoneCallInput, PhoneCallList, PhoneMessage, PhoneMessageList, PhoneNumber, PhoneNumberList, PhoneQuote, PhoneRegistrationInput, PhoneRegistrationRequirements, PhoneSearch, PhoneSendInput, PhoneThreadList, Project, ProjectExport, ProjectHealth, ReplayDetail, ReplayFrames, ReplayFramesOptions, ReplayInsights, ReplayListOptions, ReplayPeriod, ReplayStatus, ReplaySummary, Resource, ResourceType, SecretLink, SegmentFilter, SendEmailInput, SendEmailOutput, SocialAccount, SocialAccountAnalytics, SocialAdCampaign, SocialAdChange, SocialAdChangeInput, SocialCampaignCreateInput, SocialConnectLink, SocialEnvironment, SocialMedia, SocialOverview, SocialPost, SocialPostAnalytics, SocialPostInput, SpeechRequest, Transcription, UsageOptions, UsagePeriod, UsageReport, VersionDiff, VersionList, VersionRestore, VibizFile, WebDesignInput, WebhookDelivery, WebhookEventType, Withdrawal } from './types.js';
2
2
  /**
3
3
  * An error status with no Vibiz error body: a proxy, a load balancer or the
4
4
  * network answered instead of the API. Say so, and what to do.
@@ -669,6 +669,26 @@ export declare class Vibiz {
669
669
  /** Check every business again, in the background (a few at a time). */
670
670
  runAll: () => Promise<HealthRun>;
671
671
  };
672
+ /**
673
+ * Mission Control's canvas (docs: Mission Control and health checks): every
674
+ * business as a row of steps (domain, deploy, pages, traffic, experience,
675
+ * checkout, sales, limits) with 30 days of figures, plus the account's
676
+ * insights (today, movers, new problems, top sources), in one call.
677
+ */
678
+ readonly missionControl: {
679
+ get: () => Promise<MissionControl>;
680
+ /** The account's pinned rows and row order on the canvas. */
681
+ layout: () => Promise<MissionControlLayout>;
682
+ /** Pin or order rows; `replace` drops every row not listed ("Tidy up"). */
683
+ setLayout: (body: {
684
+ rows: {
685
+ project_id: string;
686
+ pinned?: boolean;
687
+ position?: number | null;
688
+ }[];
689
+ replace?: boolean;
690
+ }) => Promise<MissionControlLayout>;
691
+ };
672
692
  /** Session replay. Start from `insights`; open single sessions with `get`. */
673
693
  readonly replays: {
674
694
  /** Rule-based findings over recorded sessions: what broke and where people got stuck. */
package/dist/index.js CHANGED
@@ -809,6 +809,22 @@ var Vibiz = class {
809
809
  /** Check every business again, in the background (a few at a time). */
810
810
  runAll: () => this.request("/health/run", { method: "POST" })
811
811
  };
812
+ /**
813
+ * Mission Control's canvas (docs: Mission Control and health checks): every
814
+ * business as a row of steps (domain, deploy, pages, traffic, experience,
815
+ * checkout, sales, limits) with 30 days of figures, plus the account's
816
+ * insights (today, movers, new problems, top sources), in one call.
817
+ */
818
+ missionControl = {
819
+ get: () => this.request("/mission-control"),
820
+ /** The account's pinned rows and row order on the canvas. */
821
+ layout: () => this.request("/mission-control/layout"),
822
+ /** Pin or order rows; `replace` drops every row not listed ("Tidy up"). */
823
+ setLayout: (body) => this.request("/mission-control/layout", {
824
+ method: "PUT",
825
+ body
826
+ })
827
+ };
812
828
  /** Session replay. Start from `insights`; open single sessions with `get`. */
813
829
  replays = {
814
830
  /** Rule-based findings over recorded sessions: what broke and where people got stuck. */
@@ -1884,7 +1900,7 @@ function formatMinor(minor, currency) {
1884
1900
  }
1885
1901
 
1886
1902
  // packages/sdk/src/one-key.ts
1887
- var APP_SDK_VERSION = "0.3.4";
1903
+ var APP_SDK_VERSION = "0.3.6";
1888
1904
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
1889
1905
  function oneKeyMessage(url, host) {
1890
1906
  const where = host ?? "your host";
package/dist/one-key.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * (`npm install --save-exact @vibiz/app@<this>`). A test keeps it, the skills
11
11
  * and the docs equal to packages/app/package.json.
12
12
  */
13
- export declare const APP_SDK_VERSION = "0.3.4";
13
+ export declare const APP_SDK_VERSION = "0.3.6";
14
14
  /** Everything one app key reaches. */
15
15
  export declare const ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
16
16
  /**
package/dist/types.d.ts CHANGED
@@ -4173,4 +4173,145 @@ export interface HealthRun {
4173
4173
  note: string;
4174
4174
  console_url: string;
4175
4175
  }
4176
+ /** A business's steps, left to right, each coloured by its own checks. */
4177
+ export type MissionControlStepId = 'domain' | 'deploy' | 'pages' | 'traffic' | 'experience' | 'payments' | 'sales' | 'limits';
4178
+ export interface MissionControlStep {
4179
+ id: MissionControlStepId;
4180
+ title: string;
4181
+ /** The worst of its checks. */
4182
+ status: HealthStatus;
4183
+ /** False: the business doesn't use this step yet ("not set up"). */
4184
+ set_up: boolean;
4185
+ /** The step's key number, in `unit` (`usd_micro`: millionths of a dollar). */
4186
+ value: number | null;
4187
+ unit: 'count' | 'usd_cents' | 'usd_micro' | null;
4188
+ value_label: string | null;
4189
+ /** One line: the worst problem's detail, else how it is. */
4190
+ line: string;
4191
+ checks: {
4192
+ id: HealthCheck['id'];
4193
+ status: HealthStatus;
4194
+ title: string;
4195
+ }[];
4196
+ /** The console page for it. */
4197
+ link: string | null;
4198
+ }
4199
+ /** One business on the canvas: its steps and its figures. */
4200
+ export interface MissionControlProject {
4201
+ object: 'mission_control_project';
4202
+ project: HealthProjectRef & {
4203
+ live: boolean;
4204
+ };
4205
+ status: HealthStatus;
4206
+ checked_at: string | null;
4207
+ counts: {
4208
+ fail: number;
4209
+ warn: number;
4210
+ };
4211
+ top: HealthCheck[];
4212
+ steps: MissionControlStep[];
4213
+ metrics: {
4214
+ /** Per day, oldest first, 30 long (the days are the answer's `days`). */
4215
+ pageviews_30d: number[];
4216
+ visitors_30d: number[];
4217
+ visitors_today: number;
4218
+ visitors_7d: number;
4219
+ visitors_prev_7d: number;
4220
+ /** Percent, 7 days against the 7 before; null with no visitors before. */
4221
+ visitors_change_pct: number | null;
4222
+ sales_30d: number;
4223
+ revenue_30d_usd_cents: number;
4224
+ sales_today: number;
4225
+ revenue_today_usd_cents: number;
4226
+ errors_24h: number;
4227
+ ai_spend_today_usd_micro: number;
4228
+ top_sources_7d: {
4229
+ source: string;
4230
+ visitors: number;
4231
+ }[];
4232
+ top_pages_7d: {
4233
+ path: string;
4234
+ pageviews: number;
4235
+ }[];
4236
+ last_deploy: {
4237
+ id: string;
4238
+ status: string;
4239
+ at: string;
4240
+ error: string | null;
4241
+ console_url: string | null;
4242
+ } | null;
4243
+ latest_problem_replay: {
4244
+ id: string;
4245
+ at: string;
4246
+ errors: number;
4247
+ rage_clicks: number;
4248
+ dead_clicks: number;
4249
+ console_url: string | null;
4250
+ } | null;
4251
+ };
4252
+ console_url: string;
4253
+ }
4254
+ export interface MissionControlLayout {
4255
+ object: 'mission_control_layout';
4256
+ /** Pinned rows come first; a `position` orders a row within its group. */
4257
+ rows: {
4258
+ project_id: string;
4259
+ pinned: boolean;
4260
+ position: number | null;
4261
+ }[];
4262
+ console_url: string;
4263
+ }
4264
+ /** `GET /v1/mission-control`: every business as a row of steps, plus the account's insights. */
4265
+ export interface MissionControl {
4266
+ object: 'mission_control';
4267
+ generated_at: string;
4268
+ /** When the figures were read (kept a minute); health is fresh on every call. */
4269
+ metrics_at: string;
4270
+ checked_at: string | null;
4271
+ steps: {
4272
+ id: MissionControlStepId;
4273
+ title: string;
4274
+ checks: HealthCheck['id'][];
4275
+ }[];
4276
+ /** The 30 days of each `*_30d` series, oldest first (`2026-11-12`). */
4277
+ days: string[];
4278
+ totals: {
4279
+ projects: number;
4280
+ fail: number;
4281
+ warn: number;
4282
+ ok: number;
4283
+ unknown: number;
4284
+ };
4285
+ data: MissionControlProject[];
4286
+ insights: {
4287
+ today: {
4288
+ visitors: number;
4289
+ sales: number;
4290
+ revenue_usd_cents: number;
4291
+ fail: number;
4292
+ warn: number;
4293
+ };
4294
+ movers: {
4295
+ project_id: string;
4296
+ name: string;
4297
+ visitors_7d: number;
4298
+ visitors_prev_7d: number;
4299
+ change_pct: number;
4300
+ direction: 'up' | 'down';
4301
+ console_url: string;
4302
+ }[];
4303
+ new_problems: {
4304
+ project_id: string;
4305
+ name: string;
4306
+ check: HealthCheck;
4307
+ console_url: string;
4308
+ }[];
4309
+ top_sources_7d: {
4310
+ source: string;
4311
+ visitors: number;
4312
+ }[];
4313
+ };
4314
+ layout: MissionControlLayout;
4315
+ console_url: string;
4316
+ }
4176
4317
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibiz/sdk",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Typed client for the Vibiz Stack API: projects, hosting, databases, sign-in, email, AI, payments and more.",
5
5
  "keywords": [
6
6
  "vibiz",