@lobehub/market-sdk 0.45.0 → 0.46.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 +64 -23
- package/dist/index.mjs +50 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1475,6 +1475,12 @@ interface CreateKVCredRequest {
|
|
|
1475
1475
|
type: 'kv-env' | 'kv-header';
|
|
1476
1476
|
/** Key-value pairs to store */
|
|
1477
1477
|
values: Record<string, string>;
|
|
1478
|
+
/**
|
|
1479
|
+
* Organization credentials only (ignored for personal ones). 'public'
|
|
1480
|
+
* (default) shares it with every member and requires the admin role;
|
|
1481
|
+
* 'private' keeps it to the creator.
|
|
1482
|
+
*/
|
|
1483
|
+
visibility?: 'private' | 'public';
|
|
1478
1484
|
}
|
|
1479
1485
|
/**
|
|
1480
1486
|
* Request for creating an OAuth credential
|
|
@@ -1488,6 +1494,12 @@ interface CreateOAuthCredRequest {
|
|
|
1488
1494
|
name: string;
|
|
1489
1495
|
/** ID of the existing OAuth connection to link */
|
|
1490
1496
|
oauthConnectionId: number;
|
|
1497
|
+
/**
|
|
1498
|
+
* Organization credentials only (ignored for personal ones). 'public'
|
|
1499
|
+
* (default) shares it with every member and requires the admin role;
|
|
1500
|
+
* 'private' keeps it to the creator.
|
|
1501
|
+
*/
|
|
1502
|
+
visibility?: 'private' | 'public';
|
|
1491
1503
|
}
|
|
1492
1504
|
/**
|
|
1493
1505
|
* Request for creating a file credential
|
|
@@ -1503,6 +1515,12 @@ interface CreateFileCredRequest {
|
|
|
1503
1515
|
key: string;
|
|
1504
1516
|
/** Display name for the credential */
|
|
1505
1517
|
name: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Organization credentials only (ignored for personal ones). 'public'
|
|
1520
|
+
* (default) shares it with every member and requires the admin role;
|
|
1521
|
+
* 'private' keeps it to the creator.
|
|
1522
|
+
*/
|
|
1523
|
+
visibility?: 'private' | 'public';
|
|
1506
1524
|
}
|
|
1507
1525
|
/**
|
|
1508
1526
|
* Request for updating a credential
|
|
@@ -1529,12 +1547,22 @@ interface ShareCredRequest {
|
|
|
1529
1547
|
/** Target organization: numeric account id or `workspace:<workspaceId>` key */
|
|
1530
1548
|
orgId: string;
|
|
1531
1549
|
/**
|
|
1532
|
-
* Defaults to 'public' (
|
|
1533
|
-
*
|
|
1534
|
-
* to make it
|
|
1550
|
+
* Defaults to 'public' (every member can use it). 'private' links it for
|
|
1551
|
+
* the owner's own use in that organization — use CredService.publish()
|
|
1552
|
+
* later to make it usable by every member.
|
|
1535
1553
|
*/
|
|
1536
1554
|
visibility?: 'private' | 'public';
|
|
1537
1555
|
}
|
|
1556
|
+
/**
|
|
1557
|
+
* Picks which of a credential's shares `publish` / `unshare` act on.
|
|
1558
|
+
*/
|
|
1559
|
+
interface CredShareTargetRequest {
|
|
1560
|
+
/**
|
|
1561
|
+
* Organization: numeric account id or `workspace:<workspaceId>` key. May be
|
|
1562
|
+
* omitted while the credential has a single share.
|
|
1563
|
+
*/
|
|
1564
|
+
orgId?: string;
|
|
1565
|
+
}
|
|
1538
1566
|
/**
|
|
1539
1567
|
* Response containing a list of credentials
|
|
1540
1568
|
*/
|
|
@@ -6598,44 +6626,49 @@ declare class CredService extends BaseSDK {
|
|
|
6598
6626
|
*/
|
|
6599
6627
|
update(id: number, data: UpdateCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
6600
6628
|
/**
|
|
6601
|
-
* Shares one of the caller's own credentials
|
|
6629
|
+
* Shares one of the caller's own credentials into an organization
|
|
6602
6630
|
*
|
|
6603
6631
|
* The caller must own the credential and be a member of the target
|
|
6604
|
-
* organization. The credential stays owned by the caller
|
|
6605
|
-
*
|
|
6606
|
-
* `visibility: '
|
|
6607
|
-
*
|
|
6632
|
+
* organization. The credential stays owned by the caller and can be shared
|
|
6633
|
+
* into several organizations; sharing again into the same organization
|
|
6634
|
+
* changes that share's visibility. Defaults to `visibility: 'public'`
|
|
6635
|
+
* (every member can use it); `'private'` links it for the caller's own use
|
|
6636
|
+
* there, and `publish()` later opens it to every member. Requires
|
|
6637
|
+
* authentication.
|
|
6608
6638
|
*
|
|
6609
6639
|
* @param id - The credential ID to share
|
|
6610
|
-
* @param data - The target organization (and optional
|
|
6640
|
+
* @param data - The target organization (and optional visibility)
|
|
6611
6641
|
* @param options - Optional request options
|
|
6612
6642
|
* @returns Promise resolving to the updated credential
|
|
6613
6643
|
*/
|
|
6614
6644
|
share(id: number, data: ShareCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
6615
6645
|
/**
|
|
6616
|
-
* Publishes a
|
|
6646
|
+
* Publishes a privately shared credential to its organization
|
|
6617
6647
|
*
|
|
6618
6648
|
* Use after calling `share()` with `visibility: 'private'` to make the
|
|
6619
|
-
* credential
|
|
6649
|
+
* credential usable by every member of that organization. Owner-only.
|
|
6620
6650
|
* Requires authentication.
|
|
6621
6651
|
*
|
|
6622
6652
|
* @param id - The credential ID to publish
|
|
6623
6653
|
* @param options - Optional request options
|
|
6654
|
+
* @param target - Which share to publish (required once shared into several organizations).
|
|
6655
|
+
* Last so the published `publish(id, options)` signature keeps working.
|
|
6624
6656
|
* @returns Promise resolving to the updated credential
|
|
6625
6657
|
*/
|
|
6626
|
-
publish(id: number, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
6658
|
+
publish(id: number, options?: globalThis.RequestInit, target?: CredShareTargetRequest): Promise<UserCredSummary>;
|
|
6627
6659
|
/**
|
|
6628
|
-
*
|
|
6660
|
+
* Removes a credential's share into one organization
|
|
6629
6661
|
*
|
|
6630
|
-
*
|
|
6631
|
-
*
|
|
6632
|
-
* to. Requires authentication.
|
|
6662
|
+
* Does not delete the credential. Callable by the credential's owner, or
|
|
6663
|
+
* by an admin of that organization. Requires authentication.
|
|
6633
6664
|
*
|
|
6634
6665
|
* @param id - The credential ID to unshare
|
|
6635
6666
|
* @param options - Optional request options
|
|
6667
|
+
* @param target - Which share to remove (required once shared into several organizations).
|
|
6668
|
+
* Last so the published `unshare(id, options)` signature keeps working.
|
|
6636
6669
|
* @returns Promise resolving to the updated credential
|
|
6637
6670
|
*/
|
|
6638
|
-
unshare(id: number, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
6671
|
+
unshare(id: number, options?: globalThis.RequestInit, target?: CredShareTargetRequest): Promise<UserCredSummary>;
|
|
6639
6672
|
/**
|
|
6640
6673
|
* Deletes a credential by ID
|
|
6641
6674
|
*
|
|
@@ -7806,11 +7839,12 @@ declare class OrganizationCredsService extends BaseSDK {
|
|
|
7806
7839
|
constructor(orgId: OrgRef, options?: MarketSDKOptions, sharedHeaders?: Record<string, string>, sharedTokenState?: SharedTokenState);
|
|
7807
7840
|
private base;
|
|
7808
7841
|
/**
|
|
7809
|
-
* Lists every credential
|
|
7810
|
-
*
|
|
7811
|
-
*
|
|
7812
|
-
*
|
|
7813
|
-
*
|
|
7842
|
+
* Lists every credential the caller can see in this organization: the
|
|
7843
|
+
* organization's shared credentials, the caller's own private ones, and
|
|
7844
|
+
* members' personal credentials shared in (published ones, plus the
|
|
7845
|
+
* caller's own private links). `visibility` is the credential's
|
|
7846
|
+
* visibility inside this organization; `ownerAccountId`/`ownerType`/
|
|
7847
|
+
* `ownerDisplayName`/`ownerNamespace` identify who it belongs to.
|
|
7814
7848
|
*/
|
|
7815
7849
|
list(options?: globalThis.RequestInit): Promise<ListCredsResponse>;
|
|
7816
7850
|
/**
|
|
@@ -7823,6 +7857,13 @@ declare class OrganizationCredsService extends BaseSDK {
|
|
|
7823
7857
|
createOAuth(data: CreateOAuthCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
7824
7858
|
createFile(data: CreateFileCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
7825
7859
|
update(id: number, data: UpdateCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
7860
|
+
/**
|
|
7861
|
+
* Publishes a private organization credential to every member
|
|
7862
|
+
* (`'public'`) or takes it back to its creator (`'private'`). Creator only.
|
|
7863
|
+
* Fails with 409 when the target slot already holds a credential under
|
|
7864
|
+
* the same key (`public_cred_exists` / `private_cred_exists`).
|
|
7865
|
+
*/
|
|
7866
|
+
setVisibility(id: number, visibility: 'private' | 'public', options?: globalThis.RequestInit): Promise<UserCredSummary>;
|
|
7826
7867
|
delete(id: number, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
|
|
7827
7868
|
deleteByKey(key: string, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
|
|
7828
7869
|
/**
|
|
@@ -8923,4 +8964,4 @@ declare function buildTrustedClientPayload(params: {
|
|
|
8923
8964
|
workspaceId?: string;
|
|
8924
8965
|
}): TrustedClientPayload;
|
|
8925
8966
|
|
|
8926
|
-
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 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 CredWithPlaintext, type DeleteCredResponse, 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 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, orgRefToPathSegment };
|
|
8967
|
+
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 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 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 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, orgRefToPathSegment };
|
package/dist/index.mjs
CHANGED
|
@@ -3689,16 +3689,18 @@ var CredService = class extends BaseSDK {
|
|
|
3689
3689
|
// Share Operations
|
|
3690
3690
|
// ===========================================================================
|
|
3691
3691
|
/**
|
|
3692
|
-
* Shares one of the caller's own credentials
|
|
3692
|
+
* Shares one of the caller's own credentials into an organization
|
|
3693
3693
|
*
|
|
3694
3694
|
* The caller must own the credential and be a member of the target
|
|
3695
|
-
* organization. The credential stays owned by the caller
|
|
3696
|
-
*
|
|
3697
|
-
* `visibility: '
|
|
3698
|
-
*
|
|
3695
|
+
* organization. The credential stays owned by the caller and can be shared
|
|
3696
|
+
* into several organizations; sharing again into the same organization
|
|
3697
|
+
* changes that share's visibility. Defaults to `visibility: 'public'`
|
|
3698
|
+
* (every member can use it); `'private'` links it for the caller's own use
|
|
3699
|
+
* there, and `publish()` later opens it to every member. Requires
|
|
3700
|
+
* authentication.
|
|
3699
3701
|
*
|
|
3700
3702
|
* @param id - The credential ID to share
|
|
3701
|
-
* @param data - The target organization (and optional
|
|
3703
|
+
* @param data - The target organization (and optional visibility)
|
|
3702
3704
|
* @param options - Optional request options
|
|
3703
3705
|
* @returns Promise resolving to the updated credential
|
|
3704
3706
|
*/
|
|
@@ -3716,19 +3718,25 @@ var CredService = class extends BaseSDK {
|
|
|
3716
3718
|
return result;
|
|
3717
3719
|
}
|
|
3718
3720
|
/**
|
|
3719
|
-
* Publishes a
|
|
3721
|
+
* Publishes a privately shared credential to its organization
|
|
3720
3722
|
*
|
|
3721
3723
|
* Use after calling `share()` with `visibility: 'private'` to make the
|
|
3722
|
-
* credential
|
|
3724
|
+
* credential usable by every member of that organization. Owner-only.
|
|
3723
3725
|
* Requires authentication.
|
|
3724
3726
|
*
|
|
3725
3727
|
* @param id - The credential ID to publish
|
|
3726
3728
|
* @param options - Optional request options
|
|
3729
|
+
* @param target - Which share to publish (required once shared into several organizations).
|
|
3730
|
+
* Last so the published `publish(id, options)` signature keeps working.
|
|
3727
3731
|
* @returns Promise resolving to the updated credential
|
|
3728
3732
|
*/
|
|
3729
|
-
async publish(id, options) {
|
|
3730
|
-
log20("Publishing credential
|
|
3733
|
+
async publish(id, options, target = {}) {
|
|
3734
|
+
log20("Publishing credential %d (org=%s)", id, target.orgId);
|
|
3731
3735
|
const result = await this.request(`/v1/user/creds/${id}/publish`, {
|
|
3736
|
+
body: JSON.stringify(target),
|
|
3737
|
+
headers: {
|
|
3738
|
+
"Content-Type": "application/json"
|
|
3739
|
+
},
|
|
3732
3740
|
method: "POST",
|
|
3733
3741
|
...options
|
|
3734
3742
|
});
|
|
@@ -3736,19 +3744,24 @@ var CredService = class extends BaseSDK {
|
|
|
3736
3744
|
return result;
|
|
3737
3745
|
}
|
|
3738
3746
|
/**
|
|
3739
|
-
*
|
|
3747
|
+
* Removes a credential's share into one organization
|
|
3740
3748
|
*
|
|
3741
|
-
*
|
|
3742
|
-
*
|
|
3743
|
-
* to. Requires authentication.
|
|
3749
|
+
* Does not delete the credential. Callable by the credential's owner, or
|
|
3750
|
+
* by an admin of that organization. Requires authentication.
|
|
3744
3751
|
*
|
|
3745
3752
|
* @param id - The credential ID to unshare
|
|
3746
3753
|
* @param options - Optional request options
|
|
3754
|
+
* @param target - Which share to remove (required once shared into several organizations).
|
|
3755
|
+
* Last so the published `unshare(id, options)` signature keeps working.
|
|
3747
3756
|
* @returns Promise resolving to the updated credential
|
|
3748
3757
|
*/
|
|
3749
|
-
async unshare(id, options) {
|
|
3750
|
-
log20("Unsharing credential
|
|
3758
|
+
async unshare(id, options, target = {}) {
|
|
3759
|
+
log20("Unsharing credential %d (org=%s)", id, target.orgId);
|
|
3751
3760
|
const result = await this.request(`/v1/user/creds/${id}/unshare`, {
|
|
3761
|
+
body: JSON.stringify(target),
|
|
3762
|
+
headers: {
|
|
3763
|
+
"Content-Type": "application/json"
|
|
3764
|
+
},
|
|
3752
3765
|
method: "POST",
|
|
3753
3766
|
...options
|
|
3754
3767
|
});
|
|
@@ -5712,11 +5725,12 @@ var OrganizationCredsService = class extends BaseSDK {
|
|
|
5712
5725
|
// Read
|
|
5713
5726
|
// ===========================================================================
|
|
5714
5727
|
/**
|
|
5715
|
-
* Lists every credential
|
|
5716
|
-
*
|
|
5717
|
-
*
|
|
5718
|
-
*
|
|
5719
|
-
*
|
|
5728
|
+
* Lists every credential the caller can see in this organization: the
|
|
5729
|
+
* organization's shared credentials, the caller's own private ones, and
|
|
5730
|
+
* members' personal credentials shared in (published ones, plus the
|
|
5731
|
+
* caller's own private links). `visibility` is the credential's
|
|
5732
|
+
* visibility inside this organization; `ownerAccountId`/`ownerType`/
|
|
5733
|
+
* `ownerDisplayName`/`ownerNamespace` identify who it belongs to.
|
|
5720
5734
|
*/
|
|
5721
5735
|
async list(options) {
|
|
5722
5736
|
var _a;
|
|
@@ -5782,6 +5796,21 @@ var OrganizationCredsService = class extends BaseSDK {
|
|
|
5782
5796
|
...options
|
|
5783
5797
|
});
|
|
5784
5798
|
}
|
|
5799
|
+
/**
|
|
5800
|
+
* Publishes a private organization credential to every member
|
|
5801
|
+
* (`'public'`) or takes it back to its creator (`'private'`). Creator only.
|
|
5802
|
+
* Fails with 409 when the target slot already holds a credential under
|
|
5803
|
+
* the same key (`public_cred_exists` / `private_cred_exists`).
|
|
5804
|
+
*/
|
|
5805
|
+
async setVisibility(id, visibility, options) {
|
|
5806
|
+
log31("Setting org %s credential %d visibility=%s", this.orgSegment, id, visibility);
|
|
5807
|
+
return this.request(`${this.base()}/${id}/visibility`, {
|
|
5808
|
+
body: JSON.stringify({ visibility }),
|
|
5809
|
+
headers: { "Content-Type": "application/json" },
|
|
5810
|
+
method: "POST",
|
|
5811
|
+
...options
|
|
5812
|
+
});
|
|
5813
|
+
}
|
|
5785
5814
|
// ===========================================================================
|
|
5786
5815
|
// Delete
|
|
5787
5816
|
// ===========================================================================
|