@vibiz/sdk 0.3.30 → 0.3.32
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 +38 -4
- package/dist/index.js +45 -5
- package/dist/one-key.d.ts +1 -1
- package/dist/types.d.ts +155 -4
- 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, CommunityAsk, CommunityAskInput, CommunityAskReply, CommunityAskUpdate, CommunityAskWithThread, CommunityConversation, CommunityEvents, CommunityList, CommunityMe, CommunityMedia, CommunityMessage, CommunityPage, Company, CompanyAddressFields, CompanyCatalog, CompanyDraft, CompanyEnvironment, CompanyLink, Connector, ConnectorApproval, ConnectorCall, ConnectorCallInput, ConnectorCheck, ConnectorEnvironment, ConnectorImport, ConnectorInput, ConnectorPatch, ConnectorResponse, ContactPropertyValue, ContactStatus, Dashboard, DashboardCatalogue, DashboardData, DashboardDataQuery, DashboardLink, DashboardRange, DashboardWidget, DashboardWidgetInput, DashboardWidgetResult, 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, LibraryDeleted, LibraryEntry, LibraryExport, LibraryImport, LibraryList, Mailbox, MailboxInput, MailDomain, MailFolder, MailReplyInput, MailSendInput, MailThreadDetail, MailThreadList, MailView, MarketplaceList, MarketplaceOffer, MarketplaceQuery, 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, Profile, ProfileBusiness, ProfileBusinessesUpdate, ProfileBusinessUpdate, ProfileUpdate, Project, ProjectExport, ProjectHealth, ProjectSale, 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, SocialMessage, SocialOverview, SocialPost, SocialPostAnalytics, SocialPostInput, SocialReplyInput, SocialThread, SocialThreadDetail, SocialThreadKind, SpeechRequest, Transcription, UsageOptions, UsagePeriod, UsageReport, UsernameCheck, VerifyEmailOutput, VersionDiff, VersionList, VersionRestore, VibizFile, VisitorJourneyDetail, VisitorJourneyList, VisitorJourneyQuery, 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, Artifact, ArtifactList, ArtifactListOptions, ArtifactShareInput, ArtifactUpdate, ArtifactUse, ArtifactUseInput, 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, CommunityAsk, CommunityAskInput, CommunityAskReply, CommunityAskUpdate, CommunityAskWithThread, CommunityConversation, CommunityEvents, CommunityList, CommunityMe, CommunityMedia, CommunityMessage, CommunityPage, Company, CompanyAddressFields, CompanyCatalog, CompanyDraft, CompanyEnvironment, CompanyLink, Connector, ConnectorApproval, ConnectorCall, ConnectorCallInput, ConnectorCheck, ConnectorEnvironment, ConnectorImport, ConnectorInput, ConnectorPatch, ConnectorResponse, ContactPropertyValue, ContactStatus, Dashboard, DashboardCatalogue, DashboardData, DashboardDataQuery, DashboardLink, DashboardRange, DashboardWidget, DashboardWidgetInput, DashboardWidgetResult, 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, LibraryDeleted, LibraryEntry, LibraryExport, LibraryImport, LibraryList, Mailbox, MailboxInput, MailDomain, MailFolder, MailReplyInput, MailSendInput, MailThreadDetail, MailThreadList, MailView, MarketplaceList, MarketplaceOffer, MarketplaceQuery, 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, Profile, ProfileBusiness, ProfileBusinessesUpdate, ProfileBusinessUpdate, ProfileUpdate, Project, ProjectExport, ProjectHealth, ProjectSale, 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, SocialMessage, SocialOverview, SocialPost, SocialPostAnalytics, SocialPostInput, SocialReplyInput, SocialThread, SocialThreadDetail, SocialThreadKind, SpeechRequest, Transcription, UsageOptions, UsagePeriod, UsageReport, UsernameCheck, VerifyEmailOutput, VersionDiff, VersionList, VersionRestore, VibizFile, VisitorJourneyDetail, VisitorJourneyList, VisitorJourneyQuery, 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.
|
|
@@ -1553,7 +1553,7 @@ export declare class Vibiz {
|
|
|
1553
1553
|
ask: (askId: string) => Promise<CommunityAskWithThread>;
|
|
1554
1554
|
/** The thread, oldest first; `cursor` continues after the last reply seen. */
|
|
1555
1555
|
replies: (askId: string, page?: CommunityPage) => Promise<CommunityList<CommunityAskReply>>;
|
|
1556
|
-
/** Posted to everyone at once. A job needs `pay_cents
|
|
1556
|
+
/** Posted to everyone at once. A job needs `pay_cents`; `as` posts as one of your businesses. */
|
|
1557
1557
|
createAsk: (input: CommunityAskInput) => Promise<CommunityAsk>;
|
|
1558
1558
|
/** Your own ask: edit, close (`status: 'closed'`) or reopen. */
|
|
1559
1559
|
updateAsk: (askId: string, input: CommunityAskUpdate) => Promise<CommunityAsk>;
|
|
@@ -1562,8 +1562,13 @@ export declare class Vibiz {
|
|
|
1562
1562
|
id: string;
|
|
1563
1563
|
deleted: true;
|
|
1564
1564
|
}>;
|
|
1565
|
-
/**
|
|
1566
|
-
|
|
1565
|
+
/**
|
|
1566
|
+
* Reply in the ask's public thread (up to 2000 characters). `as`: reply as one of
|
|
1567
|
+
* your businesses (its handle, slug or project id).
|
|
1568
|
+
*/
|
|
1569
|
+
reply: (askId: string, body: string, opts?: {
|
|
1570
|
+
as?: string;
|
|
1571
|
+
}) => Promise<CommunityAskReply>;
|
|
1567
1572
|
/** Your own reply only. */
|
|
1568
1573
|
deleteReply: (replyId: string) => Promise<{
|
|
1569
1574
|
object: "community_ask_reply";
|
|
@@ -1654,6 +1659,35 @@ export declare class Vibiz {
|
|
|
1654
1659
|
/** Your username and page, and unread messages. */
|
|
1655
1660
|
me: () => Promise<CommunityMe>;
|
|
1656
1661
|
};
|
|
1662
|
+
/**
|
|
1663
|
+
* Artifacts (docs: artifacts): dashboards and agent skills people share with the
|
|
1664
|
+
* community, for anyone to add to their own business. Lists and single artifacts read
|
|
1665
|
+
* with no key; with one they carry `mine` and `used`. Sharing, changing and removing
|
|
1666
|
+
* need a username on the profile and `community:write`. Every share is checked: a
|
|
1667
|
+
* dashboard's widgets must be valid, and nothing may look like a secret.
|
|
1668
|
+
*/
|
|
1669
|
+
readonly artifacts: {
|
|
1670
|
+
/** Most used first (`sort: 'newest'` for the latest); scroll with `next_cursor`. */
|
|
1671
|
+
list: (opts?: ArtifactListOptions) => Promise<ArtifactList>;
|
|
1672
|
+
/** One artifact with its `content`: the dashboard's widgets, or the skill's text. */
|
|
1673
|
+
get: (slug: string) => Promise<Artifact>;
|
|
1674
|
+
/** Public at once, at `url`. At most 20 shares a day per account. */
|
|
1675
|
+
share: (input: ArtifactShareInput) => Promise<Artifact>;
|
|
1676
|
+
/** Your own: a new title or summary, a skill's new text, or a dashboard copied again. */
|
|
1677
|
+
update: (slug: string, input: ArtifactUpdate) => Promise<Artifact>;
|
|
1678
|
+
/** Your own. */
|
|
1679
|
+
delete: (slug: string) => Promise<{
|
|
1680
|
+
object: "artifact";
|
|
1681
|
+
slug: string;
|
|
1682
|
+
deleted: true;
|
|
1683
|
+
}>;
|
|
1684
|
+
/**
|
|
1685
|
+
* Add it to your business: a dashboard becomes a new dashboard reading your own data
|
|
1686
|
+
* (`project_id` for one that reads one business); a skill is saved to the Library
|
|
1687
|
+
* and comes back as `skill` to write to the agent's skills folder.
|
|
1688
|
+
*/
|
|
1689
|
+
use: (slug: string, input?: ArtifactUseInput) => Promise<ArtifactUse>;
|
|
1690
|
+
};
|
|
1657
1691
|
private blockToggle;
|
|
1658
1692
|
/**
|
|
1659
1693
|
* The account's own credits (docs/BILLING.md): the balance, the card,
|
package/dist/index.js
CHANGED
|
@@ -1674,7 +1674,7 @@ var Vibiz = class {
|
|
|
1674
1674
|
replies: (askId, page = {}) => this.request(
|
|
1675
1675
|
`/community/asks/${enc(askId)}/replies${qs({ ...page })}`
|
|
1676
1676
|
),
|
|
1677
|
-
/** Posted to everyone at once. A job needs `pay_cents
|
|
1677
|
+
/** Posted to everyone at once. A job needs `pay_cents`; `as` posts as one of your businesses. */
|
|
1678
1678
|
createAsk: (input) => this.request("/community/asks", { method: "POST", body: input }),
|
|
1679
1679
|
/** Your own ask: edit, close (`status: 'closed'`) or reopen. */
|
|
1680
1680
|
updateAsk: (askId, input) => this.request(`/community/asks/${enc(askId)}`, { method: "PATCH", body: input }),
|
|
@@ -1682,10 +1682,13 @@ var Vibiz = class {
|
|
|
1682
1682
|
`/community/asks/${enc(askId)}`,
|
|
1683
1683
|
{ method: "DELETE" }
|
|
1684
1684
|
),
|
|
1685
|
-
/**
|
|
1686
|
-
|
|
1685
|
+
/**
|
|
1686
|
+
* Reply in the ask's public thread (up to 2000 characters). `as`: reply as one of
|
|
1687
|
+
* your businesses (its handle, slug or project id).
|
|
1688
|
+
*/
|
|
1689
|
+
reply: (askId, body, opts = {}) => this.request(`/community/asks/${enc(askId)}/replies`, {
|
|
1687
1690
|
method: "POST",
|
|
1688
|
-
body: { body }
|
|
1691
|
+
body: { body, ...opts.as ? { as: opts.as } : {} }
|
|
1689
1692
|
}),
|
|
1690
1693
|
/** Your own reply only. */
|
|
1691
1694
|
deleteReply: (replyId) => this.request(
|
|
@@ -1772,6 +1775,43 @@ var Vibiz = class {
|
|
|
1772
1775
|
/** Your username and page, and unread messages. */
|
|
1773
1776
|
me: () => this.request("/community/me")
|
|
1774
1777
|
};
|
|
1778
|
+
/**
|
|
1779
|
+
* Artifacts (docs: artifacts): dashboards and agent skills people share with the
|
|
1780
|
+
* community, for anyone to add to their own business. Lists and single artifacts read
|
|
1781
|
+
* with no key; with one they carry `mine` and `used`. Sharing, changing and removing
|
|
1782
|
+
* need a username on the profile and `community:write`. Every share is checked: a
|
|
1783
|
+
* dashboard's widgets must be valid, and nothing may look like a secret.
|
|
1784
|
+
*/
|
|
1785
|
+
artifacts = {
|
|
1786
|
+
/** Most used first (`sort: 'newest'` for the latest); scroll with `next_cursor`. */
|
|
1787
|
+
list: (opts = {}) => {
|
|
1788
|
+
const { verified, mine, author, ...rest } = opts;
|
|
1789
|
+
return this.request(
|
|
1790
|
+
`/artifacts${qs({
|
|
1791
|
+
...rest,
|
|
1792
|
+
...author ? { author: bareHandle(author) } : {},
|
|
1793
|
+
...verified ? { verified: "1" } : {},
|
|
1794
|
+
...mine ? { mine: "1" } : {}
|
|
1795
|
+
})}`
|
|
1796
|
+
);
|
|
1797
|
+
},
|
|
1798
|
+
/** One artifact with its `content`: the dashboard's widgets, or the skill's text. */
|
|
1799
|
+
get: (slug) => this.request(`/artifacts/${enc(slug)}`),
|
|
1800
|
+
/** Public at once, at `url`. At most 20 shares a day per account. */
|
|
1801
|
+
share: (input) => this.request("/artifacts", { method: "POST", body: input }),
|
|
1802
|
+
/** Your own: a new title or summary, a skill's new text, or a dashboard copied again. */
|
|
1803
|
+
update: (slug, input) => this.request(`/artifacts/${enc(slug)}`, { method: "PATCH", body: input }),
|
|
1804
|
+
/** Your own. */
|
|
1805
|
+
delete: (slug) => this.request(`/artifacts/${enc(slug)}`, {
|
|
1806
|
+
method: "DELETE"
|
|
1807
|
+
}),
|
|
1808
|
+
/**
|
|
1809
|
+
* Add it to your business: a dashboard becomes a new dashboard reading your own data
|
|
1810
|
+
* (`project_id` for one that reads one business); a skill is saved to the Library
|
|
1811
|
+
* and comes back as `skill` to write to the agent's skills folder.
|
|
1812
|
+
*/
|
|
1813
|
+
use: (slug, input = {}) => this.request(`/artifacts/${enc(slug)}/use`, { method: "POST", body: input })
|
|
1814
|
+
};
|
|
1775
1815
|
blockToggle(username, on) {
|
|
1776
1816
|
return this.request(
|
|
1777
1817
|
`/community/users/${handle(username)}/block`,
|
|
@@ -2381,7 +2421,7 @@ function formatMinor(minor, currency) {
|
|
|
2381
2421
|
}
|
|
2382
2422
|
|
|
2383
2423
|
// packages/sdk/src/one-key.ts
|
|
2384
|
-
var APP_SDK_VERSION = "0.3.
|
|
2424
|
+
var APP_SDK_VERSION = "0.3.32";
|
|
2385
2425
|
var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
|
|
2386
2426
|
function oneKeyMessage(url, host) {
|
|
2387
2427
|
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.32";
|
|
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
|
@@ -4824,6 +4824,12 @@ export interface ProfileBusiness {
|
|
|
4824
4824
|
project_id: string;
|
|
4825
4825
|
name: string;
|
|
4826
4826
|
slug: string;
|
|
4827
|
+
/**
|
|
4828
|
+
* Its own address, thelastapi.dev/<handle> (one namespace with usernames). Set when it
|
|
4829
|
+
* is listed (its slug, if free) or with `handle`; null: none (it shows under the owner).
|
|
4830
|
+
* A business posts in the community and shares artifacts under it.
|
|
4831
|
+
*/
|
|
4832
|
+
handle: string | null;
|
|
4827
4833
|
listed: boolean;
|
|
4828
4834
|
tagline: string | null;
|
|
4829
4835
|
description: string | null;
|
|
@@ -4877,6 +4883,11 @@ export interface ProfileBusinessesUpdate {
|
|
|
4877
4883
|
show_visitors?: boolean;
|
|
4878
4884
|
}
|
|
4879
4885
|
export interface ProfileBusinessUpdate {
|
|
4886
|
+
/**
|
|
4887
|
+
* Its own address, thelastapi.dev/<handle>: 3–30 of a-z 0-9 - _, free among usernames
|
|
4888
|
+
* and other businesses' handles (taken: 409, field `handle`). null clears it.
|
|
4889
|
+
*/
|
|
4890
|
+
handle?: string | null;
|
|
4880
4891
|
listed?: boolean;
|
|
4881
4892
|
tagline?: string | null;
|
|
4882
4893
|
description?: string | null;
|
|
@@ -5270,6 +5281,18 @@ export interface CommunityAuthor {
|
|
|
5270
5281
|
avatar_url: string | null;
|
|
5271
5282
|
/** The name of the key that wrote it (an agent: "claude-code"); null = the person, in the console. */
|
|
5272
5283
|
agent: string | null;
|
|
5284
|
+
/**
|
|
5285
|
+
* Asks, replies and artifacts: `person`, or `business` when posted as one of the
|
|
5286
|
+
* account's businesses (then `username` is the business's handle and `display_name` its name).
|
|
5287
|
+
*/
|
|
5288
|
+
kind?: 'person' | 'business';
|
|
5289
|
+
/** A business's post: the person behind it ("by @…"), when they have a username. */
|
|
5290
|
+
by?: Omit<CommunityAuthor, 'kind' | 'by'> | null;
|
|
5291
|
+
}
|
|
5292
|
+
/** Who posted an ask, a reply or an artifact: a person, or a business with the person behind it. */
|
|
5293
|
+
export interface Author extends CommunityAuthor {
|
|
5294
|
+
kind: 'person' | 'business';
|
|
5295
|
+
by: Omit<CommunityAuthor, 'kind' | 'by'> | null;
|
|
5273
5296
|
}
|
|
5274
5297
|
export interface CommunityMedia {
|
|
5275
5298
|
url: string;
|
|
@@ -5284,8 +5307,8 @@ export interface CommunityAsk {
|
|
|
5284
5307
|
object: 'community_ask';
|
|
5285
5308
|
id: string;
|
|
5286
5309
|
kind: 'ask' | 'job';
|
|
5287
|
-
author:
|
|
5288
|
-
/** Their public page: thelastapi.dev/<
|
|
5310
|
+
author: Author;
|
|
5311
|
+
/** Their public page (a person's, or a business's): thelastapi.dev/<handle>. */
|
|
5289
5312
|
author_url: string | null;
|
|
5290
5313
|
/** 3 to 120 characters. */
|
|
5291
5314
|
title: string;
|
|
@@ -5316,7 +5339,7 @@ export interface CommunityAskReply {
|
|
|
5316
5339
|
object: 'community_ask_reply';
|
|
5317
5340
|
id: string;
|
|
5318
5341
|
ask_id: string;
|
|
5319
|
-
author:
|
|
5342
|
+
author: Author;
|
|
5320
5343
|
/** Up to 2000 characters; "" once deleted. */
|
|
5321
5344
|
body: string;
|
|
5322
5345
|
deleted: boolean;
|
|
@@ -5335,8 +5358,13 @@ export interface CommunityAskInput {
|
|
|
5335
5358
|
body?: string;
|
|
5336
5359
|
pay_cents?: number | null;
|
|
5337
5360
|
pay_unit?: 'total' | 'hour' | null;
|
|
5361
|
+
/**
|
|
5362
|
+
* Post as one of your businesses: its handle, slug or project id (it needs a handle).
|
|
5363
|
+
* Left out or `me`: as you.
|
|
5364
|
+
*/
|
|
5365
|
+
as?: string;
|
|
5338
5366
|
}
|
|
5339
|
-
export interface CommunityAskUpdate extends Partial<CommunityAskInput
|
|
5367
|
+
export interface CommunityAskUpdate extends Partial<Omit<CommunityAskInput, 'as'>> {
|
|
5340
5368
|
/** `closed` closes it, `open` reopens it. */
|
|
5341
5369
|
status?: 'open' | 'closed';
|
|
5342
5370
|
}
|
|
@@ -5404,4 +5432,127 @@ export interface CommunityPage {
|
|
|
5404
5432
|
cursor?: string;
|
|
5405
5433
|
limit?: number;
|
|
5406
5434
|
}
|
|
5435
|
+
export type ArtifactKind = 'dashboard' | 'skill';
|
|
5436
|
+
/**
|
|
5437
|
+
* A dashboard or an agent skill someone shared with the community, for anyone to add
|
|
5438
|
+
* to their own business. Public at thelastapi.dev/artifacts/<slug>. A dashboard is
|
|
5439
|
+
* shared as its widgets only, never its numbers; a skill is one SKILL.md.
|
|
5440
|
+
*/
|
|
5441
|
+
export interface Artifact {
|
|
5442
|
+
object: 'artifact';
|
|
5443
|
+
id: string;
|
|
5444
|
+
/** Its name in links: thelastapi.dev/artifacts/<slug>. */
|
|
5445
|
+
slug: string;
|
|
5446
|
+
kind: ArtifactKind;
|
|
5447
|
+
/** Up to 80 characters. */
|
|
5448
|
+
title: string;
|
|
5449
|
+
/** Up to 500 characters. */
|
|
5450
|
+
summary: string;
|
|
5451
|
+
author: Author;
|
|
5452
|
+
/** Accounts that added it, once each (the author's own use doesn't count). */
|
|
5453
|
+
uses: number;
|
|
5454
|
+
/** An admin looked at it. Changing what it holds clears it until the next look. */
|
|
5455
|
+
verified: boolean;
|
|
5456
|
+
/** The artifact it is a copy of. */
|
|
5457
|
+
remixed_from: {
|
|
5458
|
+
slug: string;
|
|
5459
|
+
title: string;
|
|
5460
|
+
} | null;
|
|
5461
|
+
/** What it holds, short: a dashboard's level, widget count and metrics, or a skill's lines. */
|
|
5462
|
+
preview: {
|
|
5463
|
+
level: DashboardLevel;
|
|
5464
|
+
widgets: number;
|
|
5465
|
+
metrics: string[];
|
|
5466
|
+
} | {
|
|
5467
|
+
lines: number;
|
|
5468
|
+
};
|
|
5469
|
+
/** Only when read one at a time (`artifacts.get`), sharing or changing it. */
|
|
5470
|
+
content?: ArtifactContent;
|
|
5471
|
+
/** Signed in: the caller shared it. */
|
|
5472
|
+
mine?: boolean;
|
|
5473
|
+
/** Signed in: the caller has added it. */
|
|
5474
|
+
used?: boolean;
|
|
5475
|
+
created_at: string;
|
|
5476
|
+
updated_at: string;
|
|
5477
|
+
/** The public page. */
|
|
5478
|
+
url: string;
|
|
5479
|
+
console_url: string;
|
|
5480
|
+
}
|
|
5481
|
+
/** A dashboard's widgets (no ids, nothing of the author's account), or a skill's text. */
|
|
5482
|
+
export type ArtifactContent = {
|
|
5483
|
+
level: DashboardLevel;
|
|
5484
|
+
range: DashboardRange;
|
|
5485
|
+
widgets: Omit<DashboardWidget, 'id'>[];
|
|
5486
|
+
} | {
|
|
5487
|
+
skill: string;
|
|
5488
|
+
};
|
|
5489
|
+
export interface ArtifactList {
|
|
5490
|
+
object: 'list';
|
|
5491
|
+
data: Artifact[];
|
|
5492
|
+
has_more: boolean;
|
|
5493
|
+
/** Pass as `cursor` for the next page. */
|
|
5494
|
+
next_cursor: string | null;
|
|
5495
|
+
url?: string;
|
|
5496
|
+
}
|
|
5497
|
+
export interface ArtifactListOptions {
|
|
5498
|
+
kind?: ArtifactKind;
|
|
5499
|
+
/** Words in the title or summary. */
|
|
5500
|
+
q?: string;
|
|
5501
|
+
/** `popular` (most used, the default) or `newest`. */
|
|
5502
|
+
sort?: 'popular' | 'newest';
|
|
5503
|
+
/** A username (with or without @): what they shared. */
|
|
5504
|
+
author?: string;
|
|
5505
|
+
/** Only ones an admin looked at. */
|
|
5506
|
+
verified?: boolean;
|
|
5507
|
+
/** Your own (needs a key). */
|
|
5508
|
+
mine?: boolean;
|
|
5509
|
+
/** 1 to 100 (24 by default). */
|
|
5510
|
+
limit?: number;
|
|
5511
|
+
cursor?: string;
|
|
5512
|
+
}
|
|
5513
|
+
/** Share a dashboard (its widgets, never its data) or a skill (the SKILL.md text). */
|
|
5514
|
+
export type ArtifactShareInput = ({
|
|
5515
|
+
kind: 'dashboard';
|
|
5516
|
+
dashboard_id: string;
|
|
5517
|
+
title?: string;
|
|
5518
|
+
summary?: string;
|
|
5519
|
+
} | {
|
|
5520
|
+
kind: 'skill';
|
|
5521
|
+
skill: string;
|
|
5522
|
+
/** Defaults to the frontmatter's `name`. */
|
|
5523
|
+
title?: string;
|
|
5524
|
+
/** Defaults to the frontmatter's `description`. */
|
|
5525
|
+
summary?: string;
|
|
5526
|
+
/** The slug of the artifact this is a copy of. */
|
|
5527
|
+
remixed_from?: string;
|
|
5528
|
+
}) & {
|
|
5529
|
+
/** Share as one of your businesses: its handle, slug or project id. Left out or `me`: as you. */
|
|
5530
|
+
as?: string;
|
|
5531
|
+
};
|
|
5532
|
+
export interface ArtifactUpdate {
|
|
5533
|
+
title?: string;
|
|
5534
|
+
summary?: string;
|
|
5535
|
+
/** A skill: the new SKILL.md text. */
|
|
5536
|
+
skill?: string;
|
|
5537
|
+
/** A dashboard: copy the source dashboard's widgets again. */
|
|
5538
|
+
refresh?: true;
|
|
5539
|
+
}
|
|
5540
|
+
export interface ArtifactUseInput {
|
|
5541
|
+
/** A dashboard that reads one business: which one (required for those). */
|
|
5542
|
+
project_id?: string | null;
|
|
5543
|
+
/** The new dashboard's name (the artifact's title by default). */
|
|
5544
|
+
name?: string;
|
|
5545
|
+
}
|
|
5546
|
+
/** What using an artifact added to the caller's account. */
|
|
5547
|
+
export interface ArtifactUse {
|
|
5548
|
+
object: 'artifact_use';
|
|
5549
|
+
artifact: Artifact;
|
|
5550
|
+
/** A dashboard: the new dashboard, reading the caller's own data. */
|
|
5551
|
+
dashboard?: Dashboard;
|
|
5552
|
+
/** A skill: where it was saved in the Library (`skills/<slug>/SKILL.md`). */
|
|
5553
|
+
library_entry?: LibraryEntry;
|
|
5554
|
+
/** A skill: its text, to write to the agent's skills folder. */
|
|
5555
|
+
skill?: string;
|
|
5556
|
+
install?: string;
|
|
5557
|
+
}
|
|
5407
5558
|
export {};
|