@levo-so/core 0.2.1 → 0.3.8
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/index.d.ts +57 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -788,6 +788,8 @@ export declare interface IField {
|
|
|
788
788
|
hidden?: boolean;
|
|
789
789
|
/** Whether the field is editable. */
|
|
790
790
|
editable?: boolean;
|
|
791
|
+
/** Rank of the field within its section. Defaults to 0 server-side when omitted. */
|
|
792
|
+
sort_order?: number;
|
|
791
793
|
/** Whether the field is required. */
|
|
792
794
|
required?: boolean;
|
|
793
795
|
/** Whether the field value must be unique. */
|
|
@@ -1509,6 +1511,33 @@ export declare type IMediaObject = Pick<IMedia, "id" | "location" | "srcset" | "
|
|
|
1509
1511
|
mimetype?: IMedia["metadata"]["mimetype"];
|
|
1510
1512
|
};
|
|
1511
1513
|
|
|
1514
|
+
/**
|
|
1515
|
+
* Live storage-usage aggregate for a workspace, from `GET /v1/assets/media/storage`.
|
|
1516
|
+
* Computed fresh from the `media_storage` table on every call (not the cached, drifting
|
|
1517
|
+
* `assets.media_size` counter). Root figures plus a per-`kind` breakdown.
|
|
1518
|
+
*/
|
|
1519
|
+
export declare interface IMediaStorage extends IMediaStorageMetrics {
|
|
1520
|
+
workspace_id: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Per-media-type breakdown. All five keys are always present, zero-filled when empty,
|
|
1523
|
+
* and the buckets sum exactly to the root totals.
|
|
1524
|
+
*/
|
|
1525
|
+
kind: Record<IMediaStorageKind, IMediaStorageMetrics>;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/** Media types the storage endpoint groups by. `unknown` = orphaned/blank-kind rows. */
|
|
1529
|
+
export declare type IMediaStorageKind = "image" | "video" | "audio" | "document" | "unknown";
|
|
1530
|
+
|
|
1531
|
+
/** The three storage figures, at the root and inside each `kind` bucket. Sizes are raw bytes. */
|
|
1532
|
+
export declare interface IMediaStorageMetrics {
|
|
1533
|
+
/** File count — every stored file, incl. resize variants (images only). Not a size. */
|
|
1534
|
+
total_files: number;
|
|
1535
|
+
/** `SUM(size_in_bytes)` in raw bytes. */
|
|
1536
|
+
total_size: number;
|
|
1537
|
+
/** Mean bytes per file, rounded to a whole byte. */
|
|
1538
|
+
average_size: number;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1512
1541
|
/** Source context attached to a media upload so the backend can record where the file originated. */
|
|
1513
1542
|
export declare interface IMediaUploadContext {
|
|
1514
1543
|
/** The product module the upload belongs to (e.g. "community", "blog"). */
|
|
@@ -1910,6 +1939,14 @@ export declare interface IWorkspace {
|
|
|
1910
1939
|
};
|
|
1911
1940
|
/** Whether user has an existing website or is creating new */
|
|
1912
1941
|
website_status?: "existing" | "new";
|
|
1942
|
+
/** Presence of this is what makes the API stamp `onboarded_at`. */
|
|
1943
|
+
site_type?: IWorkspaceSiteType;
|
|
1944
|
+
role?: IWorkspaceRole;
|
|
1945
|
+
org_size?: IWorkspaceOrgSize;
|
|
1946
|
+
website?: string;
|
|
1947
|
+
brand?: IWorkspaceBrandInfo;
|
|
1948
|
+
/** Extracted business-description document, attached after the workspace exists. */
|
|
1949
|
+
description_document_id?: string;
|
|
1913
1950
|
};
|
|
1914
1951
|
settings: {
|
|
1915
1952
|
head_code?: string;
|
|
@@ -1925,6 +1962,26 @@ export declare interface IWorkspace {
|
|
|
1925
1962
|
subscription: ISubscription | null;
|
|
1926
1963
|
}
|
|
1927
1964
|
|
|
1965
|
+
/** Brand identity scraped from the user's live site at signup. */
|
|
1966
|
+
export declare interface IWorkspaceBrandInfo {
|
|
1967
|
+
name?: string | null;
|
|
1968
|
+
description?: string | null;
|
|
1969
|
+
category?: string | null;
|
|
1970
|
+
logo_url?: string | null;
|
|
1971
|
+
favicon_url?: string | null;
|
|
1972
|
+
colors?: string[];
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
export declare type IWorkspaceOrgSize = "just-me" | "2-10" | "11-50" | "51-500" | "501-5000" | "5001+";
|
|
1976
|
+
|
|
1977
|
+
export declare type IWorkspaceRole = "founder" | "marketing" | "sales" | "designer" | "content" | "engineering" | "agency" | "other";
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* v3 PLG onboarding (`/welcome`) segmentation. The API validates these members —
|
|
1981
|
+
* see issue #4521 — so they are unions, not free-form strings.
|
|
1982
|
+
*/
|
|
1983
|
+
export declare type IWorkspaceSiteType = "b2b-saas" | "manufacturer" | "service" | "dealer-portal" | "membership" | "other";
|
|
1984
|
+
|
|
1928
1985
|
declare type JSONContent = {
|
|
1929
1986
|
type?: string;
|
|
1930
1987
|
attrs?: Record<string, any>;
|