tornapi-typescript 5.9.0 → 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/dist/index.d.ts +36 -12
- package/dist/index.ts +41 -12
- package/dist/openapi.json +281 -31
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export type CompanyStaffRoomSizeEnum = "No staff room" | "Small staff room" | "S
|
|
|
143
143
|
export type CompanyStorageSizeEnum = "Small room" | "Standard room" | "Large room" | "Huge room" | "Warehouse" | "Large warehouse" | "Huge warehouse";
|
|
144
144
|
export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown" | "Unknown Rarity";
|
|
145
145
|
export type AwardCrimesVersionEnum = "v1" | "v2";
|
|
146
|
+
export type CompanySearchParameter = string;
|
|
146
147
|
export type Parameters = string;
|
|
147
148
|
export type ReviveSetting = "Everyone" | "Friends & faction" | "No one" | "Unknown";
|
|
148
149
|
export type FactionWarfareTypeEnum = "ranked" | "territory" | "raid" | "chain" | "chainOngoing" | "db";
|
|
@@ -496,7 +497,11 @@ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
|
|
|
496
497
|
code: 29;
|
|
497
498
|
error: string;
|
|
498
499
|
}
|
|
499
|
-
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;
|
|
500
505
|
export interface UserItemMod {
|
|
501
506
|
id: ItemModId;
|
|
502
507
|
title: string;
|
|
@@ -2100,6 +2105,7 @@ export interface FactionSearch {
|
|
|
2100
2105
|
name: string;
|
|
2101
2106
|
respect: number;
|
|
2102
2107
|
members: number;
|
|
2108
|
+
members_max: number;
|
|
2103
2109
|
leader: FactionSearchLeader;
|
|
2104
2110
|
co_leader: FactionSearchLeader | null;
|
|
2105
2111
|
image: string | null;
|
|
@@ -2568,9 +2574,6 @@ export interface FactionCrimeReward {
|
|
|
2568
2574
|
export interface FactionCrimeSlot {
|
|
2569
2575
|
position: string;
|
|
2570
2576
|
position_info: FactionSlotPositionInfo;
|
|
2571
|
-
position_id?: TornOrganizedCrimePositionIdDeprecated;
|
|
2572
|
-
/** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
|
|
2573
|
-
position_number?: number;
|
|
2574
2577
|
item_requirement: {
|
|
2575
2578
|
id: ItemId;
|
|
2576
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> */
|
|
@@ -2689,10 +2692,7 @@ export interface FactionRankedWarReportResponse {
|
|
|
2689
2692
|
}[];
|
|
2690
2693
|
};
|
|
2691
2694
|
}
|
|
2692
|
-
/**
|
|
2693
|
-
* The following selections will fallback to API v1 and may change at any time: 'companies', 'search'.
|
|
2694
|
-
* * The following selections are not available in API v2: 'details'.
|
|
2695
|
-
*/
|
|
2695
|
+
/** The following selections are not available in API v2: 'details'. */
|
|
2696
2696
|
export type CompanySelectionName = string;
|
|
2697
2697
|
export interface CompanyLookupResponse {
|
|
2698
2698
|
selections: CompanySelectionName[];
|
|
@@ -2704,6 +2704,10 @@ export interface CompaniesResponse {
|
|
|
2704
2704
|
companies_delay: number;
|
|
2705
2705
|
_metadata: RequestMetadataWithLinksAndTotal;
|
|
2706
2706
|
}
|
|
2707
|
+
export interface CompaniesSearchResponse {
|
|
2708
|
+
search: CompanySearchProfile[];
|
|
2709
|
+
_metadata: RequestMetadataWithLinks;
|
|
2710
|
+
}
|
|
2707
2711
|
export interface CompanyProfileResponse {
|
|
2708
2712
|
profile: CompanyProfile;
|
|
2709
2713
|
}
|
|
@@ -2719,7 +2723,6 @@ export interface CompanyProfileExtended extends CompanyProfile {
|
|
|
2719
2723
|
efficiency: number;
|
|
2720
2724
|
environment: number;
|
|
2721
2725
|
trains: number;
|
|
2722
|
-
applications_allowed: boolean;
|
|
2723
2726
|
advertisement_budget: number;
|
|
2724
2727
|
upgrades: CompanyUpgrades;
|
|
2725
2728
|
value: number;
|
|
@@ -2734,13 +2737,27 @@ export interface CompanyProfile {
|
|
|
2734
2737
|
name: string;
|
|
2735
2738
|
created_at: number;
|
|
2736
2739
|
days_old: number;
|
|
2737
|
-
image: string;
|
|
2740
|
+
image: string | null;
|
|
2738
2741
|
type: CompanyType;
|
|
2739
2742
|
rating: number;
|
|
2740
2743
|
director: CompanyDirector;
|
|
2741
2744
|
employees: CompanyEmployees;
|
|
2742
2745
|
income: CompanyIncome;
|
|
2743
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;
|
|
2744
2761
|
}
|
|
2745
2762
|
export interface CompanyType {
|
|
2746
2763
|
id: CompanyTypeId;
|
|
@@ -3265,7 +3282,7 @@ export interface RacingRaceDetails extends Race {
|
|
|
3265
3282
|
is_official: boolean;
|
|
3266
3283
|
}
|
|
3267
3284
|
export type UserRaceDetails = RacingRaceDetails & {
|
|
3268
|
-
skill_gain: number;
|
|
3285
|
+
skill_gain: number | null;
|
|
3269
3286
|
};
|
|
3270
3287
|
export interface RacingRaceDetailsResponse {
|
|
3271
3288
|
race: RacingRaceDetails;
|
|
@@ -3433,7 +3450,6 @@ export interface TornOrganizedCrimeScope {
|
|
|
3433
3450
|
return: number;
|
|
3434
3451
|
}
|
|
3435
3452
|
export interface TornOrganizedCrimeSlot {
|
|
3436
|
-
id?: TornOrganizedCrimePositionIdDeprecated;
|
|
3437
3453
|
position_info: FactionSlotPositionInfo;
|
|
3438
3454
|
name: string;
|
|
3439
3455
|
required_item: TornOrganizedCrimeRequiredItem | null;
|
|
@@ -7444,6 +7460,14 @@ export interface CompanyV2 extends BaseSchema {
|
|
|
7444
7460
|
response: CompanyProfileResponseMixed;
|
|
7445
7461
|
params: "striptags" | "timestamp";
|
|
7446
7462
|
};
|
|
7463
|
+
search: {
|
|
7464
|
+
response: CompaniesSearchResponse;
|
|
7465
|
+
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
7466
|
+
};
|
|
7467
|
+
snapshot: {
|
|
7468
|
+
response: null;
|
|
7469
|
+
params: "timestamp";
|
|
7470
|
+
};
|
|
7447
7471
|
stock: {
|
|
7448
7472
|
response: CompanyStockResponse;
|
|
7449
7473
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -4911,6 +4911,8 @@ export type HonorRarityEnum =
|
|
|
4911
4911
|
|
|
4912
4912
|
export type AwardCrimesVersionEnum = "v1" | "v2";
|
|
4913
4913
|
|
|
4914
|
+
export type CompanySearchParameter = string;
|
|
4915
|
+
|
|
4914
4916
|
export type Parameters = string;
|
|
4915
4917
|
|
|
4916
4918
|
export type ReviveSetting =
|
|
@@ -5551,6 +5553,11 @@ export interface ErrorCategorySelectionUnavailableForInteractionLogs {
|
|
|
5551
5553
|
error: string;
|
|
5552
5554
|
}
|
|
5553
5555
|
|
|
5556
|
+
export interface ErrorFileDoesNotExist {
|
|
5557
|
+
code: 30;
|
|
5558
|
+
error: string;
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5554
5561
|
export type ApiError =
|
|
5555
5562
|
| ErrorUnknown
|
|
5556
5563
|
| ErrorKeyEmpty
|
|
@@ -5581,7 +5588,8 @@ export type ApiError =
|
|
|
5581
5588
|
| ErrorOnlyCategoryOrStatsAllowed
|
|
5582
5589
|
| ErrorMustMigrateToOrganizedCrimesV2
|
|
5583
5590
|
| ErrorIncorrectLogId
|
|
5584
|
-
| ErrorCategorySelectionUnavailableForInteractionLogs
|
|
5591
|
+
| ErrorCategorySelectionUnavailableForInteractionLogs
|
|
5592
|
+
| ErrorFileDoesNotExist;
|
|
5585
5593
|
|
|
5586
5594
|
export interface UserItemMod {
|
|
5587
5595
|
id: ItemModId;
|
|
@@ -7722,6 +7730,7 @@ export interface FactionSearch {
|
|
|
7722
7730
|
name: string;
|
|
7723
7731
|
respect: number;
|
|
7724
7732
|
members: number;
|
|
7733
|
+
members_max: number;
|
|
7725
7734
|
leader: FactionSearchLeader;
|
|
7726
7735
|
co_leader: FactionSearchLeader | null;
|
|
7727
7736
|
image: string | null;
|
|
@@ -8259,9 +8268,6 @@ export interface FactionCrimeReward {
|
|
|
8259
8268
|
export interface FactionCrimeSlot {
|
|
8260
8269
|
position: string;
|
|
8261
8270
|
position_info: FactionSlotPositionInfo;
|
|
8262
|
-
position_id?: TornOrganizedCrimePositionIdDeprecated;
|
|
8263
|
-
/** This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026. */
|
|
8264
|
-
position_number?: number;
|
|
8265
8271
|
item_requirement: {
|
|
8266
8272
|
id: ItemId;
|
|
8267
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> */
|
|
@@ -8397,10 +8403,7 @@ export interface FactionRankedWarReportResponse {
|
|
|
8397
8403
|
};
|
|
8398
8404
|
}
|
|
8399
8405
|
|
|
8400
|
-
/**
|
|
8401
|
-
* The following selections will fallback to API v1 and may change at any time: 'companies', 'search'.
|
|
8402
|
-
* * The following selections are not available in API v2: 'details'.
|
|
8403
|
-
*/
|
|
8406
|
+
/** The following selections are not available in API v2: 'details'. */
|
|
8404
8407
|
export type CompanySelectionName = string;
|
|
8405
8408
|
|
|
8406
8409
|
export interface CompanyLookupResponse {
|
|
@@ -8415,6 +8418,11 @@ export interface CompaniesResponse {
|
|
|
8415
8418
|
_metadata: RequestMetadataWithLinksAndTotal;
|
|
8416
8419
|
}
|
|
8417
8420
|
|
|
8421
|
+
export interface CompaniesSearchResponse {
|
|
8422
|
+
search: CompanySearchProfile[];
|
|
8423
|
+
_metadata: RequestMetadataWithLinks;
|
|
8424
|
+
}
|
|
8425
|
+
|
|
8418
8426
|
export interface CompanyProfileResponse {
|
|
8419
8427
|
profile: CompanyProfile;
|
|
8420
8428
|
}
|
|
@@ -8433,7 +8441,6 @@ export interface CompanyProfileExtended extends CompanyProfile {
|
|
|
8433
8441
|
efficiency: number;
|
|
8434
8442
|
environment: number;
|
|
8435
8443
|
trains: number;
|
|
8436
|
-
applications_allowed: boolean;
|
|
8437
8444
|
advertisement_budget: number;
|
|
8438
8445
|
upgrades: CompanyUpgrades;
|
|
8439
8446
|
value: number;
|
|
@@ -8450,13 +8457,28 @@ export interface CompanyProfile {
|
|
|
8450
8457
|
name: string;
|
|
8451
8458
|
created_at: number;
|
|
8452
8459
|
days_old: number;
|
|
8453
|
-
image: string;
|
|
8460
|
+
image: string | null;
|
|
8454
8461
|
type: CompanyType;
|
|
8455
8462
|
rating: number;
|
|
8456
8463
|
director: CompanyDirector;
|
|
8457
8464
|
employees: CompanyEmployees;
|
|
8458
8465
|
income: CompanyIncome;
|
|
8459
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;
|
|
8460
8482
|
}
|
|
8461
8483
|
|
|
8462
8484
|
export interface CompanyType {
|
|
@@ -9069,7 +9091,7 @@ export interface RacingRaceDetails extends Race {
|
|
|
9069
9091
|
}
|
|
9070
9092
|
|
|
9071
9093
|
export type UserRaceDetails = RacingRaceDetails & {
|
|
9072
|
-
skill_gain: number;
|
|
9094
|
+
skill_gain: number | null;
|
|
9073
9095
|
};
|
|
9074
9096
|
|
|
9075
9097
|
export interface RacingRaceDetailsResponse {
|
|
@@ -9266,7 +9288,6 @@ export interface TornOrganizedCrimeScope {
|
|
|
9266
9288
|
}
|
|
9267
9289
|
|
|
9268
9290
|
export interface TornOrganizedCrimeSlot {
|
|
9269
|
-
id?: TornOrganizedCrimePositionIdDeprecated;
|
|
9270
9291
|
position_info: FactionSlotPositionInfo;
|
|
9271
9292
|
name: string;
|
|
9272
9293
|
required_item: TornOrganizedCrimeRequiredItem | null;
|
|
@@ -13490,6 +13511,14 @@ export interface CompanyV2 extends BaseSchema {
|
|
|
13490
13511
|
response: CompanyProfileResponseMixed;
|
|
13491
13512
|
params: "striptags" | "timestamp";
|
|
13492
13513
|
};
|
|
13514
|
+
search: {
|
|
13515
|
+
response: CompaniesSearchResponse;
|
|
13516
|
+
params: "name" | "filters" | "limit" | "offset" | "timestamp";
|
|
13517
|
+
};
|
|
13518
|
+
snapshot: {
|
|
13519
|
+
response: null;
|
|
13520
|
+
params: "timestamp";
|
|
13521
|
+
};
|
|
13493
13522
|
stock: {
|
|
13494
13523
|
response: CompanyStockResponse;
|
|
13495
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
|
{
|
|
@@ -6781,6 +6781,97 @@
|
|
|
6781
6781
|
"x-stability": "Unstable"
|
|
6782
6782
|
}
|
|
6783
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
|
+
},
|
|
6784
6875
|
"/company/stock": {
|
|
6785
6876
|
"get": {
|
|
6786
6877
|
"tags": [
|
|
@@ -15905,6 +15996,21 @@
|
|
|
15905
15996
|
"v2"
|
|
15906
15997
|
]
|
|
15907
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
|
+
},
|
|
15908
16014
|
"Parameters": {
|
|
15909
16015
|
"oneOf": [
|
|
15910
16016
|
{
|
|
@@ -15918,7 +16024,7 @@
|
|
|
15918
16024
|
},
|
|
15919
16025
|
{
|
|
15920
16026
|
"type": "string",
|
|
15921
|
-
"pattern": "^(id|respect|members)(Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater)
|
|
16027
|
+
"pattern": "^(id|respect|members|membersMax):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
15922
16028
|
}
|
|
15923
16029
|
]
|
|
15924
16030
|
},
|
|
@@ -17864,6 +17970,25 @@
|
|
|
17864
17970
|
},
|
|
17865
17971
|
"type": "object"
|
|
17866
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
|
+
},
|
|
17867
17992
|
"ApiError": {
|
|
17868
17993
|
"oneOf": [
|
|
17869
17994
|
{
|
|
@@ -17955,6 +18080,9 @@
|
|
|
17955
18080
|
},
|
|
17956
18081
|
{
|
|
17957
18082
|
"$ref": "#/components/schemas/ErrorCategorySelectionUnavailableForInteractionLogs"
|
|
18083
|
+
},
|
|
18084
|
+
{
|
|
18085
|
+
"$ref": "#/components/schemas/ErrorFileDoesNotExist"
|
|
17958
18086
|
}
|
|
17959
18087
|
]
|
|
17960
18088
|
},
|
|
@@ -25914,6 +26042,7 @@
|
|
|
25914
26042
|
"name",
|
|
25915
26043
|
"respect",
|
|
25916
26044
|
"members",
|
|
26045
|
+
"members_max",
|
|
25917
26046
|
"leader",
|
|
25918
26047
|
"co_leader",
|
|
25919
26048
|
"image",
|
|
@@ -25937,6 +26066,10 @@
|
|
|
25937
26066
|
"type": "integer",
|
|
25938
26067
|
"format": "int32"
|
|
25939
26068
|
},
|
|
26069
|
+
"members_max": {
|
|
26070
|
+
"type": "integer",
|
|
26071
|
+
"format": "int32"
|
|
26072
|
+
},
|
|
25940
26073
|
"leader": {
|
|
25941
26074
|
"$ref": "#/components/schemas/FactionSearchLeader"
|
|
25942
26075
|
},
|
|
@@ -28082,15 +28215,6 @@
|
|
|
28082
28215
|
"position_info": {
|
|
28083
28216
|
"$ref": "#/components/schemas/FactionSlotPositionInfo"
|
|
28084
28217
|
},
|
|
28085
|
-
"position_id": {
|
|
28086
|
-
"$ref": "#/components/schemas/TornOrganizedCrimePositionIdDeprecated"
|
|
28087
|
-
},
|
|
28088
|
-
"position_number": {
|
|
28089
|
-
"description": "This field is now available in 'position_info' object as 'number' field.<br>This field will be removed on 1st of June 2026.",
|
|
28090
|
-
"type": "integer",
|
|
28091
|
-
"format": "int32",
|
|
28092
|
-
"deprecated": true
|
|
28093
|
-
},
|
|
28094
28218
|
"item_requirement": {
|
|
28095
28219
|
"description": "Details of item required for the slot, if applicable.",
|
|
28096
28220
|
"oneOf": [
|
|
@@ -28709,18 +28833,18 @@
|
|
|
28709
28833
|
"CompanySelectionName": {
|
|
28710
28834
|
"oneOf": [
|
|
28711
28835
|
{
|
|
28712
|
-
"description": "The following selections
|
|
28836
|
+
"description": "The following selections are not available in API v2: 'details'.",
|
|
28713
28837
|
"type": "string",
|
|
28714
28838
|
"enum": [
|
|
28715
28839
|
"applications",
|
|
28840
|
+
"companies",
|
|
28716
28841
|
"employees",
|
|
28717
28842
|
"lookup",
|
|
28718
28843
|
"news",
|
|
28719
28844
|
"profile",
|
|
28845
|
+
"snapshot",
|
|
28720
28846
|
"stock",
|
|
28721
|
-
"timestamp"
|
|
28722
|
-
"companies",
|
|
28723
|
-
"search"
|
|
28847
|
+
"timestamp"
|
|
28724
28848
|
]
|
|
28725
28849
|
},
|
|
28726
28850
|
{
|
|
@@ -28771,6 +28895,24 @@
|
|
|
28771
28895
|
},
|
|
28772
28896
|
"type": "object"
|
|
28773
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
|
+
},
|
|
28774
28916
|
"CompanyProfileResponse": {
|
|
28775
28917
|
"required": [
|
|
28776
28918
|
"profile"
|
|
@@ -28823,7 +28965,6 @@
|
|
|
28823
28965
|
"efficiency",
|
|
28824
28966
|
"environment",
|
|
28825
28967
|
"trains",
|
|
28826
|
-
"applications_allowed",
|
|
28827
28968
|
"advertisement_budget",
|
|
28828
28969
|
"upgrades",
|
|
28829
28970
|
"value"
|
|
@@ -28849,9 +28990,6 @@
|
|
|
28849
28990
|
"type": "integer",
|
|
28850
28991
|
"format": "int32"
|
|
28851
28992
|
},
|
|
28852
|
-
"applications_allowed": {
|
|
28853
|
-
"type": "boolean"
|
|
28854
|
-
},
|
|
28855
28993
|
"advertisement_budget": {
|
|
28856
28994
|
"type": "integer",
|
|
28857
28995
|
"format": "int64"
|
|
@@ -28899,7 +29037,8 @@
|
|
|
28899
29037
|
"director",
|
|
28900
29038
|
"employees",
|
|
28901
29039
|
"income",
|
|
28902
|
-
"customers"
|
|
29040
|
+
"customers",
|
|
29041
|
+
"applications_allowed"
|
|
28903
29042
|
],
|
|
28904
29043
|
"properties": {
|
|
28905
29044
|
"id": {
|
|
@@ -28917,7 +29056,14 @@
|
|
|
28917
29056
|
"format": "int32"
|
|
28918
29057
|
},
|
|
28919
29058
|
"image": {
|
|
28920
|
-
"
|
|
29059
|
+
"oneOf": [
|
|
29060
|
+
{
|
|
29061
|
+
"type": "string"
|
|
29062
|
+
},
|
|
29063
|
+
{
|
|
29064
|
+
"type": "null"
|
|
29065
|
+
}
|
|
29066
|
+
]
|
|
28921
29067
|
},
|
|
28922
29068
|
"type": {
|
|
28923
29069
|
"$ref": "#/components/schemas/CompanyType"
|
|
@@ -28937,6 +29083,70 @@
|
|
|
28937
29083
|
},
|
|
28938
29084
|
"customers": {
|
|
28939
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"
|
|
28940
29150
|
}
|
|
28941
29151
|
},
|
|
28942
29152
|
"type": "object"
|
|
@@ -31543,8 +31753,16 @@
|
|
|
31543
31753
|
],
|
|
31544
31754
|
"properties": {
|
|
31545
31755
|
"skill_gain": {
|
|
31546
|
-
"
|
|
31547
|
-
"
|
|
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
|
+
]
|
|
31548
31766
|
}
|
|
31549
31767
|
},
|
|
31550
31768
|
"type": "object"
|
|
@@ -32325,9 +32543,6 @@
|
|
|
32325
32543
|
"required_item"
|
|
32326
32544
|
],
|
|
32327
32545
|
"properties": {
|
|
32328
|
-
"id": {
|
|
32329
|
-
"$ref": "#/components/schemas/TornOrganizedCrimePositionIdDeprecated"
|
|
32330
|
-
},
|
|
32331
32546
|
"position_info": {
|
|
32332
32547
|
"$ref": "#/components/schemas/FactionSlotPositionInfo"
|
|
32333
32548
|
},
|
|
@@ -33966,6 +34181,33 @@
|
|
|
33966
34181
|
}
|
|
33967
34182
|
},
|
|
33968
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
|
+
},
|
|
33969
34211
|
"ApiKeyPublic": {
|
|
33970
34212
|
"name": "key",
|
|
33971
34213
|
"in": "query",
|
|
@@ -34005,10 +34247,18 @@
|
|
|
34005
34247
|
"ApiTimestamp": {
|
|
34006
34248
|
"name": "timestamp",
|
|
34007
34249
|
"in": "query",
|
|
34008
|
-
"description": "Timestamp to bypass cache",
|
|
34250
|
+
"description": "Timestamp to bypass cache or get the data in specific point in time",
|
|
34009
34251
|
"required": false,
|
|
34010
34252
|
"schema": {
|
|
34011
|
-
"
|
|
34253
|
+
"oneOf": [
|
|
34254
|
+
{
|
|
34255
|
+
"type": "integer",
|
|
34256
|
+
"format": "int32"
|
|
34257
|
+
},
|
|
34258
|
+
{
|
|
34259
|
+
"type": "string"
|
|
34260
|
+
}
|
|
34261
|
+
]
|
|
34012
34262
|
}
|
|
34013
34263
|
},
|
|
34014
34264
|
"ApiFiltersIncomingOutgoing": {
|
|
@@ -34056,7 +34306,7 @@
|
|
|
34056
34306
|
"ApiFactionSearchFilter": {
|
|
34057
34307
|
"name": "filters",
|
|
34058
34308
|
"in": "query",
|
|
34059
|
-
"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`",
|
|
34060
34310
|
"required": false,
|
|
34061
34311
|
"style": "form",
|
|
34062
34312
|
"explode": false,
|
|
@@ -34076,7 +34326,7 @@
|
|
|
34076
34326
|
},
|
|
34077
34327
|
{
|
|
34078
34328
|
"type": "string",
|
|
34079
|
-
"pattern": "^(id|respect|members)(Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater)
|
|
34329
|
+
"pattern": "^(id|respect|members|membersMax):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
|
|
34080
34330
|
}
|
|
34081
34331
|
]
|
|
34082
34332
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tornapi-typescript",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0",
|
|
5
5
|
"repository": {
|
|
6
|
-
"url": "https://github.com/Torn-Playground/tornapi-typescript"
|
|
6
|
+
"url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"generate-types": "tsc && node build/index.js"
|