feat(server): add project sharing access control
This commit is contained in:
@@ -357,6 +357,11 @@ type DeleteProjectsResponse struct {
|
||||
Deleted int64 `json:"deleted"`
|
||||
}
|
||||
|
||||
type DeleteShareMemberRequest struct {
|
||||
Id string `path:"id"`
|
||||
MemberId string `path:"memberId"`
|
||||
}
|
||||
|
||||
type ExtractNodeTextAsyncRequest struct {
|
||||
Id string `path:"id"`
|
||||
NodeId string `path:"nodeId"`
|
||||
@@ -536,6 +541,12 @@ type InspirationItem struct {
|
||||
Accent string `json:"accent"`
|
||||
}
|
||||
|
||||
type InviteShareMemberRequest struct {
|
||||
Id string `path:"id"`
|
||||
Identifier string `json:"identifier"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type LovartAgentThreadListData struct {
|
||||
Page int64 `json:"page"`
|
||||
Total int64 `json:"total"`
|
||||
@@ -796,6 +807,18 @@ type RecognizeObjectResponse struct {
|
||||
BBox NormalizedBox `json:"bbox"`
|
||||
}
|
||||
|
||||
type ResolveShareRequest struct {
|
||||
ShareId string `path:"shareId"`
|
||||
VisitorId string `header:"X-Share-Visitor,optional"`
|
||||
}
|
||||
|
||||
type ResolveShareResponse struct {
|
||||
ShareId string `json:"shareId"`
|
||||
Project Project `json:"project"`
|
||||
Access ShareAccess `json:"access"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
}
|
||||
|
||||
type SaveCanvasRequest struct {
|
||||
Id string `path:"id"`
|
||||
Version string `json:"version,optional"`
|
||||
@@ -840,6 +863,63 @@ type SaveProjectResponse struct {
|
||||
Data SaveProjectData `json:"data"`
|
||||
}
|
||||
|
||||
type ShareAccess struct {
|
||||
Permission string `json:"permission"`
|
||||
Source string `json:"source"`
|
||||
Authenticated bool `json:"authenticated"`
|
||||
IsOwner bool `json:"isOwner"`
|
||||
Capabilities ShareCapabilities `json:"capabilities"`
|
||||
}
|
||||
|
||||
type ShareCapabilities struct {
|
||||
CanViewCanvas bool `json:"canViewCanvas"`
|
||||
CanViewChat bool `json:"canViewChat"`
|
||||
CanEdit bool `json:"canEdit"`
|
||||
CanManage bool `json:"canManage"`
|
||||
}
|
||||
|
||||
type SharePerson struct {
|
||||
Id string `json:"id"`
|
||||
UserId string `json:"userId,optional"`
|
||||
Name string `json:"name,optional"`
|
||||
Identifier string `json:"identifier,optional"`
|
||||
AvatarUrl string `json:"avatarUrl,optional"`
|
||||
Permission string `json:"permission"`
|
||||
CreatedAt string `json:"createdAt,optional"`
|
||||
}
|
||||
|
||||
type ShareSettings struct {
|
||||
ProjectId string `json:"projectId"`
|
||||
ShareId string `json:"shareId,optional"`
|
||||
LinkPermission string `json:"linkPermission"`
|
||||
Owner SharePerson `json:"owner"`
|
||||
Members []SharePerson `json:"members"`
|
||||
VisitorCount int64 `json:"visitorCount"`
|
||||
UpdatedAt string `json:"updatedAt,optional"`
|
||||
}
|
||||
|
||||
type ShareSettingsRequest struct {
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
type ShareSettingsResponse struct {
|
||||
Settings ShareSettings `json:"settings"`
|
||||
}
|
||||
|
||||
type ShareVisitor struct {
|
||||
Id string `json:"id"`
|
||||
UserId string `json:"userId,optional"`
|
||||
Name string `json:"name"`
|
||||
Identifier string `json:"identifier,optional"`
|
||||
AvatarUrl string `json:"avatarUrl,optional"`
|
||||
VisitCount int64 `json:"visitCount"`
|
||||
LastSeenAt string `json:"lastSeenAt"`
|
||||
}
|
||||
|
||||
type ShareVisitorsResponse struct {
|
||||
Visitors []ShareVisitor `json:"visitors"`
|
||||
}
|
||||
|
||||
type StopAgentTaskRequest struct {
|
||||
Id string `path:"id"`
|
||||
ThreadId string `json:"threadId,optional"`
|
||||
@@ -855,6 +935,17 @@ type UpdateProjectTitleRequest struct {
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
type UpdateShareLinkRequest struct {
|
||||
Id string `path:"id"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type UpdateShareMemberRequest struct {
|
||||
Id string `path:"id"`
|
||||
MemberId string `path:"memberId"`
|
||||
Permission string `json:"permission"`
|
||||
}
|
||||
|
||||
type WechatAuthURLResponse struct {
|
||||
AuthUrl string `json:"authUrl"`
|
||||
State string `json:"state"`
|
||||
|
||||
Reference in New Issue
Block a user