@lobehub/market-sdk 0.25.0 → 0.25.1-beta.1

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.mts CHANGED
@@ -1568,6 +1568,55 @@ interface PaginationQuery {
1568
1568
  /** Number of results to skip */
1569
1569
  offset?: number;
1570
1570
  }
1571
+ /**
1572
+ * Client Info
1573
+ *
1574
+ * Client environment information for debugging feedback
1575
+ */
1576
+ interface FeedbackClientInfo {
1577
+ /** Browser/app language */
1578
+ language?: string;
1579
+ /** Screen resolution (e.g., "1920x1080") */
1580
+ screenResolution?: string;
1581
+ /** User timezone */
1582
+ timezone?: string;
1583
+ /** Current page URL */
1584
+ url?: string;
1585
+ /** Browser user agent string */
1586
+ userAgent?: string;
1587
+ /** Viewport dimensions (e.g., "1280x720") */
1588
+ viewport?: string;
1589
+ }
1590
+ /**
1591
+ * Submit Feedback Request
1592
+ *
1593
+ * Request body for submitting user feedback
1594
+ */
1595
+ interface SubmitFeedbackRequest {
1596
+ /** Optional client environment information */
1597
+ clientInfo?: FeedbackClientInfo;
1598
+ /** User email address (required for contact) */
1599
+ email: string;
1600
+ /** Detailed feedback message (1-5000 characters) */
1601
+ message: string;
1602
+ /** Optional screenshot URL */
1603
+ screenshotUrl?: string;
1604
+ /** Feedback title/subject (1-200 characters) */
1605
+ title: string;
1606
+ }
1607
+ /**
1608
+ * Submit Feedback Response
1609
+ *
1610
+ * Response structure for submit feedback endpoint
1611
+ */
1612
+ interface SubmitFeedbackResponse {
1613
+ /** Created issue ID in Linear */
1614
+ issueId: string;
1615
+ /** URL to view the issue in Linear */
1616
+ issueUrl: string;
1617
+ /** Whether the submission was successful */
1618
+ success: boolean;
1619
+ }
1571
1620
 
