mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
* create quest handler * Updating action schema and removing backend-only insert permissions * Better handle auth bearer token * Basic tests for creating quests * Check if player has > 100 pSEED to allow creating a quest * move quests actions into its own router * create quest completion * updateCompletion handler * update types * Improving handler input types * Improve types and logic * Removing types file and using autogenerated ones * Reject other submissions when accepting a unique quest completion * Fix linting errors * Fix CreateQuestCompletionInput maybe * error messages * Puttin pSEED contractnaddress in config file Co-authored-by: Hammad Jutt <jutt@ualberta.ca>
82 lines
1.3 KiB
GraphQL
82 lines
1.3 KiB
GraphQL
type Mutation {
|
|
createQuest (
|
|
quest: CreateQuestInput!
|
|
): CreateQuestOutput
|
|
}
|
|
|
|
|
|
type Mutation {
|
|
createQuestCompletion (
|
|
questCompletion: CreateQuestCompletionInput!
|
|
): CreateQuestCompletionOutput
|
|
}
|
|
|
|
|
|
type Mutation {
|
|
updateBoxProfile : UpdateBoxProfileResponse
|
|
}
|
|
|
|
|
|
type Mutation {
|
|
updateQuestCompletion (
|
|
updateData: UpdateQuestCompletionInput!
|
|
): UpdateQuestCompletionOutput
|
|
}
|
|
|
|
|
|
|
|
|
|
enum QuestRepetition_ActionEnum {
|
|
UNIQUE
|
|
PERSONAL
|
|
RECURRING
|
|
}
|
|
|
|
enum QuestCompletionStatus_ActionEnum {
|
|
ACCEPTED
|
|
REJECTED
|
|
}
|
|
|
|
input CreateQuestInput {
|
|
guild_id : uuid!
|
|
title : String!
|
|
description : String
|
|
external_link : String
|
|
repetition : QuestRepetition_ActionEnum
|
|
cooldown : Int
|
|
}
|
|
|
|
input CreateQuestCompletionInput {
|
|
quest_id : String!
|
|
submission_link : String
|
|
submission_text : String
|
|
}
|
|
|
|
input UpdateQuestCompletionInput {
|
|
quest_completion_id : String!
|
|
status : QuestCompletionStatus_ActionEnum!
|
|
}
|
|
|
|
type UpdateBoxProfileResponse {
|
|
success : Boolean!
|
|
updatedProfiles : [String!]!
|
|
}
|
|
|
|
type CreateQuestOutput {
|
|
success : Boolean!
|
|
quest_id : uuid
|
|
error : String
|
|
}
|
|
|
|
type CreateQuestCompletionOutput {
|
|
success : Boolean!
|
|
error : String
|
|
quest_completion_id : uuid
|
|
}
|
|
|
|
type UpdateQuestCompletionOutput {
|
|
success : Boolean!
|
|
error : String
|
|
}
|
|
|