@vibiz/sdk 0.3.5 → 0.3.8

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, 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';
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, ProjectSearch, ReplayDetail, ReplayFrames, ReplayFramesOptions, ReplayInsights, ReplayListOptions, ReplayPeriod, ReplayStatus, ReplaySummary, Resource, ResourceType, SearchConnectionList, SearchPageList, 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.
@@ -689,6 +689,50 @@ export declare class Vibiz {
689
689
  replace?: boolean;
690
690
  }) => Promise<MissionControlLayout>;
691
691
  };
692
+ /**
693
+ * Search (docs: Search): the project's pages go to IndexNow (Bing and the
694
+ * engines that share it) after every production deploy, own domain only.
695
+ */
696
+ readonly search: {
697
+ get: (projectId: string) => Promise<ProjectSearch>;
698
+ /** Also send the free vibiz.app address while there is no own domain. */
699
+ update: (projectId: string, body: {
700
+ submit_free_address: boolean;
701
+ }) => Promise<ProjectSearch>;
702
+ /** Send what is new or changed now, without a deploy. */
703
+ submit: (projectId: string) => Promise<ProjectSearch & {
704
+ run: {
705
+ sent: number;
706
+ host: string | null;
707
+ note?: string;
708
+ };
709
+ }>;
710
+ /** The sitemap's pages as Google sees them: indexed, not indexed (with the inspector link), or all. */
711
+ pages: (projectId: string, opts?: {
712
+ state?: "indexed" | "not_indexed" | "all";
713
+ limit?: number;
714
+ offset?: number;
715
+ }) => Promise<SearchPageList>;
716
+ /** Set up and read Google and Bing now instead of waiting for the daily sync. */
717
+ sync: (projectId: string) => Promise<ProjectSearch>;
718
+ /** The account's own Google Search Console and Bing Webmaster connections. */
719
+ connections: () => Promise<SearchConnectionList>;
720
+ /** Owner: Google's consent page to connect a Google account (open `url` in a browser). */
721
+ connectGoogle: () => Promise<{
722
+ object: "search_connect";
723
+ provider: "google";
724
+ url: string;
725
+ console_url?: string;
726
+ }>;
727
+ /** Owner: the Bing Webmaster API key, for every project. */
728
+ connectBing: (apiKey: string) => Promise<SearchConnectionList>;
729
+ /** Owner: disconnect a Google account or the Bing key. */
730
+ disconnect: (id: string) => Promise<{
731
+ object: "search_connection";
732
+ id: string;
733
+ deleted: true;
734
+ }>;
735
+ };
692
736
  /** Session replay. Start from `insights`; open single sessions with `get`. */
693
737
  readonly replays: {
694
738
  /** Rule-based findings over recorded sessions: what broke and where people got stuck. */
package/dist/index.js CHANGED
@@ -825,6 +825,38 @@ var Vibiz = class {
825
825
  body
826
826
  })
827
827
  };
828
+ /**
829
+ * Search (docs: Search): the project's pages go to IndexNow (Bing and the
830
+ * engines that share it) after every production deploy, own domain only.
831
+ */
832
+ search = {
833
+ get: (projectId) => this.request(`/projects/${projectId}/search`),
834
+ /** Also send the free vibiz.app address while there is no own domain. */
835
+ update: (projectId, body) => this.request(`/projects/${projectId}/search`, { method: "PATCH", body }),
836
+ /** Send what is new or changed now, without a deploy. */
837
+ submit: (projectId) => this.request(
838
+ `/projects/${projectId}/search/submit`,
839
+ { method: "POST" }
840
+ ),
841
+ /** The sitemap's pages as Google sees them: indexed, not indexed (with the inspector link), or all. */
842
+ pages: (projectId, opts = {}) => this.request(`/projects/${projectId}/search/pages${qs(opts)}`),
843
+ /** Set up and read Google and Bing now instead of waiting for the daily sync. */
844
+ sync: (projectId) => this.request(`/projects/${projectId}/search/sync`, { method: "POST" }),
845
+ /** The account's own Google Search Console and Bing Webmaster connections. */
846
+ connections: () => this.request("/search/connections"),
847
+ /** Owner: Google's consent page to connect a Google account (open `url` in a browser). */
848
+ connectGoogle: () => this.request("/search/google/connect", { method: "POST" }),
849
+ /** Owner: the Bing Webmaster API key, for every project. */
850
+ connectBing: (apiKey) => this.request("/search/bing", {
851
+ method: "POST",
852
+ body: { api_key: apiKey }
853
+ }),
854
+ /** Owner: disconnect a Google account or the Bing key. */
855
+ disconnect: (id) => this.request(
856
+ `/search/connections/${id}`,
857
+ { method: "DELETE" }
858
+ )
859
+ };
828
860
  /** Session replay. Start from `insights`; open single sessions with `get`. */