1572
1621
  /**
1573
1622
  * Base SDK class
@@ -1649,6 +1698,202 @@ declare class BaseSDK {
1649
1698
  private fetchNewToken;
1650
1699
  }
1651
1700
 
1701
+ /**
1702
+ * Admin Agent Item
1703
+ * Extended agent item with admin-specific fields
1704
+ */
1705
+ interface AdminAgentItem extends AgentItem {
1706
+ /** Number of knowledge bases attached to the agent */
1707
+ knowledgeCount?: number;
1708
+ /** Owner ID of the agent */
1709
+ ownerId: number;
1710
+ /** Number of plugins attached to the agent */
1711
+ pluginCount?: number;
1712
+ /** Safety check result */
1713
+ safetyCheck?: string | null;
1714
+ /** Publication status */
1715
+ status?: string;
1716
+ /** Token usage */
1717
+ tokenUsage?: number;
1718
+ }
1719
+ /**
1720
+ * Admin Agent Item Detail
1721
+ * Extended agent detail with admin-specific fields
1722
+ */
1723
+ interface AdminAgentItemDetail extends AgentItemDetail {
1724
+ /** Safety check result */
1725
+ safetyCheck?: string | null;
1726
+ }
1727
+ /**
1728
+ * Agent list query parameters for admin
1729
+ */
1730
+ interface AdminAgentListQueryParams extends AdminListQueryParams {
1731
+ /** Filter by category */
1732
+ category?: string;
1733
+ /** Filter by official status */
1734
+ isOfficial?: 'true' | 'false';
1735
+ /** Filter by namespace */
1736
+ namespace?: string;
1737
+ /** Filter by status */
1738
+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated' | 'all';
1739
+ /** Filter by visibility */
1740
+ visibility?: 'public' | 'private' | 'internal' | 'all';
1741
+ }
1742
+ /**
1743
+ * Agent update parameters
1744
+ */
1745
+ interface AgentUpdateParams {
1746
+ /** Official homepage or repository URL for the agent */
1747
+ homepage?: string | null;
1748
+ /** Unique identifier for the agent */
1749
+ identifier?: string;
1750
+ /** Whether this agent is featured */
1751
+ isFeatured?: boolean;
1752
+ /** Whether this agent is officially maintained by LobeHub */
1753
+ isOfficial?: boolean;
1754
+ /** Default name of the agent */
1755
+ name?: string;
1756
+ /** Safety check result */
1757
+ safetyCheck?: string | null;
1758
+ /** Publication status */
1759
+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated';
1760
+ /** Visibility level */
1761
+ visibility?: 'public' | 'private' | 'internal';
1762
+ }
1763
+ /**
1764
+ * Agent by status response item
1765
+ */
1766
+ interface AgentByStatusItem {
1767
+ id: number;
1768
+ identifier: string;
1769
+ name: string;
1770
+ status: AgentStatus;
1771
+ updatedAt: string | null;
1772
+ }
1773
+ /**
1774
+ * Agent version by status response item
1775
+ */
1776
+ interface AgentVersionByStatusItem {
1777
+ agentId: number;
1778
+ agentName: string;
1779
+ identifier: string;
1780
+ status: AgentStatus;
1781
+ updatedAt: string | null;
1782
+ version: string;
1783
+ versionId: number;
1784
+ }
1785
+ /**
1786
+ * Agent Management Service
1787
+ *
1788
+ * Provides administrative functionality for managing agents in the marketplace.
1789
+ * This service handles CRUD operations for agents, agent status, and visibility.
1790
+ */
1791
+ declare class AgentService$1 extends BaseSDK {
1792
+ /**
1793
+ * Retrieves a list of agents with admin details
1794
+ *
1795
+ * Supports filtering, pagination, and sorting of results.
1796
+ *
1797
+ * @param params - Query parameters for filtering and pagination
1798
+ * @returns Promise resolving to the agent list response with admin details
1799
+ */
1800
+ getAgents(params?: AdminAgentListQueryParams): Promise<AdminListResponse<AdminAgentItem>>;
1801
+ /**
1802
+ * Retrieves agents filtered by status
1803
+ *
1804
+ * @param status - The status to filter by
1805
+ * @returns Promise resolving to agents matching the status
1806
+ */
1807
+ getAgentsByStatus(status: AgentStatus): Promise<{
1808
+ data: AgentByStatusItem[];
1809
+ total: number;
1810
+ }>;
1811
+ /**
1812
+ * Retrieves agent versions filtered by status
1813
+ *
1814
+ * @param status - The status to filter by
1815
+ * @returns Promise resolving to agent versions matching the status
1816
+ */
1817
+ getAgentVersionsByStatus(status: AgentStatus): Promise<{
1818
+ data: AgentVersionByStatusItem[];
1819
+ total: number;
1820
+ }>;
1821
+ /**
1822
+ * Retrieves a single agent with full admin details
1823
+ *
1824
+ * @param id - Agent ID or identifier
1825
+ * @param options - Optional query parameters
1826
+ * @returns Promise resolving to the detailed agent information
1827
+ */
1828
+ getAgent(id: number | string, options?: {
1829
+ locale?: string;
1830
+ version?: string;
1831
+ }): Promise<AdminAgentItemDetail>;
1832
+ /**
1833
+ * Updates agent information
1834
+ *
1835
+ * @param id - Agent ID or identifier
1836
+ * @param data - Agent update data containing fields to update
1837
+ * @returns Promise resolving to the updated agent
1838
+ */
1839
+ updateAgent(id: number | string, data: AgentUpdateParams): Promise<AdminAgentItem>;
1840
+ /**
1841
+ * Updates agent publication status
1842
+ *
1843
+ * @param id - Agent ID or identifier
1844
+ * @param status - New status to set
1845
+ * @returns Promise resolving to success response
1846
+ */
1847
+ updateAgentStatus(id: number | string, status: 'published' | 'unpublished' | 'archived' | 'deprecated'): Promise<{
1848
+ message: string;
1849
+ success: boolean;
1850
+ }>;
1851
+ /**
1852
+ * Updates agent visibility
1853
+ *
1854
+ * @param id - Agent ID or identifier
1855
+ * @param visibility - New visibility setting
1856
+ * @returns Promise resolving to success response
1857
+ */
1858
+ updateAgentVisibility(id: number | string, visibility: 'public' | 'private' | 'internal'): Promise<{
1859
+ message: string;
1860
+ success: boolean;
1861
+ }>;
1862
+ /**
1863
+ * Deletes an agent
1864
+ *
1865
+ * @param id - Agent ID or identifier
1866
+ * @returns Promise resolving to success response
1867
+ */
1868
+ deleteAgent(id: number | string): Promise<{
1869
+ message: string;
1870
+ success: boolean;
1871
+ }>;
1872
+ /**
1873
+ * Updates status for multiple agents in a single operation
1874
+ *
1875
+ * @param ids - Array of agent IDs to update
1876
+ * @param status - New status to set for all specified agents
1877
+ * @returns Promise resolving to success response
1878
+ */
1879
+ batchUpdateAgentStatus(ids: number[], status: 'published' | 'unpublished' | 'archived' | 'deprecated'): Promise<{
1880
+ message: string;
1881
+ success: boolean;
1882
+ updatedCount: number;
1883
+ }>;
1884
+ /**
1885
+ * Deletes multiple agents in a single operation
1886
+ *
1887
+ * @param ids - Array of agent IDs to delete
1888
+ * @returns Promise resolving to success response
1889
+ */
1890
+ batchDeleteAgents(ids: number[]): Promise<{
1891
+ deletedCount: number;
1892
+ message: string;
1893
+ success: boolean;
1894
+ }>;
1895
+ }
1896
+
1652
1897
  /**
1653
1898
  * Market Overview Statistics Interface
1654
1899
  * Defines the structure for market overview data
@@ -2513,21 +2758,29 @@ declare class PluginEnvService extends BaseSDK {
2513
2758
  * LobeHub Market Admin SDK Client
2514
2759
  *
2515
2760
  * Client for accessing administrative functionality of the LobeHub Marketplace.
2516
- * This SDK provides privileged operations for managing plugins, reviews,
2761
+ * This SDK provides privileged operations for managing agents, plugins, reviews,
2517
2762
  * system settings, and dependencies. It requires admin-level authentication.
2518
2763
  */
