feat(tenant/kol): let KOLs self-subscribe to their own published packages
Add /kol/manage/packages/:id/self-subscription POST/DELETE on the tenant side so a KOL can grant themselves access to their own published package without going through the marketplace approval flow. Reject self-subscribe through the marketplace with a clear error, expose owned_by_current_tenant on package responses, and surface a self_subscription block on KolPackage Response. The admin-web KOL workspace gets 订阅自己 / 取消订阅 entries with matching messaging in the marketplace detail view. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -449,6 +449,17 @@ export const kolManageApi = {
|
||||
{},
|
||||
);
|
||||
},
|
||||
selfSubscribePackage(id: number) {
|
||||
return apiClient.post<KolPackageSummary, Record<string, never>>(
|
||||
`/api/tenant/kol/manage/packages/${id}/self-subscription`,
|
||||
{},
|
||||
);
|
||||
},
|
||||
cancelSelfSubscription(id: number) {
|
||||
return apiClient.remove<KolPackageSummary>(
|
||||
`/api/tenant/kol/manage/packages/${id}/self-subscription`,
|
||||
);
|
||||
},
|
||||
deletePackage(id: number) {
|
||||
return apiClient.remove<null>(`/api/tenant/kol/manage/packages/${id}`);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user