tornapi-typescript 5.8.1 → 6.0.0
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/README.md +6 -6
- package/dist/index.d.ts +58 -17
- package/dist/index.ts +77 -17
- package/dist/openapi.json +468 -38
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -27,12 +27,12 @@ generated above.
|
|
|
27
27
|
|
|
28
28
|
The V2 types are generated in the following way:
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
- load [openapi specification](https://www.torn.com/swagger/openapi.json)
|
|
31
|
+
- convert the specification to TypeScript definitions using [typeconv](https://github.com/grantila/typeconv)
|
|
32
|
+
- clean the type definitions
|
|
33
|
+
- remove all "[key: string]: any;", because typeconv adds it everywhere for some reason
|
|
34
|
+
- remove all empty objects (caused by the above cleaning)
|
|
35
|
+
- run through prettier to have it look decent
|
|
36
36
|
|
|
37
37
|
### V2 client
|
|
38
38
|
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type FactionPositionAbilityEnum = "Medical Usage" | "Booster Usage" | "Dr
|
|
|
33
33
|
export type FactionOrganizedCrimePayoutType = "balance" | "wallet" | "inventory";
|
|
34
34
|
export type TornRacketType = "Item" | "Points" | "Money";
|
|
35
35
|
export type FactionNewsCategory = "main" | "attack" | "armoryDeposit" | "armoryAction" | "territoryWar" | "rankedWar" | "territoryGain" | "chain" | "crime" | "membership" | "depositFunds" | "giveFunds";
|
|
36
|
+
export type CompanyNewsCategory = "main" | "funds" | "training" | "employees" | "all";
|
|
36
37
|
export type FactionRankEnum = "Unranked" | "Bronze" | "Silver" | "Gold" | "Platinum" | "Diamond";
|
|
37
38
|
export type UserCrimeUniquesRewardAmmoEnum = "standard" | "special";
|
|
38
39
|
export type RaceStatusEnum = "open" | "in_progress" | "finished";
|
|
@@ -142,6 +143,7 @@ export type CompanyStaffRoomSizeEnum = "No staff room" | "Small staff room" | "S
|
|
|
142
143
|
export type CompanyStorageSizeEnum = "Small room" | "Standard room" | "Large room" | "Huge room" | "Warehouse" | "Large warehouse" | "Huge warehouse";
|
|
143
144
|
export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown" | "Unknown Rarity";
|
|
144
145
|
export type AwardCrimesVersionEnum = "v1" | "v2";
|
|
146
|
+
export type CompanySearchParameter = string;
|
|
145
147
|
export type Parameters = string;
|
|
146
148
|
export type ReviveSetting = "Everyone" | "Friends & faction" | "No one" | "Unknown";
|
|
147
149
|
export type FactionWarfareTypeEnum = "ranked" | "territory" | "raid" | "chain" | "chainOngoing" | "db";
|
|
@@ -495,7 +497,11 @@ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
|
|
|
495
497
|
code: 29;
|
|
496
498
|
error: string;
|
|
497
499
|
}
|
|
498
|
-
export
|
|
500
|
+
export interface ErrorFileDoesNotExist {
|
|
501
|
+
code: 30;
|
|
502
|
+
error: string;
|
|
503
|
+
}
|
|
504
|
+
export type ApiError = ErrorUnknown | ErrorKeyEmpty | ErrorIncorrectKey | ErrorWrongType | ErrorWrongFields | ErrorTooManyRequests | ErrorIncorrectId | ErrorIncorrectIdEntityRelation | ErrorIpBlocked | ErrorApiDisabled | ErrorKeyOwnerInFederalJail | ErrorKeyChangeCooldown | ErrorKeyReadError | ErrorKeyTemporaryDisabled | ErrorDailyReadLimitReached | ErrorLogUnavailable | ErrorAccessLevelTooLow | ErrorBackendError | ErrorApiKeyPaused | ErrorMustMigrateToCrimesV2 | ErrorRaceNotFinished | ErrorIncorrectCategory | ErrorOnlyAvailableInApiV1 | ErrorOnlyAvailableInApiV2 | ErrorClosedTemporarily | ErrorInvalidStatRequested | ErrorOnlyCategoryOrStatsAllowed | ErrorMustMigrateToOrganizedCrimesV2 | ErrorIncorrectLogId | ErrorCategorySelectionUnavailableForInteractionLogs | ErrorFileDoesNotExist;
|
|
499
505
|
export interface UserItemMod {
|
|
500
506
|
id: ItemModId;
|
|
501
507
|
title: string;
|
|
@@ -2099,6 +2105,7 @@ export interface FactionSearch {
|
|
|
2099
2105
|
name: string;
|
|
2100
2106
|
respect: number;
|
|
2101
2107
|
members: number;
|
|
2108
|
+
members_max: number;
|
|
2102
2109
|
leader: FactionSearchLeader;
|
|
2103
2110
|
co_leader: FactionSearchLeader | null;
|
|
2104
2111
|
image: string | null;
|
|
@@ -2170,6 +2177,7 @@ export interface FactionTerritoryWarReportResponse {
|
|
|
2170
2177
|
}
|
|
2171
2178
|
export interface FactionTerritoryOwnership {
|
|
2172
2179
|
id: string;
|
|
2180
|
+
irradiated: boolean;
|
|
2173
2181
|
owned_by: FactionId | null;
|
|
2174
2182
|
acquired_at: number | null;
|
|
2175
2183
|
}
|
|
@@ -2395,13 +2403,13 @@ export interface FactionWarsResponse {
|
|
|
2395
2403
|
pacts: FactionPact[];
|
|
2396
2404
|
wars: FactionWars;
|
|
2397
2405
|
}
|
|
2398
|
-
export interface
|
|
2406
|
+
export interface News {
|
|
2399
2407
|
id: string;
|
|
2400
2408
|
text: string;
|
|
2401
2409
|
timestamp: number;
|
|
2402
2410
|
}
|
|
2403
|
-
export interface
|
|
2404
|
-
news:
|
|
2411
|
+
export interface NewsResponse {
|
|
2412
|
+
news: News[];
|
|
2405
2413
|
_metadata: RequestMetadataWithLinks;
|
|
2406
2414
|
}
|
|
2407
2415
|
export interface FactionRaidsResponse {
|
|
@@ -2566,9 +2574,6 @@ export interface FactionCrimeReward {
|
|
|
2566
2574
|
export interface FactionCrimeSlot {
|
|
2567
2575
|
position: string;
|
|
2568
2576
|
position_info: FactionSlotPositionInfo;
|
|
2569
|
-
position_id?: TornOrganizedCrimePositionIdDeprecated;
|
|
2570
|
-
/** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
|
|
2571
|
-
position_number?: number;
|
|
2572
2577
|
item_requirement: {
|
|
2573
2578
|
id: ItemId;
|
|
2574
2579
|
/** Shows if the item is reusable or consumed during the crime.<br><b>Important note: There may be alternative paths which won't consume the item, even if the item is non-reusable.</b> */
|
|
@@ -2687,14 +2692,22 @@ export interface FactionRankedWarReportResponse {
|
|
|
2687
2692
|
}[];
|
|
2688
2693
|
};
|
|
2689
2694
|
}
|
|
2690
|
-
/**
|
|
2691
|
-
* The following selections will fallback to API v1 and may change at any time: 'companies', 'news', 'search'.
|
|
2692
|
-
* * The following selections are not available in API v2: 'details'.
|
|
2693
|
-
*/
|
|
2695
|
+
/** The following selections are not available in API v2: 'details'. */
|
|
2694
2696
|
export type CompanySelectionName = string;
|
|
2695
2697
|
export interface CompanyLookupResponse {
|
|
2696
2698
|
selections: CompanySelectionName[];
|
|
2697
2699
|
}
|
|
2700
|
+
export interface CompaniesResponse {
|
|
2701
|
+
companies: CompanyProfile[];
|
|
2702
|
+
companies_timestamp: number;
|
|
2703
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
2704
|
+
companies_delay: number;
|
|
2705
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
2706
|
+
}
|
|
2707
|
+
export interface CompaniesSearchResponse {
|
|
2708
|
+
search: CompanySearchProfile[];
|
|
2709
|
+
_metadata: RequestMetadataWithLinks;
|
|
2710
|
+
}
|
|
2698
2711
|
export interface CompanyProfileResponse {
|
|
2699
2712
|
profile: CompanyProfile;
|
|
2700
2713
|
}
|
|
@@ -2710,7 +2723,6 @@ export interface CompanyProfileExtended extends CompanyProfile {
|
|
|
2710
2723
|
efficiency: number;
|
|
2711
2724
|
environment: number;
|
|
2712
2725
|
trains: number;
|
|
2713
|
-
applications_allowed: boolean;
|
|
2714
2726
|
advertisement_budget: number;
|
|
2715
2727
|
upgrades: CompanyUpgrades;
|
|
2716
2728
|
value: number;
|
|
@@ -2725,13 +2737,27 @@ export interface CompanyProfile {
|
|
|
2725
2737
|
name: string;
|
|
2726
2738
|
created_at: number;
|
|
2727
2739
|
days_old: number;
|
|
2728
|
-
image: string;
|
|
2740
|
+
image: string | null;
|
|
2729
2741
|
type: CompanyType;
|
|
2730
2742
|
rating: number;
|
|
2731
2743
|
director: CompanyDirector;
|
|
2732
2744
|
employees: CompanyEmployees;
|
|
2733
2745
|
income: CompanyIncome;
|
|
2734
2746
|
customers: CompanyCustomers;
|
|
2747
|
+
applications_allowed: boolean;
|
|
2748
|
+
}
|
|
2749
|
+
export interface CompanySearchProfile {
|
|
2750
|
+
id: CompanyId;
|
|
2751
|
+
name: string;
|
|
2752
|
+
created_at: number;
|
|
2753
|
+
days_old: number;
|
|
2754
|
+
image: string | null;
|
|
2755
|
+
type: CompanyType;
|
|
2756
|
+
rating: number;
|
|
2757
|
+
employees: CompanyEmployees;
|
|
2758
|
+
income: CompanyIncome;
|
|
2759
|
+
customers: CompanyCustomers;
|
|
2760
|
+
applications_allowed: boolean;
|
|
2735
2761
|
}
|
|
2736
2762
|
export interface CompanyType {
|
|
2737
2763
|
id: CompanyTypeId;
|
|
@@ -3256,7 +3282,7 @@ export interface RacingRaceDetails extends Race {
|
|
|
3256
3282
|
is_official: boolean;
|
|
3257
3283
|
}
|
|
3258
3284
|
export type UserRaceDetails = RacingRaceDetails & {
|
|
3259
|
-
skill_gain: number;
|
|
3285
|
+
skill_gain: number | null;
|
|
3260
3286
|
};
|
|
3261
3287
|
export interface RacingRaceDetailsResponse {
|
|
3262
3288
|
race: RacingRaceDetails;
|
|
@@ -3424,7 +3450,6 @@ export interface TornOrganizedCrimeScope {
|
|
|
3424
3450
|
return: number;
|
|
3425
3451
|
}
|
|
3426
3452
|
export interface TornOrganizedCrimeSlot {
|
|
3427
|
-
id?: TornOrganizedCrimePositionIdDeprecated;
|
|
3428
3453
|
position_info: FactionSlotPositionInfo;
|
|
3429
3454
|
name: string;
|
|
3430
3455
|
required_item: TornOrganizedCrimeRequiredItem | null;
|
|
@@ -3639,7 +3664,7 @@ export interface TornBountiesResponse {
|
|
|
3639
3664
|
bounties: Bounty[];
|
|
3640
3665
|
bounties_timestamp: number;
|
|
3641
3666
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
3642
|
-
bounties_delay
|
|
3667
|
+
bounties_delay: number;
|
|
3643
3668
|
_metadata: RequestMetadataWithLinksAndTotal;
|
|
3644
3669
|
}
|
|
3645
3670
|
export interface TornItemAmmo {
|
|
@@ -7328,7 +7353,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
7328
7353
|
params: "striptags" | "timestamp";
|
|
7329
7354
|
};
|
|
7330
7355
|
news: {
|
|
7331
|
-
response:
|
|
7356
|
+
response: NewsResponse;
|
|
7332
7357
|
params: "striptags" | "limit" | "sort" | "to" | "from" | "cat" | "timestamp";
|
|
7333
7358
|
};
|
|
7334
7359
|
positions: {
|
|
@@ -7423,10 +7448,26 @@ export interface CompanyV2 extends BaseSchema {
|
|
|
7423
7448
|
response: CompanyEmployeesResponse;
|
|
7424
7449
|
params: "striptags" | "timestamp";
|
|
7425
7450
|
};
|
|
7451
|
+
news: {
|
|
7452
|
+
response: NewsResponse;
|
|
7453
|
+
params: "striptags" | "limit" | "sort" | "to" | "from" | "cat" | "timestamp";
|
|
7454
|
+
};
|
|
7455
|
+
companies: {
|
|
7456
|
+
response: CompaniesResponse;
|
|
7457
|
+
params: "typeId" | "limit" | "offset" | "striptags" | "timestamp";
|
|
7458
|
+
};
|
|
7426
7459
|
profile: {
|
|
7427
7460
|
response: CompanyProfileResponseMixed;
|
|
7428
7461
|
params: "striptags" | "timestamp";
|
|
7429
7462
|
};
|
|
7463
|
+
search: {
|
|
7464
|
+
response: CompaniesSearchResponse;
|
|
7465
|
+
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
7466
|
+
};
|
|
7467
|
+
snapshot: {
|
|
7468
|
+
response: null;
|
|
7469
|
+
params: "timestamp";
|
|
7470
|
+
};
|
|
7430
7471
|
stock: {
|
|
7431
7472
|
response: CompanyStockResponse;
|
|
7432
7473
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -4447,6 +4447,13 @@ export type FactionNewsCategory =
|
|
|
4447
4447
|
| "depositFunds"
|
|
4448
4448
|
| "giveFunds";
|
|
4449
4449
|
|
|
4450
|
+
export type CompanyNewsCategory =
|
|
4451
|
+
| "main"
|
|
4452
|
+
| "funds"
|
|
4453
|
+
| "training"
|
|
4454
|
+
| "employees"
|
|
4455
|
+
| "all";
|
|
4456
|
+
|
|
4450
4457
|
export type FactionRankEnum =
|
|
4451
4458
|
| "Unranked"
|
|
4452
4459
|
| "Bronze"
|
|
@@ -4904,6 +4911,8 @@ export type HonorRarityEnum =
|
|
|
4904
4911
|
|
|
4905
4912
|
export type AwardCrimesVersionEnum = "v1" | "v2";
|
|
4906
4913
|
|
|
4914
|
+
export type CompanySearchParameter = string;
|
|
4915
|
+
|
|
4907
4916
|
export type Parameters = string;
|
|
4908
4917
|
|
|
4909
4918
|
export type ReviveSetting =
|
|
@@ -5544,6 +5553,11 @@ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
|
|
|
5544
5553
|
error: string;
|
|
5545
5554
|
}
|
|
5546
5555
|
|
|
5556
|
+
export interface ErrorFileDoesNotExist {
|
|
5557
|
+
code: 30;
|
|
5558
|
+
error: string;
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5547
5561
|
export type ApiError =
|
|
5548
5562
|
| ErrorUnknown
|
|
5549
5563
|
| ErrorKeyEmpty
|
|
@@ -5574,7 +5588,8 @@ export type ApiError =
|
|
|
5574
5588
|
| ErrorOnlyCategoryOrStatsAllowed
|
|
5575
5589
|
| ErrorMustMigrateToOrganizedCrimesV2
|
|
5576
5590
|
| ErrorIncorrectLogId
|
|
5577
|
-
| ErrorCategorySelectionUnavailableForInteractionLogs
|
|
5591
|
+
| ErrorCategorySelectionUnavailableForInteractionLogs
|
|
5592
|
+
| ErrorFileDoesNotExist;
|
|
5578
5593
|
|
|
5579
5594
|
export interface UserItemMod {
|
|
5580
5595
|
id: ItemModId;
|
|
@@ -7715,6 +7730,7 @@ export interface FactionSearch {
|
|
|
7715
7730
|
name: string;
|
|
7716
7731
|
respect: number;
|
|
7717
7732
|
members: number;
|
|
7733
|
+
members_max: number;
|
|
7718
7734
|
leader: FactionSearchLeader;
|
|
7719
7735
|
co_leader: FactionSearchLeader | null;
|
|
7720
7736
|
image: string | null;
|
|
@@ -7796,6 +7812,7 @@ export interface FactionTerritoryWarReportResponse {
|
|
|
7796
7812
|
|
|
7797
7813
|
export interface FactionTerritoryOwnership {
|
|
7798
7814
|
id: string;
|
|
7815
|
+
irradiated: boolean;
|
|
7799
7816
|
owned_by: FactionId | null;
|
|
7800
7817
|
acquired_at: number | null;
|
|
7801
7818
|
}
|
|
@@ -8056,14 +8073,14 @@ export interface FactionWarsResponse {
|
|
|
8056
8073
|
wars: FactionWars;
|
|
8057
8074
|
}
|
|
8058
8075
|
|
|
8059
|
-
export interface
|
|
8076
|
+
export interface News {
|
|
8060
8077
|
id: string;
|
|
8061
8078
|
text: string;
|
|
8062
8079
|
timestamp: number;
|
|
8063
8080
|
}
|
|
8064
8081
|
|
|
8065
|
-
export interface
|
|
8066
|
-
news:
|
|
8082
|
+
export interface NewsResponse {
|
|
8083
|
+
news: News[];
|
|
8067
8084
|
_metadata: RequestMetadataWithLinks;
|
|
8068
8085
|
}
|
|
8069
8086
|
|
|
@@ -8251,9 +8268,6 @@ export interface FactionCrimeReward {
|
|
|
8251
8268
|
export interface FactionCrimeSlot {
|
|
8252
8269
|
position: string;
|
|
8253
8270
|
position_info: FactionSlotPositionInfo;
|
|
8254
|
-
position_id?: TornOrganizedCrimePositionIdDeprecated;
|
|
8255
|
-
/** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
|
|
8256
|
-
position_number?: number;
|
|
8257
8271
|
item_requirement: {
|
|
8258
8272
|
id: ItemId;
|
|
8259
8273
|
/** Shows if the item is reusable or consumed during the crime.<br><b>Important note: There may be alternative paths which won't consume the item, even if the item is non-reusable.</b> */
|
|
@@ -8389,16 +8403,26 @@ export interface FactionRankedWarReportResponse {
|
|
|
8389
8403
|
};
|
|
8390
8404
|
}
|
|
8391
8405
|
|
|
8392
|
-
/**
|
|
8393
|
-
* The following selections will fallback to API v1 and may change at any time: 'companies', 'news', 'search'.
|
|
8394
|
-
* * The following selections are not available in API v2: 'details'.
|
|
8395
|
-
*/
|
|
8406
|
+
/** The following selections are not available in API v2: 'details'. */
|
|
8396
8407
|
export type CompanySelectionName = string;
|
|
8397
8408
|
|
|
8398
8409
|
export interface CompanyLookupResponse {
|
|
8399
8410
|
selections: CompanySelectionName[];
|
|
8400
8411
|
}
|
|
8401
8412
|
|
|
8413
|
+
export interface CompaniesResponse {
|
|
8414
|
+
companies: CompanyProfile[];
|
|
8415
|
+
companies_timestamp: number;
|
|
8416
|
+
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
8417
|
+
companies_delay: number;
|
|
8418
|
+
_metadata: RequestMetadataWithLinksAndTotal;
|
|
8419
|
+
}
|
|
8420
|
+
|
|
8421
|
+
export interface CompaniesSearchResponse {
|
|
8422
|
+
search: CompanySearchProfile[];
|
|
8423
|
+
_metadata: RequestMetadataWithLinks;
|
|
8424
|
+
}
|
|
8425
|
+
|
|
8402
8426
|
export interface CompanyProfileResponse {
|
|
8403
8427
|
profile: CompanyProfile;
|
|
8404
8428
|
}
|
|
@@ -8417,7 +8441,6 @@ export interface CompanyProfileExtended extends CompanyProfile {
|
|
|
8417
8441
|
efficiency: number;
|
|
8418
8442
|
environment: number;
|
|
8419
8443
|
trains: number;
|
|
8420
|
-
applications_allowed: boolean;
|
|
8421
8444
|
advertisement_budget: number;
|
|
8422
8445
|
upgrades: CompanyUpgrades;
|
|
8423
8446
|
value: number;
|
|
@@ -8434,13 +8457,28 @@ export interface CompanyProfile {
|
|
|
8434
8457
|
name: string;
|
|
8435
8458
|
created_at: number;
|
|
8436
8459
|
days_old: number;
|
|
8437
|
-
image: string;
|
|
8460
|
+
image: string | null;
|
|
8438
8461
|
type: CompanyType;
|
|
8439
8462
|
rating: number;
|
|
8440
8463
|
director: CompanyDirector;
|
|
8441
8464
|
employees: CompanyEmployees;
|
|
8442
8465
|
income: CompanyIncome;
|
|
8443
8466
|
customers: CompanyCustomers;
|
|
8467
|
+
applications_allowed: boolean;
|
|
8468
|
+
}
|
|
8469
|
+
|
|
8470
|
+
export interface CompanySearchProfile {
|
|
8471
|
+
id: CompanyId;
|
|
8472
|
+
name: string;
|
|
8473
|
+
created_at: number;
|
|
8474
|
+
days_old: number;
|
|
8475
|
+
image: string | null;
|
|
8476
|
+
type: CompanyType;
|
|
8477
|
+
rating: number;
|
|
8478
|
+
employees: CompanyEmployees;
|
|
8479
|
+
income: CompanyIncome;
|
|
8480
|
+
customers: CompanyCustomers;
|
|
8481
|
+
applications_allowed: boolean;
|
|
8444
8482
|
}
|
|
8445
8483
|
|
|
8446
8484
|
export interface CompanyType {
|
|
@@ -9053,7 +9091,7 @@ export interface RacingRaceDetails extends Race {
|
|
|
9053
9091
|
}
|
|
9054
9092
|
|
|
9055
9093
|
export type UserRaceDetails = RacingRaceDetails & {
|
|
9056
|
-
skill_gain: number;
|
|
9094
|
+
skill_gain: number | null;
|
|
9057
9095
|
};
|
|
9058
9096
|
|
|
9059
9097
|
export interface RacingRaceDetailsResponse {
|
|
@@ -9250,7 +9288,6 @@ export interface TornOrganizedCrimeScope {
|
|
|
9250
9288
|
}
|
|
9251
9289
|
|
|
9252
9290
|
export interface TornOrganizedCrimeSlot {
|
|
9253
|
-
id?: TornOrganizedCrimePositionIdDeprecated;
|
|
9254
9291
|
position_info: FactionSlotPositionInfo;
|
|
9255
9292
|
name: string;
|
|
9256
9293
|
required_item: TornOrganizedCrimeRequiredItem | null;
|
|
@@ -9502,7 +9539,7 @@ export interface TornBountiesResponse {
|
|
|
9502
9539
|
bounties: Bounty[];
|
|
9503
9540
|
bounties_timestamp: number;
|
|
9504
9541
|
/** The minimum amount of time needed before the cache timestamp can change. */
|
|
9505
|
-
bounties_delay
|
|
9542
|
+
bounties_delay: number;
|
|
9506
9543
|
_metadata: RequestMetadataWithLinksAndTotal;
|
|
9507
9544
|
}
|
|
9508
9545
|
|
|
@@ -13333,7 +13370,7 @@ export interface FactionV2 extends BaseSchema {
|
|
|
13333
13370
|
params: "striptags" | "timestamp";
|
|
13334
13371
|
};
|
|
13335
13372
|
news: {
|
|
13336
|
-
response:
|
|
13373
|
+
response: NewsResponse;
|
|
13337
13374
|
params:
|
|
13338
13375
|
| "striptags"
|
|
13339
13376
|
| "limit"
|
|
@@ -13455,10 +13492,33 @@ export interface CompanyV2 extends BaseSchema {
|
|
|
13455
13492
|
response: CompanyEmployeesResponse;
|
|
13456
13493
|
params: "striptags" | "timestamp";
|
|
13457
13494
|
};
|
|
13495
|
+
news: {
|
|
13496
|
+
response: NewsResponse;
|
|
13497
|
+
params:
|
|
13498
|
+
| "striptags"
|
|
13499
|
+
| "limit"
|
|
13500
|
+
| "sort"
|
|
13501
|
+
| "to"
|
|
13502
|
+
| "from"
|
|
13503
|
+
| "cat"
|
|
13504
|
+
| "timestamp";
|
|
13505
|
+
};
|
|
13506
|
+
companies: {
|
|
13507
|
+
response: CompaniesResponse;
|
|
13508
|
+
params: "typeId" | "limit" | "offset" | "striptags" | "timestamp";
|
|
13509
|
+
};
|
|
13458
13510
|
profile: {
|
|
13459
13511
|
response: CompanyProfileResponseMixed;
|
|
13460
13512
|
params: "striptags" | "timestamp";
|
|
13461
13513
|
};
|
|
13514
|
+
search: {
|
|
13515
|
+
response: CompaniesSearchResponse;
|
|
13516
|
+
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
13517
|
+
};
|
|
13518
|
+
snapshot: {
|
|
13519
|
+
response: null;
|
|
13520
|
+
params: "timestamp";
|
|
13521
|
+
};
|
|
13462
13522
|
stock: {
|
|
13463
13523
|
response: CompanyStockResponse;
|
|
13464
13524
|
params: "timestamp";
|
package/dist/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Torn API",
|
|
5
5
|
"description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "6.0.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -1935,7 +1935,7 @@
|
|
|
1935
1935
|
"User"
|
|
1936
1936
|
],
|
|
1937
1937
|
"summary": "Get your logs",
|
|
1938
|
-
"description": "Requires full access key. <br> It's possible to pass a list of log ids or a log category id.<br>",
|
|
1938
|
+
"description": "Requires full access key. <br> It's possible to pass a list of log ids or a log category id.<br>This selection is standalone and cannot be used together with other selections.",
|
|
1939
1939
|
"operationId": "getMyLogs",
|
|
1940
1940
|
"parameters": [
|
|
1941
1941
|
{
|
|
@@ -4923,7 +4923,7 @@
|
|
|
4923
4923
|
"content": {
|
|
4924
4924
|
"application/json": {
|
|
4925
4925
|
"schema": {
|
|
4926
|
-
"$ref": "#/components/schemas/
|
|
4926
|
+
"$ref": "#/components/schemas/NewsResponse"
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
4929
4929
|
}
|
|
@@ -6339,7 +6339,7 @@
|
|
|
6339
6339
|
"$ref": "#/components/schemas/FactionWarsResponse"
|
|
6340
6340
|
},
|
|
6341
6341
|
{
|
|
6342
|
-
"$ref": "#/components/schemas/
|
|
6342
|
+
"$ref": "#/components/schemas/NewsResponse"
|
|
6343
6343
|
},
|
|
6344
6344
|
{
|
|
6345
6345
|
"$ref": "#/components/schemas/RevivesResponse"
|
|
@@ -6568,6 +6568,126 @@
|
|
|
6568
6568
|
"x-stability": "Unstable"
|
|
6569
6569
|
}
|
|
6570
6570
|
},
|
|
6571
|
+
"/company/news": {
|
|
6572
|
+
"get": {
|
|
6573
|
+
"tags": [
|
|
6574
|
+
"Company"
|
|
6575
|
+
],
|
|
6576
|
+
"summary": "Get your company's news details",
|
|
6577
|
+
"description": "Requires minimal access key. <br>",
|
|
6578
|
+
"operationId": "getMyCompanyNews",
|
|
6579
|
+
"parameters": [
|
|
6580
|
+
{
|
|
6581
|
+
"$ref": "#/components/parameters/ApiStripTagsFalse"
|
|
6582
|
+
},
|
|
6583
|
+
{
|
|
6584
|
+
"$ref": "#/components/parameters/ApiLimit100"
|
|
6585
|
+
},
|
|
6586
|
+
{
|
|
6587
|
+
"$ref": "#/components/parameters/ApiSortDesc"
|
|
6588
|
+
},
|
|
6589
|
+
{
|
|
6590
|
+
"$ref": "#/components/parameters/ApiTo"
|
|
6591
|
+
},
|
|
6592
|
+
{
|
|
6593
|
+
"$ref": "#/components/parameters/ApiFrom"
|
|
6594
|
+
},
|
|
6595
|
+
{
|
|
6596
|
+
"name": "cat",
|
|
6597
|
+
"in": "query",
|
|
6598
|
+
"description": "News category type",
|
|
6599
|
+
"required": true,
|
|
6600
|
+
"schema": {
|
|
6601
|
+
"$ref": "#/components/schemas/CompanyNewsCategory"
|
|
6602
|
+
}
|
|
6603
|
+
},
|
|
6604
|
+
{
|
|
6605
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
6606
|
+
},
|
|
6607
|
+
{
|
|
6608
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
6609
|
+
},
|
|
6610
|
+
{
|
|
6611
|
+
"$ref": "#/components/parameters/ApiKeyMinimal"
|
|
6612
|
+
}
|
|
6613
|
+
],
|
|
6614
|
+
"responses": {
|
|
6615
|
+
"200": {
|
|
6616
|
+
"description": "Successful operation",
|
|
6617
|
+
"content": {
|
|
6618
|
+
"application/json": {
|
|
6619
|
+
"schema": {
|
|
6620
|
+
"$ref": "#/components/schemas/NewsResponse"
|
|
6621
|
+
}
|
|
6622
|
+
}
|
|
6623
|
+
}
|
|
6624
|
+
}
|
|
6625
|
+
},
|
|
6626
|
+
"security": [
|
|
6627
|
+
{
|
|
6628
|
+
"api_key": []
|
|
6629
|
+
}
|
|
6630
|
+
],
|
|
6631
|
+
"x-stability": "Unstable"
|
|
6632
|
+
}
|
|
6633
|
+
},
|
|
6634
|
+
"/company/{typeId}/companies": {
|
|
6635
|
+
"get": {
|
|
6636
|
+
"tags": [
|
|
6637
|
+
"Company"
|
|
6638
|
+
],
|
|
6639
|
+
"summary": "Get a list of companies for a specific company type",
|
|
6640
|
+
"description": "Requires public access key. <br>",
|
|
6641
|
+
"operationId": "getCompaniesList",
|
|
6642
|
+
"parameters": [
|
|
6643
|
+
{
|
|
6644
|
+
"name": "typeId",
|
|
6645
|
+
"in": "path",
|
|
6646
|
+
"description": "Company type id",
|
|
6647
|
+
"required": true,
|
|
6648
|
+
"schema": {
|
|
6649
|
+
"$ref": "#/components/schemas/CompanyTypeId"
|
|
6650
|
+
}
|
|
6651
|
+
},
|
|
6652
|
+
{
|
|
6653
|
+
"$ref": "#/components/parameters/ApiLimit100Default20"
|
|
6654
|
+
},
|
|
6655
|
+
{
|
|
6656
|
+
"$ref": "#/components/parameters/ApiOffsetNoDefault"
|
|
6657
|
+
},
|
|
6658
|
+
{
|
|
6659
|
+
"$ref": "#/components/parameters/ApiStripTagsTrue"
|
|
6660
|
+
},
|
|
6661
|
+
{
|
|
6662
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
6663
|
+
},
|
|
6664
|
+
{
|
|
6665
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
6666
|
+
},
|
|
6667
|
+
{
|
|
6668
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
6669
|
+
}
|
|
6670
|
+
],
|
|
6671
|
+
"responses": {
|
|
6672
|
+
"200": {
|
|
6673
|
+
"description": "Successful operation",
|
|
6674
|
+
"content": {
|
|
6675
|
+
"application/json": {
|
|
6676
|
+
"schema": {
|
|
6677
|
+
"$ref": "#/components/schemas/CompaniesResponse"
|
|
6678
|
+
}
|
|
6679
|
+
}
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
},
|
|
6683
|
+
"security": [
|
|
6684
|
+
{
|
|
6685
|
+
"api_key": []
|
|
6686
|
+
}
|
|
6687
|
+
],
|
|
6688
|
+
"x-stability": "Unstable"
|
|
6689
|
+
}
|
|
6690
|
+
},
|
|
6571
6691
|
"/company/profile": {
|
|
6572
6692
|
"get": {
|
|
6573
6693
|
"tags": [
|
|
@@ -6661,6 +6781,97 @@
|
|
|
6661
6781
|
"x-stability": "Unstable"
|
|
6662
6782
|
}
|
|
6663
6783
|
},
|
|
6784
|
+
"/company/search": {
|
|
6785
|
+
"get": {
|
|
6786
|
+
"tags": [
|
|
6787
|
+
"Company"
|
|
6788
|
+
],
|
|
6789
|
+
"summary": "Search companies by name or other criteria",
|
|
6790
|
+
"description": "Requires public access key. <br>This selection is standalone and cannot be used together with other selections.",
|
|
6791
|
+
"operationId": "getCompaniesSearch",
|
|
6792
|
+
"parameters": [
|
|
6793
|
+
{
|
|
6794
|
+
"$ref": "#/components/parameters/ApiName"
|
|
6795
|
+
},
|
|
6796
|
+
{
|
|
6797
|
+
"$ref": "#/components/parameters/ApiCompanySearchFilter"
|
|
6798
|
+
},
|
|
6799
|
+
{
|
|
6800
|
+
"$ref": "#/components/parameters/ApiLimit50Default20"
|
|
6801
|
+
},
|
|
6802
|
+
{
|
|
6803
|
+
"$ref": "#/components/parameters/ApiOffset"
|
|
6804
|
+
},
|
|
6805
|
+
{
|
|
6806
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
6807
|
+
},
|
|
6808
|
+
{
|
|
6809
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
6810
|
+
},
|
|
6811
|
+
{
|
|
6812
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
6813
|
+
}
|
|
6814
|
+
],
|
|
6815
|
+
"responses": {
|
|
6816
|
+
"200": {
|
|
6817
|
+
"description": "Successful operation",
|
|
6818
|
+
"content": {
|
|
6819
|
+
"application/json": {
|
|
6820
|
+
"schema": {
|
|
6821
|
+
"$ref": "#/components/schemas/CompaniesSearchResponse"
|
|
6822
|
+
}
|
|
6823
|
+
}
|
|
6824
|
+
}
|
|
6825
|
+
}
|
|
6826
|
+
},
|
|
6827
|
+
"security": [
|
|
6828
|
+
{
|
|
6829
|
+
"api_key": []
|
|
6830
|
+
}
|
|
6831
|
+
],
|
|
6832
|
+
"x-stability": "Unstable"
|
|
6833
|
+
}
|
|
6834
|
+
},
|
|
6835
|
+
"/company/snapshot": {
|
|
6836
|
+
"get": {
|
|
6837
|
+
"tags": [
|
|
6838
|
+
"Company"
|
|
6839
|
+
],
|
|
6840
|
+
"summary": "Get daily companies snapshot CSV",
|
|
6841
|
+
"description": "Requires public access key.<br>Returns a CSV daily snapshot of companies.<br>This selection is standalone and cannot be used together with other selections.<br>\nCSV columns: id, name, created_at, days_old, image, type, rating, director_id,\nemployees_hired, employees_capacity, daily_income, daily_customers,\nweekly_income, weekly_customers, applications_allowed",
|
|
6842
|
+
"operationId": "getCompaniesSnapshot",
|
|
6843
|
+
"parameters": [
|
|
6844
|
+
{
|
|
6845
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
6846
|
+
},
|
|
6847
|
+
{
|
|
6848
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
6849
|
+
},
|
|
6850
|
+
{
|
|
6851
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
6852
|
+
}
|
|
6853
|
+
],
|
|
6854
|
+
"responses": {
|
|
6855
|
+
"200": {
|
|
6856
|
+
"description": "Successful CSV response",
|
|
6857
|
+
"content": {
|
|
6858
|
+
"text/csv": {
|
|
6859
|
+
"schema": {
|
|
6860
|
+
"type": "string",
|
|
6861
|
+
"example": "id,name,created_at,days_old,image,type,rating,director_id,employees_hired,employees_capacity,daily_income,daily_customers,weekly_income,weekly_customers,applications_allowed\\n125981,Safety first,1779957421,0,,10,0,4082850,1,7,0,0,0,0,1"
|
|
6862
|
+
}
|
|
6863
|
+
}
|
|
6864
|
+
}
|
|
6865
|
+
}
|
|
6866
|
+
},
|
|
6867
|
+
"security": [
|
|
6868
|
+
{
|
|
6869
|
+
"api_key": []
|
|
6870
|
+
}
|
|
6871
|
+
],
|
|
6872
|
+
"x-stability": "Unstable"
|
|
6873
|
+
}
|
|
6874
|
+
},
|
|
6664
6875
|
"/company/stock": {
|
|
6665
6876
|
"get": {
|
|
6666
6877
|
"tags": [
|
|
@@ -6827,6 +7038,19 @@
|
|
|
6827
7038
|
}
|
|
6828
7039
|
}
|
|
6829
7040
|
},
|
|
7041
|
+
{
|
|
7042
|
+
"name": "cat",
|
|
7043
|
+
"in": "query",
|
|
7044
|
+
"description": "Selection category",
|
|
7045
|
+
"required": false,
|
|
7046
|
+
"schema": {
|
|
7047
|
+
"oneOf": [
|
|
7048
|
+
{
|
|
7049
|
+
"$ref": "#/components/schemas/CompanyNewsCategory"
|
|
7050
|
+
}
|
|
7051
|
+
]
|
|
7052
|
+
}
|
|
7053
|
+
},
|
|
6830
7054
|
{
|
|
6831
7055
|
"$ref": "#/components/parameters/ApiLimit"
|
|
6832
7056
|
},
|
|
@@ -6868,6 +7092,9 @@
|
|
|
6868
7092
|
{
|
|
6869
7093
|
"$ref": "#/components/schemas/CompanyProfileResponse"
|
|
6870
7094
|
},
|
|
7095
|
+
{
|
|
7096
|
+
"$ref": "#/components/schemas/NewsResponse"
|
|
7097
|
+
},
|
|
6871
7098
|
{
|
|
6872
7099
|
"$ref": "#/components/schemas/CompanyStockResponse"
|
|
6873
7100
|
},
|
|
@@ -15031,6 +15258,16 @@
|
|
|
15031
15258
|
"giveFunds"
|
|
15032
15259
|
]
|
|
15033
15260
|
},
|
|
15261
|
+
"CompanyNewsCategory": {
|
|
15262
|
+
"type": "string",
|
|
15263
|
+
"enum": [
|
|
15264
|
+
"main",
|
|
15265
|
+
"funds",
|
|
15266
|
+
"training",
|
|
15267
|
+
"employees",
|
|
15268
|
+
"all"
|
|
15269
|
+
]
|
|
15270
|
+
},
|
|
15034
15271
|
"FactionRankEnum": {
|
|
15035
15272
|
"type": "string",
|
|
15036
15273
|
"enum": [
|
|
@@ -15759,6 +15996,21 @@
|
|
|
15759
15996
|
"v2"
|
|
15760
15997
|
]
|
|
15761
15998
|
},
|
|
15999
|
+
"CompanySearchParameter": {
|
|
16000
|
+
"oneOf": [
|
|
16001
|
+
{
|
|
16002
|
+
"type": "string",
|
|
16003
|
+
"enum": [
|
|
16004
|
+
"recruiting",
|
|
16005
|
+
"notRecruiting"
|
|
16006
|
+
]
|
|
16007
|
+
},
|
|
16008
|
+
{
|
|
16009
|
+
"type": "string",
|
|
16010
|
+
"pattern": "^(id|type|daysOld|rating|dailyIncome|weeklyIncome|dailyCustomers|weeklyCustomers):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
16011
|
+
}
|
|
16012
|
+
]
|
|
16013
|
+
},
|
|
15762
16014
|
"Parameters": {
|
|
15763
16015
|
"oneOf": [
|
|
15764
16016
|
{
|
|
@@ -15772,7 +16024,7 @@
|
|
|
15772
16024
|
},
|
|
15773
16025
|
{
|
|
15774
16026
|
"type": "string",
|
|
15775
|
-
"pattern": "^(id|respect|members)(Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater)
|
|
16027
|
+
"pattern": "^(id|respect|members|membersMax):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
15776
16028
|
}
|
|
15777
16029
|
]
|
|
15778
16030
|
},
|
|
@@ -17718,6 +17970,25 @@
|
|
|
17718
17970
|
},
|
|
17719
17971
|
"type": "object"
|
|
17720
17972
|
},
|
|
17973
|
+
"ErrorFileDoesNotExist": {
|
|
17974
|
+
"required": [
|
|
17975
|
+
"code",
|
|
17976
|
+
"error"
|
|
17977
|
+
],
|
|
17978
|
+
"properties": {
|
|
17979
|
+
"code": {
|
|
17980
|
+
"type": "integer",
|
|
17981
|
+
"format": "int32",
|
|
17982
|
+
"enum": [
|
|
17983
|
+
30
|
|
17984
|
+
]
|
|
17985
|
+
},
|
|
17986
|
+
"error": {
|
|
17987
|
+
"type": "string"
|
|
17988
|
+
}
|
|
17989
|
+
},
|
|
17990
|
+
"type": "object"
|
|
17991
|
+
},
|
|
17721
17992
|
"ApiError": {
|
|
17722
17993
|
"oneOf": [
|
|
17723
17994
|
{
|
|
@@ -17809,6 +18080,9 @@
|
|
|
17809
18080
|
},
|
|
17810
18081
|
{
|
|
17811
18082
|
"$ref": "#/components/schemas/ErrorCategorySelectionUnavailableForInteractionLogs"
|
|
18083
|
+
},
|
|
18084
|
+
{
|
|
18085
|
+
"$ref": "#/components/schemas/ErrorFileDoesNotExist"
|
|
17812
18086
|
}
|
|
17813
18087
|
]
|
|
17814
18088
|
},
|
|
@@ -25768,6 +26042,7 @@
|
|
|
25768
26042
|
"name",
|
|
25769
26043
|
"respect",
|
|
25770
26044
|
"members",
|
|
26045
|
+
"members_max",
|
|
25771
26046
|
"leader",
|
|
25772
26047
|
"co_leader",
|
|
25773
26048
|
"image",
|
|
@@ -25791,6 +26066,10 @@
|
|
|
25791
26066
|
"type": "integer",
|
|
25792
26067
|
"format": "int32"
|
|
25793
26068
|
},
|
|
26069
|
+
"members_max": {
|
|
26070
|
+
"type": "integer",
|
|
26071
|
+
"format": "int32"
|
|
26072
|
+
},
|
|
25794
26073
|
"leader": {
|
|
25795
26074
|
"$ref": "#/components/schemas/FactionSearchLeader"
|
|
25796
26075
|
},
|
|
@@ -26124,12 +26403,16 @@
|
|
|
26124
26403
|
"required": [
|
|
26125
26404
|
"id",
|
|
26126
26405
|
"owned_by",
|
|
26127
|
-
"acquired_at"
|
|
26406
|
+
"acquired_at",
|
|
26407
|
+
"irradiated"
|
|
26128
26408
|
],
|
|
26129
26409
|
"properties": {
|
|
26130
26410
|
"id": {
|
|
26131
26411
|
"type": "string"
|
|
26132
26412
|
},
|
|
26413
|
+
"irradiated": {
|
|
26414
|
+
"type": "boolean"
|
|
26415
|
+
},
|
|
26133
26416
|
"owned_by": {
|
|
26134
26417
|
"oneOf": [
|
|
26135
26418
|
{
|
|
@@ -27143,7 +27426,7 @@
|
|
|
27143
27426
|
},
|
|
27144
27427
|
"type": "object"
|
|
27145
27428
|
},
|
|
27146
|
-
"
|
|
27429
|
+
"News": {
|
|
27147
27430
|
"required": [
|
|
27148
27431
|
"id",
|
|
27149
27432
|
"text",
|
|
@@ -27163,7 +27446,7 @@
|
|
|
27163
27446
|
},
|
|
27164
27447
|
"type": "object"
|
|
27165
27448
|
},
|
|
27166
|
-
"
|
|
27449
|
+
"NewsResponse": {
|
|
27167
27450
|
"required": [
|
|
27168
27451
|
"news",
|
|
27169
27452
|
"_metadata"
|
|
@@ -27172,7 +27455,7 @@
|
|
|
27172
27455
|
"news": {
|
|
27173
27456
|
"type": "array",
|
|
27174
27457
|
"items": {
|
|
27175
|
-
"$ref": "#/components/schemas/
|
|
27458
|
+
"$ref": "#/components/schemas/News"
|
|
27176
27459
|
}
|
|
27177
27460
|
},
|
|
27178
27461
|
"_metadata": {
|
|
@@ -27932,15 +28215,6 @@
|
|
|
27932
28215
|
"position_info": {
|
|
27933
28216
|
"$ref": "#/components/schemas/FactionSlotPositionInfo"
|
|
27934
28217
|
},
|
|
27935
|
-
"position_id": {
|
|
27936
|
-
"$ref": "#/components/schemas/TornOrganizedCrimePositionIdDeprecated"
|
|
27937
|
-
},
|
|
27938
|
-
"position_number": {
|
|
27939
|
-
"description": "This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026.",
|
|
27940
|
-
"type": "integer",
|
|
27941
|
-
"format": "int32",
|
|
27942
|
-
"deprecated": true
|
|
27943
|
-
},
|
|
27944
28218
|
"item_requirement": {
|
|
27945
28219
|
"description": "Details of item required for the slot, if applicable.",
|
|
27946
28220
|
"oneOf": [
|
|
@@ -28559,18 +28833,18 @@
|
|
|
28559
28833
|
"CompanySelectionName": {
|
|
28560
28834
|
"oneOf": [
|
|
28561
28835
|
{
|
|
28562
|
-
"description": "The following selections
|
|
28836
|
+
"description": "The following selections are not available in API v2: 'details'.",
|
|
28563
28837
|
"type": "string",
|
|
28564
28838
|
"enum": [
|
|
28565
28839
|
"applications",
|
|
28840
|
+
"companies",
|
|
28566
28841
|
"employees",
|
|
28567
28842
|
"lookup",
|
|
28843
|
+
"news",
|
|
28568
28844
|
"profile",
|
|
28845
|
+
"snapshot",
|
|
28569
28846
|
"stock",
|
|
28570
|
-
"timestamp"
|
|
28571
|
-
"companies",
|
|
28572
|
-
"news",
|
|
28573
|
-
"search"
|
|
28847
|
+
"timestamp"
|
|
28574
28848
|
]
|
|
28575
28849
|
},
|
|
28576
28850
|
{
|
|
@@ -28592,6 +28866,53 @@
|
|
|
28592
28866
|
},
|
|
28593
28867
|
"type": "object"
|
|
28594
28868
|
},
|
|
28869
|
+
"CompaniesResponse": {
|
|
28870
|
+
"required": [
|
|
28871
|
+
"companies",
|
|
28872
|
+
"companies_timestamp",
|
|
28873
|
+
"companies_delay",
|
|
28874
|
+
"_metadata"
|
|
28875
|
+
],
|
|
28876
|
+
"properties": {
|
|
28877
|
+
"companies": {
|
|
28878
|
+
"type": "array",
|
|
28879
|
+
"items": {
|
|
28880
|
+
"$ref": "#/components/schemas/CompanyProfile"
|
|
28881
|
+
}
|
|
28882
|
+
},
|
|
28883
|
+
"companies_timestamp": {
|
|
28884
|
+
"type": "integer",
|
|
28885
|
+
"format": "int32"
|
|
28886
|
+
},
|
|
28887
|
+
"companies_delay": {
|
|
28888
|
+
"description": "The minimum amount of time needed before the cache timestamp can change.",
|
|
28889
|
+
"type": "integer",
|
|
28890
|
+
"format": "int32"
|
|
28891
|
+
},
|
|
28892
|
+
"_metadata": {
|
|
28893
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
|
|
28894
|
+
}
|
|
28895
|
+
},
|
|
28896
|
+
"type": "object"
|
|
28897
|
+
},
|
|
28898
|
+
"CompaniesSearchResponse": {
|
|
28899
|
+
"required": [
|
|
28900
|
+
"search",
|
|
28901
|
+
"_metadata"
|
|
28902
|
+
],
|
|
28903
|
+
"properties": {
|
|
28904
|
+
"search": {
|
|
28905
|
+
"type": "array",
|
|
28906
|
+
"items": {
|
|
28907
|
+
"$ref": "#/components/schemas/CompanySearchProfile"
|
|
28908
|
+
}
|
|
28909
|
+
},
|
|
28910
|
+
"_metadata": {
|
|
28911
|
+
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
|
28912
|
+
}
|
|
28913
|
+
},
|
|
28914
|
+
"type": "object"
|
|
28915
|
+
},
|
|
28595
28916
|
"CompanyProfileResponse": {
|
|
28596
28917
|
"required": [
|
|
28597
28918
|
"profile"
|
|
@@ -28644,7 +28965,6 @@
|
|
|
28644
28965
|
"efficiency",
|
|
28645
28966
|
"environment",
|
|
28646
28967
|
"trains",
|
|
28647
|
-
"applications_allowed",
|
|
28648
28968
|
"advertisement_budget",
|
|
28649
28969
|
"upgrades",
|
|
28650
28970
|
"value"
|
|
@@ -28670,9 +28990,6 @@
|
|
|
28670
28990
|
"type": "integer",
|
|
28671
28991
|
"format": "int32"
|
|
28672
28992
|
},
|
|
28673
|
-
"applications_allowed": {
|
|
28674
|
-
"type": "boolean"
|
|
28675
|
-
},
|
|
28676
28993
|
"advertisement_budget": {
|
|
28677
28994
|
"type": "integer",
|
|
28678
28995
|
"format": "int64"
|
|
@@ -28720,7 +29037,8 @@
|
|
|
28720
29037
|
"director",
|
|
28721
29038
|
"employees",
|
|
28722
29039
|
"income",
|
|
28723
|
-
"customers"
|
|
29040
|
+
"customers",
|
|
29041
|
+
"applications_allowed"
|
|
28724
29042
|
],
|
|
28725
29043
|
"properties": {
|
|
28726
29044
|
"id": {
|
|
@@ -28738,7 +29056,14 @@
|
|
|
28738
29056
|
"format": "int32"
|
|
28739
29057
|
},
|
|
28740
29058
|
"image": {
|
|
28741
|
-
"
|
|
29059
|
+
"oneOf": [
|
|
29060
|
+
{
|
|
29061
|
+
"type": "string"
|
|
29062
|
+
},
|
|
29063
|
+
{
|
|
29064
|
+
"type": "null"
|
|
29065
|
+
}
|
|
29066
|
+
]
|
|
28742
29067
|
},
|
|
28743
29068
|
"type": {
|
|
28744
29069
|
"$ref": "#/components/schemas/CompanyType"
|
|
@@ -28758,6 +29083,70 @@
|
|
|
28758
29083
|
},
|
|
28759
29084
|
"customers": {
|
|
28760
29085
|
"$ref": "#/components/schemas/CompanyCustomers"
|
|
29086
|
+
},
|
|
29087
|
+
"applications_allowed": {
|
|
29088
|
+
"type": "boolean"
|
|
29089
|
+
}
|
|
29090
|
+
},
|
|
29091
|
+
"type": "object"
|
|
29092
|
+
},
|
|
29093
|
+
"CompanySearchProfile": {
|
|
29094
|
+
"required": [
|
|
29095
|
+
"id",
|
|
29096
|
+
"name",
|
|
29097
|
+
"created_at",
|
|
29098
|
+
"days_old",
|
|
29099
|
+
"image",
|
|
29100
|
+
"type",
|
|
29101
|
+
"rating",
|
|
29102
|
+
"employees",
|
|
29103
|
+
"income",
|
|
29104
|
+
"customers",
|
|
29105
|
+
"applications_allowed"
|
|
29106
|
+
],
|
|
29107
|
+
"properties": {
|
|
29108
|
+
"id": {
|
|
29109
|
+
"$ref": "#/components/schemas/CompanyId"
|
|
29110
|
+
},
|
|
29111
|
+
"name": {
|
|
29112
|
+
"type": "string"
|
|
29113
|
+
},
|
|
29114
|
+
"created_at": {
|
|
29115
|
+
"type": "integer",
|
|
29116
|
+
"format": "int32"
|
|
29117
|
+
},
|
|
29118
|
+
"days_old": {
|
|
29119
|
+
"type": "integer",
|
|
29120
|
+
"format": "int32"
|
|
29121
|
+
},
|
|
29122
|
+
"image": {
|
|
29123
|
+
"oneOf": [
|
|
29124
|
+
{
|
|
29125
|
+
"type": "string"
|
|
29126
|
+
},
|
|
29127
|
+
{
|
|
29128
|
+
"type": "null"
|
|
29129
|
+
}
|
|
29130
|
+
]
|
|
29131
|
+
},
|
|
29132
|
+
"type": {
|
|
29133
|
+
"$ref": "#/components/schemas/CompanyType"
|
|
29134
|
+
},
|
|
29135
|
+
"rating": {
|
|
29136
|
+
"type": "integer",
|
|
29137
|
+
"format": "int32"
|
|
29138
|
+
},
|
|
29139
|
+
"employees": {
|
|
29140
|
+
"$ref": "#/components/schemas/CompanyEmployees"
|
|
29141
|
+
},
|
|
29142
|
+
"income": {
|
|
29143
|
+
"$ref": "#/components/schemas/CompanyIncome"
|
|
29144
|
+
},
|
|
29145
|
+
"customers": {
|
|
29146
|
+
"$ref": "#/components/schemas/CompanyCustomers"
|
|
29147
|
+
},
|
|
29148
|
+
"applications_allowed": {
|
|
29149
|
+
"type": "boolean"
|
|
28761
29150
|
}
|
|
28762
29151
|
},
|
|
28763
29152
|
"type": "object"
|
|
@@ -31364,8 +31753,16 @@
|
|
|
31364
31753
|
],
|
|
31365
31754
|
"properties": {
|
|
31366
31755
|
"skill_gain": {
|
|
31367
|
-
"
|
|
31368
|
-
"
|
|
31756
|
+
"description": "This value is null for races which have status 'in_progress'",
|
|
31757
|
+
"oneOf": [
|
|
31758
|
+
{
|
|
31759
|
+
"type": "number",
|
|
31760
|
+
"format": "float"
|
|
31761
|
+
},
|
|
31762
|
+
{
|
|
31763
|
+
"type": "null"
|
|
31764
|
+
}
|
|
31765
|
+
]
|
|
31369
31766
|
}
|
|
31370
31767
|
},
|
|
31371
31768
|
"type": "object"
|
|
@@ -32146,9 +32543,6 @@
|
|
|
32146
32543
|
"required_item"
|
|
32147
32544
|
],
|
|
32148
32545
|
"properties": {
|
|
32149
|
-
"id": {
|
|
32150
|
-
"$ref": "#/components/schemas/TornOrganizedCrimePositionIdDeprecated"
|
|
32151
|
-
},
|
|
32152
32546
|
"position_info": {
|
|
32153
32547
|
"$ref": "#/components/schemas/FactionSlotPositionInfo"
|
|
32154
32548
|
},
|
|
@@ -33202,6 +33596,7 @@
|
|
|
33202
33596
|
"required": [
|
|
33203
33597
|
"bounties",
|
|
33204
33598
|
"bounties_timestamp",
|
|
33599
|
+
"bounties_delay",
|
|
33205
33600
|
"_metadata"
|
|
33206
33601
|
],
|
|
33207
33602
|
"properties": {
|
|
@@ -33786,6 +34181,33 @@
|
|
|
33786
34181
|
}
|
|
33787
34182
|
},
|
|
33788
34183
|
"parameters": {
|
|
34184
|
+
"ApiCompanySearchFilter": {
|
|
34185
|
+
"name": "filters",
|
|
34186
|
+
"in": "query",
|
|
34187
|
+
"description": "A filtering query parameter allowing a comma-separated list of filters. <br>\n * Each filter can be one of the following:\n * Fixed options: `recruiting`, `notRecruiting`\n * Dynamic options: `fieldName`+`condition`+`number`. Each dynamic filter is made out of 3 parts separated by colon `:`:\n * * `fieldName` is one of: `id`, `type`, `daysOld`, `rating`, `dailyIncome`, `weeklyIncome`, `dailyCustomers`, `weeklyCustomers`\n * * `condition` is one of: `=`, `!=`, `<`, `<=`, `>=`, `>`, `Equal`, `NotEqual`, `Less`, `LessOrEqual`, `GreaterOrEqual`, `Greater`\n * * `number`: any integer value\n * Examples: `filters=recruiting`, `filters=weeklyIncome:>=:20000,id:<:1000,notRecruiting`, `filters=type:Equal:10,rating:=:10,dailyIncome:<=:6666666`",
|
|
34188
|
+
"required": false,
|
|
34189
|
+
"style": "form",
|
|
34190
|
+
"explode": false,
|
|
34191
|
+
"schema": {
|
|
34192
|
+
"type": "array",
|
|
34193
|
+
"items": {
|
|
34194
|
+
"schema": "CompanySearchParameter",
|
|
34195
|
+
"oneOf": [
|
|
34196
|
+
{
|
|
34197
|
+
"type": "string",
|
|
34198
|
+
"enum": [
|
|
34199
|
+
"recruiting",
|
|
34200
|
+
"notRecruiting"
|
|
34201
|
+
]
|
|
34202
|
+
},
|
|
34203
|
+
{
|
|
34204
|
+
"type": "string",
|
|
34205
|
+
"pattern": "^(id|type|daysOld|rating|dailyIncome|weeklyIncome|dailyCustomers|weeklyCustomers):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
34206
|
+
}
|
|
34207
|
+
]
|
|
34208
|
+
}
|
|
34209
|
+
}
|
|
34210
|
+
},
|
|
33789
34211
|
"ApiKeyPublic": {
|
|
33790
34212
|
"name": "key",
|
|
33791
34213
|
"in": "query",
|
|
@@ -33825,10 +34247,18 @@
|
|
|
33825
34247
|
"ApiTimestamp": {
|
|
33826
34248
|
"name": "timestamp",
|
|
33827
34249
|
"in": "query",
|
|
33828
|
-
"description": "Timestamp to bypass cache",
|
|
34250
|
+
"description": "Timestamp to bypass cache or get the data in specific point in time",
|
|
33829
34251
|
"required": false,
|
|
33830
34252
|
"schema": {
|
|
33831
|
-
"
|
|
34253
|
+
"oneOf": [
|
|
34254
|
+
{
|
|
34255
|
+
"type": "integer",
|
|
34256
|
+
"format": "int32"
|
|
34257
|
+
},
|
|
34258
|
+
{
|
|
34259
|
+
"type": "string"
|
|
34260
|
+
}
|
|
34261
|
+
]
|
|
33832
34262
|
}
|
|
33833
34263
|
},
|
|
33834
34264
|
"ApiFiltersIncomingOutgoing": {
|
|
@@ -33876,7 +34306,7 @@
|
|
|
33876
34306
|
"ApiFactionSearchFilter": {
|
|
33877
34307
|
"name": "filters",
|
|
33878
34308
|
"in": "query",
|
|
33879
|
-
"description": "A filtering query parameter allowing a comma-separated list of filters. <br>\n * Each filter can be one of the following:\n * Fixed options:
|
|
34309
|
+
"description": "A filtering query parameter allowing a comma-separated list of filters. <br>\n * Each filter can be one of the following:\n * Fixed options: `destroyed`, `notDestroyed`, `recruiting`, `notRecruiting`\n * Dynamic options: `fieldName`+`condition`+`number`. Each dynamic filter is made out of 3 parts separated by colon `:`:\n * * `fieldName` is one of: `id`, `respect`, `members`, `membersMax`\n * * `condition` is one of: `=`, `!=`, `<`, `<=`, `>=`, `>`, `Equal`, `NotEqual`, `Less`, `LessOrEqual`, `GreaterOrEqual`, `Greater`\n * * `number`: any integer value\n * Examples: `filters=destroyed`, `filters=notDestroyed,recruiting`, `filters=respect:>=:20000,id:<:100,notRecruiting`",
|
|
33880
34310
|
"required": false,
|
|
33881
34311
|
"style": "form",
|
|
33882
34312
|
"explode": false,
|
|
@@ -33896,7 +34326,7 @@
|
|
|
33896
34326
|
},
|
|
33897
34327
|
{
|
|
33898
34328
|
"type": "string",
|
|
33899
|
-
"pattern": "^(id|respect|members)(Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater)
|
|
34329
|
+
"pattern": "^(id|respect|members|membersMax):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
33900
34330
|
}
|
|
33901
34331
|
]
|
|
33902
34332
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
|
|
7
|
+
},
|
|
5
8
|
"scripts": {
|
|
6
9
|
"generate-types": "tsc && node build/index.js"
|
|
7
10
|
},
|
|
8
11
|
"devDependencies": {
|
|
9
|
-
"@scalar/openapi-types": "^0.
|
|
10
|
-
"@types/node": "^
|
|
12
|
+
"@scalar/openapi-types": "^0.9.0",
|
|
13
|
+
"@types/node": "^25.9.1",
|
|
11
14
|
"prettier": "^3.8.3",
|
|
12
15
|
"typeconv": "^2.3.1",
|
|
13
16
|
"typescript": "^6.0.3"
|