@vibiz/sdk 0.3.31 → 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 +8 -3
- package/dist/index.js +8 -5
- package/dist/one-key.d.ts +1 -1
- package/dist/types.d.ts +37 -6
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -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";
|
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(
|
|
@@ -2418,7 +2421,7 @@ function formatMinor(minor, currency) {
|
|
|
2418
2421
|
}
|
|
2419
2422
|
|
|
2420
2423
|
// packages/sdk/src/one-key.ts
|
|
2421
|
-
var APP_SDK_VERSION = "0.3.
|
|
2424
|
+
var APP_SDK_VERSION = "0.3.32";
|
|
2422
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";
|
|
2423
2426
|
function oneKeyMessage(url, host) {
|
|
2424
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
|
}
|
|
@@ -5420,7 +5448,7 @@ export interface Artifact {
|
|
|
5420
5448
|
title: string;
|
|
5421
5449
|
/** Up to 500 characters. */
|
|
5422
5450
|
summary: string;
|
|
5423
|
-
author:
|
|
5451
|
+
author: Author;
|
|
5424
5452
|
/** Accounts that added it, once each (the author's own use doesn't count). */
|
|
5425
5453
|
uses: number;
|
|
5426
5454
|
/** An admin looked at it. Changing what it holds clears it until the next look. */
|
|
@@ -5483,7 +5511,7 @@ export interface ArtifactListOptions {
|
|
|
5483
5511
|
cursor?: string;
|
|
5484
5512
|
}
|
|
5485
5513
|
/** Share a dashboard (its widgets, never its data) or a skill (the SKILL.md text). */
|
|
5486
|
-
export type ArtifactShareInput = {
|
|
5514
|
+
export type ArtifactShareInput = ({
|
|
5487
5515
|
kind: 'dashboard';
|
|
5488
5516
|
dashboard_id: string;
|
|
5489
5517
|
title?: string;
|
|
@@ -5497,6 +5525,9 @@ export type ArtifactShareInput = {
|
|
|
5497
5525
|
summary?: string;
|
|
5498
5526
|
/** The slug of the artifact this is a copy of. */
|
|
5499
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;
|
|
5500
5531
|
};
|
|
5501
5532
|
export interface ArtifactUpdate {
|
|
5502
5533
|
title?: string;
|