Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { DefinitionTypeEnum } from '../engine/Definition';
|
||||
export var ApiTypeEnum;
|
||||
(function (ApiTypeEnum) {
|
||||
ApiTypeEnum["GAME_DATA_SERVICE"] = "GAME_DATA_SERVICE";
|
||||
ApiTypeEnum["CHARACTER_SERVICE"] = "CHARACTER_SERVICE";
|
||||
ApiTypeEnum["WEBSITE"] = "WEBSITE";
|
||||
ApiTypeEnum["HACK__CHARACTER_SERVICE_GAME_DATA"] = "HACK__CHARACTER_SERVICE_GAME_DATA";
|
||||
})(ApiTypeEnum || (ApiTypeEnum = {}));
|
||||
export const DEFINITION_SERVICE_VERSIONS = {
|
||||
[DefinitionTypeEnum.INFUSION]: 1,
|
||||
[DefinitionTypeEnum.VEHICLE]: 4,
|
||||
};
|
||||
export const CHARACTER_SERVICE_VERSION_KEY = 'v5';
|
||||
export const CHARACTER_SERVICE_VERSION_KEY_OVERRIDE = 'v5.1';
|
||||
@@ -0,0 +1,29 @@
|
||||
import { CampaignAccessors } from '../engine/Campaign';
|
||||
import { ContentSharingSettingEnum } from '../engine/Core';
|
||||
import { CHARACTER_SERVICE_VERSION_KEY } from './constants';
|
||||
/**
|
||||
*
|
||||
* @param apiPath
|
||||
*/
|
||||
export function generateCharacterServiceApiPath(apiPath, apiVersionOverride) {
|
||||
return ['character', apiVersionOverride !== null && apiVersionOverride !== void 0 ? apiVersionOverride : CHARACTER_SERVICE_VERSION_KEY, apiPath].join('/');
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param campaign
|
||||
*/
|
||||
export function generateRequiredGameDataServiceParams(campaign) {
|
||||
return {
|
||||
campaignId: campaign === null ? null : CampaignAccessors.getId(campaign),
|
||||
sharingSetting: ContentSharingSettingEnum.SCOPE_TO_INDIVIDUAL_CAMPAIGN,
|
||||
};
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param characterId
|
||||
*/
|
||||
export function generateRequiredCharacterServiceParams(characterId) {
|
||||
return {
|
||||
characterId,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as ApiAdapterUtils from '../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from './constants';
|
||||
import { getGameDataDefinitionTypeBasePath } from './utils';
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
* @param config
|
||||
*/
|
||||
export function hack__characterServiceMakeGetIdsDefinitionTypeRequest(definitionType, config) {
|
||||
let apiPath = ['game-data', getGameDataDefinitionTypeBasePath(definitionType), 'collection'].join('/');
|
||||
return ApiAdapterUtils.makePost(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, apiPath, config);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
*
|
||||
* @param level
|
||||
*/
|
||||
export function getSpellLevelPactMagicRequestsDataKey(level) {
|
||||
switch (level) {
|
||||
case 1:
|
||||
return 'level1';
|
||||
case 2:
|
||||
return 'level2';
|
||||
case 3:
|
||||
return 'level3';
|
||||
case 4:
|
||||
return 'level4';
|
||||
case 5:
|
||||
return 'level5';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param level
|
||||
*/
|
||||
export function getSpellLevelSpellSlotRequestsDataKey(level) {
|
||||
switch (level) {
|
||||
case 1:
|
||||
return 'level1';
|
||||
case 2:
|
||||
return 'level2';
|
||||
case 3:
|
||||
return 'level3';
|
||||
case 4:
|
||||
return 'level4';
|
||||
case 5:
|
||||
return 'level5';
|
||||
case 6:
|
||||
return 'level6';
|
||||
case 7:
|
||||
return 'level7';
|
||||
case 8:
|
||||
return 'level8';
|
||||
case 9:
|
||||
return 'level9';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterActionLimitedUse = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'action/limited-use');
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterBackground = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'background');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterBackgroundChoice = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'background/choice');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomBackground = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/background');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterConfigurationHasCustomBackground = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'configuration/has-custom-background');
|
||||
@@ -0,0 +1,20 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterBuilderStandardBuild = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'builder/standard-build', {
|
||||
removeDefaultParams: true,
|
||||
});
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterBuilderRandomBuild = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'builder/random-build', {
|
||||
removeDefaultParams: true,
|
||||
});
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterBuilderQuickBuild = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'builder/quick-build', {
|
||||
removeDefaultParams: true,
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
export const getPartyInventory = ApiAdapterUtils.makeInterpolatedGet(ApiTypeEnum.CHARACTER_SERVICE, 'party/inventory/{campaignId}', { removeDefaultParams: true });
|
||||
// This response should have the sharing state on it
|
||||
// shareStatus = `ON` (fully working, paid) `OFF` (should not be on) `DELETE_ONLY` (turned off, but still has things. Can claim or move out of campaign or delete, no adding more to the container)
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
* Get data for single campaign setting
|
||||
*/
|
||||
export const getCampaignSetting = ApiAdapterUtils.makeInterpolatedGet(ApiTypeEnum.GAME_DATA_SERVICE, 'campaign-settings/v1/campaign-settings/{id}');
|
||||
/**
|
||||
* Get data for all campaign settings
|
||||
*/
|
||||
export const getAllCampaignSettings = ApiAdapterUtils.makeGet(ApiTypeEnum.GAME_DATA_SERVICE, 'campaign-settings/v1/campaign-settings');
|
||||
/**
|
||||
* Update campaign setting on character
|
||||
*/
|
||||
export const putCharacterCampaignSetting = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'campaign-setting');
|
||||
@@ -0,0 +1,47 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterAbilityScore = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/ability-score');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterAbilityScoreType = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/ability-score/type');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterHelpText = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/help-text');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterRestShort = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'character/rest/short');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterRestShort = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'character/rest/short');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterRestLong = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'character/rest/long');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterRestLong = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'character/rest/long');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterProgression = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/progression');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterPreferences = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/preferences');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterSourceCategories = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/source-categories');
|
||||
export const putCharacterSources = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, `campaign-setting`);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInspiration = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'character/inspiration');
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterClass = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'class');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterClass = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'class');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterClassLevel = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'class/level');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterClassFeatureChoice = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'class/feature/choice');
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCondition = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'condition');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCondition = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'condition');
|
||||
@@ -0,0 +1,22 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCreature = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'creature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCreature = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'creature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCreature = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'creature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCreatureStatus = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'creature/status');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCreatureHp = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'creature/hp');
|
||||
@@ -0,0 +1,98 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum, CHARACTER_SERVICE_VERSION_KEY_OVERRIDE } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomValue = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/value');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomValue = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/value');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomEntityValues = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/entity/values');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomProficiency = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/proficiency');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomProficiency = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/proficiency');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomProficiency = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/proficiency');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomMovement = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/movement');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomMovement = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/movement');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomMovement = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/movement');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomAction = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/action');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomAction = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/action');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomAction = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/action');
|
||||
/**
|
||||
* TODO v5.1: Remove this and usages when mobile moves up
|
||||
*/
|
||||
export const postCharacterCustomItemV5 = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item');
|
||||
/**
|
||||
* TODO v5.1: Remove this and usages when mobile moves up
|
||||
*/
|
||||
export const deleteCharacterCustomItemV5 = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item');
|
||||
/**
|
||||
* TODO v5.1: Remove this and usages when mobile moves up
|
||||
*/
|
||||
export const putCharacterCustomItemV5 = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomItem = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item', undefined, CHARACTER_SERVICE_VERSION_KEY_OVERRIDE);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomItem = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item', undefined, CHARACTER_SERVICE_VERSION_KEY_OVERRIDE);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomItem = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/item', undefined, CHARACTER_SERVICE_VERSION_KEY_OVERRIDE);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomSense = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/sense');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomSense = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/sense');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomSense = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/sense');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterCustomDefenseAdjustment = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'custom/defense-adjustment');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterCustomDefenseAdjustment = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'custom/defense-adjustment');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterCustomDefenseAdjustment = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'custom/defense-adjustment');
|
||||
@@ -0,0 +1,26 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDecorationBackdrop = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/backdrop');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDecorationFrame = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/frame');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDecorationPortrait = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/portrait');
|
||||
/**
|
||||
* user uploaded portrait file
|
||||
*/
|
||||
export const postCharacterDecorationPortraitCustom = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/portrait/custom');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDecorationThemeColor = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/theme-color');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDecorationSocialImage = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'decoration/social-image');
|
||||
@@ -0,0 +1,54 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionAge = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/age');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionAlignment = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/alignment');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionEyes = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/eyes');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionFaith = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/faith');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionGender = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/gender');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionHair = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/hair');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionHeight = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/height');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionLifestyle = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/lifestyle');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionName = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/name');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionNotes = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/notes');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionSkin = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/skin');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionTraits = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/traits');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterDescriptionWeight = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'description/weight');
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
export const putCharacterFeatChoice = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'feat/choice');
|
||||
export const postCharacterFeatAdHoc = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'feat/ad-hoc');
|
||||
export const deleteCharacterFeatAdHoc = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'feat/ad-hoc');
|
||||
export const postEntityFeat = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'feat/from-entity');
|
||||
@@ -0,0 +1,30 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterInfusionItems = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'infusion/items');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterInfusion = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'infusion/item');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterInfusion = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'infusion/item');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterKnownInfusions = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'known-infusions');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterKnownInfusion = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'known-infusion');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterKnownInfusion = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'known-infusion');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterKnownInfusion = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'known-infusion');
|
||||
@@ -0,0 +1,66 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryItemQuantity = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item/quantity');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryItemAttuned = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item/attuned');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryItemCharge = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item/charge');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryItemEquipped = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item/equipped');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryItemMove = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item/move');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterInventoryItem = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterInventoryItem = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/item');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryStartingType = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/starting-type');
|
||||
/**
|
||||
* CURRENCY
|
||||
* TODO: Beyond Bits
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrency = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencyTransaction = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/transaction');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencyCopper = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/copper');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencyElectrum = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/electrum');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencyGold = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/gold');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencyPlatinum = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/platinum');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterInventoryCurrencySilver = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'inventory/currency/silver');
|
||||
@@ -0,0 +1,26 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeRestore = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/restore');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeHpBase = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/hp/base');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeHpBonus = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/hp/bonus');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeHpOverride = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/hp/override');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeHpDamageTaken = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/hp/damage-taken');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterLifeDeathSaves = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'life/death-saves');
|
||||
@@ -0,0 +1,34 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterOptionalFeatureClassFeature = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/class-feature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterOptionalFeatureClassFeature = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/class-feature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterOptionalFeatureClassFeature = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/class-feature');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterOptionalFeatureClassFeatureCollection = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/class-feature/collection');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterOptionalFeatureOrigin = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/racial-trait');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterOptionalFeatureOrigin = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/racial-trait');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterOptionalFeatureOrigin = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/racial-trait');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterOptionalFeatureOriginCollection = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'optional-feature/racial-trait/collection');
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterPdf = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'pdf');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterPdf = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'pdf');
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
export const getPremadeInfo = ApiAdapterUtils.makeInterpolatedGet(ApiTypeEnum.CHARACTER_SERVICE, 'premade/{characterId}', {
|
||||
removeDefaultParams: true,
|
||||
});
|
||||
export const addPremadeInfo = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'premade');
|
||||
export const setPremadeInfo = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'premade');
|
||||
export const deletePremadeInfo = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'premade');
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterRace = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'race');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterRaceRacialTraitChoice = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'race/trait/choice');
|
||||
@@ -0,0 +1,30 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterRollResultGroups = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-groups');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterRollResultGroup = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-group');
|
||||
/**
|
||||
* PUT - UpdateRollResult(characterId, rollKey, nextRollKey, rollTotal, assignedValue, rollValues, groupKey, componentKey) - /character/v4/roll-result
|
||||
*/
|
||||
export const putCharacterRollResult = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterRollResultGroup = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-group');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterRollResultGroupOrder = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-group/order');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterRollResultGroup = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-group');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterRollResultGroups = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'roll-result-groups');
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterRuleData = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'rule-data', { removeDefaultParams: true });
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterShareUrl = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'share/url');
|
||||
@@ -0,0 +1,26 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterSpell = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'spell');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterSpell = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'spell');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterSpellPrepared = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'spell/prepared');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterSpellSlots = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'spell/slots');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterSpellPactMagic = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'spell/pact-magic');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterSpellRemoveBySpellListIds = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'spell/remove-by-spell-list-ids');
|
||||
@@ -0,0 +1,50 @@
|
||||
import * as ApiAdapterUtils from '../../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterVehicles = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'vehicles');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterVehicle = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterVehicle = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterVehicle = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterVehicleFuel = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/fuel');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterVehicleCondition = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/condition');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterVehicleCondition = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/condition');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const deleteCharacterVehicleCondition = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/condition');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getCharacterVehicleComponents = ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/components');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const postCharacterVehicleComponent = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/component');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterVehicleComponent = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/component');
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const putCharacterVehicleComponentHp = ApiAdapterUtils.makePut(ApiTypeEnum.CHARACTER_SERVICE, 'vehicle/component/hp');
|
||||
@@ -0,0 +1,6 @@
|
||||
import * as ApiAdapterUtils from '../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../constants';
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to a feature flag service
|
||||
*/
|
||||
export const getFeatureFlag = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'featureflag');
|
||||
@@ -0,0 +1,88 @@
|
||||
import * as ApiAdapterUtils from '../../../apiAdapter/utils';
|
||||
import { ApiTypeEnum } from '../../constants';
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const getGameDataRuleDataVehicle = ApiAdapterUtils.makeGet(ApiTypeEnum.GAME_DATA_SERVICE, 'vehicles/v3/rule-data');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterNameRandom = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'name/random');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getSuggestedNames = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'name/random/list');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataBackgrounds = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/backgrounds');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataBackdrops = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/backdrops');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataFeats = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/feats');
|
||||
// /features/v1/features/collection?category=blessing
|
||||
export const getCharacterGameDataFeatures = ApiAdapterUtils.makeGet(ApiTypeEnum.GAME_DATA_SERVICE, 'features/v1/features/collection');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataFrames = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/frames');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataPortraits = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/portraits');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataSubclasses = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/subclasses');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataThemeColors = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/themes');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataClasses = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/classes');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataSpells = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/spells');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataAlwaysKnownSpells = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/always-known-spells');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataAlwaysPreparedSpells = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/always-prepared-spells');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataRaces = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/races');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataBackgroundStartingEquipment = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/background-starting-equipment');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataClassStartingEquipment = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/class-starting-equipment');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataItems = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/items', undefined, 'v5.1');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataMonsters = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/monsters');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataRacialTraits = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/racial-trait/collection');
|
||||
/**
|
||||
* This is a temporary character service endpoint and will eventually be moved to the game data service
|
||||
*/
|
||||
export const getCharacterGameDataClassFeatures = ApiAdapterUtils.makeGet(ApiTypeEnum.HACK__CHARACTER_SERVICE_GAME_DATA, 'game-data/class-feature/collection');
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ApiTypeEnum } from "../../constants";
|
||||
import * as ApiAdapterUtils from '../../../apiAdapter/utils';
|
||||
export const getCharacterFeatures = ApiAdapterUtils.makeInterpolatedGet(ApiTypeEnum.CHARACTER_SERVICE, 'features/{characterId}', { removeDefaultParams: true });
|
||||
export const postCharacterFeature = ApiAdapterUtils.makePost(ApiTypeEnum.CHARACTER_SERVICE, 'feature');
|
||||
export const deleteCharacterFeature = ApiAdapterUtils.makeDelete(ApiTypeEnum.CHARACTER_SERVICE, 'feature');
|
||||
export const postFeaturesAndSubfeatures = ApiAdapterUtils.makePost(ApiTypeEnum.GAME_DATA_SERVICE, 'features/v1/features/collection');
|
||||
@@ -0,0 +1,101 @@
|
||||
import * as ApiAdapterUtils from '../apiAdapter/utils';
|
||||
import { ConfigUtils } from '../config';
|
||||
import { DefinitionTypeEnum } from '../engine/Definition';
|
||||
import { HelperUtils } from '../engine/Helper';
|
||||
import { ApiTypeEnum, DEFINITION_SERVICE_VERSIONS } from './constants';
|
||||
/**
|
||||
*
|
||||
* @param url
|
||||
* @param id
|
||||
*/
|
||||
export function makeGetIdUrl(url, id) {
|
||||
return url.replace('{id}', id);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
*/
|
||||
export function getGameDataDefinitionTypeBasePath(definitionType) {
|
||||
let basePath = '';
|
||||
switch (definitionType) {
|
||||
case DefinitionTypeEnum.VEHICLE:
|
||||
basePath = 'vehicle';
|
||||
break;
|
||||
case DefinitionTypeEnum.INFUSION:
|
||||
basePath = 'infusion';
|
||||
break;
|
||||
case DefinitionTypeEnum.RACIAL_TRAIT:
|
||||
basePath = 'racial-trait';
|
||||
break;
|
||||
case DefinitionTypeEnum.CLASS_FEATURE:
|
||||
basePath = 'class-feature';
|
||||
break;
|
||||
default:
|
||||
// not implemented
|
||||
}
|
||||
return basePath;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
*/
|
||||
export function getGameDataDefinitionTypeVersion(definitionType) {
|
||||
let version = HelperUtils.lookupDataOrFallback(DEFINITION_SERVICE_VERSIONS, definitionType, -1);
|
||||
return `v${version}`;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
* @param config
|
||||
*/
|
||||
export function makeGetAllDefinitionTypeRequest(definitionType, config) {
|
||||
let apiPath = [
|
||||
getGameDataDefinitionTypeBasePath(definitionType),
|
||||
getGameDataDefinitionTypeVersion(definitionType),
|
||||
'collection',
|
||||
].join('/');
|
||||
return ApiAdapterUtils.makeGet(ApiTypeEnum.GAME_DATA_SERVICE, apiPath, config);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
* @param id
|
||||
*/
|
||||
export function makeGetDefinitionTypeRequest(definitionType, id) {
|
||||
let apiPath = [
|
||||
getGameDataDefinitionTypeBasePath(definitionType),
|
||||
getGameDataDefinitionTypeVersion(definitionType),
|
||||
'{id}',
|
||||
].join('/');
|
||||
return ApiAdapterUtils.makeGet(ApiTypeEnum.GAME_DATA_SERVICE, makeGetIdUrl(apiPath, id));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param definitionType
|
||||
* @param config
|
||||
*/
|
||||
export function makeGetIdsDefinitionTypeRequest(definitionType, config) {
|
||||
let apiPath = [
|
||||
getGameDataDefinitionTypeBasePath(definitionType),
|
||||
getGameDataDefinitionTypeVersion(definitionType),
|
||||
'collection',
|
||||
].join('/');
|
||||
return ApiAdapterUtils.makePost(ApiTypeEnum.GAME_DATA_SERVICE, apiPath, config);
|
||||
}
|
||||
/**
|
||||
* TODO consider makeInterpolatedGet for gets with params
|
||||
* TODO support character/v3/characters/full/{userId}
|
||||
* TODO support character/v3/characters/short/{userId}
|
||||
* @param characterId
|
||||
*/
|
||||
export function makeGetCharacterRequest(characterId) {
|
||||
//TODO v5.1: when mobile moves up to support customItems access if we can remove this
|
||||
const { includeCustomItems } = ConfigUtils.getCurrentRulesEngineConfig();
|
||||
let config = {
|
||||
removeDefaultParams: true,
|
||||
};
|
||||
if (includeCustomItems) {
|
||||
config = Object.assign(Object.assign({}, config), { params: { includeCustomItems } });
|
||||
}
|
||||
return ApiAdapterUtils.makeGet(ApiTypeEnum.CHARACTER_SERVICE, makeGetIdUrl('character/{id}', characterId.toString()), config);
|
||||
}
|
||||
Reference in New Issue
Block a user