@lobehub/market-sdk 0.47.0 → 0.48.0
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 +57 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2291,6 +2291,17 @@ interface GetClientMetadataParams {
|
|
|
2291
2291
|
*/
|
|
2292
2292
|
version?: string;
|
|
2293
2293
|
}
|
|
2294
|
+
/**
|
|
2295
|
+
* The member whose personal connection a workspace uses
|
|
2296
|
+
*/
|
|
2297
|
+
interface ConnectionReference {
|
|
2298
|
+
/** Market account id of the member */
|
|
2299
|
+
sourceAccountId: number;
|
|
2300
|
+
/** The member's market display name, when known */
|
|
2301
|
+
sourceDisplayName: string | null;
|
|
2302
|
+
/** The member's LobeHub user id */
|
|
2303
|
+
sourceUserId: string | null;
|
|
2304
|
+
}
|
|
2294
2305
|
/**
|
|
2295
2306
|
* User's OAuth connection to a provider
|
|
2296
2307
|
*/
|
|
@@ -2319,6 +2330,16 @@ interface OAuthConnection {
|
|
|
2319
2330
|
* Provider username (if available)
|
|
2320
2331
|
*/
|
|
2321
2332
|
providerUsername?: string;
|
|
2333
|
+
/**
|
|
2334
|
+
* Inside a workspace: set when the workspace uses a member's personal
|
|
2335
|
+
* connection (left by the per-workspace migration) instead of its own.
|
|
2336
|
+
*/
|
|
2337
|
+
reference?: ConnectionReference;
|
|
2338
|
+
/**
|
|
2339
|
+
* Personal scope only: the workspaces that use this personal connection, so
|
|
2340
|
+
* a client can warn before revoking it.
|
|
2341
|
+
*/
|
|
2342
|
+
referencedByWorkspaceIds?: string[];
|
|
2322
2343
|
/**
|
|
2323
2344
|
* Authorized scopes
|
|
2324
2345
|
*/
|
|
@@ -2429,6 +2450,11 @@ interface ListConnectionsResponse {
|
|
|
2429
2450
|
* Whether the request was successful
|
|
2430
2451
|
*/
|
|
2431
2452
|
success: boolean;
|
|
2453
|
+
/**
|
|
2454
|
+
* Inside a workspace that has no organization on Market yet: nothing can be
|
|
2455
|
+
* connected there until the workspace is mirrored
|
|
2456
|
+
*/
|
|
2457
|
+
workspaceUnavailable?: boolean;
|
|
2432
2458
|
}
|
|
2433
2459
|
/**
|
|
2434
2460
|
* Response for connection statistics
|
|
@@ -2512,6 +2538,24 @@ interface RefreshConnectionResponse {
|
|
|
2512
2538
|
* Response for revoking connection
|
|
2513
2539
|
*/
|
|
2514
2540
|
interface RevokeConnectionResponse {
|
|
2541
|
+
/**
|
|
2542
|
+
* What was removed: the scope's own connection, or — in a workspace that
|
|
2543
|
+
* only used a member's personal connection — that reference
|
|
2544
|
+
*/
|
|
2545
|
+
revoked?: 'connection' | 'reference';
|
|
2546
|
+
/**
|
|
2547
|
+
* Whether the request was successful
|
|
2548
|
+
*/
|
|
2549
|
+
success: boolean;
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* Response for letting a workspace use the caller's personal connection
|
|
2553
|
+
*/
|
|
2554
|
+
interface AddConnectionReferenceResponse {
|
|
2555
|
+
/**
|
|
2556
|
+
* `created` (or already present), or why nothing was created
|
|
2557
|
+
*/
|
|
2558
|
+
status: 'created' | 'no_personal_connection' | 'workspace_connection_exists';
|
|
2515
2559
|
/**
|
|
2516
2560
|
* Whether the request was successful
|
|
2517
2561
|
*/
|
|
@@ -6587,6 +6631,18 @@ declare class ConnectService extends BaseSDK {
|
|
|
6587
6631
|
* @returns Promise resolving to the revoke result
|
|
6588
6632
|
*/
|
|
6589
6633
|
revoke(provider: string, options?: globalThis.RequestInit): Promise<RevokeConnectionResponse>;
|
|
6634
|
+
/**
|
|
6635
|
+
* Lets the current workspace use the caller's own personal connection
|
|
6636
|
+
*
|
|
6637
|
+
* Only inside a workspace (a trust token carrying `workspaceId`) and only for
|
|
6638
|
+
* workspace admins. The tokens are shared, not copied; authorizing the
|
|
6639
|
+
* workspace itself later replaces the reference. Idempotent.
|
|
6640
|
+
*
|
|
6641
|
+
* @param provider - The provider ID (e.g., 'linear', 'github')
|
|
6642
|
+
* @param options - Optional request options (must include authentication)
|
|
6643
|
+
* @returns Promise resolving to whether a reference now exists
|
|
6644
|
+
*/
|
|
6645
|
+
addReference(provider: string, options?: globalThis.RequestInit): Promise<AddConnectionReferenceResponse>;
|
|
6590
6646
|
}
|
|
6591
6647
|
|
|
6592
6648
|
/**
|
|
@@ -9085,4 +9141,4 @@ declare function buildTrustedClientPayload(params: {
|
|
|
9085
9141
|
workspaceId?: string;
|
|
9086
9142
|
}): TrustedClientPayload;
|
|
9087
9143
|
|
|
9088
|
-
export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentListQuery, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AnalyzeStorageParams, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredShareTargetRequest, type CredWithPlaintext, type DeleteCredResponse, type DeleteFilesParams, type Deployment, type DeploymentBuildSummary, type DiscoveryDocument, type EditLocalFileParams, type ExecScriptParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FirstPluginLocalizationInput, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetClientMetadataParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketErrorKind, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCategory, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginLatestOwnComment, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type PreparedDeploymentUpload, type ProgrammingLanguage, type PublishPluginParams, type PublishPluginResponse, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RevokeTokenRequest, type RunBuildInToolsContext, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SandboxRunParams, type SandboxStorageRequestContext, type SearchLocalFilesParams, type ShareCredRequest, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, getMarketErrorKind, orgRefToPathSegment };
|
|
9144
|
+
export { type AccountMeta, type AddConnectionReferenceResponse, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentListQuery, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AnalyzeStorageParams, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionReference, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredShareTargetRequest, type CredWithPlaintext, type DeleteCredResponse, type DeleteFilesParams, type Deployment, type DeploymentBuildSummary, type DiscoveryDocument, type EditLocalFileParams, type ExecScriptParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FirstPluginLocalizationInput, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetClientMetadataParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketErrorKind, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCategory, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginLatestOwnComment, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type PreparedDeploymentUpload, type ProgrammingLanguage, type PublishPluginParams, type PublishPluginResponse, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RevokeTokenRequest, type RunBuildInToolsContext, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SandboxRunParams, type SandboxStorageRequestContext, type SearchLocalFilesParams, type ShareCredRequest, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, getMarketErrorKind, orgRefToPathSegment };
|
package/dist/index.mjs
CHANGED
|
@@ -3623,6 +3623,29 @@ var ConnectService = class extends BaseSDK {
|
|
|
3623
3623
|
log20("Connection revoked for %s: success=%s", provider, result.success);
|
|
3624
3624
|
return result;
|
|
3625
3625
|
}
|
|
3626
|
+
/**
|
|
3627
|
+
* Lets the current workspace use the caller's own personal connection
|
|
3628
|
+
*
|
|
3629
|
+
* Only inside a workspace (a trust token carrying `workspaceId`) and only for
|
|
3630
|
+
* workspace admins. The tokens are shared, not copied; authorizing the
|
|
3631
|
+
* workspace itself later replaces the reference. Idempotent.
|
|
3632
|
+
*
|
|
3633
|
+
* @param provider - The provider ID (e.g., 'linear', 'github')
|
|
3634
|
+
* @param options - Optional request options (must include authentication)
|
|
3635
|
+
* @returns Promise resolving to whether a reference now exists
|
|
3636
|
+
*/
|
|
3637
|
+
async addReference(provider, options) {
|
|
3638
|
+
log20("Adding workspace reference for provider: %s", provider);
|
|
3639
|
+
const result = await this.request(
|
|
3640
|
+
`/connect/${encodeURIComponent(provider)}/reference`,
|
|
3641
|
+
{
|
|
3642
|
+
method: "POST",
|
|
3643
|
+
...options
|
|
3644
|
+
}
|
|
3645
|
+
);
|
|
3646
|
+
log20("Workspace reference for %s: status=%s", provider, result.status);
|
|
3647
|
+
return result;
|
|
3648
|
+
}
|
|
3626
3649
|
};
|
|
3627
3650
|
|
|
3628
3651
|
// src/market/services/CredService.ts
|