Creates all (?) endpoints
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.HeaderParam;
|
||||
import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
@Path("/campaign")
|
||||
public class CampaignEndpoints {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(CampaignEndpoints.class);
|
||||
|
||||
@POST
|
||||
@Path("checkCampaignProgress")
|
||||
@Consumes("application/json")
|
||||
public void checkCampaignProgress(@HeaderParam("Authorization") final String authentication,
|
||||
final CheckCampaignRequest request) {
|
||||
logger.info("CheckCampaignProgress called by " + authentication + " : " + request);
|
||||
//TODO
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("debugAddNextChapter")
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
public void debugAddNextChapter(@HeaderParam("Authorization") final String authentication,
|
||||
final DebugAddNextChapterRequest request) {
|
||||
logger.info("DebugAddNextChapter called by " + authentication + " : " + request);
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("debugAddNextEvent")
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
public void debugAddNextEvent(@HeaderParam("Authorization") final String authentication,
|
||||
final DebugAddNextEventRequest request) {
|
||||
|
||||
logger.info("DebugAddNextEvent called by " + authentication + " : " + request);
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("setChapterDialogStatus")
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
public SetChapterDialogResult setChapterDialogStatus(@HeaderParam("Authorization") final String authentication,
|
||||
final SetChapterDialogStatusRequest request) {
|
||||
logger.info("SetChapterDialogStatus called by " + authentication + " : " + request);
|
||||
//TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("setChapterEventChoice")
|
||||
@Consumes("application/json")
|
||||
@Produces("application/json")
|
||||
public SetChapterEventResult setChapterEventChoice(@HeaderParam("Authorization") final String authentication,
|
||||
final SetChapterEventChoiceRequest request) {
|
||||
logger.info("SetChapterEventChoice called by " + authentication + " : " + request);
|
||||
//TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("list")
|
||||
@Produces("application/json")
|
||||
public ListCampaignsResponse getList(@HeaderParam("Authorization") final String authentication) {
|
||||
logger.info("List called by " + authentication);
|
||||
//TODO
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record CheckCampaignRequest(int campaignId, boolean isMastery) {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record DebugAddNextChapterRequest(int campaignId, int actId, boolean isMastery) {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record DebugAddNextEventRequest(int campaignId, int actId, int chapterId, boolean isMastery) {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public enum DialogModalType {
|
||||
None,
|
||||
Intro,
|
||||
Ending,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record ListCampaignsResponse(UserCampaignData campaignDatas) {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import ch.gtache.elderscrollslegends.service.reward.RewardDescription;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record SetChapterDialogResult(List<RewardDescription> rewards) {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record SetChapterDialogStatusRequest(int campaignId, int actId, int chapterId, int cinematicId,
|
||||
boolean isMastery, DialogModalType modalType, boolean seen) {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record SetChapterEventChoiceRequest(int campaignId, int actId, int chapterId, int cinematicId,
|
||||
boolean isMastery, DialogModalType modalType, UserCampaignChoice choiceType) {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import ch.gtache.elderscrollslegends.service.reward.RewardDescription;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record SetChapterEventResult(List<RewardDescription> rewards) {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record UserActData(int actId, boolean isMastery, List<UserChapterData> chapterData) {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public enum UserCampaignChoice {
|
||||
None,
|
||||
First,
|
||||
Second,
|
||||
Third,
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record UserCampaignData(int campaignId, boolean isActive, int lastPlayedActIndex, int lastPlayedChapterIndex,
|
||||
int lastPlayedChapterEventINdex, List<UserActData> actData, List<Integer> ownedActs) {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public record UserChapterData(int chapterId, boolean isComplete, boolean hasIntroBeenShown,
|
||||
boolean hasEndingBeenShown, List<UserChapterEventData> chapterEventData,
|
||||
UserCampaignChoice introChoice, UserCampaignChoice endingChoice,
|
||||
List<Integer> chapterSeenCinematicTypeHashes) {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record UserChapterEventData(int chapterEventId, int chapterId, boolean isComplete,
|
||||
UserCampaignChoice introChoice,
|
||||
UserCampaignChoice endingChoice) {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package ch.gtache.elderscrollslegends.service.campaign;
|
||||
|
||||
public record UserDialogModalData(DialogModalType modalType, int choiceIndex) {
|
||||
}
|
||||
Reference in New Issue
Block a user