ReferenceAPI ReferenceGroups
Edit Groups
Edit Groups.
Request
interface GroupsEditRequest {
action: 'edit'
resource: string
details: {
name: string | undefined
description: string | undefined
}
}Prop
Type
Response
interface GroupsEditResponse_success {
status: 'success'
error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
message?: string | undefined
details: {
gid: string
name: string
description: string | undefined
created_at: string
created_by: string
updated_at: string
updated_by: string
users: string[] | undefined
}
metadata: unknown
}Prop
Type
interface GroupsEditResponse_pending {
status: 'pending'
error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
message?: string | undefined
details: {
proposal_id: string
}
}Prop
Type
Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'
const response = await broadcastRequest<
typeof resourceSchema.shape.groups.shape.edit
>(
{
action: 'edit',
resource: '/groups/{id}',
details: {
// TODO: fill in required fields
},
},
blockstream,
)