torn-client 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +25 -20
- package/dist/index.d.ts +25 -20
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -172,6 +172,12 @@ type AttackPlayerSimplified = {
|
|
|
172
172
|
faction_id: FactionId | null;
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
/** @category Models */
|
|
176
|
+
type AttacksFullResponse = {
|
|
177
|
+
attacks: AttackSimplified[];
|
|
178
|
+
_metadata: RequestMetadataWithLinks;
|
|
179
|
+
};
|
|
180
|
+
|
|
175
181
|
/** @category Models */
|
|
176
182
|
type AttackSimplified = {
|
|
177
183
|
id: AttackId;
|
|
@@ -185,6 +191,12 @@ type AttackSimplified = {
|
|
|
185
191
|
respect_loss: number;
|
|
186
192
|
};
|
|
187
193
|
|
|
194
|
+
/** @category Models */
|
|
195
|
+
type AttacksResponse = {
|
|
196
|
+
attacks: Attack[];
|
|
197
|
+
_metadata: RequestMetadataWithLinks;
|
|
198
|
+
};
|
|
199
|
+
|
|
188
200
|
/** @category Models */
|
|
189
201
|
type AwardCrimesVersionEnum = "v1" | "v2";
|
|
190
202
|
|
|
@@ -367,18 +379,6 @@ type FactionApplicationStatusEnum = "accepted" | "declined" | "withdrawn" | "act
|
|
|
367
379
|
/** @category Models */
|
|
368
380
|
type FactionAttackResult = "None" | "Attacked" | "Mugged" | "Hospitalized" | "Arrested" | "Looted" | "Lost" | "Stalemate" | "Assist" | "Escape" | "Timeout" | "Special" | "Bounty" | "Interrupted";
|
|
369
381
|
|
|
370
|
-
/** @category Models */
|
|
371
|
-
type FactionAttacksFullResponse = {
|
|
372
|
-
attacks: AttackSimplified[];
|
|
373
|
-
_metadata: RequestMetadataWithLinks;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
/** @category Models */
|
|
377
|
-
type FactionAttacksResponse = {
|
|
378
|
-
attacks: Attack[];
|
|
379
|
-
_metadata: RequestMetadataWithLinks;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
382
|
/** @category Models */
|
|
383
383
|
type FactionBalance = {
|
|
384
384
|
faction: {
|
|
@@ -927,7 +927,7 @@ type FactionRankedWarsCategoryEnum = "all" | "ongoing";
|
|
|
927
927
|
type FactionRankEnum = "Unranked" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond";
|
|
928
928
|
|
|
929
929
|
/** @category Models */
|
|
930
|
-
type FactionResponse = FactionHofResponse | FactionMembersResponse | FactionBasicResponse | FactionWarsResponse | FactionNewsResponse | RevivesResponse | FactionTerritoryWarsHistoryResponse |
|
|
930
|
+
type FactionResponse = FactionHofResponse | FactionMembersResponse | FactionBasicResponse | FactionWarsResponse | FactionNewsResponse | RevivesResponse | FactionTerritoryWarsHistoryResponse | AttacksResponse | FactionBalanceResponse | FactionRaidWarReportResponse | FactionTerritoriesOwnershipResponse | FactionPositionsResponse | RevivesFullResponse | AttacksFullResponse | FactionApplicationsResponse | FactionOngoingChainResponse | FactionChainsResponse | FactionChainReportResponse | FactionCrimesResponse | FactionCrimeResponse | FactionRaidsResponse | FactionWarfareResponse | FactionRankedWarReportResponse | FactionTerritoryWarReportResponse | FactionTerritoriesResponse | FactionUpgradesResponse | FactionStatsResponse | FactionContributorsResponse | FactionRacketsResponse | FactionRankedWarResponse | FactionLookupResponse | TimestampResponse;
|
|
931
931
|
|
|
932
932
|
/** @category Models */
|
|
933
933
|
type FactionSearch = {
|
|
@@ -4301,9 +4301,14 @@ type UserRaceCarDetails = RaceCar & {
|
|
|
4301
4301
|
parts: RaceCarUpgradeId[];
|
|
4302
4302
|
};
|
|
4303
4303
|
|
|
4304
|
+
/** @category Models */
|
|
4305
|
+
type UserRaceDetails = RacingRaceDetails & {
|
|
4306
|
+
skill_gain: unknown;
|
|
4307
|
+
};
|
|
4308
|
+
|
|
4304
4309
|
/** @category Models */
|
|
4305
4310
|
type UserRacesResponse = {
|
|
4306
|
-
races:
|
|
4311
|
+
races: UserRaceDetails[];
|
|
4307
4312
|
_metadata: RequestMetadataWithLinks;
|
|
4308
4313
|
};
|
|
4309
4314
|
|
|
@@ -4336,7 +4341,7 @@ type UserRefillsResponse = {
|
|
|
4336
4341
|
};
|
|
4337
4342
|
|
|
4338
4343
|
/** @category Models */
|
|
4339
|
-
type UserResponse = UserCrimesResponse | UserWeaponExpResponse | UserAmmoResponse | UserDiscordResponse | UserRacesResponse | UserEnlistedCarsResponse | UserForumPostsResponse | UserForumThreadsResponse | UserForumSubscribedThreadsResponse | UserForumFeedResponse | UserForumFriendsResponse | UserPropertyResponse | ReportsResponse | UserHofResponse | UserCalendarResponse | UserRacingRecordsResponse | UserEducationResponse | UserBountiesResponse | UserJobRanksResponse | UserPropertiesResponse | UserFactionBalanceResponse | UserBasicResponse | RevivesResponse | UserHonorsResponse | UserMedalsResponse | UserMeritsResponse | RevivesFullResponse | UserProfileResponse | UserJobResponse | UserFactionResponse | UserCompetitionResponse | UserIconsResponse | UserItemMarketResponse | UserListResponse | UserEquipmentResponse | UserMissionsResponse | UserPersonalStatsResponse | UserOrganizedCrimeResponse |
|
|
4344
|
+
type UserResponse = UserCrimesResponse | UserWeaponExpResponse | UserAmmoResponse | UserDiscordResponse | UserRacesResponse | UserEnlistedCarsResponse | UserForumPostsResponse | UserForumThreadsResponse | UserForumSubscribedThreadsResponse | UserForumFeedResponse | UserForumFriendsResponse | UserPropertyResponse | ReportsResponse | UserHofResponse | UserCalendarResponse | UserRacingRecordsResponse | UserEducationResponse | UserBountiesResponse | UserJobRanksResponse | UserPropertiesResponse | UserFactionBalanceResponse | UserBasicResponse | RevivesResponse | UserHonorsResponse | UserMedalsResponse | UserMeritsResponse | RevivesFullResponse | UserProfileResponse | UserJobResponse | UserFactionResponse | UserCompetitionResponse | UserIconsResponse | UserItemMarketResponse | UserListResponse | UserEquipmentResponse | UserMissionsResponse | UserPersonalStatsResponse | UserOrganizedCrimeResponse | AttacksResponse | UserBarsResponse | UserCooldownsResponse | UserNotificationsResponse | UserRefillsResponse | UserTravelResponse | UserVirusResponse | AttacksFullResponse | UserMoneyResponse | UserJobPointsResponse | UserWorkStatsResponse | UserSkillsResponse | UserBattleStatsResponse | UserNewEventsResponse | UserEventsResponse | UserMessagesResponse | UserNewMessagesResponse | UserLookupResponse | TimestampResponse;
|
|
4340
4345
|
|
|
4341
4346
|
/** @category Models */
|
|
4342
4347
|
type UserRoleEnum = "Admin" | "Officer" | "Moderator" | "Helper" | "Tester" | "NPC" | "Committee" | "Reporter" | "Wiki Contributor" | "Wiki Editor" | "Civilian";
|
|
@@ -4464,7 +4469,7 @@ declare class FactionEndpoint {
|
|
|
4464
4469
|
to?: number;
|
|
4465
4470
|
from?: number;
|
|
4466
4471
|
timestamp?: string;
|
|
4467
|
-
}): Promise<PaginatedResponse<
|
|
4472
|
+
}): Promise<PaginatedResponse<AttacksResponse> & AttacksResponse>;
|
|
4468
4473
|
/**
|
|
4469
4474
|
* Get your faction's simplified attacks
|
|
4470
4475
|
* @param params - Optional query parameters
|
|
@@ -4476,7 +4481,7 @@ declare class FactionEndpoint {
|
|
|
4476
4481
|
to?: number;
|
|
4477
4482
|
from?: number;
|
|
4478
4483
|
timestamp?: string;
|
|
4479
|
-
}): Promise<PaginatedResponse<
|
|
4484
|
+
}): Promise<PaginatedResponse<AttacksFullResponse> & AttacksFullResponse>;
|
|
4480
4485
|
/**
|
|
4481
4486
|
* Get your faction's & member's balance details
|
|
4482
4487
|
* @param params - Optional query parameters
|
|
@@ -5662,7 +5667,7 @@ declare class UserEndpoint {
|
|
|
5662
5667
|
to?: number;
|
|
5663
5668
|
from?: number;
|
|
5664
5669
|
timestamp?: string;
|
|
5665
|
-
}): Promise<PaginatedResponse<
|
|
5670
|
+
}): Promise<PaginatedResponse<AttacksResponse> & AttacksResponse>;
|
|
5666
5671
|
/**
|
|
5667
5672
|
* Get your simplified attacks
|
|
5668
5673
|
* @param params - Optional query parameters
|
|
@@ -5674,7 +5679,7 @@ declare class UserEndpoint {
|
|
|
5674
5679
|
to?: number;
|
|
5675
5680
|
from?: number;
|
|
5676
5681
|
timestamp?: string;
|
|
5677
|
-
}): Promise<PaginatedResponse<
|
|
5682
|
+
}): Promise<PaginatedResponse<AttacksFullResponse> & AttacksFullResponse>;
|
|
5678
5683
|
/**
|
|
5679
5684
|
* Get your bars information
|
|
5680
5685
|
* @param params - Optional query parameters
|
|
@@ -6409,4 +6414,4 @@ declare class TornRateLimitError extends Error {
|
|
|
6409
6414
|
constructor(message: string);
|
|
6410
6415
|
}
|
|
6411
6416
|
|
|
6412
|
-
export { type AmmoId, type ApiFiltersAttacksRevivesEnum, type ApiKeyAccessTypeEnum, type ApiKeyBalancing, type Attack, type AttackActionEnum, type AttackCode, type AttackFinishingHitEffect, type AttackId, type AttackLog, type AttackLogResponse, type AttackLogSummary, type AttackPlayer, type AttackPlayerFaction, type AttackPlayerSimplified, type AttackSimplified, type AttackingFinishingHitEffects, type AwardCrimesVersionEnum, type BasicProperty, type BasicUser, type Bazaar, type BazaarAdvancedItemSales, type BazaarBargainSales, type BazaarBulkSales, type BazaarDollarSales, type BazaarRecentFavorites, type BazaarResponse, type BazaarResponseSpecialized, type BazaarSpecialized, type BazaarTotalFavorites, type BazaarWeekly, type BazaarWeeklyCustomers, type BazaarWeeklyIncome, type Bounty, type ChainId, type CompanyId, type CompanyTypeId, type CountryEnum, type DirtyBombId, type DiscordId, type EducationId, type EliminationTeamId, type Faction, type FactionApplication, type FactionApplicationStatusEnum, type FactionApplicationsResponse, type FactionAttackResult, type FactionAttacksFullResponse, type FactionAttacksResponse, type FactionBalance, type FactionBalanceResponse, type FactionBasic, type FactionBasicResponse, type FactionBranchDetails, type FactionBranchId, type FactionBranchStateEnum, type FactionChain, FactionChainIdContext, type FactionChainReport, type FactionChainReportAttacker, type FactionChainReportAttackerAttacks, type FactionChainReportAttackerRespect, type FactionChainReportBonus, type FactionChainReportDetails, type FactionChainReportResponse, type FactionChainWarfare, type FactionChainsResponse, type FactionContributor, type FactionContributorsResponse, type FactionCrime, type FactionCrimeId, FactionCrimeIdContext, type FactionCrimeItemOutcomeEnum, type FactionCrimeResponse, type FactionCrimeReward, type FactionCrimeRewardItem, type FactionCrimeRewardPayout, type FactionCrimeSlot, type FactionCrimeStatusEnum, type FactionCrimeUser, type FactionCrimeUserItemOutcome, type FactionCrimeUserItemOutcomeEnum, type FactionCrimeUserOutcome, type FactionCrimesResponse, FactionEndpoint, type FactionHofResponse, type FactionHofStats, type FactionHofValues, type FactionId, FactionIdContext, type FactionLookupResponse, type FactionMember, type FactionMembersResponse, type FactionNews, type FactionNewsCategory, type FactionNewsResponse, type FactionOngoingChain, type FactionOngoingChainResponse, type FactionOrganizedCrimePayoutType, type FactionPact, type FactionPosition, type FactionPositionAbilityEnum, type FactionPositionsResponse, type FactionRacketsResponse, type FactionRaidReport, type FactionRaidReportAttacker, type FactionRaidReportFaction, type FactionRaidReportUser, type FactionRaidWar, FactionRaidWarIdContext, type FactionRaidWarParticipant, type FactionRaidWarReportResponse, type FactionRaidWarfare, type FactionRaidWarfareFaction, type FactionRaidsResponse, type FactionRank, type FactionRankEnum, type FactionRankedWar, type FactionRankedWarDetails, FactionRankedWarIdContext, type FactionRankedWarParticipant, type FactionRankedWarReportResponse, type FactionRankedWarResponse, type FactionRankedWarsCategoryEnum, type FactionResponse, type FactionSearch, type FactionSearchLeader, type FactionSearchResponse, type FactionSelectionName, type FactionStat, type FactionStatEnum, type FactionStatsResponse, type FactionTerritoriesOwnershipResponse, type FactionTerritoriesResponse, type FactionTerritory, type FactionTerritoryEnum, type FactionTerritoryOwnership, type FactionTerritoryWar, type FactionTerritoryWarFaction, type FactionTerritoryWarFactionWallPlayers, type FactionTerritoryWarFinished, type FactionTerritoryWarFinishedFaction, FactionTerritoryWarIdContext, type FactionTerritoryWarOngoing, type FactionTerritoryWarOngoingFaction, type FactionTerritoryWarParticipant, type FactionTerritoryWarReport, type FactionTerritoryWarReportFaction, type FactionTerritoryWarReportMembers, type FactionTerritoryWarReportResponse, type FactionTerritoryWarResultEnum, type FactionTerritoryWarfare, type FactionTerritoryWarsCategoryEnum, type FactionTerritoryWarsHistoryResponse, type FactionUpgradeDetails, type FactionUpgrades, type FactionUpgradesResponse, type FactionWarfareDirtyBomb, type FactionWarfareDirtyBombPlanter, type FactionWarfareDirtyBombTargetFaction, type FactionWarfareResponse, type FactionWarfareTypeEnum, type FactionWars, type FactionWarsResponse, type ForumCategoriesResponse, ForumCategoryIdsContext, ForumEndpoint, type ForumFeed, type ForumFeedTypeEnum, type ForumId, type ForumLookupResponse, type ForumPoll, type ForumPollVote, type ForumPost, type ForumPostId, type ForumPostsResponse, type ForumResponse, type ForumSelectionName, type ForumSubscribedThread, type ForumSubscribedThreadPostsCount, type ForumThreadAuthor, type ForumThreadBase, type ForumThreadExtended, type ForumThreadId, ForumThreadIdContext, type ForumThreadResponse, type ForumThreadUserExtended, type ForumThreadsResponse, type HofValue, type HofValueFloat, type HofValueString, type HonorId, type HonorRarityEnum, type HonorTypeEnum, type ItemId, type ItemMarket, type ItemMarketItem, type ItemMarketListingItemBonus, type ItemMarketListingItemDetails, type ItemMarketListingItemStats, type ItemMarketListingNonstackable, type ItemMarketListingStackable, type ItemModId, type ItemUid, type JobPositionArmyEnum, type JobPositionCasinoEnum, type JobPositionEducationEnum, type JobPositionGrocerEnum, type JobPositionLawEnum, type JobPositionMedicalEnum, type JobTypeEnum, KeyEndpoint, type KeyInfoAvailableLog, type KeyInfoResponse, type KeyLogResponse, type KeyResponse, type KeySelectionName, type LogCategoryId, type LogId, MarketEndpoint, MarketIdContext, type MarketItemMarketResponse, type MarketLookupResponse, type MarketPropertiesResponse, type MarketPropertyDetails, MarketPropertyTypeIdContext, type MarketRentalDetails, type MarketRentalsResponse, type MarketResponse, type MarketSelectionName, type MarketSpecializedBazaarCategoryEnum, type MedalId, type MedalTypeEnum, type MeritId, type MissionDifficultyEnum, type MissionRewardDetailsAmmo, type MissionRewardDetailsItem, type MissionRewardDetailsUpgrade, type MissionRewardUpgrade, type MissionStatusEnum, type OrganizedCrimeName, PaginatedResponse, type Parameters, type PersonalStatsAttackingExtended, type PersonalStatsAttackingPopular, type PersonalStatsAttackingPublic, type PersonalStatsBattleStats, type PersonalStatsBounties, type PersonalStatsCategoryEnum, type PersonalStatsCommunication, type PersonalStatsCrimes, type PersonalStatsCrimesPopular, type PersonalStatsCrimesV1, type PersonalStatsCrimesV2, type PersonalStatsDrugs, type PersonalStatsFinishingHits, type PersonalStatsHistoricStat, type PersonalStatsHospital, type PersonalStatsHospitalPopular, type PersonalStatsInvestments, type PersonalStatsItems, type PersonalStatsItemsPopular, type PersonalStatsJail, type PersonalStatsJobsExtended, type PersonalStatsJobsPublic, type PersonalStatsMissions, type PersonalStatsNetworthExtended, type PersonalStatsNetworthPublic, type PersonalStatsOther, type PersonalStatsOtherPopular, type PersonalStatsRacing, type PersonalStatsStatName, type PersonalStatsTrading, type PersonalStatsTravel, type PersonalStatsTravelPopular, type ProfileSpouse, PropertyEndpoint, type PropertyId, PropertyIdContext, type PropertyLookupResponse, type PropertyModificationEnum, type PropertyPropertyResponse, type PropertyResponse, type PropertySelectionName, type PropertyStaffEnum, type PropertyTypeId, type Race, type RaceCar, type RaceCarId, type RaceCarUpgrade, type RaceCarUpgradeCategory, type RaceCarUpgradeId, type RaceCarUpgradeSubCategory, type RaceClassEnum, type RaceId, type RaceRecord, type RaceStatusEnum, type RaceTrack, type RaceTrackId, type RacerDetails, type RacingCarUpgradesResponse, type RacingCarsResponse, RacingEndpoint, type RacingLookupResponse, type RacingRaceDetails, type RacingRaceDetailsResponse, RacingRaceIdContext, type RacingRaceTypeEnum, type RacingRacesResponse, type RacingResponse, type RacingSelectionName, RacingTrackIdContext, type RacingTrackRecordsResponse, type RacingTracksResponse, type RaidWarId, type RankedWarId, type RateLimitMode, type Report, type ReportAnonymousBounties, type ReportBase, type ReportCompanyFinancials, type ReportFriendOrFoe, type ReportFriendOrFoeUser, type ReportHistory, type ReportHistoryCompany, type ReportHistoryFaction, type ReportInvestment, type ReportMoney, type ReportMostWanted, type ReportReport, type ReportStats, type ReportStockAnalysis, type ReportTrueLevel, type ReportTypeEnum, type ReportWarrantDetails, type ReportsResponse, type RequestLinks, type RequestMetadata, type RequestMetadataWithLinks, type RequestMetadataWithLinksAndTotal, type Requester, type Revive, type ReviveId, type ReviveSetting, type ReviveSimplified, type RevivesFullResponse, type RevivesResponse, type SelectionCategoryEnum, type TerritoryWarId, type TimestampResponse, TornAPI, type TornAPIOptions, TornApiError, type TornBountiesResponse, type TornCalendarActivity, type TornCalendarResponse, type TornCrime, type TornCrimeId, TornCrimeIdContext, type TornCrimesResponse, type TornEducation, type TornEducationCourses, type TornEducationPrerequisites, type TornEducationResponse, type TornEducationRewards, type TornEliminationTeam, type TornEliminationTeamLeader, type TornEliminationTeamPlayer, type TornEliminationTeamPlayersResponse, type TornEliminationTeamsResponse, TornEndpoint, type TornFactionHof, type TornFactionHofCategory, type TornFactionHofResponse, type TornFactionTree, type TornFactionTreeBranch, type TornFactionTreeResponse, type TornHof, type TornHofBasic, type TornHofCategory, type TornHofResponse, type TornHofWithOffenses, type TornHonor, type TornHonorsResponse, TornIdContext, TornIdsContext, type TornItem, type TornItemAmmo, type TornItemAmmoResponse, type TornItemAmmoTypeEnum, type TornItemArmorCoverage, type TornItemArmorCoveragePartEnum, type TornItemArmorDetails, type TornItemBaseStats, type TornItemCategory, type TornItemDetails, type TornItemDetailsResponse, type TornItemMods, type TornItemModsResponse, type TornItemTypeEnum, type TornItemWeaponCategoryEnum, type TornItemWeaponDetails, type TornItemWeaponTypeEnum, type TornItemsResponse, type TornLog, type TornLogCategoriesResponse, type TornLogCategory, TornLogCategoryIdContext, type TornLogTypesResponse, type TornLookupResponse, type TornMedal, type TornMedalsResponse, type TornMerit, type TornMeritsResponse, type TornOrganizedCrime, type TornOrganizedCrimePositionId, type TornOrganizedCrimeRequiredItem, type TornOrganizedCrimeResponse, type TornOrganizedCrimeScope, type TornOrganizedCrimeSlot, type TornOrganizedCrimeSpawn, type TornProperties, type TornRacket, type TornRacketReward, type TornRacketType, TornRateLimitError, type TornResponse, type TornSelectionName, type TornSubcrime, type TornSubcrimesResponse, type TornTerritoriesNoLinksResponse, type TornTerritoriesResponse, type TornTerritory, type TornTerritoryCoordinates, type User, type UserAmmo, type UserAmmoResponse, type UserAmmoType, type UserBar, type UserBars, type UserBarsResponse, type UserBasic, type UserBasicResponse, type UserBattleStatDetail, type UserBattleStatModifierDetail, type UserBattleStatsResponse, type UserBountiesResponse, type UserCalendar, type UserCalendarResponse, type UserClothing, type UserCompany, type UserCompanyPoints, type UserCompetitionEasterEggs, type UserCompetitionElimination, type UserCompetitionHalloween, type UserCompetitionResponse, type UserCompetitionRps, type UserCooldownsResponse, type UserCrime, type UserCrimeAttempts, type UserCrimeDetailsBootlegging, type UserCrimeDetailsCardSkimming, type UserCrimeDetailsCracking, type UserCrimeDetailsGraffiti, type UserCrimeDetailsHustling, type UserCrimeDetailsScamming, type UserCrimeDetailsShoplifting, UserCrimeIdContext, type UserCrimeRewardAmmo, type UserCrimeRewardItem, type UserCrimeRewards, type UserCrimeUniques, type UserCrimeUniquesReward, type UserCrimeUniquesRewardAmmo, type UserCrimeUniquesRewardAmmoEnum, type UserCrimeUniquesRewardMoney, type UserCrimesResponse, type UserCurrentEducation, type UserDiscordPathId, type UserDiscordResponse, type UserDonatorStatusEnum, type UserEducation, type UserEducationResponse, UserEndpoint, type UserEnlistedCarsResponse, type UserEquipment, type UserEquipmentResponse, type UserEvent, type UserEventId, type UserEventsResponse, type UserFaction, type UserFactionBalance, type UserFactionBalanceResponse, type UserFactionResponse, type UserFlyMethodEnum, type UserForumFeedResponse, type UserForumFriendsResponse, type UserForumPostsResponse, type UserForumSubscribedThreadsResponse, type UserForumThreadsResponse, type UserGenderEnum, type UserHofResponse, type UserHofStats, type UserHonor, type UserHonorsResponse, type UserIconId, type UserIconPrivate, type UserIconPublic, type UserIconsResponse, type UserId, UserIdContext, type UserItemMarkeListingItemDetails, type UserItemMarketListing, type UserItemMarketResponse, type UserJob, type UserJobPointsResponse, type UserJobRanks, type UserJobRanksResponse, type UserJobResponse, type UserLastAction, type UserLastActionStatusEnum, type UserList, type UserListEnum, type UserListResponse, type UserLog, type UserLogId, type UserLogsResponse, type UserLookupResponse, type UserMaritalStatusEnum, type UserMedal, type UserMedalsResponse, type UserMeritUpgrade, type UserMerits, type UserMeritsResponse, type UserMessage, type UserMessageId, type UserMessageTypeEnum, type UserMessagesResponse, type UserMissionsResponse, type UserMoneyResponse, type UserNewEventsResponse, type UserNewMessagesResponse, type UserNotificationsResponse, type UserOrganizedCrimeError, type UserOrganizedCrimeResponse, type UserPersonalStatsCategory, type UserPersonalStatsFull, type UserPersonalStatsFullPublic, type UserPersonalStatsHistoric, type UserPersonalStatsPopular, type UserPersonalStatsResponse, type UserPlaneImageTypeEnum, type UserProfileResponse, type UserPropertiesResponse, type UserPropertyBasicDetails, type UserPropertyDetails, type UserPropertyDetailsExtended, type UserPropertyDetailsExtendedForRent, type UserPropertyDetailsExtendedForSale, type UserPropertyDetailsExtendedRented, type UserPropertyDetailsExtendedWithRent, type UserPropertyResponse, type UserRaceCarDetails, type UserRacesResponse, type UserRacingRecordsResponse, type UserRankEnum, type UserRefillsResponse, type UserResponse, type UserRoleEnum, type UserRpsStatus, type UserSelectionName, type UserSkillDetail, type UserSkillSlugEnum, type UserSkillsResponse, type UserStatus, type UserStatusStateEnum, type UserSubcrime, type UserTitleEnum, type UserTravelResponse, type UserVirus, type UserVirusResponse, type UserWeaponExp, type UserWeaponExpResponse, type UserWorkStatsResponse, type WeaponBonusEnum };
|
|
6417
|
+
export { type AmmoId, type ApiFiltersAttacksRevivesEnum, type ApiKeyAccessTypeEnum, type ApiKeyBalancing, type Attack, type AttackActionEnum, type AttackCode, type AttackFinishingHitEffect, type AttackId, type AttackLog, type AttackLogResponse, type AttackLogSummary, type AttackPlayer, type AttackPlayerFaction, type AttackPlayerSimplified, type AttackSimplified, type AttackingFinishingHitEffects, type AttacksFullResponse, type AttacksResponse, type AwardCrimesVersionEnum, type BasicProperty, type BasicUser, type Bazaar, type BazaarAdvancedItemSales, type BazaarBargainSales, type BazaarBulkSales, type BazaarDollarSales, type BazaarRecentFavorites, type BazaarResponse, type BazaarResponseSpecialized, type BazaarSpecialized, type BazaarTotalFavorites, type BazaarWeekly, type BazaarWeeklyCustomers, type BazaarWeeklyIncome, type Bounty, type ChainId, type CompanyId, type CompanyTypeId, type CountryEnum, type DirtyBombId, type DiscordId, type EducationId, type EliminationTeamId, type Faction, type FactionApplication, type FactionApplicationStatusEnum, type FactionApplicationsResponse, type FactionAttackResult, type FactionBalance, type FactionBalanceResponse, type FactionBasic, type FactionBasicResponse, type FactionBranchDetails, type FactionBranchId, type FactionBranchStateEnum, type FactionChain, FactionChainIdContext, type FactionChainReport, type FactionChainReportAttacker, type FactionChainReportAttackerAttacks, type FactionChainReportAttackerRespect, type FactionChainReportBonus, type FactionChainReportDetails, type FactionChainReportResponse, type FactionChainWarfare, type FactionChainsResponse, type FactionContributor, type FactionContributorsResponse, type FactionCrime, type FactionCrimeId, FactionCrimeIdContext, type FactionCrimeItemOutcomeEnum, type FactionCrimeResponse, type FactionCrimeReward, type FactionCrimeRewardItem, type FactionCrimeRewardPayout, type FactionCrimeSlot, type FactionCrimeStatusEnum, type FactionCrimeUser, type FactionCrimeUserItemOutcome, type FactionCrimeUserItemOutcomeEnum, type FactionCrimeUserOutcome, type FactionCrimesResponse, FactionEndpoint, type FactionHofResponse, type FactionHofStats, type FactionHofValues, type FactionId, FactionIdContext, type FactionLookupResponse, type FactionMember, type FactionMembersResponse, type FactionNews, type FactionNewsCategory, type FactionNewsResponse, type FactionOngoingChain, type FactionOngoingChainResponse, type FactionOrganizedCrimePayoutType, type FactionPact, type FactionPosition, type FactionPositionAbilityEnum, type FactionPositionsResponse, type FactionRacketsResponse, type FactionRaidReport, type FactionRaidReportAttacker, type FactionRaidReportFaction, type FactionRaidReportUser, type FactionRaidWar, FactionRaidWarIdContext, type FactionRaidWarParticipant, type FactionRaidWarReportResponse, type FactionRaidWarfare, type FactionRaidWarfareFaction, type FactionRaidsResponse, type FactionRank, type FactionRankEnum, type FactionRankedWar, type FactionRankedWarDetails, FactionRankedWarIdContext, type FactionRankedWarParticipant, type FactionRankedWarReportResponse, type FactionRankedWarResponse, type FactionRankedWarsCategoryEnum, type FactionResponse, type FactionSearch, type FactionSearchLeader, type FactionSearchResponse, type FactionSelectionName, type FactionStat, type FactionStatEnum, type FactionStatsResponse, type FactionTerritoriesOwnershipResponse, type FactionTerritoriesResponse, type FactionTerritory, type FactionTerritoryEnum, type FactionTerritoryOwnership, type FactionTerritoryWar, type FactionTerritoryWarFaction, type FactionTerritoryWarFactionWallPlayers, type FactionTerritoryWarFinished, type FactionTerritoryWarFinishedFaction, FactionTerritoryWarIdContext, type FactionTerritoryWarOngoing, type FactionTerritoryWarOngoingFaction, type FactionTerritoryWarParticipant, type FactionTerritoryWarReport, type FactionTerritoryWarReportFaction, type FactionTerritoryWarReportMembers, type FactionTerritoryWarReportResponse, type FactionTerritoryWarResultEnum, type FactionTerritoryWarfare, type FactionTerritoryWarsCategoryEnum, type FactionTerritoryWarsHistoryResponse, type FactionUpgradeDetails, type FactionUpgrades, type FactionUpgradesResponse, type FactionWarfareDirtyBomb, type FactionWarfareDirtyBombPlanter, type FactionWarfareDirtyBombTargetFaction, type FactionWarfareResponse, type FactionWarfareTypeEnum, type FactionWars, type FactionWarsResponse, type ForumCategoriesResponse, ForumCategoryIdsContext, ForumEndpoint, type ForumFeed, type ForumFeedTypeEnum, type ForumId, type ForumLookupResponse, type ForumPoll, type ForumPollVote, type ForumPost, type ForumPostId, type ForumPostsResponse, type ForumResponse, type ForumSelectionName, type ForumSubscribedThread, type ForumSubscribedThreadPostsCount, type ForumThreadAuthor, type ForumThreadBase, type ForumThreadExtended, type ForumThreadId, ForumThreadIdContext, type ForumThreadResponse, type ForumThreadUserExtended, type ForumThreadsResponse, type HofValue, type HofValueFloat, type HofValueString, type HonorId, type HonorRarityEnum, type HonorTypeEnum, type ItemId, type ItemMarket, type ItemMarketItem, type ItemMarketListingItemBonus, type ItemMarketListingItemDetails, type ItemMarketListingItemStats, type ItemMarketListingNonstackable, type ItemMarketListingStackable, type ItemModId, type ItemUid, type JobPositionArmyEnum, type JobPositionCasinoEnum, type JobPositionEducationEnum, type JobPositionGrocerEnum, type JobPositionLawEnum, type JobPositionMedicalEnum, type JobTypeEnum, KeyEndpoint, type KeyInfoAvailableLog, type KeyInfoResponse, type KeyLogResponse, type KeyResponse, type KeySelectionName, type LogCategoryId, type LogId, MarketEndpoint, MarketIdContext, type MarketItemMarketResponse, type MarketLookupResponse, type MarketPropertiesResponse, type MarketPropertyDetails, MarketPropertyTypeIdContext, type MarketRentalDetails, type MarketRentalsResponse, type MarketResponse, type MarketSelectionName, type MarketSpecializedBazaarCategoryEnum, type MedalId, type MedalTypeEnum, type MeritId, type MissionDifficultyEnum, type MissionRewardDetailsAmmo, type MissionRewardDetailsItem, type MissionRewardDetailsUpgrade, type MissionRewardUpgrade, type MissionStatusEnum, type OrganizedCrimeName, PaginatedResponse, type Parameters, type PersonalStatsAttackingExtended, type PersonalStatsAttackingPopular, type PersonalStatsAttackingPublic, type PersonalStatsBattleStats, type PersonalStatsBounties, type PersonalStatsCategoryEnum, type PersonalStatsCommunication, type PersonalStatsCrimes, type PersonalStatsCrimesPopular, type PersonalStatsCrimesV1, type PersonalStatsCrimesV2, type PersonalStatsDrugs, type PersonalStatsFinishingHits, type PersonalStatsHistoricStat, type PersonalStatsHospital, type PersonalStatsHospitalPopular, type PersonalStatsInvestments, type PersonalStatsItems, type PersonalStatsItemsPopular, type PersonalStatsJail, type PersonalStatsJobsExtended, type PersonalStatsJobsPublic, type PersonalStatsMissions, type PersonalStatsNetworthExtended, type PersonalStatsNetworthPublic, type PersonalStatsOther, type PersonalStatsOtherPopular, type PersonalStatsRacing, type PersonalStatsStatName, type PersonalStatsTrading, type PersonalStatsTravel, type PersonalStatsTravelPopular, type ProfileSpouse, PropertyEndpoint, type PropertyId, PropertyIdContext, type PropertyLookupResponse, type PropertyModificationEnum, type PropertyPropertyResponse, type PropertyResponse, type PropertySelectionName, type PropertyStaffEnum, type PropertyTypeId, type Race, type RaceCar, type RaceCarId, type RaceCarUpgrade, type RaceCarUpgradeCategory, type RaceCarUpgradeId, type RaceCarUpgradeSubCategory, type RaceClassEnum, type RaceId, type RaceRecord, type RaceStatusEnum, type RaceTrack, type RaceTrackId, type RacerDetails, type RacingCarUpgradesResponse, type RacingCarsResponse, RacingEndpoint, type RacingLookupResponse, type RacingRaceDetails, type RacingRaceDetailsResponse, RacingRaceIdContext, type RacingRaceTypeEnum, type RacingRacesResponse, type RacingResponse, type RacingSelectionName, RacingTrackIdContext, type RacingTrackRecordsResponse, type RacingTracksResponse, type RaidWarId, type RankedWarId, type RateLimitMode, type Report, type ReportAnonymousBounties, type ReportBase, type ReportCompanyFinancials, type ReportFriendOrFoe, type ReportFriendOrFoeUser, type ReportHistory, type ReportHistoryCompany, type ReportHistoryFaction, type ReportInvestment, type ReportMoney, type ReportMostWanted, type ReportReport, type ReportStats, type ReportStockAnalysis, type ReportTrueLevel, type ReportTypeEnum, type ReportWarrantDetails, type ReportsResponse, type RequestLinks, type RequestMetadata, type RequestMetadataWithLinks, type RequestMetadataWithLinksAndTotal, type Requester, type Revive, type ReviveId, type ReviveSetting, type ReviveSimplified, type RevivesFullResponse, type RevivesResponse, type SelectionCategoryEnum, type TerritoryWarId, type TimestampResponse, TornAPI, type TornAPIOptions, TornApiError, type TornBountiesResponse, type TornCalendarActivity, type TornCalendarResponse, type TornCrime, type TornCrimeId, TornCrimeIdContext, type TornCrimesResponse, type TornEducation, type TornEducationCourses, type TornEducationPrerequisites, type TornEducationResponse, type TornEducationRewards, type TornEliminationTeam, type TornEliminationTeamLeader, type TornEliminationTeamPlayer, type TornEliminationTeamPlayersResponse, type TornEliminationTeamsResponse, TornEndpoint, type TornFactionHof, type TornFactionHofCategory, type TornFactionHofResponse, type TornFactionTree, type TornFactionTreeBranch, type TornFactionTreeResponse, type TornHof, type TornHofBasic, type TornHofCategory, type TornHofResponse, type TornHofWithOffenses, type TornHonor, type TornHonorsResponse, TornIdContext, TornIdsContext, type TornItem, type TornItemAmmo, type TornItemAmmoResponse, type TornItemAmmoTypeEnum, type TornItemArmorCoverage, type TornItemArmorCoveragePartEnum, type TornItemArmorDetails, type TornItemBaseStats, type TornItemCategory, type TornItemDetails, type TornItemDetailsResponse, type TornItemMods, type TornItemModsResponse, type TornItemTypeEnum, type TornItemWeaponCategoryEnum, type TornItemWeaponDetails, type TornItemWeaponTypeEnum, type TornItemsResponse, type TornLog, type TornLogCategoriesResponse, type TornLogCategory, TornLogCategoryIdContext, type TornLogTypesResponse, type TornLookupResponse, type TornMedal, type TornMedalsResponse, type TornMerit, type TornMeritsResponse, type TornOrganizedCrime, type TornOrganizedCrimePositionId, type TornOrganizedCrimeRequiredItem, type TornOrganizedCrimeResponse, type TornOrganizedCrimeScope, type TornOrganizedCrimeSlot, type TornOrganizedCrimeSpawn, type TornProperties, type TornRacket, type TornRacketReward, type TornRacketType, TornRateLimitError, type TornResponse, type TornSelectionName, type TornSubcrime, type TornSubcrimesResponse, type TornTerritoriesNoLinksResponse, type TornTerritoriesResponse, type TornTerritory, type TornTerritoryCoordinates, type User, type UserAmmo, type UserAmmoResponse, type UserAmmoType, type UserBar, type UserBars, type UserBarsResponse, type UserBasic, type UserBasicResponse, type UserBattleStatDetail, type UserBattleStatModifierDetail, type UserBattleStatsResponse, type UserBountiesResponse, type UserCalendar, type UserCalendarResponse, type UserClothing, type UserCompany, type UserCompanyPoints, type UserCompetitionEasterEggs, type UserCompetitionElimination, type UserCompetitionHalloween, type UserCompetitionResponse, type UserCompetitionRps, type UserCooldownsResponse, type UserCrime, type UserCrimeAttempts, type UserCrimeDetailsBootlegging, type UserCrimeDetailsCardSkimming, type UserCrimeDetailsCracking, type UserCrimeDetailsGraffiti, type UserCrimeDetailsHustling, type UserCrimeDetailsScamming, type UserCrimeDetailsShoplifting, UserCrimeIdContext, type UserCrimeRewardAmmo, type UserCrimeRewardItem, type UserCrimeRewards, type UserCrimeUniques, type UserCrimeUniquesReward, type UserCrimeUniquesRewardAmmo, type UserCrimeUniquesRewardAmmoEnum, type UserCrimeUniquesRewardMoney, type UserCrimesResponse, type UserCurrentEducation, type UserDiscordPathId, type UserDiscordResponse, type UserDonatorStatusEnum, type UserEducation, type UserEducationResponse, UserEndpoint, type UserEnlistedCarsResponse, type UserEquipment, type UserEquipmentResponse, type UserEvent, type UserEventId, type UserEventsResponse, type UserFaction, type UserFactionBalance, type UserFactionBalanceResponse, type UserFactionResponse, type UserFlyMethodEnum, type UserForumFeedResponse, type UserForumFriendsResponse, type UserForumPostsResponse, type UserForumSubscribedThreadsResponse, type UserForumThreadsResponse, type UserGenderEnum, type UserHofResponse, type UserHofStats, type UserHonor, type UserHonorsResponse, type UserIconId, type UserIconPrivate, type UserIconPublic, type UserIconsResponse, type UserId, UserIdContext, type UserItemMarkeListingItemDetails, type UserItemMarketListing, type UserItemMarketResponse, type UserJob, type UserJobPointsResponse, type UserJobRanks, type UserJobRanksResponse, type UserJobResponse, type UserLastAction, type UserLastActionStatusEnum, type UserList, type UserListEnum, type UserListResponse, type UserLog, type UserLogId, type UserLogsResponse, type UserLookupResponse, type UserMaritalStatusEnum, type UserMedal, type UserMedalsResponse, type UserMeritUpgrade, type UserMerits, type UserMeritsResponse, type UserMessage, type UserMessageId, type UserMessageTypeEnum, type UserMessagesResponse, type UserMissionsResponse, type UserMoneyResponse, type UserNewEventsResponse, type UserNewMessagesResponse, type UserNotificationsResponse, type UserOrganizedCrimeError, type UserOrganizedCrimeResponse, type UserPersonalStatsCategory, type UserPersonalStatsFull, type UserPersonalStatsFullPublic, type UserPersonalStatsHistoric, type UserPersonalStatsPopular, type UserPersonalStatsResponse, type UserPlaneImageTypeEnum, type UserProfileResponse, type UserPropertiesResponse, type UserPropertyBasicDetails, type UserPropertyDetails, type UserPropertyDetailsExtended, type UserPropertyDetailsExtendedForRent, type UserPropertyDetailsExtendedForSale, type UserPropertyDetailsExtendedRented, type UserPropertyDetailsExtendedWithRent, type UserPropertyResponse, type UserRaceCarDetails, type UserRaceDetails, type UserRacesResponse, type UserRacingRecordsResponse, type UserRankEnum, type UserRefillsResponse, type UserResponse, type UserRoleEnum, type UserRpsStatus, type UserSelectionName, type UserSkillDetail, type UserSkillSlugEnum, type UserSkillsResponse, type UserStatus, type UserStatusStateEnum, type UserSubcrime, type UserTitleEnum, type UserTravelResponse, type UserVirus, type UserVirusResponse, type UserWeaponExp, type UserWeaponExpResponse, type UserWorkStatsResponse, type WeaponBonusEnum };
|
package/dist/index.d.ts
CHANGED
|
@@ -172,6 +172,12 @@ type AttackPlayerSimplified = {
|
|
|
172
172
|
faction_id: FactionId | null;
|
|
173
173
|
};
|
|
174
174
|
|
|
175
|
+
/** @category Models */
|
|
176
|
+
type AttacksFullResponse = {
|
|
177
|
+
attacks: AttackSimplified[];
|
|
178
|
+
_metadata: RequestMetadataWithLinks;
|
|
179
|
+
};
|
|
180
|
+
|
|
175
181
|
/** @category Models */
|
|
176
182
|
type AttackSimplified = {
|
|
177
183
|
id: AttackId;
|
|
@@ -185,6 +191,12 @@ type AttackSimplified = {
|
|
|
185
191
|
respect_loss: number;
|
|
186
192
|
};
|
|
187
193
|
|
|
194
|
+
/** @category Models */
|
|
195
|
+
type AttacksResponse = {
|
|
196
|
+
attacks: Attack[];
|
|
197
|
+
_metadata: RequestMetadataWithLinks;
|
|
198
|
+
};
|
|
199
|
+
|
|
188
200
|
/** @category Models */
|
|
189
201
|
type AwardCrimesVersionEnum = "v1" | "v2";
|
|
190
202
|
|
|
@@ -367,18 +379,6 @@ type FactionApplicationStatusEnum = "accepted" | "declined" | "withdrawn" | "act
|
|
|
367
379
|
/** @category Models */
|
|
368
380
|
type FactionAttackResult = "None" | "Attacked" | "Mugged" | "Hospitalized" | "Arrested" | "Looted" | "Lost" | "Stalemate" | "Assist" | "Escape" | "Timeout" | "Special" | "Bounty" | "Interrupted";
|
|
369
381
|
|
|
370
|
-
/** @category Models */
|
|
371
|
-
type FactionAttacksFullResponse = {
|
|
372
|
-
attacks: AttackSimplified[];
|
|
373
|
-
_metadata: RequestMetadataWithLinks;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
/** @category Models */
|
|
377
|
-
type FactionAttacksResponse = {
|
|
378
|
-
attacks: Attack[];
|
|
379
|
-
_metadata: RequestMetadataWithLinks;
|
|
380
|
-
};
|
|
381
|
-
|
|
382
382
|
/** @category Models */
|
|
383
383
|
type FactionBalance = {
|
|
384
384
|
faction: {
|
|
@@ -927,7 +927,7 @@ type FactionRankedWarsCategoryEnum = "all" | "ongoing";
|
|
|
927
927
|
type FactionRankEnum = "Unranked" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond";
|
|
928
928
|
|
|
929
929
|
/** @category Models */
|
|
930
|
-
type FactionResponse = FactionHofResponse | FactionMembersResponse | FactionBasicResponse | FactionWarsResponse | FactionNewsResponse | RevivesResponse | FactionTerritoryWarsHistoryResponse |
|
|
930
|
+
type FactionResponse = FactionHofResponse | FactionMembersResponse | FactionBasicResponse | FactionWarsResponse | FactionNewsResponse | RevivesResponse | FactionTerritoryWarsHistoryResponse | AttacksResponse | FactionBalanceResponse | FactionRaidWarReportResponse | FactionTerritoriesOwnershipResponse | FactionPositionsResponse | RevivesFullResponse | AttacksFullResponse | FactionApplicationsResponse | FactionOngoingChainResponse | FactionChainsResponse | FactionChainReportResponse | FactionCrimesResponse | FactionCrimeResponse | FactionRaidsResponse | FactionWarfareResponse | FactionRankedWarReportResponse | FactionTerritoryWarReportResponse | FactionTerritoriesResponse | FactionUpgradesResponse | FactionStatsResponse | FactionContributorsResponse | FactionRacketsResponse | FactionRankedWarResponse | FactionLookupResponse | TimestampResponse;
|
|
931
931
|
|
|
932
932
|
/** @category Models */
|
|
933
933
|
type FactionSearch = {
|
|
@@ -4301,9 +4301,14 @@ type UserRaceCarDetails = RaceCar & {
|
|
|
4301
4301
|
parts: RaceCarUpgradeId[];
|
|
4302
4302
|
};
|
|
4303
4303
|
|
|
4304
|
+
/** @category Models */
|
|
4305
|
+
type UserRaceDetails = RacingRaceDetails & {
|
|
4306
|
+
skill_gain: unknown;
|
|
4307
|
+
};
|
|
4308
|
+
|
|
4304
4309
|
/** @category Models */
|
|
4305
4310
|
type UserRacesResponse = {
|
|
4306
|
-
races:
|
|
4311
|
+
races: UserRaceDetails[];
|
|
4307
4312
|
_metadata: RequestMetadataWithLinks;
|
|
4308
4313
|
};
|
|
4309
4314
|
|
|
@@ -4336,7 +4341,7 @@ type UserRefillsResponse = {
|
|
|
4336
4341
|
};
|
|
4337
4342
|
|
|
4338
4343
|
/** @category Models */
|
|
4339
|
-
type UserResponse = UserCrimesResponse | UserWeaponExpResponse | UserAmmoResponse | UserDiscordResponse | UserRacesResponse | UserEnlistedCarsResponse | UserForumPostsResponse | UserForumThreadsResponse | UserForumSubscribedThreadsResponse | UserForumFeedResponse | UserForumFriendsResponse | UserPropertyResponse | ReportsResponse | UserHofResponse | UserCalendarResponse | UserRacingRecordsResponse | UserEducationResponse | UserBountiesResponse | UserJobRanksResponse | UserPropertiesResponse | UserFactionBalanceResponse | UserBasicResponse | RevivesResponse | UserHonorsResponse | UserMedalsResponse | UserMeritsResponse | RevivesFullResponse | UserProfileResponse | UserJobResponse | UserFactionResponse | UserCompetitionResponse | UserIconsResponse | UserItemMarketResponse | UserListResponse | UserEquipmentResponse | UserMissionsResponse | UserPersonalStatsResponse | UserOrganizedCrimeResponse |
|
|
4344
|
+
type UserResponse = UserCrimesResponse | UserWeaponExpResponse | UserAmmoResponse | UserDiscordResponse | UserRacesResponse | UserEnlistedCarsResponse | UserForumPostsResponse | UserForumThreadsResponse | UserForumSubscribedThreadsResponse | UserForumFeedResponse | UserForumFriendsResponse | UserPropertyResponse | ReportsResponse | UserHofResponse | UserCalendarResponse | UserRacingRecordsResponse | UserEducationResponse | UserBountiesResponse | UserJobRanksResponse | UserPropertiesResponse | UserFactionBalanceResponse | UserBasicResponse | RevivesResponse | UserHonorsResponse | UserMedalsResponse | UserMeritsResponse | RevivesFullResponse | UserProfileResponse | UserJobResponse | UserFactionResponse | UserCompetitionResponse | UserIconsResponse | UserItemMarketResponse | UserListResponse | UserEquipmentResponse | UserMissionsResponse | UserPersonalStatsResponse | UserOrganizedCrimeResponse | AttacksResponse | UserBarsResponse | UserCooldownsResponse | UserNotificationsResponse | UserRefillsResponse | UserTravelResponse | UserVirusResponse | AttacksFullResponse | UserMoneyResponse | UserJobPointsResponse | UserWorkStatsResponse | UserSkillsResponse | UserBattleStatsResponse | UserNewEventsResponse | UserEventsResponse | UserMessagesResponse | UserNewMessagesResponse | UserLookupResponse | TimestampResponse;
|
|
4340
4345
|
|
|
4341
4346
|
/** @category Models */
|
|
4342
4347
|
type UserRoleEnum = "Admin" | "Officer" | "Moderator" | "Helper" | "Tester" | "NPC" | "Committee" | "Reporter" | "Wiki Contributor" | "Wiki Editor" | "Civilian";
|
|
@@ -4464,7 +4469,7 @@ declare class FactionEndpoint {
|
|
|
4464
4469
|
to?: number;
|
|
4465
4470
|
from?: number;
|
|
4466
4471
|
timestamp?: string;
|
|
4467
|
-
}): Promise<PaginatedResponse<
|
|
4472
|
+
}): Promise<PaginatedResponse<AttacksResponse> & AttacksResponse>;
|
|
4468
4473
|
/**
|
|
4469
4474
|
* Get your faction's simplified attacks
|
|
4470
4475
|
* @param params - Optional query parameters
|
|
@@ -4476,7 +4481,7 @@ declare class FactionEndpoint {
|
|
|
4476
4481
|
to?: number;
|
|
4477
4482
|
from?: number;
|
|
4478
4483
|
timestamp?: string;
|
|
4479
|
-
}): Promise<PaginatedResponse<
|
|
4484
|
+
}): Promise<PaginatedResponse<AttacksFullResponse> & AttacksFullResponse>;
|
|
4480
4485
|
/**
|
|
4481
4486
|
* Get your faction's & member's balance details
|
|
4482
4487
|
* @param params - Optional query parameters
|
|
@@ -5662,7 +5667,7 @@ declare class UserEndpoint {
|
|
|
5662
5667
|
to?: number;
|
|
5663
5668
|
from?: number;
|
|
5664
5669
|
timestamp?: string;
|
|
5665
|
-
}): Promise<PaginatedResponse<
|
|
5670
|
+
}): Promise<PaginatedResponse<AttacksResponse> & AttacksResponse>;
|
|
5666
5671
|
/**
|
|
5667
5672
|
* Get your simplified attacks
|
|
5668
5673
|
* @param params - Optional query parameters
|
|
@@ -5674,7 +5679,7 @@ declare class UserEndpoint {
|
|
|
5674
5679
|
to?: number;
|
|
5675
5680
|
from?: number;
|
|
5676
5681
|
timestamp?: string;
|
|
5677
|
-
}): Promise<PaginatedResponse<
|
|
5682
|
+
}): Promise<PaginatedResponse<AttacksFullResponse> & AttacksFullResponse>;
|
|
5678
5683
|
/**
|
|
5679
5684
|
* Get your bars information
|
|
5680
5685
|
* @param params - Optional query parameters
|
|
@@ -6409,4 +6414,4 @@ declare class TornRateLimitError extends Error {
|
|
|
6409
6414
|
constructor(message: string);
|
|
6410
6415
|
}
|
|
6411
6416
|
|
|
6412
|
-
export { type AmmoId, type ApiFiltersAttacksRevivesEnum, type ApiKeyAccessTypeEnum, type ApiKeyBalancing, type Attack, type AttackActionEnum, type AttackCode, type AttackFinishingHitEffect, type AttackId, type AttackLog, type AttackLogResponse, type AttackLogSummary, type AttackPlayer, type AttackPlayerFaction, type AttackPlayerSimplified, type AttackSimplified, type AttackingFinishingHitEffects, type AwardCrimesVersionEnum, type BasicProperty, type BasicUser, type Bazaar, type BazaarAdvancedItemSales, type BazaarBargainSales, type BazaarBulkSales, type BazaarDollarSales, type BazaarRecentFavorites, type BazaarResponse, type BazaarResponseSpecialized, type BazaarSpecialized, type BazaarTotalFavorites, type BazaarWeekly, type BazaarWeeklyCustomers, type BazaarWeeklyIncome, type Bounty, type ChainId, type CompanyId, type CompanyTypeId, type CountryEnum, type DirtyBombId, type DiscordId, type EducationId, type EliminationTeamId, type Faction, type FactionApplication, type FactionApplicationStatusEnum, type FactionApplicationsResponse, type FactionAttackResult, type FactionAttacksFullResponse, type FactionAttacksResponse, type FactionBalance, type FactionBalanceResponse, type FactionBasic, type FactionBasicResponse, type FactionBranchDetails, type FactionBranchId, type FactionBranchStateEnum, type FactionChain, FactionChainIdContext, type FactionChainReport, type FactionChainReportAttacker, type FactionChainReportAttackerAttacks, type FactionChainReportAttackerRespect, type FactionChainReportBonus, type FactionChainReportDetails, type FactionChainReportResponse, type FactionChainWarfare, type FactionChainsResponse, type FactionContributor, type FactionContributorsResponse, type FactionCrime, type FactionCrimeId, FactionCrimeIdContext, type FactionCrimeItemOutcomeEnum, type FactionCrimeResponse, type FactionCrimeReward, type FactionCrimeRewardItem, type FactionCrimeRewardPayout, type FactionCrimeSlot, type FactionCrimeStatusEnum, type FactionCrimeUser, type FactionCrimeUserItemOutcome, type FactionCrimeUserItemOutcomeEnum, type FactionCrimeUserOutcome, type FactionCrimesResponse, FactionEndpoint, type FactionHofResponse, type FactionHofStats, type FactionHofValues, type FactionId, FactionIdContext, type FactionLookupResponse, type FactionMember, type FactionMembersResponse, type FactionNews, type FactionNewsCategory, type FactionNewsResponse, type FactionOngoingChain, type FactionOngoingChainResponse, type FactionOrganizedCrimePayoutType, type FactionPact, type FactionPosition, type FactionPositionAbilityEnum, type FactionPositionsResponse, type FactionRacketsResponse, type FactionRaidReport, type FactionRaidReportAttacker, type FactionRaidReportFaction, type FactionRaidReportUser, type FactionRaidWar, FactionRaidWarIdContext, type FactionRaidWarParticipant, type FactionRaidWarReportResponse, type FactionRaidWarfare, type FactionRaidWarfareFaction, type FactionRaidsResponse, type FactionRank, type FactionRankEnum, type FactionRankedWar, type FactionRankedWarDetails, FactionRankedWarIdContext, type FactionRankedWarParticipant, type FactionRankedWarReportResponse, type FactionRankedWarResponse, type FactionRankedWarsCategoryEnum, type FactionResponse, type FactionSearch, type FactionSearchLeader, type FactionSearchResponse, type FactionSelectionName, type FactionStat, type FactionStatEnum, type FactionStatsResponse, type FactionTerritoriesOwnershipResponse, type FactionTerritoriesResponse, type FactionTerritory, type FactionTerritoryEnum, type FactionTerritoryOwnership, type FactionTerritoryWar, type FactionTerritoryWarFaction, type FactionTerritoryWarFactionWallPlayers, type FactionTerritoryWarFinished, type FactionTerritoryWarFinishedFaction, FactionTerritoryWarIdContext, type FactionTerritoryWarOngoing, type FactionTerritoryWarOngoingFaction, type FactionTerritoryWarParticipant, type FactionTerritoryWarReport, type FactionTerritoryWarReportFaction, type FactionTerritoryWarReportMembers, type FactionTerritoryWarReportResponse, type FactionTerritoryWarResultEnum, type FactionTerritoryWarfare, type FactionTerritoryWarsCategoryEnum, type FactionTerritoryWarsHistoryResponse, type FactionUpgradeDetails, type FactionUpgrades, type FactionUpgradesResponse, type FactionWarfareDirtyBomb, type FactionWarfareDirtyBombPlanter, type FactionWarfareDirtyBombTargetFaction, type FactionWarfareResponse, type FactionWarfareTypeEnum, type FactionWars, type FactionWarsResponse, type ForumCategoriesResponse, ForumCategoryIdsContext, ForumEndpoint, type ForumFeed, type ForumFeedTypeEnum, type ForumId, type ForumLookupResponse, type ForumPoll, type ForumPollVote, type ForumPost, type ForumPostId, type ForumPostsResponse, type ForumResponse, type ForumSelectionName, type ForumSubscribedThread, type ForumSubscribedThreadPostsCount, type ForumThreadAuthor, type ForumThreadBase, type ForumThreadExtended, type ForumThreadId, ForumThreadIdContext, type ForumThreadResponse, type ForumThreadUserExtended, type ForumThreadsResponse, type HofValue, type HofValueFloat, type HofValueString, type HonorId, type HonorRarityEnum, type HonorTypeEnum, type ItemId, type ItemMarket, type ItemMarketItem, type ItemMarketListingItemBonus, type ItemMarketListingItemDetails, type ItemMarketListingItemStats, type ItemMarketListingNonstackable, type ItemMarketListingStackable, type ItemModId, type ItemUid, type JobPositionArmyEnum, type JobPositionCasinoEnum, type JobPositionEducationEnum, type JobPositionGrocerEnum, type JobPositionLawEnum, type JobPositionMedicalEnum, type JobTypeEnum, KeyEndpoint, type KeyInfoAvailableLog, type KeyInfoResponse, type KeyLogResponse, type KeyResponse, type KeySelectionName, type LogCategoryId, type LogId, MarketEndpoint, MarketIdContext, type MarketItemMarketResponse, type MarketLookupResponse, type MarketPropertiesResponse, type MarketPropertyDetails, MarketPropertyTypeIdContext, type MarketRentalDetails, type MarketRentalsResponse, type MarketResponse, type MarketSelectionName, type MarketSpecializedBazaarCategoryEnum, type MedalId, type MedalTypeEnum, type MeritId, type MissionDifficultyEnum, type MissionRewardDetailsAmmo, type MissionRewardDetailsItem, type MissionRewardDetailsUpgrade, type MissionRewardUpgrade, type MissionStatusEnum, type OrganizedCrimeName, PaginatedResponse, type Parameters, type PersonalStatsAttackingExtended, type PersonalStatsAttackingPopular, type PersonalStatsAttackingPublic, type PersonalStatsBattleStats, type PersonalStatsBounties, type PersonalStatsCategoryEnum, type PersonalStatsCommunication, type PersonalStatsCrimes, type PersonalStatsCrimesPopular, type PersonalStatsCrimesV1, type PersonalStatsCrimesV2, type PersonalStatsDrugs, type PersonalStatsFinishingHits, type PersonalStatsHistoricStat, type PersonalStatsHospital, type PersonalStatsHospitalPopular, type PersonalStatsInvestments, type PersonalStatsItems, type PersonalStatsItemsPopular, type PersonalStatsJail, type PersonalStatsJobsExtended, type PersonalStatsJobsPublic, type PersonalStatsMissions, type PersonalStatsNetworthExtended, type PersonalStatsNetworthPublic, type PersonalStatsOther, type PersonalStatsOtherPopular, type PersonalStatsRacing, type PersonalStatsStatName, type PersonalStatsTrading, type PersonalStatsTravel, type PersonalStatsTravelPopular, type ProfileSpouse, PropertyEndpoint, type PropertyId, PropertyIdContext, type PropertyLookupResponse, type PropertyModificationEnum, type PropertyPropertyResponse, type PropertyResponse, type PropertySelectionName, type PropertyStaffEnum, type PropertyTypeId, type Race, type RaceCar, type RaceCarId, type RaceCarUpgrade, type RaceCarUpgradeCategory, type RaceCarUpgradeId, type RaceCarUpgradeSubCategory, type RaceClassEnum, type RaceId, type RaceRecord, type RaceStatusEnum, type RaceTrack, type RaceTrackId, type RacerDetails, type RacingCarUpgradesResponse, type RacingCarsResponse, RacingEndpoint, type RacingLookupResponse, type RacingRaceDetails, type RacingRaceDetailsResponse, RacingRaceIdContext, type RacingRaceTypeEnum, type RacingRacesResponse, type RacingResponse, type RacingSelectionName, RacingTrackIdContext, type RacingTrackRecordsResponse, type RacingTracksResponse, type RaidWarId, type RankedWarId, type RateLimitMode, type Report, type ReportAnonymousBounties, type ReportBase, type ReportCompanyFinancials, type ReportFriendOrFoe, type ReportFriendOrFoeUser, type ReportHistory, type ReportHistoryCompany, type ReportHistoryFaction, type ReportInvestment, type ReportMoney, type ReportMostWanted, type ReportReport, type ReportStats, type ReportStockAnalysis, type ReportTrueLevel, type ReportTypeEnum, type ReportWarrantDetails, type ReportsResponse, type RequestLinks, type RequestMetadata, type RequestMetadataWithLinks, type RequestMetadataWithLinksAndTotal, type Requester, type Revive, type ReviveId, type ReviveSetting, type ReviveSimplified, type RevivesFullResponse, type RevivesResponse, type SelectionCategoryEnum, type TerritoryWarId, type TimestampResponse, TornAPI, type TornAPIOptions, TornApiError, type TornBountiesResponse, type TornCalendarActivity, type TornCalendarResponse, type TornCrime, type TornCrimeId, TornCrimeIdContext, type TornCrimesResponse, type TornEducation, type TornEducationCourses, type TornEducationPrerequisites, type TornEducationResponse, type TornEducationRewards, type TornEliminationTeam, type TornEliminationTeamLeader, type TornEliminationTeamPlayer, type TornEliminationTeamPlayersResponse, type TornEliminationTeamsResponse, TornEndpoint, type TornFactionHof, type TornFactionHofCategory, type TornFactionHofResponse, type TornFactionTree, type TornFactionTreeBranch, type TornFactionTreeResponse, type TornHof, type TornHofBasic, type TornHofCategory, type TornHofResponse, type TornHofWithOffenses, type TornHonor, type TornHonorsResponse, TornIdContext, TornIdsContext, type TornItem, type TornItemAmmo, type TornItemAmmoResponse, type TornItemAmmoTypeEnum, type TornItemArmorCoverage, type TornItemArmorCoveragePartEnum, type TornItemArmorDetails, type TornItemBaseStats, type TornItemCategory, type TornItemDetails, type TornItemDetailsResponse, type TornItemMods, type TornItemModsResponse, type TornItemTypeEnum, type TornItemWeaponCategoryEnum, type TornItemWeaponDetails, type TornItemWeaponTypeEnum, type TornItemsResponse, type TornLog, type TornLogCategoriesResponse, type TornLogCategory, TornLogCategoryIdContext, type TornLogTypesResponse, type TornLookupResponse, type TornMedal, type TornMedalsResponse, type TornMerit, type TornMeritsResponse, type TornOrganizedCrime, type TornOrganizedCrimePositionId, type TornOrganizedCrimeRequiredItem, type TornOrganizedCrimeResponse, type TornOrganizedCrimeScope, type TornOrganizedCrimeSlot, type TornOrganizedCrimeSpawn, type TornProperties, type TornRacket, type TornRacketReward, type TornRacketType, TornRateLimitError, type TornResponse, type TornSelectionName, type TornSubcrime, type TornSubcrimesResponse, type TornTerritoriesNoLinksResponse, type TornTerritoriesResponse, type TornTerritory, type TornTerritoryCoordinates, type User, type UserAmmo, type UserAmmoResponse, type UserAmmoType, type UserBar, type UserBars, type UserBarsResponse, type UserBasic, type UserBasicResponse, type UserBattleStatDetail, type UserBattleStatModifierDetail, type UserBattleStatsResponse, type UserBountiesResponse, type UserCalendar, type UserCalendarResponse, type UserClothing, type UserCompany, type UserCompanyPoints, type UserCompetitionEasterEggs, type UserCompetitionElimination, type UserCompetitionHalloween, type UserCompetitionResponse, type UserCompetitionRps, type UserCooldownsResponse, type UserCrime, type UserCrimeAttempts, type UserCrimeDetailsBootlegging, type UserCrimeDetailsCardSkimming, type UserCrimeDetailsCracking, type UserCrimeDetailsGraffiti, type UserCrimeDetailsHustling, type UserCrimeDetailsScamming, type UserCrimeDetailsShoplifting, UserCrimeIdContext, type UserCrimeRewardAmmo, type UserCrimeRewardItem, type UserCrimeRewards, type UserCrimeUniques, type UserCrimeUniquesReward, type UserCrimeUniquesRewardAmmo, type UserCrimeUniquesRewardAmmoEnum, type UserCrimeUniquesRewardMoney, type UserCrimesResponse, type UserCurrentEducation, type UserDiscordPathId, type UserDiscordResponse, type UserDonatorStatusEnum, type UserEducation, type UserEducationResponse, UserEndpoint, type UserEnlistedCarsResponse, type UserEquipment, type UserEquipmentResponse, type UserEvent, type UserEventId, type UserEventsResponse, type UserFaction, type UserFactionBalance, type UserFactionBalanceResponse, type UserFactionResponse, type UserFlyMethodEnum, type UserForumFeedResponse, type UserForumFriendsResponse, type UserForumPostsResponse, type UserForumSubscribedThreadsResponse, type UserForumThreadsResponse, type UserGenderEnum, type UserHofResponse, type UserHofStats, type UserHonor, type UserHonorsResponse, type UserIconId, type UserIconPrivate, type UserIconPublic, type UserIconsResponse, type UserId, UserIdContext, type UserItemMarkeListingItemDetails, type UserItemMarketListing, type UserItemMarketResponse, type UserJob, type UserJobPointsResponse, type UserJobRanks, type UserJobRanksResponse, type UserJobResponse, type UserLastAction, type UserLastActionStatusEnum, type UserList, type UserListEnum, type UserListResponse, type UserLog, type UserLogId, type UserLogsResponse, type UserLookupResponse, type UserMaritalStatusEnum, type UserMedal, type UserMedalsResponse, type UserMeritUpgrade, type UserMerits, type UserMeritsResponse, type UserMessage, type UserMessageId, type UserMessageTypeEnum, type UserMessagesResponse, type UserMissionsResponse, type UserMoneyResponse, type UserNewEventsResponse, type UserNewMessagesResponse, type UserNotificationsResponse, type UserOrganizedCrimeError, type UserOrganizedCrimeResponse, type UserPersonalStatsCategory, type UserPersonalStatsFull, type UserPersonalStatsFullPublic, type UserPersonalStatsHistoric, type UserPersonalStatsPopular, type UserPersonalStatsResponse, type UserPlaneImageTypeEnum, type UserProfileResponse, type UserPropertiesResponse, type UserPropertyBasicDetails, type UserPropertyDetails, type UserPropertyDetailsExtended, type UserPropertyDetailsExtendedForRent, type UserPropertyDetailsExtendedForSale, type UserPropertyDetailsExtendedRented, type UserPropertyDetailsExtendedWithRent, type UserPropertyResponse, type UserRaceCarDetails, type UserRacesResponse, type UserRacingRecordsResponse, type UserRankEnum, type UserRefillsResponse, type UserResponse, type UserRoleEnum, type UserRpsStatus, type UserSelectionName, type UserSkillDetail, type UserSkillSlugEnum, type UserSkillsResponse, type UserStatus, type UserStatusStateEnum, type UserSubcrime, type UserTitleEnum, type UserTravelResponse, type UserVirus, type UserVirusResponse, type UserWeaponExp, type UserWeaponExpResponse, type UserWorkStatsResponse, type WeaponBonusEnum };
|
|
6417
|
+
export { type AmmoId, type ApiFiltersAttacksRevivesEnum, type ApiKeyAccessTypeEnum, type ApiKeyBalancing, type Attack, type AttackActionEnum, type AttackCode, type AttackFinishingHitEffect, type AttackId, type AttackLog, type AttackLogResponse, type AttackLogSummary, type AttackPlayer, type AttackPlayerFaction, type AttackPlayerSimplified, type AttackSimplified, type AttackingFinishingHitEffects, type AttacksFullResponse, type AttacksResponse, type AwardCrimesVersionEnum, type BasicProperty, type BasicUser, type Bazaar, type BazaarAdvancedItemSales, type BazaarBargainSales, type BazaarBulkSales, type BazaarDollarSales, type BazaarRecentFavorites, type BazaarResponse, type BazaarResponseSpecialized, type BazaarSpecialized, type BazaarTotalFavorites, type BazaarWeekly, type BazaarWeeklyCustomers, type BazaarWeeklyIncome, type Bounty, type ChainId, type CompanyId, type CompanyTypeId, type CountryEnum, type DirtyBombId, type DiscordId, type EducationId, type EliminationTeamId, type Faction, type FactionApplication, type FactionApplicationStatusEnum, type FactionApplicationsResponse, type FactionAttackResult, type FactionBalance, type FactionBalanceResponse, type FactionBasic, type FactionBasicResponse, type FactionBranchDetails, type FactionBranchId, type FactionBranchStateEnum, type FactionChain, FactionChainIdContext, type FactionChainReport, type FactionChainReportAttacker, type FactionChainReportAttackerAttacks, type FactionChainReportAttackerRespect, type FactionChainReportBonus, type FactionChainReportDetails, type FactionChainReportResponse, type FactionChainWarfare, type FactionChainsResponse, type FactionContributor, type FactionContributorsResponse, type FactionCrime, type FactionCrimeId, FactionCrimeIdContext, type FactionCrimeItemOutcomeEnum, type FactionCrimeResponse, type FactionCrimeReward, type FactionCrimeRewardItem, type FactionCrimeRewardPayout, type FactionCrimeSlot, type FactionCrimeStatusEnum, type FactionCrimeUser, type FactionCrimeUserItemOutcome, type FactionCrimeUserItemOutcomeEnum, type FactionCrimeUserOutcome, type FactionCrimesResponse, FactionEndpoint, type FactionHofResponse, type FactionHofStats, type FactionHofValues, type FactionId, FactionIdContext, type FactionLookupResponse, type FactionMember, type FactionMembersResponse, type FactionNews, type FactionNewsCategory, type FactionNewsResponse, type FactionOngoingChain, type FactionOngoingChainResponse, type FactionOrganizedCrimePayoutType, type FactionPact, type FactionPosition, type FactionPositionAbilityEnum, type FactionPositionsResponse, type FactionRacketsResponse, type FactionRaidReport, type FactionRaidReportAttacker, type FactionRaidReportFaction, type FactionRaidReportUser, type FactionRaidWar, FactionRaidWarIdContext, type FactionRaidWarParticipant, type FactionRaidWarReportResponse, type FactionRaidWarfare, type FactionRaidWarfareFaction, type FactionRaidsResponse, type FactionRank, type FactionRankEnum, type FactionRankedWar, type FactionRankedWarDetails, FactionRankedWarIdContext, type FactionRankedWarParticipant, type FactionRankedWarReportResponse, type FactionRankedWarResponse, type FactionRankedWarsCategoryEnum, type FactionResponse, type FactionSearch, type FactionSearchLeader, type FactionSearchResponse, type FactionSelectionName, type FactionStat, type FactionStatEnum, type FactionStatsResponse, type FactionTerritoriesOwnershipResponse, type FactionTerritoriesResponse, type FactionTerritory, type FactionTerritoryEnum, type FactionTerritoryOwnership, type FactionTerritoryWar, type FactionTerritoryWarFaction, type FactionTerritoryWarFactionWallPlayers, type FactionTerritoryWarFinished, type FactionTerritoryWarFinishedFaction, FactionTerritoryWarIdContext, type FactionTerritoryWarOngoing, type FactionTerritoryWarOngoingFaction, type FactionTerritoryWarParticipant, type FactionTerritoryWarReport, type FactionTerritoryWarReportFaction, type FactionTerritoryWarReportMembers, type FactionTerritoryWarReportResponse, type FactionTerritoryWarResultEnum, type FactionTerritoryWarfare, type FactionTerritoryWarsCategoryEnum, type FactionTerritoryWarsHistoryResponse, type FactionUpgradeDetails, type FactionUpgrades, type FactionUpgradesResponse, type FactionWarfareDirtyBomb, type FactionWarfareDirtyBombPlanter, type FactionWarfareDirtyBombTargetFaction, type FactionWarfareResponse, type FactionWarfareTypeEnum, type FactionWars, type FactionWarsResponse, type ForumCategoriesResponse, ForumCategoryIdsContext, ForumEndpoint, type ForumFeed, type ForumFeedTypeEnum, type ForumId, type ForumLookupResponse, type ForumPoll, type ForumPollVote, type ForumPost, type ForumPostId, type ForumPostsResponse, type ForumResponse, type ForumSelectionName, type ForumSubscribedThread, type ForumSubscribedThreadPostsCount, type ForumThreadAuthor, type ForumThreadBase, type ForumThreadExtended, type ForumThreadId, ForumThreadIdContext, type ForumThreadResponse, type ForumThreadUserExtended, type ForumThreadsResponse, type HofValue, type HofValueFloat, type HofValueString, type HonorId, type HonorRarityEnum, type HonorTypeEnum, type ItemId, type ItemMarket, type ItemMarketItem, type ItemMarketListingItemBonus, type ItemMarketListingItemDetails, type ItemMarketListingItemStats, type ItemMarketListingNonstackable, type ItemMarketListingStackable, type ItemModId, type ItemUid, type JobPositionArmyEnum, type JobPositionCasinoEnum, type JobPositionEducationEnum, type JobPositionGrocerEnum, type JobPositionLawEnum, type JobPositionMedicalEnum, type JobTypeEnum, KeyEndpoint, type KeyInfoAvailableLog, type KeyInfoResponse, type KeyLogResponse, type KeyResponse, type KeySelectionName, type LogCategoryId, type LogId, MarketEndpoint, MarketIdContext, type MarketItemMarketResponse, type MarketLookupResponse, type MarketPropertiesResponse, type MarketPropertyDetails, MarketPropertyTypeIdContext, type MarketRentalDetails, type MarketRentalsResponse, type MarketResponse, type MarketSelectionName, type MarketSpecializedBazaarCategoryEnum, type MedalId, type MedalTypeEnum, type MeritId, type MissionDifficultyEnum, type MissionRewardDetailsAmmo, type MissionRewardDetailsItem, type MissionRewardDetailsUpgrade, type MissionRewardUpgrade, type MissionStatusEnum, type OrganizedCrimeName, PaginatedResponse, type Parameters, type PersonalStatsAttackingExtended, type PersonalStatsAttackingPopular, type PersonalStatsAttackingPublic, type PersonalStatsBattleStats, type PersonalStatsBounties, type PersonalStatsCategoryEnum, type PersonalStatsCommunication, type PersonalStatsCrimes, type PersonalStatsCrimesPopular, type PersonalStatsCrimesV1, type PersonalStatsCrimesV2, type PersonalStatsDrugs, type PersonalStatsFinishingHits, type PersonalStatsHistoricStat, type PersonalStatsHospital, type PersonalStatsHospitalPopular, type PersonalStatsInvestments, type PersonalStatsItems, type PersonalStatsItemsPopular, type PersonalStatsJail, type PersonalStatsJobsExtended, type PersonalStatsJobsPublic, type PersonalStatsMissions, type PersonalStatsNetworthExtended, type PersonalStatsNetworthPublic, type PersonalStatsOther, type PersonalStatsOtherPopular, type PersonalStatsRacing, type PersonalStatsStatName, type PersonalStatsTrading, type PersonalStatsTravel, type PersonalStatsTravelPopular, type ProfileSpouse, PropertyEndpoint, type PropertyId, PropertyIdContext, type PropertyLookupResponse, type PropertyModificationEnum, type PropertyPropertyResponse, type PropertyResponse, type PropertySelectionName, type PropertyStaffEnum, type PropertyTypeId, type Race, type RaceCar, type RaceCarId, type RaceCarUpgrade, type RaceCarUpgradeCategory, type RaceCarUpgradeId, type RaceCarUpgradeSubCategory, type RaceClassEnum, type RaceId, type RaceRecord, type RaceStatusEnum, type RaceTrack, type RaceTrackId, type RacerDetails, type RacingCarUpgradesResponse, type RacingCarsResponse, RacingEndpoint, type RacingLookupResponse, type RacingRaceDetails, type RacingRaceDetailsResponse, RacingRaceIdContext, type RacingRaceTypeEnum, type RacingRacesResponse, type RacingResponse, type RacingSelectionName, RacingTrackIdContext, type RacingTrackRecordsResponse, type RacingTracksResponse, type RaidWarId, type RankedWarId, type RateLimitMode, type Report, type ReportAnonymousBounties, type ReportBase, type ReportCompanyFinancials, type ReportFriendOrFoe, type ReportFriendOrFoeUser, type ReportHistory, type ReportHistoryCompany, type ReportHistoryFaction, type ReportInvestment, type ReportMoney, type ReportMostWanted, type ReportReport, type ReportStats, type ReportStockAnalysis, type ReportTrueLevel, type ReportTypeEnum, type ReportWarrantDetails, type ReportsResponse, type RequestLinks, type RequestMetadata, type RequestMetadataWithLinks, type RequestMetadataWithLinksAndTotal, type Requester, type Revive, type ReviveId, type ReviveSetting, type ReviveSimplified, type RevivesFullResponse, type RevivesResponse, type SelectionCategoryEnum, type TerritoryWarId, type TimestampResponse, TornAPI, type TornAPIOptions, TornApiError, type TornBountiesResponse, type TornCalendarActivity, type TornCalendarResponse, type TornCrime, type TornCrimeId, TornCrimeIdContext, type TornCrimesResponse, type TornEducation, type TornEducationCourses, type TornEducationPrerequisites, type TornEducationResponse, type TornEducationRewards, type TornEliminationTeam, type TornEliminationTeamLeader, type TornEliminationTeamPlayer, type TornEliminationTeamPlayersResponse, type TornEliminationTeamsResponse, TornEndpoint, type TornFactionHof, type TornFactionHofCategory, type TornFactionHofResponse, type TornFactionTree, type TornFactionTreeBranch, type TornFactionTreeResponse, type TornHof, type TornHofBasic, type TornHofCategory, type TornHofResponse, type TornHofWithOffenses, type TornHonor, type TornHonorsResponse, TornIdContext, TornIdsContext, type TornItem, type TornItemAmmo, type TornItemAmmoResponse, type TornItemAmmoTypeEnum, type TornItemArmorCoverage, type TornItemArmorCoveragePartEnum, type TornItemArmorDetails, type TornItemBaseStats, type TornItemCategory, type TornItemDetails, type TornItemDetailsResponse, type TornItemMods, type TornItemModsResponse, type TornItemTypeEnum, type TornItemWeaponCategoryEnum, type TornItemWeaponDetails, type TornItemWeaponTypeEnum, type TornItemsResponse, type TornLog, type TornLogCategoriesResponse, type TornLogCategory, TornLogCategoryIdContext, type TornLogTypesResponse, type TornLookupResponse, type TornMedal, type TornMedalsResponse, type TornMerit, type TornMeritsResponse, type TornOrganizedCrime, type TornOrganizedCrimePositionId, type TornOrganizedCrimeRequiredItem, type TornOrganizedCrimeResponse, type TornOrganizedCrimeScope, type TornOrganizedCrimeSlot, type TornOrganizedCrimeSpawn, type TornProperties, type TornRacket, type TornRacketReward, type TornRacketType, TornRateLimitError, type TornResponse, type TornSelectionName, type TornSubcrime, type TornSubcrimesResponse, type TornTerritoriesNoLinksResponse, type TornTerritoriesResponse, type TornTerritory, type TornTerritoryCoordinates, type User, type UserAmmo, type UserAmmoResponse, type UserAmmoType, type UserBar, type UserBars, type UserBarsResponse, type UserBasic, type UserBasicResponse, type UserBattleStatDetail, type UserBattleStatModifierDetail, type UserBattleStatsResponse, type UserBountiesResponse, type UserCalendar, type UserCalendarResponse, type UserClothing, type UserCompany, type UserCompanyPoints, type UserCompetitionEasterEggs, type UserCompetitionElimination, type UserCompetitionHalloween, type UserCompetitionResponse, type UserCompetitionRps, type UserCooldownsResponse, type UserCrime, type UserCrimeAttempts, type UserCrimeDetailsBootlegging, type UserCrimeDetailsCardSkimming, type UserCrimeDetailsCracking, type UserCrimeDetailsGraffiti, type UserCrimeDetailsHustling, type UserCrimeDetailsScamming, type UserCrimeDetailsShoplifting, UserCrimeIdContext, type UserCrimeRewardAmmo, type UserCrimeRewardItem, type UserCrimeRewards, type UserCrimeUniques, type UserCrimeUniquesReward, type UserCrimeUniquesRewardAmmo, type UserCrimeUniquesRewardAmmoEnum, type UserCrimeUniquesRewardMoney, type UserCrimesResponse, type UserCurrentEducation, type UserDiscordPathId, type UserDiscordResponse, type UserDonatorStatusEnum, type UserEducation, type UserEducationResponse, UserEndpoint, type UserEnlistedCarsResponse, type UserEquipment, type UserEquipmentResponse, type UserEvent, type UserEventId, type UserEventsResponse, type UserFaction, type UserFactionBalance, type UserFactionBalanceResponse, type UserFactionResponse, type UserFlyMethodEnum, type UserForumFeedResponse, type UserForumFriendsResponse, type UserForumPostsResponse, type UserForumSubscribedThreadsResponse, type UserForumThreadsResponse, type UserGenderEnum, type UserHofResponse, type UserHofStats, type UserHonor, type UserHonorsResponse, type UserIconId, type UserIconPrivate, type UserIconPublic, type UserIconsResponse, type UserId, UserIdContext, type UserItemMarkeListingItemDetails, type UserItemMarketListing, type UserItemMarketResponse, type UserJob, type UserJobPointsResponse, type UserJobRanks, type UserJobRanksResponse, type UserJobResponse, type UserLastAction, type UserLastActionStatusEnum, type UserList, type UserListEnum, type UserListResponse, type UserLog, type UserLogId, type UserLogsResponse, type UserLookupResponse, type UserMaritalStatusEnum, type UserMedal, type UserMedalsResponse, type UserMeritUpgrade, type UserMerits, type UserMeritsResponse, type UserMessage, type UserMessageId, type UserMessageTypeEnum, type UserMessagesResponse, type UserMissionsResponse, type UserMoneyResponse, type UserNewEventsResponse, type UserNewMessagesResponse, type UserNotificationsResponse, type UserOrganizedCrimeError, type UserOrganizedCrimeResponse, type UserPersonalStatsCategory, type UserPersonalStatsFull, type UserPersonalStatsFullPublic, type UserPersonalStatsHistoric, type UserPersonalStatsPopular, type UserPersonalStatsResponse, type UserPlaneImageTypeEnum, type UserProfileResponse, type UserPropertiesResponse, type UserPropertyBasicDetails, type UserPropertyDetails, type UserPropertyDetailsExtended, type UserPropertyDetailsExtendedForRent, type UserPropertyDetailsExtendedForSale, type UserPropertyDetailsExtendedRented, type UserPropertyDetailsExtendedWithRent, type UserPropertyResponse, type UserRaceCarDetails, type UserRaceDetails, type UserRacesResponse, type UserRacingRecordsResponse, type UserRankEnum, type UserRefillsResponse, type UserResponse, type UserRoleEnum, type UserRpsStatus, type UserSelectionName, type UserSkillDetail, type UserSkillSlugEnum, type UserSkillsResponse, type UserStatus, type UserStatusStateEnum, type UserSubcrime, type UserTitleEnum, type UserTravelResponse, type UserVirus, type UserVirusResponse, type UserWeaponExp, type UserWeaponExpResponse, type UserWorkStatsResponse, type WeaponBonusEnum };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var a=class{requester;constructor(e){this.requester=e;}async applications(e){let t="/faction/applications",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacks(e){let t="/faction/attacks",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacksfull(e){let t="/faction/attacksfull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async balance(e){let t="/faction/balance",s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async basic(e){let t="/faction/basic",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chain(e){let t="/faction/chain",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chains(e){let t="/faction/chains",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chainreport(e){let t="/faction/chainreport",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async contributors(e){let t="/faction/contributors",s={...e?.stat!==void 0&&{stat:e.stat},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async crimes(e){let t="/faction/crimes",s={...e?.cat!==void 0&&{cat:e.cat},...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/faction/hof",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async members(e){let t="/faction/members",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async news(e){let t="/faction/news",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async positions(e){let t="/faction/positions",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rackets(e){let t="/faction/rackets",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async raids(e){let t="/faction/raids",s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rankedwars(e){let t="/faction/rankedwars",s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async reports(e){let t="/faction/reports",s={...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revives(e){let t="/faction/revives",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revivesfull(e){let t="/faction/revivesFull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async search(e){let t="/faction/search",s={...e?.name!==void 0&&{name:e.name},...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async stats(e){let t="/faction/stats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t="/faction/territory",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territoryownership(e){let t="/faction/territoryownership",s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territorywars(e){let t="/faction/territorywars",s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async upgrades(e){let t="/faction/upgrades",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async warfare(e){let t="/faction/warfare",s={...e?.cat!==void 0&&{cat:e.cat},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async wars(e){let t="/faction/wars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/faction/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/faction/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/faction",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.cat!==void 0&&{cat:e.cat},...e?.stat!==void 0&&{stat:e.stat},...e?.filters!==void 0&&{filters:e.filters},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.sort!==void 0&&{sort:e.sort},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new I(this.requester,e)}withChainId(e){return new T(this.requester,e)}withCrimeId(e){return new F(this.requester,e)}withRaidWarId(e){return new k(this.requester,e)}withRankedWarId(e){return new C(this.requester,e)}withTerritoryWarId(e){return new U(this.requester,e)}},I=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async basic(e){let t=`/faction/${this.contextId}/basic`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chain(e){let t=`/faction/${this.contextId}/chain`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chains(e){let t=`/faction/${this.contextId}/chains`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t=`/faction/${this.contextId}/hof`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async members(e){let t=`/faction/${this.contextId}/members`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async raids(e){let t=`/faction/${this.contextId}/raids`,s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rankedwars(e){let t=`/faction/${this.contextId}/rankedwars`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t=`/faction/${this.contextId}/territory`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territorywars(e){let t=`/faction/${this.contextId}/territorywars`,s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async wars(e){let t=`/faction/${this.contextId}/wars`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(){let e=`/faction/${this.contextId}`,t={};return this.requester(e,t)}},T=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async chainreport(e){let t=`/faction/${this.contextId}/chainreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},F=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async crime(e){let t=`/faction/${this.contextId}/crime`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},k=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async raidreport(e){let t=`/faction/${this.contextId}/raidreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},C=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async rankedwarreport(e){let t=`/faction/${this.contextId}/rankedwarreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},U=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async territorywarreport(e){let t=`/faction/${this.contextId}/territorywarreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var f=class{requester;constructor(e){this.requester=e;}async categories(e){let t="/forum/categories",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async threads(e){let t="/forum/threads",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/forum/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/forum/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/forum",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withThreadId(e){return new v(this.requester,e)}withCategoryIds(e){return new x(this.requester,e)}},v=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async posts(e){let t=`/forum/${this.contextId}/posts`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async thread(e){let t=`/forum/${this.contextId}/thread`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},x=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async threads(e){let t=`/forum/${this.contextId}/threads`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var l=class{requester;constructor(e){this.requester=e;}async log(e){let t="/key/log",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async info(e){let t="/key/info",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/key",s={...e?.selections&&{selections:e.selections.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var h=class{requester;constructor(e){this.requester=e;}async bazaar(e){let t="/market/bazaar",s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/market/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/market/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/market",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.cat!==void 0&&{cat:e.cat},...e?.bonus!==void 0&&{bonus:e.bonus},...e?.sort!==void 0&&{sort:e.sort},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new S(this.requester,e)}withPropertyTypeId(e){return new w(this.requester,e)}},S=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async bazaar(e){let t=`/market/${this.contextId}/bazaar`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmarket(e){let t=`/market/${this.contextId}/itemmarket`,s={...e?.bonus!==void 0&&{bonus:e.bonus},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},w=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async properties(e){let t=`/market/${this.contextId}/properties`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rentals(e){let t=`/market/${this.contextId}/rentals`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var y=class{requester;constructor(e){this.requester=e;}withId(e){return new E(this.requester,e)}async lookup(e){let t="/property/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/property/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/property",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},E=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async get(e){let t=`/property/${this.contextId}/property`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var g=class{requester;constructor(e){this.requester=e;}async cars(e){let t="/racing/cars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async carupgrades(e){let t="/racing/carupgrades",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async races(e){let t="/racing/races",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async tracks(e){let t="/racing/tracks",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/racing/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/racing/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/racing",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withRaceId(e){return new A(this.requester,e)}withTrackId(e){return new M(this.requester,e)}},A=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async race(e){let t=`/racing/${this.contextId}/race`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},M=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async records(e){let t=`/racing/${this.contextId}/records`,s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var R=class{requester;constructor(e){this.requester=e;}async attacklog(e){let t="/torn/attacklog",s={...e?.log!==void 0&&{log:e.log},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t="/torn/bounties",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async calendar(e){let t="/torn/calendar",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async crimes(e){let t="/torn/crimes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async education(e){let t="/torn/education",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async elimination(e){let t="/torn/elimination",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async factionhof(e){let t="/torn/factionhof",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async factiontree(e){let t="/torn/factiontree",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async honors(e){let t="/torn/honors",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/torn/hof",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemammo(e){let t="/torn/itemammo",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmods(e){let t="/torn/itemmods",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async items(e){let t="/torn/items",s={...e?.cat!==void 0&&{cat:e.cat},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async logcategories(e){let t="/torn/logcategories",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async logtypes(e){let t="/torn/logtypes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t="/torn/medals",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async merits(e){let t="/torn/merits",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async organizedcrimes(e){let t="/torn/organizedcrimes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t="/torn/properties",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t="/torn/territory",s={...e?.ids&&{ids:e.ids.join(",")},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/torn/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/torn/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/torn",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.sort!==void 0&&{sort:e.sort},...e?.cat!==void 0&&{cat:e.cat},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new L(this.requester,e)}withIds(e){return new D(this.requester,e)}withLogCategoryId(e){return new $(this.requester,e)}withCrimeId(e){return new K(this.requester,e)}},L=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async eliminationteam(e){let t=`/torn/${this.contextId}/eliminationteam`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemdetails(e){let t=`/torn/${this.contextId}/itemdetails`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},D=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async honors(e){let t=`/torn/${this.contextId}/honors`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async items(e){let t=`/torn/${this.contextId}/items`,s={...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t=`/torn/${this.contextId}/medals`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},$=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async logtypes(e){let t=`/torn/${this.contextId}/logtypes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},K=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async subcrimes(e){let t=`/torn/${this.contextId}/subcrimes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var q=class{requester;constructor(e){this.requester=e;}async ammo(e){let t="/user/ammo",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacks(e){let t="/user/attacks",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacksfull(e){let t="/user/attacksfull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bars(e){let t="/user/bars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async basic(e){let t="/user/basic",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async battlestats(e){let t="/user/battlestats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t="/user/bounties",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async calendar(e){let t="/user/calendar",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async competition(e){let t="/user/competition",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async cooldowns(e){let t="/user/cooldowns",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async discord(e){let t="/user/discord",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async education(e){let t="/user/education",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async enlistedcars(e){let t="/user/enlistedcars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async equipment(e){let t="/user/equipment",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async events(e){let t="/user/events",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async faction(e){let t="/user/faction",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumfeed(e){let t="/user/forumfeed",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumfriends(e){let t="/user/forumfriends",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumposts(e){let t="/user/forumposts",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumsubscribedthreads(e){let t="/user/forumsubscribedthreads",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumthreads(e){let t="/user/forumthreads",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/user/hof",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async honors(e){let t="/user/honors",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async icons(e){let t="/user/icons",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmarket(e){let t="/user/itemmarket",s={...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async job(e){let t="/user/job",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async jobpoints(e){let t="/user/jobpoints",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async jobranks(e){let t="/user/jobranks",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async list(e){let t="/user/list",s={...e?.cat!==void 0&&{cat:e.cat},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async log(e){let t="/user/log",s={...e?.log&&{log:e.log.join(",")},...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t="/user/medals",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async merits(e){let t="/user/merits",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async messages(e){let t="/user/messages",s={...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async missions(e){let t="/user/missions",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async money(e){let t="/user/money",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async newevents(e){let t="/user/newevents",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async newmessages(e){let t="/user/newmessages",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async notifications(e){let t="/user/notifications",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async organizedcrime(e){let t="/user/organizedcrime",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async personalstats(e){let t="/user/personalstats",s={...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async profile(e){let t="/user/profile",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t="/user/properties",s={...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async property(e){let t="/user/property",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async races(e){let t="/user/races",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async racingrecords(e){let t="/user/racingrecords",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async refills(e){let t="/user/refills",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async reports(e){let t="/user/reports",s={...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revives(e){let t="/user/revives",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revivesfull(e){let t="/user/revivesFull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async skills(e){let t="/user/skills",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async travel(e){let t="/user/travel",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async virus(e){let t="/user/virus",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async weaponexp(e){let t="/user/weaponexp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async workstats(e){let t="/user/workstats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/user/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/user/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/user",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.filters!==void 0&&{filters:e.filters},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new W(this.requester,e)}withCrimeId(e){return new j(this.requester,e)}},W=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async basic(e){let t=`/user/${this.contextId}/basic`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t=`/user/${this.contextId}/bounties`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async competition(e){let t=`/user/${this.contextId}/competition`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async discord(e){let t=`/user/${this.contextId}/discord`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async faction(e){let t=`/user/${this.contextId}/faction`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumposts(e){let t=`/user/${this.contextId}/forumposts`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumthreads(e){let t=`/user/${this.contextId}/forumthreads`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t=`/user/${this.contextId}/hof`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async icons(e){let t=`/user/${this.contextId}/icons`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async job(e){let t=`/user/${this.contextId}/job`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async personalstats(e){let t=`/user/${this.contextId}/personalstats`,s={...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async profile(e){let t=`/user/${this.contextId}/profile`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t=`/user/${this.contextId}/properties`,s={...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async property(e){let t=`/user/${this.contextId}/property`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(){let e=`/user/${this.contextId}`,t={};return this.requester(e,t)}},j=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async crimes(e){let t=`/user/${this.contextId}/crimes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var c=class extends Error{code;constructor(e){super(e.error),this.name="TornApiError",this.code=e.code;}},d=class extends Error{constructor(e){super(e),this.name="TornRateLimitError";}};var b=class{nextUrl;prevUrl;requester;constructor(e,t,s,r){Object.assign(this,e),this.nextUrl=t,this.prevUrl=s,this.requester=r;}async fetchPage(e){if(!e)return null;let t=new URL(e),s=t.pathname.substring(3),r={};for(let[u,n]of t.searchParams.entries())r[u]=n;return this.requester(s,r)}next(){return this.fetchPage(this.nextUrl)}prev(){return this.fetchPage(this.prevUrl)}};var N=i=>i instanceof Error,z=i=>typeof i=="object"&&i!==null&&"error"in i&&typeof i.error=="object"&&i.error!==null&&"code"in i.error&&"error"in i.error,_=i=>typeof i=="object"&&i!==null&&"_metadata"in i&&typeof i._metadata=="object"&&i._metadata!==null&&"links"in i._metadata,P=class{apiKeys;rateLimitMode;comment;headers;apiUrl;apiKeyBalancing;verbose;apiKeyIndex=0;requestTimestamps=new Map;constructor(e){if(!e.apiKeys||e.apiKeys.length===0)throw new Error("At least one API key must be provided.");this.apiKeys=e.apiKeys,this.rateLimitMode=e.rateLimitMode??"autoDelay",this.comment=e.comment,this.headers=e.headers??{},this.apiUrl=e.apiUrl??"https://api.torn.com/v2",this.apiKeyBalancing=e.apiKeyBalancing??"roundRobin",this.verbose=!!e.verbose;for(let t of this.apiKeys)this.requestTimestamps.set(t,[]);}log(...e){this.verbose&&console.log("[TornClient]",...e);}requester=this.makeRequest.bind(this);isKeyAvailable(e){if(this.rateLimitMode==="ignore")return true;let s=Date.now()-6e4,r=(this.requestTimestamps.get(e)??[]).filter(u=>u>s);return this.requestTimestamps.set(e,r),r.length<100}findAvailableKey(){for(let e=0;e<this.apiKeys.length;e++){let t=this.getApiKey();if(this.isKeyAvailable(t))return t}return null}getMinWaitTime(){let e=Date.now(),t=60100;for(let s of this.apiKeys){let r=this.requestTimestamps.get(s)??[];if(r.length>=100){let u=r[0],n=6e4-(e-u)+100;n<t&&(t=n);}}return Math.max(0,t)}getApiKey(){if(this.apiKeys.length===1)return this.apiKeys[0];if(this.apiKeyBalancing==="random"){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}let e=this.apiKeys[this.apiKeyIndex];return this.apiKeyIndex=(this.apiKeyIndex+1)%this.apiKeys.length,e}async makeRequest(e,t){this.log("Request received:",e,t);let s=this.findAvailableKey();if(!s){if(this.rateLimitMode==="autoDelay"){let n=this.getMinWaitTime();this.log(`All keys are on cooldown. Delaying for ${n}ms...`),await new Promise(o=>setTimeout(o,n)),s=this.findAvailableKey();}if(!s){let n=new d("Rate limit of 100 requests/minute exceeded for all available keys");throw this.log("Rate limit exceeded for all keys"),n}}this.log(`Using API key: ${s.slice(0,5)}...`);let r=new URL(`${this.apiUrl}${e}`);for(let[n,o]of Object.entries(t))o!=null&&n!=="key"&&n!=="comment"&&r.searchParams.set(n,String(o));this.comment&&r.searchParams.set("comment",this.comment);let u={headers:{Accept:"application/json",Authorization:`ApiKey ${s}`,...this.headers}};try{this.log("Fetching:",r.toString());let n=await fetch(r.toString(),u);if(this.rateLimitMode!=="ignore"){let p=this.requestTimestamps.get(s)??[];p.push(Date.now()),this.requestTimestamps.set(s,p);}if(!n.ok)throw new Error(`Request failed with status ${n.status}: ${n.statusText}`);let o=await n.json();if(z(o))throw new c(o.error);let m;return _(o)?m=new b(o,o._metadata.links.next,o._metadata.links.prev,this.requester):m=o,this.log("Response data:",m),m}catch(n){let o=N(n)?n:new Error("An unknown error occurred");throw this.log("Request failed:",o.message),o}}getRateLimitInfo(){let e=Date.now(),t=e-6e4,s={};for(let r of this.apiKeys){let u=(this.requestTimestamps.get(r)??[]).filter(H=>H>t),n=u.length,o=Math.max(0,100-n),m=u[0]??null,p=m?Math.max(0,6e4-(e-m)):0;s[r.slice(0,5)]={used:n,remaining:o,resetInMs:p};}return s}};var B=class{user;faction;market;property;racing;forum;key;torn;rateLimitMode;requestHandler;constructor(e){if(!e.apiKeys||e.apiKeys.length===0)throw new Error("At least one API key is required to initialize the client.");this.rateLimitMode=e.rateLimitMode??"autoDelay",this.requestHandler=new P(e);let t=this.requestHandler.requester;this.user=new q(t),this.faction=new a(t),this.market=new h(t),this.property=new y(t),this.racing=new g(t),this.forum=new f(t),this.torn=new R(t),this.key=new l(t);}getRateLimitInfo(){return this.requestHandler.getRateLimitInfo()}};
|
|
2
|
-
exports.FactionChainIdContext=T;exports.FactionCrimeIdContext=
|
|
1
|
+
'use strict';var a=class{requester;constructor(e){this.requester=e;}async applications(e){let t="/faction/applications",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacks(e){let t="/faction/attacks",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacksfull(e){let t="/faction/attacksfull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async balance(e){let t="/faction/balance",s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async basic(e){let t="/faction/basic",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chain(e){let t="/faction/chain",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chains(e){let t="/faction/chains",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chainreport(e){let t="/faction/chainreport",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async contributors(e){let t="/faction/contributors",s={...e?.stat!==void 0&&{stat:e.stat},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async crimes(e){let t="/faction/crimes",s={...e?.cat!==void 0&&{cat:e.cat},...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/faction/hof",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async members(e){let t="/faction/members",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async news(e){let t="/faction/news",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async positions(e){let t="/faction/positions",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rackets(e){let t="/faction/rackets",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async raids(e){let t="/faction/raids",s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rankedwars(e){let t="/faction/rankedwars",s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async reports(e){let t="/faction/reports",s={...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revives(e){let t="/faction/revives",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revivesfull(e){let t="/faction/revivesFull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async search(e){let t="/faction/search",s={...e?.name!==void 0&&{name:e.name},...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async stats(e){let t="/faction/stats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t="/faction/territory",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territoryownership(e){let t="/faction/territoryownership",s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territorywars(e){let t="/faction/territorywars",s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async upgrades(e){let t="/faction/upgrades",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async warfare(e){let t="/faction/warfare",s={...e?.cat!==void 0&&{cat:e.cat},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async wars(e){let t="/faction/wars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/faction/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/faction/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/faction",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.cat!==void 0&&{cat:e.cat},...e?.stat!==void 0&&{stat:e.stat},...e?.filters!==void 0&&{filters:e.filters},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.sort!==void 0&&{sort:e.sort},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new I(this.requester,e)}withChainId(e){return new T(this.requester,e)}withCrimeId(e){return new k(this.requester,e)}withRaidWarId(e){return new F(this.requester,e)}withRankedWarId(e){return new C(this.requester,e)}withTerritoryWarId(e){return new U(this.requester,e)}},I=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async basic(e){let t=`/faction/${this.contextId}/basic`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chain(e){let t=`/faction/${this.contextId}/chain`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async chains(e){let t=`/faction/${this.contextId}/chains`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t=`/faction/${this.contextId}/hof`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async members(e){let t=`/faction/${this.contextId}/members`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async raids(e){let t=`/faction/${this.contextId}/raids`,s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rankedwars(e){let t=`/faction/${this.contextId}/rankedwars`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t=`/faction/${this.contextId}/territory`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territorywars(e){let t=`/faction/${this.contextId}/territorywars`,s={...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async wars(e){let t=`/faction/${this.contextId}/wars`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(){let e=`/faction/${this.contextId}`,t={};return this.requester(e,t)}},T=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async chainreport(e){let t=`/faction/${this.contextId}/chainreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},k=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async crime(e){let t=`/faction/${this.contextId}/crime`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},F=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async raidreport(e){let t=`/faction/${this.contextId}/raidreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},C=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async rankedwarreport(e){let t=`/faction/${this.contextId}/rankedwarreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},U=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async territorywarreport(e){let t=`/faction/${this.contextId}/territorywarreport`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var f=class{requester;constructor(e){this.requester=e;}async categories(e){let t="/forum/categories",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async threads(e){let t="/forum/threads",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/forum/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/forum/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/forum",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withThreadId(e){return new v(this.requester,e)}withCategoryIds(e){return new x(this.requester,e)}},v=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async posts(e){let t=`/forum/${this.contextId}/posts`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async thread(e){let t=`/forum/${this.contextId}/thread`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},x=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async threads(e){let t=`/forum/${this.contextId}/threads`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var l=class{requester;constructor(e){this.requester=e;}async log(e){let t="/key/log",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async info(e){let t="/key/info",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/key",s={...e?.selections&&{selections:e.selections.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var h=class{requester;constructor(e){this.requester=e;}async bazaar(e){let t="/market/bazaar",s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/market/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/market/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/market",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.cat!==void 0&&{cat:e.cat},...e?.bonus!==void 0&&{bonus:e.bonus},...e?.sort!==void 0&&{sort:e.sort},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new S(this.requester,e)}withPropertyTypeId(e){return new w(this.requester,e)}},S=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async bazaar(e){let t=`/market/${this.contextId}/bazaar`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmarket(e){let t=`/market/${this.contextId}/itemmarket`,s={...e?.bonus!==void 0&&{bonus:e.bonus},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},w=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async properties(e){let t=`/market/${this.contextId}/properties`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async rentals(e){let t=`/market/${this.contextId}/rentals`,s={...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var y=class{requester;constructor(e){this.requester=e;}withId(e){return new E(this.requester,e)}async lookup(e){let t="/property/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/property/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/property",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},E=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async get(e){let t=`/property/${this.contextId}/property`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var g=class{requester;constructor(e){this.requester=e;}async cars(e){let t="/racing/cars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async carupgrades(e){let t="/racing/carupgrades",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async races(e){let t="/racing/races",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async tracks(e){let t="/racing/tracks",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/racing/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/racing/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/racing",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.cat!==void 0&&{cat:e.cat},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withRaceId(e){return new A(this.requester,e)}withTrackId(e){return new M(this.requester,e)}},A=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async race(e){let t=`/racing/${this.contextId}/race`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},M=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async records(e){let t=`/racing/${this.contextId}/records`,s={...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var R=class{requester;constructor(e){this.requester=e;}async attacklog(e){let t="/torn/attacklog",s={...e?.log!==void 0&&{log:e.log},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t="/torn/bounties",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async calendar(e){let t="/torn/calendar",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async crimes(e){let t="/torn/crimes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async education(e){let t="/torn/education",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async elimination(e){let t="/torn/elimination",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async factionhof(e){let t="/torn/factionhof",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async factiontree(e){let t="/torn/factiontree",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async honors(e){let t="/torn/honors",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/torn/hof",s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemammo(e){let t="/torn/itemammo",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmods(e){let t="/torn/itemmods",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async items(e){let t="/torn/items",s={...e?.cat!==void 0&&{cat:e.cat},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async logcategories(e){let t="/torn/logcategories",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async logtypes(e){let t="/torn/logtypes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t="/torn/medals",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async merits(e){let t="/torn/merits",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async organizedcrimes(e){let t="/torn/organizedcrimes",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t="/torn/properties",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async territory(e){let t="/torn/territory",s={...e?.ids&&{ids:e.ids.join(",")},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/torn/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/torn/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/torn",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.sort!==void 0&&{sort:e.sort},...e?.cat!==void 0&&{cat:e.cat},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new L(this.requester,e)}withIds(e){return new D(this.requester,e)}withLogCategoryId(e){return new $(this.requester,e)}withCrimeId(e){return new K(this.requester,e)}},L=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async eliminationteam(e){let t=`/torn/${this.contextId}/eliminationteam`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemdetails(e){let t=`/torn/${this.contextId}/itemdetails`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},D=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async honors(e){let t=`/torn/${this.contextId}/honors`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async items(e){let t=`/torn/${this.contextId}/items`,s={...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t=`/torn/${this.contextId}/medals`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},$=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async logtypes(e){let t=`/torn/${this.contextId}/logtypes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}},K=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async subcrimes(e){let t=`/torn/${this.contextId}/subcrimes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var q=class{requester;constructor(e){this.requester=e;}async ammo(e){let t="/user/ammo",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacks(e){let t="/user/attacks",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async attacksfull(e){let t="/user/attacksfull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bars(e){let t="/user/bars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async basic(e){let t="/user/basic",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async battlestats(e){let t="/user/battlestats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t="/user/bounties",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async calendar(e){let t="/user/calendar",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async competition(e){let t="/user/competition",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async cooldowns(e){let t="/user/cooldowns",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async discord(e){let t="/user/discord",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async education(e){let t="/user/education",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async enlistedcars(e){let t="/user/enlistedcars",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async equipment(e){let t="/user/equipment",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async events(e){let t="/user/events",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async faction(e){let t="/user/faction",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumfeed(e){let t="/user/forumfeed",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumfriends(e){let t="/user/forumfriends",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumposts(e){let t="/user/forumposts",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumsubscribedthreads(e){let t="/user/forumsubscribedthreads",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumthreads(e){let t="/user/forumthreads",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t="/user/hof",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async honors(e){let t="/user/honors",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async icons(e){let t="/user/icons",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async itemmarket(e){let t="/user/itemmarket",s={...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async job(e){let t="/user/job",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async jobpoints(e){let t="/user/jobpoints",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async jobranks(e){let t="/user/jobranks",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async list(e){let t="/user/list",s={...e?.cat!==void 0&&{cat:e.cat},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async log(e){let t="/user/log",s={...e?.log&&{log:e.log.join(",")},...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async medals(e){let t="/user/medals",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async merits(e){let t="/user/merits",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async messages(e){let t="/user/messages",s={...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async missions(e){let t="/user/missions",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async money(e){let t="/user/money",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async newevents(e){let t="/user/newevents",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async newmessages(e){let t="/user/newmessages",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async notifications(e){let t="/user/notifications",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async organizedcrime(e){let t="/user/organizedcrime",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async personalstats(e){let t="/user/personalstats",s={...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async profile(e){let t="/user/profile",s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t="/user/properties",s={...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async property(e){let t="/user/property",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async races(e){let t="/user/races",s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.cat!==void 0&&{cat:e.cat},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async racingrecords(e){let t="/user/racingrecords",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async refills(e){let t="/user/refills",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async reports(e){let t="/user/reports",s={...e?.cat!==void 0&&{cat:e.cat},...e?.target!==void 0&&{target:e.target},...e?.limit!==void 0&&{limit:e.limit},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revives(e){let t="/user/revives",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async revivesfull(e){let t="/user/revivesFull",s={...e?.filters&&{filters:e.filters.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.to!==void 0&&{to:e.to},...e?.from!==void 0&&{from:e.from},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async skills(e){let t="/user/skills",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async travel(e){let t="/user/travel",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async virus(e){let t="/user/virus",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async weaponexp(e){let t="/user/weaponexp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async workstats(e){let t="/user/workstats",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async lookup(e){let t="/user/lookup",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async timestamp(e){let t="/user/timestamp",s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(e){let t="/user",s={...e?.selections&&{selections:e.selections.join(",")},...e?.id!==void 0&&{id:e.id},...e?.legacy&&{legacy:e.legacy.join(",")},...e?.limit!==void 0&&{limit:e.limit},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.sort!==void 0&&{sort:e.sort},...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.filters!==void 0&&{filters:e.filters},...e?.striptags!==void 0&&{striptags:e.striptags},...e?.offset!==void 0&&{offset:e.offset},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}withId(e){return new W(this.requester,e)}withCrimeId(e){return new j(this.requester,e)}},W=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async basic(e){let t=`/user/${this.contextId}/basic`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async bounties(e){let t=`/user/${this.contextId}/bounties`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async competition(e){let t=`/user/${this.contextId}/competition`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async discord(e){let t=`/user/${this.contextId}/discord`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async faction(e){let t=`/user/${this.contextId}/faction`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumposts(e){let t=`/user/${this.contextId}/forumposts`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async forumthreads(e){let t=`/user/${this.contextId}/forumthreads`,s={...e?.limit!==void 0&&{limit:e.limit},...e?.sort!==void 0&&{sort:e.sort},...e?.from!==void 0&&{from:e.from},...e?.to!==void 0&&{to:e.to},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async hof(e){let t=`/user/${this.contextId}/hof`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async icons(e){let t=`/user/${this.contextId}/icons`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async job(e){let t=`/user/${this.contextId}/job`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async personalstats(e){let t=`/user/${this.contextId}/personalstats`,s={...e?.cat!==void 0&&{cat:e.cat},...e?.stat&&{stat:e.stat.join(",")},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async profile(e){let t=`/user/${this.contextId}/profile`,s={...e?.striptags!==void 0&&{striptags:e.striptags},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async properties(e){let t=`/user/${this.contextId}/properties`,s={...e?.filters!==void 0&&{filters:e.filters},...e?.offset!==void 0&&{offset:e.offset},...e?.limit!==void 0&&{limit:e.limit},...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async property(e){let t=`/user/${this.contextId}/property`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}async get(){let e=`/user/${this.contextId}`,t={};return this.requester(e,t)}},j=class{requester;contextId;constructor(e,t){this.requester=e,this.contextId=t;}async crimes(e){let t=`/user/${this.contextId}/crimes`,s={...e?.timestamp!==void 0&&{timestamp:e.timestamp}};return this.requester(t,s)}};var c=class extends Error{code;constructor(e){super(e.error),this.name="TornApiError",this.code=e.code;}},d=class extends Error{constructor(e){super(e),this.name="TornRateLimitError";}};var b=class{nextUrl;prevUrl;requester;constructor(e,t,s,r){Object.assign(this,e),this.nextUrl=t,this.prevUrl=s,this.requester=r;}async fetchPage(e){if(!e)return null;let t=new URL(e),s=t.pathname.substring(3),r={};for(let[u,n]of t.searchParams.entries())r[u]=n;return this.requester(s,r)}next(){return this.fetchPage(this.nextUrl)}prev(){return this.fetchPage(this.prevUrl)}};var N=i=>i instanceof Error,z=i=>typeof i=="object"&&i!==null&&"error"in i&&typeof i.error=="object"&&i.error!==null&&"code"in i.error&&"error"in i.error,_=i=>typeof i=="object"&&i!==null&&"_metadata"in i&&typeof i._metadata=="object"&&i._metadata!==null&&"links"in i._metadata,P=class{apiKeys;rateLimitMode;comment;headers;apiUrl;apiKeyBalancing;verbose;apiKeyIndex=0;requestTimestamps=new Map;constructor(e){if(!e.apiKeys||e.apiKeys.length===0)throw new Error("At least one API key must be provided.");this.apiKeys=e.apiKeys,this.rateLimitMode=e.rateLimitMode??"autoDelay",this.comment=e.comment,this.headers=e.headers??{},this.apiUrl=e.apiUrl??"https://api.torn.com/v2",this.apiKeyBalancing=e.apiKeyBalancing??"roundRobin",this.verbose=!!e.verbose;for(let t of this.apiKeys)this.requestTimestamps.set(t,[]);}log(...e){this.verbose&&console.log("[TornClient]",...e);}requester=this.makeRequest.bind(this);isKeyAvailable(e){if(this.rateLimitMode==="ignore")return true;let s=Date.now()-6e4,r=(this.requestTimestamps.get(e)??[]).filter(u=>u>s);return this.requestTimestamps.set(e,r),r.length<100}findAvailableKey(){for(let e=0;e<this.apiKeys.length;e++){let t=this.getApiKey();if(this.isKeyAvailable(t))return t}return null}getMinWaitTime(){let e=Date.now(),t=60100;for(let s of this.apiKeys){let r=this.requestTimestamps.get(s)??[];if(r.length>=100){let u=r[0],n=6e4-(e-u)+100;n<t&&(t=n);}}return Math.max(0,t)}getApiKey(){if(this.apiKeys.length===1)return this.apiKeys[0];if(this.apiKeyBalancing==="random"){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}let e=this.apiKeys[this.apiKeyIndex];return this.apiKeyIndex=(this.apiKeyIndex+1)%this.apiKeys.length,e}async makeRequest(e,t){this.log("Request received:",e,t);let s=this.findAvailableKey();if(!s){if(this.rateLimitMode==="autoDelay"){let n=this.getMinWaitTime();this.log(`All keys are on cooldown. Delaying for ${n}ms...`),await new Promise(o=>setTimeout(o,n)),s=this.findAvailableKey();}if(!s){let n=new d("Rate limit of 100 requests/minute exceeded for all available keys");throw this.log("Rate limit exceeded for all keys"),n}}this.log(`Using API key: ${s.slice(0,5)}...`);let r=new URL(`${this.apiUrl}${e}`);for(let[n,o]of Object.entries(t))o!=null&&n!=="key"&&n!=="comment"&&r.searchParams.set(n,String(o));this.comment&&r.searchParams.set("comment",this.comment);let u={headers:{Accept:"application/json",Authorization:`ApiKey ${s}`,...this.headers}};try{this.log("Fetching:",r.toString());let n=await fetch(r.toString(),u);if(this.rateLimitMode!=="ignore"){let p=this.requestTimestamps.get(s)??[];p.push(Date.now()),this.requestTimestamps.set(s,p);}if(!n.ok)throw new Error(`Request failed with status ${n.status}: ${n.statusText}`);let o=await n.json();if(z(o))throw new c(o.error);let m;return _(o)?m=new b(o,o._metadata.links.next,o._metadata.links.prev,this.requester):m=o,this.log("Response data:",m),m}catch(n){let o=N(n)?n:new Error("An unknown error occurred");throw this.log("Request failed:",o.message),o}}getRateLimitInfo(){let e=Date.now(),t=e-6e4,s={};for(let r of this.apiKeys){let u=(this.requestTimestamps.get(r)??[]).filter(H=>H>t),n=u.length,o=Math.max(0,100-n),m=u[0]??null,p=m?Math.max(0,6e4-(e-m)):0;s[r.slice(0,5)]={used:n,remaining:o,resetInMs:p};}return s}};var B=class{user;faction;market;property;racing;forum;key;torn;rateLimitMode;requestHandler;constructor(e){if(!e.apiKeys||e.apiKeys.length===0)throw new Error("At least one API key is required to initialize the client.");this.rateLimitMode=e.rateLimitMode??"autoDelay",this.requestHandler=new P(e);let t=this.requestHandler.requester;this.user=new q(t),this.faction=new a(t),this.market=new h(t),this.property=new y(t),this.racing=new g(t),this.forum=new f(t),this.torn=new R(t),this.key=new l(t);}getRateLimitInfo(){return this.requestHandler.getRateLimitInfo()}};
|
|
2
|
+
exports.FactionChainIdContext=T;exports.FactionCrimeIdContext=k;exports.FactionEndpoint=a;exports.FactionIdContext=I;exports.FactionRaidWarIdContext=F;exports.FactionRankedWarIdContext=C;exports.FactionTerritoryWarIdContext=U;exports.ForumCategoryIdsContext=x;exports.ForumEndpoint=f;exports.ForumThreadIdContext=v;exports.KeyEndpoint=l;exports.MarketEndpoint=h;exports.MarketIdContext=S;exports.MarketPropertyTypeIdContext=w;exports.PaginatedResponse=b;exports.PropertyEndpoint=y;exports.PropertyIdContext=E;exports.RacingEndpoint=g;exports.RacingRaceIdContext=A;exports.RacingTrackIdContext=M;exports.TornAPI=B;exports.TornApiError=c;exports.TornCrimeIdContext=K;exports.TornEndpoint=R;exports.TornIdContext=L;exports.TornIdsContext=D;exports.TornLogCategoryIdContext=$;exports.TornRateLimitError=d;exports.UserCrimeIdContext=j;exports.UserEndpoint=q;exports.UserIdContext=W;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|