2519
2764
  declare class MarketAdmin extends BaseSDK {
2765
+ /**
2766
+ * Agent management service
2767
+ * Provides methods for creating, updating, and managing agents
2768
+ */
2769
+ readonly agents: AgentService$1;
2520
2770
  /**
2521
2771
  * Market analysis service
2522
2772
  * Provides methods for accessing market analytics and statistics
2523
2773
  */
2524
2774
  readonly analysis: AnalysisService;
2775
+ /**
2776
+ * Plugin environment service
2777
+ */
2778
+ readonly env: PluginEnvService;
2525
2779
  /**
2526
2780
  * Plugin management service
2527
2781
  * Provides methods for creating, updating, and managing plugins
2528
2782
  */
2529
2783
  readonly plugins: PluginService;
2530
- readonly env: PluginEnvService;
2531
2784
  /**
2532
2785
  * Review management service
2533
2786
  * Provides methods for moderating and managing user reviews
@@ -2859,6 +3112,45 @@ declare class AuthService extends BaseSDK {
2859
3112
  }>;
2860
3113
  }
2861
3114
 
3115
+ /**
3116
+ * Feedback Service
3117
+ *
3118
+ * Provides functionality for submitting user feedback to the LobeHub Marketplace.
3119
+ * Feedback is tracked in Linear for follow-up.
3120
+ *
3121
+ * Note: This endpoint is rate-limited to 3 requests per minute per IP.
3122
+ */
3123
+ declare class FeedbackService extends BaseSDK {
3124
+ /**
3125
+ * Submits user feedback
3126
+ *
3127
+ * Creates a feedback issue in Linear for tracking and follow-up.
3128
+ * Email is required for contact purposes.
3129
+ *
3130
+ * Rate limit: 3 requests per minute per IP
3131
+ *
3132
+ * @param data - The feedback data to submit
3133
+ * @param options - Optional request options
3134
+ * @returns Promise resolving to the feedback submission response
3135
+ * @throws Error if rate limit is exceeded (429) or submission fails
3136
+ *
3137
+ * @example
3138
+ * ```typescript
3139
+ * const response = await sdk.feedback.submitFeedback({
3140
+ * email: 'user@example.com',
3141
+ * title: 'Feature request',
3142
+ * message: 'It would be great if...',
3143
+ * clientInfo: {
3144
+ * url: window.location.href,
3145
+ * userAgent: navigator.userAgent,
3146
+ * },
3147
+ * });
3148
+ * console.log('Feedback submitted:', response.issueUrl);
3149
+ * ```
3150
+ */
3151
+ submitFeedback(data: SubmitFeedbackRequest, options?: globalThis.RequestInit): Promise<SubmitFeedbackResponse>;
3152
+ }
3153
+
2862
3154
  /**
2863
3155
  * Plugins Service
2864
3156
  *
@@ -3470,6 +3762,11 @@ declare class MarketSDK extends BaseSDK {
3470
3762
  * Provides methods to like/unlike content and retrieve like lists
3471
3763
  */
3472
3764
  readonly likes: UserLikeService;
3765
+ /**
3766
+ * Feedback service for submitting user feedback
3767
+ * Provides methods to submit feedback which is tracked in Linear
3768
+ */
3769
+ readonly feedback: FeedbackService;
3473
3770
  /**
3474
3771
  * Discovery service for retrieving API service information
3475
3772
  * Used to get information about available endpoints and services
@@ -3578,4 +3875,4 @@ declare function buildTrustedClientPayload(params: {
3578
3875
  userId: string;
3579
3876
  }): TrustedClientPayload;
3580
3877
 
3581
- export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FollowListItem, type FollowListResponse, type FollowRequest, type GetCommandOutputParams, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListLocalFilesParams, MarketAdmin, MarketSDK, type MarketSDKOptions, type MoveLocalFilesParams, type MoveOperation, type OAuthTokenResponse, type OwnAgentListQuery, type PaginationQuery, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshTokenRequest, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, type SearchLocalFilesParams, type SharedTokenState, StatusEnumSchema, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
3878
+ export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FollowListItem, type FollowListResponse, type FollowRequest, type GetCommandOutputParams, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListLocalFilesParams, MarketAdmin, MarketSDK, type MarketSDKOptions, type MoveLocalFilesParams, type MoveOperation, type OAuthTokenResponse, type OwnAgentListQuery, type PaginationQuery, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshTokenRequest, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, type SearchLocalFilesParams, type SharedTokenState, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };