@vibiz/sdk 0.3.14 → 0.3.15
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 +21 -3
- package/dist/index.js +17 -1
- package/dist/one-key.d.ts +1 -1
- package/dist/types.d.ts +24 -2
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, KeyPermission, KeyPresetChoice, 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, KeyPermission, KeyPresetChoice, LedgerEntry, Mailbox, MailboxInput, MailDomain, MailFolder, MailReplyInput, MailSendInput, MailThreadDetail, MailThreadList, MailView, MediaModelInfo, 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.
|
|
@@ -1060,6 +1060,17 @@ export declare class Vibiz {
|
|
|
1060
1060
|
all?: boolean;
|
|
1061
1061
|
q?: string;
|
|
1062
1062
|
}) => Promise<AiModelInfo[]>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Every image and video model that runs by its id (Kling, Seedance,
|
|
1065
|
+
* face swap, upscalers…), with its live price. Run one with
|
|
1066
|
+
* `jobs.create({ type, model: id, input: { prompt, model_input } })`:
|
|
1067
|
+
* charged from credits.
|
|
1068
|
+
*/
|
|
1069
|
+
mediaModels: (opts?: {
|
|
1070
|
+
q?: string;
|
|
1071
|
+
category?: string;
|
|
1072
|
+
limit?: number;
|
|
1073
|
+
}) => Promise<MediaModelInfo[]>;
|
|
1063
1074
|
jobs: {
|
|
1064
1075
|
create: (input: {
|
|
1065
1076
|
type: "image" | "video";
|
|
@@ -1069,9 +1080,16 @@ export declare class Vibiz {
|
|
|
1069
1080
|
n?: number;
|
|
1070
1081
|
size?: string;
|
|
1071
1082
|
aspect_ratio?: "16:9" | "9:16" | "1:1";
|
|
1072
|
-
/** Video: a still to animate
|
|
1083
|
+
/** Video: a still to animate. Image: a photo to edit. A public https URL. */
|
|
1073
1084
|
image_url?: string;
|
|
1074
|
-
/**
|
|
1085
|
+
/** Image: more photos to combine, at most 8 with `image_url`. */
|
|
1086
|
+
image_urls?: string[];
|
|
1087
|
+
/**
|
|
1088
|
+
* With a model run by its id (`ai.mediaModels`): that model's own
|
|
1089
|
+
* parameters (face images, duration, …), at most 16 KB.
|
|
1090
|
+
*/
|
|
1091
|
+
model_input?: Record<string, unknown>;
|
|
1092
|
+
/** The older name of `model_input`. */
|
|
1075
1093
|
fal_input?: Record<string, unknown>;
|
|
1076
1094
|
};
|
|
1077
1095
|
}, opts?: {
|
package/dist/index.js
CHANGED
|
@@ -1220,6 +1220,22 @@ var Vibiz = class {
|
|
|
1220
1220
|
const tail = qs2.size ? `?${qs2}` : "";
|
|
1221
1221
|
return this.request(`/ai/models${tail}`).then((r) => r.data);
|
|
1222
1222
|
},
|
|
1223
|
+
/**
|
|
1224
|
+
* Every image and video model that runs by its id (Kling, Seedance,
|
|
1225
|
+
* face swap, upscalers…), with its live price. Run one with
|
|
1226
|
+
* `jobs.create({ type, model: id, input: { prompt, model_input } })`:
|
|
1227
|
+
* charged from credits.
|
|
1228
|
+
*/
|
|
1229
|
+
mediaModels: (opts = {}) => {
|
|
1230
|
+
const qs2 = new URLSearchParams();
|
|
1231
|
+
if (opts.q) qs2.set("q", opts.q);
|
|
1232
|
+
if (opts.category) qs2.set("category", opts.category);
|
|
1233
|
+
if (opts.limit) qs2.set("limit", String(opts.limit));
|
|
1234
|
+
const tail = qs2.size ? `?${qs2}` : "";
|
|
1235
|
+
return this.request(`/ai/media-models${tail}`).then(
|
|
1236
|
+
(r) => r.data
|
|
1237
|
+
);
|
|
1238
|
+
},
|
|
1223
1239
|
jobs: {
|
|
1224
1240
|
create: (input, opts = {}) => this.request("/ai/jobs", { method: "POST", body: input, ...opts }),
|
|
1225
1241
|
get: (id) => this.request(`/ai/jobs/${id}`),
|
|
@@ -1979,7 +1995,7 @@ function formatMinor(minor, currency) {
|
|
|
1979
1995
|
}
|
|
1980
1996
|
|
|
1981
1997
|
// packages/sdk/src/one-key.ts
|
|
1982
|
-
var APP_SDK_VERSION = "0.3.
|
|
1998
|
+
var APP_SDK_VERSION = "0.3.15";
|
|
1983
1999
|
var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
|
|
1984
2000
|
function oneKeyMessage(url, host) {
|
|
1985
2001
|
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.
|
|
13
|
+
export declare const APP_SDK_VERSION = "0.3.15";
|
|
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
|
@@ -1409,11 +1409,33 @@ export interface ImageRequest {
|
|
|
1409
1409
|
/** `b64_json` (default) or `url`: a Vibiz link valid for a day. */
|
|
1410
1410
|
response_format?: 'b64_json' | 'url';
|
|
1411
1411
|
/**
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1412
|
+
* A photo to edit or start from, public https (a Files link works): the
|
|
1413
|
+
* prompt says what to change. vibiz/image, vibiz/image-pro, vibiz/image-text.
|
|
1414
1414
|
*/
|
|
1415
|
+
image_url?: string;
|
|
1416
|
+
/** Several photos to combine (a person and a product…), at most 8 with `image_url`. */
|
|
1417
|
+
image_urls?: string[];
|
|
1418
|
+
/**
|
|
1419
|
+
* With a model run by its id (`ai.mediaModels`): that model's own
|
|
1420
|
+
* parameters, merged into what it receives (at most 16 KB).
|
|
1421
|
+
*/
|
|
1422
|
+
model_input?: Record<string, unknown>;
|
|
1423
|
+
/** The older name of `model_input`. */
|
|
1415
1424
|
fal_input?: Record<string, unknown>;
|
|
1416
1425
|
}
|
|
1426
|
+
/** An entry of `GET /v1/ai/media-models`: an image or video model that runs by its id. */
|
|
1427
|
+
export interface MediaModelInfo {
|
|
1428
|
+
id: string;
|
|
1429
|
+
name: string;
|
|
1430
|
+
category: string;
|
|
1431
|
+
description: string;
|
|
1432
|
+
type: 'image' | 'video';
|
|
1433
|
+
/** The live price per unit (image, megapixel, video, seconds…), in USD. */
|
|
1434
|
+
price: {
|
|
1435
|
+
unit: string;
|
|
1436
|
+
usd: number;
|
|
1437
|
+
} | null;
|
|
1438
|
+
}
|
|
1417
1439
|
export interface ImageResult {
|
|
1418
1440
|
created: number;
|
|
1419
1441
|
model: string;
|