Creates all (?) endpoints

This commit is contained in:
Guillaume Tâche
2025-04-21 22:10:24 +02:00
commit 8a05f63687
263 changed files with 4821 additions and 0 deletions

View File

@@ -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;
}
}

View File

@@ -0,0 +1,4 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record CheckCampaignRequest(int campaignId, boolean isMastery) {
}

View File

@@ -0,0 +1,4 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record DebugAddNextChapterRequest(int campaignId, int actId, boolean isMastery) {
}

View File

@@ -0,0 +1,4 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record DebugAddNextEventRequest(int campaignId, int actId, int chapterId, boolean isMastery) {
}

View File

@@ -0,0 +1,7 @@
package ch.gtache.elderscrollslegends.service.campaign;
public enum DialogModalType {
None,
Intro,
Ending,
}

View File

@@ -0,0 +1,4 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record ListCampaignsResponse(UserCampaignData campaignDatas) {
}

View File

@@ -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) {
}

View File

@@ -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) {
}

View File

@@ -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) {
}

View File

@@ -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) {
}

View File

@@ -0,0 +1,6 @@
package ch.gtache.elderscrollslegends.service.campaign;
import java.util.List;
public record UserActData(int actId, boolean isMastery, List<UserChapterData> chapterData) {
}

View File

@@ -0,0 +1,8 @@
package ch.gtache.elderscrollslegends.service.campaign;
public enum UserCampaignChoice {
None,
First,
Second,
Third,
}

View File

@@ -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) {
}

View File

@@ -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) {
}

View File

@@ -0,0 +1,6 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record UserChapterEventData(int chapterEventId, int chapterId, boolean isComplete,
UserCampaignChoice introChoice,
UserCampaignChoice endingChoice) {
}

View File

@@ -0,0 +1,4 @@
package ch.gtache.elderscrollslegends.service.campaign;
public record UserDialogModalData(DialogModalType modalType, int choiceIndex) {
}