829
861
  replays = {
830
862
  /** Rule-based findings over recorded sessions: what broke and where people got stuck. */
@@ -1900,7 +1932,7 @@ function formatMinor(minor, currency) {
1900
1932
  }
1901
1933
 
1902
1934
  // packages/sdk/src/one-key.ts
1903
- var APP_SDK_VERSION = "0.3.5";
1935
+ var APP_SDK_VERSION = "0.3.8";
1904
1936
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
1905
1937
  function oneKeyMessage(url, host) {
1906
1938
  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.5";
13
+ export declare const APP_SDK_VERSION = "0.3.8";
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
@@ -4314,4 +4314,123 @@ export interface MissionControl {
4314
4314
  layout: MissionControlLayout;
4315
4315
  console_url: string;
4316
4316
  }
4317
+ /** A project's search settings (docs: Search). */
4318
+ export interface ProjectSearch {
4319
+ object: 'project_search';
4320
+ indexnow: {
4321
+ /** The address whose pages are sent: the own domain, or the free one when turned on. */
4322
+ host: string | null;
4323
+ sending_free_address: boolean;
4324
+ submit_free_address: boolean;
4325
+ key_url: string | null;
4326
+ pages_sent: number;
4327
+ last_sent_at: string | null;
4328
+ last_sent_count: number;
4329
+ /** Why the last run sent nothing, in words. */
4330
+ note: string | null;
4331
+ };
4332
+ /** The account's own Google Search Console (Settings ▸ Search), for this project's site. */
4333
+ google: {
4334
+ connected: boolean;
4335
+ account_email: string | null;
4336
+ /** `sc-domain:example.com` (proved with DNS) or `https://example.com/` (proved with a file). */
4337
+ property: string | null;
4338
+ verify_method: 'dns' | 'file' | null;
4339
+ verify_file_url: string | null;
4340
+ verified_at: string | null;
4341
+ sitemap_submitted_at: string | null;
4342
+ last_sync_at: string | null;
4343
+ next_sync_at: string | null;
4344
+ /** What failed, why, and how to fix it. */
4345
+ note: string | null;
4346
+ totals: {
4347
+ pages_known: number;
4348
+ indexed: number;
4349
+ not_indexed: number;
4350
+ not_inspected: number;
4351
+ };
4352
+ clicks_28d: number;
4353
+ impressions_28d: number;
4354
+ position_28d: number | null;
4355
+ daily: {
4356
+ date: string;
4357
+ clicks: number;
4358
+ impressions: number;
4359
+ position: number | null;
4360
+ }[];
4361
+ top_queries: (SearchTopRow & {
4362
+ query: string;
4363
+ })[];
4364
+ top_pages: (SearchTopRow & {
4365
+ url: string;
4366
+ })[];
4367
+ search_console_url: string | null;
4368
+ };
4369
+ /** The account's own Bing Webmaster, best effort (IndexNow already tells Bing about pages). */
4370
+ bing: {
4371
+ connected: boolean;
4372
+ host: string | null;
4373
+ site_added_at: string | null;
4374
+ verified_at: string | null;
4375
+ sitemap_submitted_at: string | null;
4376
+ clicks_28d: number | null;
4377
+ impressions_28d: number | null;
4378
+ note: string | null;
4379
+ };
4380
+ }
4381
+ export interface SearchTopRow {
4382
+ clicks: number;
4383
+ impressions: number;
4384
+ ctr: number;
4385
+ position: number;
4386
+ }
4387
+ /** One sitemap page as Google sees it (URL Inspection). */
4388
+ export interface SearchPage {
4389
+ object: 'search_page';
4390
+ url: string;
4391
+ indexed: boolean;
4392
+ verdict: string | null;
4393
+ /** Google's words: "Submitted and indexed", "Crawled - currently not indexed"… */
4394
+ coverage_state: string | null;
4395
+ indexing_state: string | null;
4396
+ last_crawl_time: string | null;
4397
+ page_fetch_state: string | null;
4398
+ robots_txt_state: string | null;
4399
+ google_canonical: string | null;
4400
+ user_canonical: string | null;
4401
+ inspected_at: string | null;
4402
+ lastmod: string | null;
4403
+ /** Search Console's inspector for the page, where the owner clicks Request indexing. */
4404
+ google_inspect_url: string | null;
4405
+ }
4406
+ export interface SearchPageList {
4407
+ object: 'list';
4408
+ state: 'indexed' | 'not_indexed' | 'all';
4409
+ property: string | null;
4410
+ total: number;
4411
+ has_more: boolean;
4412
+ data: SearchPage[];
4413
+ console_url?: string;
4414
+ }
4415
+ /** An account's own Google Search Console or Bing Webmaster connection. */
4416
+ export interface SearchConnection {
4417
+ object: 'search_connection';
4418
+ id: string;
4419
+ provider: 'google' | 'bing';
4420
+ account_email: string | null;
4421
+ /** Sites set up on it; Google allows `site_limit` (1,000) per account. */
4422
+ sites: number;
4423
+ site_limit: number | null;
4424
+ status: 'connected' | 'error';
4425
+ error: string | null;
4426
+ error_at: string | null;
4427
+ created_at: string;
4428
+ }
4429
+ export interface SearchConnectionList {
4430
+ object: 'list';
4431
+ data: SearchConnection[];
4432
+ /** Whether this Stack can connect Google (its OAuth client is set). */
4433
+ google_available: boolean;
4434
+ console_url?: string;
4435
+ }
4317
4436
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibiz/sdk",
3
- "version": "0.3.5",
3
+ "version": "0.3.8",
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",