@vibiz/sdk 0.3.0 → 0.3.2
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 +18 -1
- package/dist/index.js +18 -1
- package/dist/one-key.d.ts +1 -1
- package/dist/types.d.ts +33 -0
- 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, 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, 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, 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, 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, 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, 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.
|
|
@@ -1124,6 +1124,23 @@ export declare class Vibiz {
|
|
|
1124
1124
|
points_to: string | null;
|
|
1125
1125
|
project_id?: string;
|
|
1126
1126
|
}) => Promise<DomainUse>;
|
|
1127
|
+
/**
|
|
1128
|
+
* A bought domain's DNS records (we host its DNS): any key lists them;
|
|
1129
|
+
* adding and removing need a full-access key. Records Vibiz keeps are
|
|
1130
|
+
* `managed` and are removed only with `force`.
|
|
1131
|
+
*/
|
|
1132
|
+
records: {
|
|
1133
|
+
list: (domain: string) => Promise<DnsRecordList>;
|
|
1134
|
+
/** Idempotent: the same type, name and value already there comes back (`created: false`). */
|
|
1135
|
+
add: (domain: string, input: DnsRecordInput) => Promise<DnsRecord & {
|
|
1136
|
+
created: boolean;
|
|
1137
|
+
}>;
|
|
1138
|
+
remove: (domain: string, id: string, opts?: {
|
|
1139
|
+
force?: boolean;
|
|
1140
|
+
}) => Promise<DnsRecord & {
|
|
1141
|
+
deleted: true;
|
|
1142
|
+
}>;
|
|
1143
|
+
};
|
|
1127
1144
|
/** Buy for the account: on `project_id` once registered, or none to use later. */
|
|
1128
1145
|
buy: (input: DomainBuyInput & {
|
|
1129
1146
|
project_id?: string | null;
|
package/dist/index.js
CHANGED
|
@@ -1256,6 +1256,23 @@ var Vibiz = class {
|
|
|
1256
1256
|
method: "POST",
|
|
1257
1257
|
body: input
|
|
1258
1258
|
}),
|
|
1259
|
+
/**
|
|
1260
|
+
* A bought domain's DNS records (we host its DNS): any key lists them;
|
|
1261
|
+
* adding and removing need a full-access key. Records Vibiz keeps are
|
|
1262
|
+
* `managed` and are removed only with `force`.
|
|
1263
|
+
*/
|
|
1264
|
+
records: {
|
|
1265
|
+
list: (domain) => this.request(`/domains/${encodeURIComponent(domain)}/records`),
|
|
1266
|
+
/** Idempotent: the same type, name and value already there comes back (`created: false`). */
|
|
1267
|
+
add: (domain, input) => this.request(
|
|
1268
|
+
`/domains/${encodeURIComponent(domain)}/records`,
|
|
1269
|
+
{ method: "POST", body: input }
|
|
1270
|
+
),
|
|
1271
|
+
remove: (domain, id, opts = {}) => this.request(
|
|
1272
|
+
`/domains/${encodeURIComponent(domain)}/records/${encodeURIComponent(id)}${opts.force ? "?force=1" : ""}`,
|
|
1273
|
+
{ method: "DELETE" }
|
|
1274
|
+
)
|
|
1275
|
+
},
|
|
1259
1276
|
/** Buy for the account: on `project_id` once registered, or none to use later. */
|
|
1260
1277
|
buy: (input) => this.request("/domains/buy", { method: "POST", body: input }),
|
|
1261
1278
|
owner: () => this.request("/domains/owner"),
|
|
@@ -1844,7 +1861,7 @@ function formatMinor(minor, currency) {
|
|
|
1844
1861
|
}
|
|
1845
1862
|
|
|
1846
1863
|
// packages/sdk/src/one-key.ts
|
|
1847
|
-
var APP_SDK_VERSION = "0.3.
|
|
1864
|
+
var APP_SDK_VERSION = "0.3.2";
|
|
1848
1865
|
var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
|
|
1849
1866
|
function oneKeyMessage(url, host) {
|
|
1850
1867
|
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.2";
|
|
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
|
@@ -231,6 +231,39 @@ export interface OwnedDomainList {
|
|
|
231
231
|
data: OwnedDomain[];
|
|
232
232
|
console_url: string;
|
|
233
233
|
}
|
|
234
|
+
/** One DNS record of a bought domain (docs: domains ▸ DNS records). */
|
|
235
|
+
export interface DnsRecord {
|
|
236
|
+
object: 'dns_record';
|
|
237
|
+
id: string;
|
|
238
|
+
type: string;
|
|
239
|
+
/** Relative to the domain: `''` is the domain itself. */
|
|
240
|
+
name: string;
|
|
241
|
+
fqdn: string;
|
|
242
|
+
value: string;
|
|
243
|
+
ttl: number | null;
|
|
244
|
+
/** MX only. */
|
|
245
|
+
priority: number | null;
|
|
246
|
+
/** Kept by Vibiz (hosting, email, the DNS defaults): leave it. */
|
|
247
|
+
managed: boolean;
|
|
248
|
+
managed_by: 'hosting' | 'email' | 'default' | null;
|
|
249
|
+
}
|
|
250
|
+
export interface DnsRecordList {
|
|
251
|
+
object: 'dns_records';
|
|
252
|
+
domain: string;
|
|
253
|
+
data: DnsRecord[];
|
|
254
|
+
console_url: string;
|
|
255
|
+
next_step: string;
|
|
256
|
+
}
|
|
257
|
+
export interface DnsRecordInput {
|
|
258
|
+
type: 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'CAA';
|
|
259
|
+
/** A label under the domain (`www`, `_dmarc`), or `''` / `@` for the domain itself. */
|
|
260
|
+
name: string;
|
|
261
|
+
value: string;
|
|
262
|
+
/** Seconds, 60 to 604800. */
|
|
263
|
+
ttl?: number;
|
|
264
|
+
/** MX only (required there). */
|
|
265
|
+
priority?: number;
|
|
266
|
+
}
|
|
234
267
|
/** Where an inbox stands: it gets forwards only once `confirmed` (docs: email ▸ Forwarding). */
|
|
235
268
|
export type ForwardDestinationStatus = 'pending' | 'confirmed' | 'disabled';
|
|
236
269
|
/** Email forwarding for one domain: `hello@<domain>` → the owner's own inbox, "via Vibiz". */
|