@vibiz/sdk 0.3.8 → 0.3.10

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, 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';
1
+ import type { ActionInfo, ActionResult, ActionRun, ActionRunList, ActionRunsQuery, ActionUsage, AdminMetrics, AiJob, AiKeyProvider, 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.
@@ -724,6 +724,14 @@ export declare class Vibiz {
724
724
  url: string;
725
725
  console_url?: string;
726
726
  }>;
727
+ /**
728
+ * Owner: a Google service-account key (the JSON file, as text or parsed),
729
+ * so nobody signs in with Google. `owner_email` is added as an owner of
730
+ * every site, so they show in that person's own Search Console.
731
+ */
732
+ addGoogleKey: (key: string | Record<string, unknown>, opts?: {
733
+ owner_email?: string;
734
+ }) => Promise<SearchConnectionList>;
727
735
  /** Owner: the Bing Webmaster API key, for every project. */
728
736
  connectBing: (apiKey: string) => Promise<SearchConnectionList>;
729
737
  /** Owner: disconnect a Google account or the Bing key. */
@@ -1048,6 +1056,8 @@ export declare class Vibiz {
1048
1056
  n?: number;
1049
1057
  size?: string;
1050
1058
  aspect_ratio?: "16:9" | "9:16" | "1:1";
1059
+ /** With a `fal/<endpoint>` model (your own fal key): raw input for that endpoint. */
1060
+ fal_input?: Record<string, unknown>;
1051
1061
  };
1052
1062
  }, opts?: {
1053
1063
  idempotencyKey?: string;
@@ -1082,23 +1092,23 @@ export declare class Vibiz {
1082
1092
  list: (opts?: {
1083
1093
  projectId?: string;
1084
1094
  }) => Promise<AiProviderKeyList>;
1085
- get: (provider: "google", opts?: {
1095
+ get: (provider: AiKeyProvider, opts?: {
1086
1096
  projectId?: string;
1087
1097
  }) => Promise<AiProviderKey>;
1088
1098
  /** Checked with a cheap call to the provider first; refused with the reason if it fails. */
1089
- set: (provider: "google", input: AiProviderKeyInput, opts?: {
1099
+ set: (provider: AiKeyProvider, input: AiProviderKeyInput, opts?: {
1090
1100
  projectId?: string;
1091
1101
  }) => Promise<AiProviderKey>;
1092
1102
  /** Which capabilities the key serves; the rest runs on Vibiz. */
1093
- update: (provider: "google", patch: {
1103
+ update: (provider: AiKeyProvider, patch: {
1094
1104
  use_for: AiProviderKey["use_for"] & {};
1095
1105
  }, opts?: {
1096
1106
  projectId?: string;
1097
1107
  }) => Promise<AiProviderKey>;
1098
- test: (provider: "google", opts?: {
1108
+ test: (provider: AiKeyProvider, opts?: {
1099
1109
  projectId?: string;
1100
1110
  }) => Promise<AiProviderKey>;
1101
- remove: (provider: "google", opts?: {
1111
+ remove: (provider: AiKeyProvider, opts?: {
1102
1112
  projectId?: string;
1103
1113
  }) => Promise<AiProviderKey>;
1104
1114
  };
package/dist/index.js CHANGED
@@ -846,6 +846,15 @@ var Vibiz = class {
846
846
  connections: () => this.request("/search/connections"),
847
847
  /** Owner: Google's consent page to connect a Google account (open `url` in a browser). */
848
848
  connectGoogle: () => this.request("/search/google/connect", { method: "POST" }),
849
+ /**
850
+ * Owner: a Google service-account key (the JSON file, as text or parsed),
851
+ * so nobody signs in with Google. `owner_email` is added as an owner of
852
+ * every site, so they show in that person's own Search Console.
853
+ */
854
+ addGoogleKey: (key, opts = {}) => this.request("/search/google/key", {
855
+ method: "POST",
856
+ body: { key, ...opts }
857
+ }),
849
858
  /** Owner: the Bing Webmaster API key, for every project. */
850
859
  connectBing: (apiKey) => this.request("/search/bing", {
851
860
  method: "POST",
@@ -1932,7 +1941,7 @@ function formatMinor(minor, currency) {
1932
1941
  }
1933
1942
 
1934
1943
  // packages/sdk/src/one-key.ts
1935
- var APP_SDK_VERSION = "0.3.8";
1944
+ var APP_SDK_VERSION = "0.3.10";
1936
1945
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
1937
1946
  function oneKeyMessage(url, host) {
1938
1947
  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.8";
13
+ export declare const APP_SDK_VERSION = "0.3.10";
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
@@ -1390,6 +1390,11 @@ export interface ImageRequest {
1390
1390
  quality?: 'low' | 'medium' | 'high';
1391
1391
  /** `b64_json` (default) or `url`: a Vibiz link valid for a day. */
1392
1392
  response_format?: 'b64_json' | 'url';
1393
+ /**
1394
+ * With a `fal/<endpoint>` model, which runs only on your own fal key: raw
1395
+ * input for that endpoint, merged into what it receives (at most 16 KB).
1396
+ */
1397
+ fal_input?: Record<string, unknown>;
1393
1398
  }
1394
1399
  export interface ImageResult {
1395
1400
  created: number;
@@ -1500,11 +1505,13 @@ export interface AiSettings {
1500
1505
  spent_today_usd: number;
1501
1506
  }
1502
1507
  export type AiCapabilityName = 'llm' | 'embeddings' | 'image' | 'video' | 'speech' | 'transcription';
1503
- export type AiProviderKeyType = 'gemini_api_key' | 'vertex';
1508
+ export type AiProviderKeyType = 'gemini_api_key' | 'vertex' | 'fal_key';
1509
+ /** Whose keys you can add: Google (Gemini / Vertex AI) and fal (images, video, any fal/<endpoint>). */
1510
+ export type AiKeyProvider = 'google' | 'fal';
1504
1511
  /** A customer key's status. Never the secret: only its last 4 characters. */
1505
1512
  export interface AiProviderKey {
1506
1513
  object: 'ai_provider_key';
1507
- provider: 'google';
1514
+ provider: AiKeyProvider;
1508
1515
  scope: 'account' | 'project';
1509
1516
  project_id: string | null;
1510
1517
  has_key: boolean;
@@ -1551,6 +1558,11 @@ export interface AiProviderKey {
1551
1558
  status?: number;
1552
1559
  google_status?: string;
1553
1560
  google_reason?: string;
1561
+ /** A good key with something to fix (fal: the account is out of credit). */
1562
+ warning?: {
1563
+ reason: string;
1564
+ message: string;
1565
+ };
1554
1566
  };
1555
1567
  deleted?: boolean;
1556
1568
  }
@@ -1558,6 +1570,12 @@ export type AiProviderKeyInput = {
1558
1570
  type: 'gemini_api_key';
1559
1571
  api_key: string;
1560
1572
  use_for?: AiCapabilityName[];
1573
+ }
1574
+ /** A fal key (`<key id>:<secret>`, from fal.ai/dashboard/keys). */
1575
+ | {
1576
+ type: 'fal_key';
1577
+ api_key: string;
1578
+ use_for?: AiCapabilityName[];
1561
1579
  } | {
1562
1580
  type: 'vertex';
1563
1581
  /** The service account key file: its JSON text or the parsed object. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibiz/sdk",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
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",