From ee8dec45961ea66e35cdc4bc39ebbb6fa434505e Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 18 Nov 2024 10:47:00 +0000 Subject: [PATCH] Updated types --- .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ .../types/callbacks/GameCallbacks.d.ts | 14 +++++++- .../types/controllers/GameController.d.ts | 2 ++ .../helpers/Dialogue/SptDialogueChatBot.d.ts | 4 ++- .../eft/game/ISendSurveyOpinionRequest.d.ts | 9 +++++ .../models/eft/game/ISurveyResponseData.d.ts | 35 +++++++++++++++++++ .../types/models/spt/config/ICoreConfig.d.ts | 2 ++ 168 files changed, 1792 insertions(+), 56 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/24WebSocket/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/24WebSocket/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/ISurveyResponseData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/ISendSurveyOpinionRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/ISurveyResponseData.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/GameCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/13AddTrader/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/13AddTrader/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/13AddTrader/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/13AddTrader/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/GameCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/18CustomItemService/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/1LogToConsole/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/24WebSocket/types/controllers/GameController.d.ts b/TypeScript/24WebSocket/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/24WebSocket/types/controllers/GameController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/24WebSocket/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/24WebSocket/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/24WebSocket/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/24WebSocket/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/2EditDatabase/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string; diff --git a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts index e34bc41..fc866ce 100644 --- a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts @@ -13,7 +13,9 @@ import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; +import { ISendSurveyOpinionRequest } from "@spt/models/eft/game/ISendSurveyOpinionRequest"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IVersionValidateRequestData } from "@spt/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; @@ -90,5 +92,15 @@ export declare class GameCallbacks implements OnLoad { * Handle /client/survey * @returns INullResponseData */ - getSurvey(url: string, request: IEmptyRequestData, sessionID: string): INullResponseData; + getSurvey(url: string, request: IEmptyRequestData, sessionId: string): INullResponseData | IGetBodyResponseData; + /** + * Handle client/survey/view + * @returns INullResponseData + */ + getSurveyView(url: string, request: any, sessionId: string): INullResponseData; + /** + * Handle client/survey/opinion + * @returns INullResponseData + */ + sendSurveyOpinion(url: string, request: ISendSurveyOpinionRequest, sessionId: string): INullResponseData; } diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index cb9644a..2717c3f 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -14,6 +14,7 @@ import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData" import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt/models/eft/game/IServerDetails"; +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -132,4 +133,5 @@ export declare class GameController { */ protected checkForAndRemoveUndefinedDialogs(fullProfile: ISptProfile): void; protected logProfileDetails(fullProfile: ISptProfile): void; + getSurvey(sessionId: string): ISurveyResponseData; } diff --git a/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts b/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts index 759ebf1..d2bf5c5 100644 --- a/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/Dialogue/SptDialogueChatBot.d.ts @@ -6,6 +6,7 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { GiftService } from "@spt/services/GiftService"; +import { LocalisationService } from "@spt/services/LocalisationService"; import { MailSendService } from "@spt/services/MailSendService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; import { RandomUtil } from "@spt/utils/RandomUtil"; @@ -14,11 +15,12 @@ export declare class SptDialogueChatBot implements IDialogueChatBot { protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected seasonalEventService: SeasonalEventService; + protected localisationService: LocalisationService; protected giftService: GiftService; protected configServer: ConfigServer; protected coreConfig: ICoreConfig; protected weatherConfig: IWeatherConfig; - constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, giftService: GiftService, configServer: ConfigServer); + constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, giftService: GiftService, configServer: ConfigServer); getChatBot(): IUserDialogInfo; /** * Send responses back to player when they communicate with SPT friend on friends list diff --git a/TypeScript/9RouterHooks/types/models/eft/game/ISendSurveyOpinionRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/ISendSurveyOpinionRequest.d.ts new file mode 100644 index 0000000..70683e8 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/ISendSurveyOpinionRequest.d.ts @@ -0,0 +1,9 @@ +export interface ISendSurveyOpinionRequest { + surveyId: number; + answers: ISurveyOpinionAnswer[]; +} +export interface ISurveyOpinionAnswer { + questionId: number; + answerType: string; + answers: any; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/game/ISurveyResponseData.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/ISurveyResponseData.d.ts new file mode 100644 index 0000000..7de9f50 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/ISurveyResponseData.d.ts @@ -0,0 +1,35 @@ +export interface ISurveyResponseData { + locale: Record>; + survey: ISurvey; +} +export interface ISurvey { + id: number; + welcomePageData: IWelcomePageData; + farewellPageData: IFarewellPageData; + pages: number[][]; + questions: ISurveyQuestion[]; + isNew: boolean; +} +export interface IWelcomePageData { + titleLocaleKey: string; + timeLocaleKey: string; + descriptionLocaleKey: string; +} +export interface IFarewellPageData { + textLocaleKey: string; +} +export interface ISurveyQuestion { + id: number; + sortIndex: number; + titleLocaleKey: string; + hintLocaleKey: string; + answerLimit: number; + answerType: string; + answers: ISurveyAnswer[]; +} +export interface ISurveyAnswer { + id: number; + questionId: number; + sortIndex: number; + localeKey: string; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index 572d0b4..d35cc7d 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -1,3 +1,4 @@ +import { ISurveyResponseData } from "@spt/models/eft/game/ISurveyResponseData"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { kind: "spt-core"; @@ -11,6 +12,7 @@ export interface ICoreConfig extends IBaseConfig { bsgLogging: IBsgLogging; release: IRelease; fixes: IGameFixes; + survey: ISurveyResponseData; features: IServerFeatures; /** Commit hash build server was created from */ commit?: string;