Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metaprotocol labeling: mappings and protobufs #4987

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12,851 changes: 6,536 additions & 6,315 deletions distributor-node/src/services/networking/query-node/schema.graphql

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions metadata-protobuf/proto/WorkingGroups.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,91 @@ message ModeratePost {
required string rationale = 2;
}

message CreateTag {
// Name of new Tag, e.g : roadmap
required string name = 1;

// Description of new Tag, e.g : Roadmap covering the Joystream ecosystem
required string description = 2;

// Type of new Tag : e.g : roadmap
required string type = 3;

// Visibility of new Tag : e.g : true
required bool visibility = 4;
}

message UpdateTag {
// ID of tag
required string tag_id = 1;

// name of tag
optional string name = 2;

// Updated Description of Tag
optional string description = 3;

// Updated Type of Tag
optional string type = 4;

// Updated Visibility of Tag
optional bool visibility = 5;
}

message AssignTagsToThread {
// ID of tag
repeated string tag_ids = 1;

// ID of thread
required string thread_id = 2;
}

message UnassignTagsFromThread {
// ID of tag
repeated string tag_ids = 1;

// ID of thread
required string thread_id = 2;
}

message AssignTagsToProposal {
// ID of tag
repeated string tag_ids = 1;

// ID of proposal
required string proposal_id = 2;
}

message UnassignTagsFromProposal {
// ID of tag
repeated string tag_ids = 1;

// ID of proposal
required string proposal_id = 2;
}

message AllowTagToWorker {
// ID of worker
required uint64 worker_id = 1;
}

message DisallowTagToWorker {
// ID of worker
required uint64 worker_id = 1;
}

message RemarkMetadataAction {
oneof action {
ModeratePost moderate_post = 1;
VerifyValidator verify_validator = 2;
CreateTag create_tag = 3;
UpdateTag update_tag = 4;
AssignTagsToThread assign_tags_to_thread = 5;
UnassignTagsFromThread unassign_tags_from_thread = 6;
AssignTagsToProposal assign_tags_to_proposal = 7;
UnassignTagsFromProposal unassign_tags_from_proposal = 8;
AllowTagToWorker allow_tag_to_worker = 9;
DisallowTagToWorker disallow_tag_to_worker = 10;
}
}

Expand Down
2 changes: 1 addition & 1 deletion query-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Refactor of mappings for more better handling of error cases. [#4856](https://github.com/Joystream/joystream/pull/4856)
- Bug fix [#4855](https://github.com/Joystream/joystream/issues/4855)
- Add support for UpdateGlobalNftLimit proposal.
- Add support for UpdateGlobalNftLimit proposal.

### 1.6.0

Expand Down
8 changes: 8 additions & 0 deletions query-node/mappings/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,4 +434,12 @@ export enum MetaprotocolTxError {

// Channel errors
InvalidChannelRewardAccount = 'InvalidChannelRewardAccount',

// Tag errors
TagAlreadyExists = 'TagAlreadyExists',
TagIsNotLead = 'TagIsNotLead',
TagNotFound = 'TagNotFound',
TagPermNotAllowed = 'TagPermNotAllowed',
TagInvalidThreadId = 'TagInvalidThreadId',
TagInvalidProposalId = 'TagInvalidProposalId',
}