tornapi-typescript 6.6.0 → 6.7.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 +50 -1
- package/dist/index.ts +57 -1
- package/dist/openapi.json +290 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,8 @@ export type RaidWarId = number;
|
|
|
88
88
|
export type ItemUid = number;
|
|
89
89
|
export type UserId = number;
|
|
90
90
|
export type CompanyPositionId = number;
|
|
91
|
+
export type CompanySpecialId = number;
|
|
92
|
+
export type CompanyStockId = number;
|
|
91
93
|
export type TradeId = number;
|
|
92
94
|
export type StockId = number;
|
|
93
95
|
export type DiscordId = string;
|
|
@@ -2883,7 +2885,7 @@ export interface CompanyStockResponse {
|
|
|
2883
2885
|
}
|
|
2884
2886
|
export interface CompanyStockItem {
|
|
2885
2887
|
name: string;
|
|
2886
|
-
id:
|
|
2888
|
+
id: CompanyStockId;
|
|
2887
2889
|
cost: number;
|
|
2888
2890
|
rrp: number;
|
|
2889
2891
|
price: number;
|
|
@@ -3358,6 +3360,49 @@ export type PropertySelectionName = string;
|
|
|
3358
3360
|
export interface PropertyLookupResponse {
|
|
3359
3361
|
selections: PropertySelectionName[];
|
|
3360
3362
|
}
|
|
3363
|
+
export interface TornCompaniesResponse {
|
|
3364
|
+
companies: TornCompany[];
|
|
3365
|
+
}
|
|
3366
|
+
export interface TornCompany {
|
|
3367
|
+
id: CompanyTypeId;
|
|
3368
|
+
name: string;
|
|
3369
|
+
cost: number;
|
|
3370
|
+
employees: number;
|
|
3371
|
+
positions: TornCompanyPosition[];
|
|
3372
|
+
specials: TornCompanySpecial[];
|
|
3373
|
+
stock: TornCompanyStock[];
|
|
3374
|
+
}
|
|
3375
|
+
export interface TornCompanyPosition {
|
|
3376
|
+
id: CompanyPositionId;
|
|
3377
|
+
name: string;
|
|
3378
|
+
description: string;
|
|
3379
|
+
ability: string;
|
|
3380
|
+
working_stats: {
|
|
3381
|
+
required: {
|
|
3382
|
+
intelligence: number;
|
|
3383
|
+
manual_labor: number;
|
|
3384
|
+
endurance: number;
|
|
3385
|
+
};
|
|
3386
|
+
daily_gains: {
|
|
3387
|
+
intelligence: number;
|
|
3388
|
+
manual_labor: number;
|
|
3389
|
+
endurance: number;
|
|
3390
|
+
};
|
|
3391
|
+
};
|
|
3392
|
+
}
|
|
3393
|
+
export interface TornCompanySpecial {
|
|
3394
|
+
id: CompanySpecialId;
|
|
3395
|
+
name: string;
|
|
3396
|
+
effect: string;
|
|
3397
|
+
cost: number;
|
|
3398
|
+
rating: number;
|
|
3399
|
+
}
|
|
3400
|
+
export interface TornCompanyStock {
|
|
3401
|
+
id: CompanyStockId;
|
|
3402
|
+
name: string;
|
|
3403
|
+
cost: number;
|
|
3404
|
+
rrp: number;
|
|
3405
|
+
}
|
|
3361
3406
|
export interface TornStock {
|
|
3362
3407
|
id: StockId;
|
|
3363
3408
|
name: string;
|
|
@@ -7717,6 +7762,10 @@ export interface TornV2 extends BaseSchema {
|
|
|
7717
7762
|
response: TornCalendarResponse;
|
|
7718
7763
|
params: "timestamp";
|
|
7719
7764
|
};
|
|
7765
|
+
companies: {
|
|
7766
|
+
response: TornCompaniesResponse;
|
|
7767
|
+
params: "timestamp";
|
|
7768
|
+
};
|
|
7720
7769
|
crimes: {
|
|
7721
7770
|
response: TornCrimesResponse;
|
|
7722
7771
|
params: "timestamp";
|
package/dist/index.ts
CHANGED
|
@@ -4745,6 +4745,10 @@ export type UserId = number;
|
|
|
4745
4745
|
|
|
4746
4746
|
export type CompanyPositionId = number;
|
|
4747
4747
|
|
|
4748
|
+
export type CompanySpecialId = number;
|
|
4749
|
+
|
|
4750
|
+
export type CompanyStockId = number;
|
|
4751
|
+
|
|
4748
4752
|
export type TradeId = number;
|
|
4749
4753
|
|
|
4750
4754
|
export type StockId = number;
|
|
@@ -8547,7 +8551,7 @@ export interface CompanyStockResponse {
|
|
|
8547
8551
|
|
|
8548
8552
|
export interface CompanyStockItem {
|
|
8549
8553
|
name: string;
|
|
8550
|
-
id:
|
|
8554
|
+
id: CompanyStockId;
|
|
8551
8555
|
cost: number;
|
|
8552
8556
|
rrp: number;
|
|
8553
8557
|
price: number;
|
|
@@ -9099,6 +9103,54 @@ export interface PropertyLookupResponse {
|
|
|
9099
9103
|
selections: PropertySelectionName[];
|
|
9100
9104
|
}
|
|
9101
9105
|
|
|
9106
|
+
export interface TornCompaniesResponse {
|
|
9107
|
+
companies: TornCompany[];
|
|
9108
|
+
}
|
|
9109
|
+
|
|
9110
|
+
export interface TornCompany {
|
|
9111
|
+
id: CompanyTypeId;
|
|
9112
|
+
name: string;
|
|
9113
|
+
cost: number;
|
|
9114
|
+
employees: number;
|
|
9115
|
+
positions: TornCompanyPosition[];
|
|
9116
|
+
specials: TornCompanySpecial[];
|
|
9117
|
+
stock: TornCompanyStock[];
|
|
9118
|
+
}
|
|
9119
|
+
|
|
9120
|
+
export interface TornCompanyPosition {
|
|
9121
|
+
id: CompanyPositionId;
|
|
9122
|
+
name: string;
|
|
9123
|
+
description: string;
|
|
9124
|
+
ability: string;
|
|
9125
|
+
working_stats: {
|
|
9126
|
+
required: {
|
|
9127
|
+
intelligence: number;
|
|
9128
|
+
manual_labor: number;
|
|
9129
|
+
endurance: number;
|
|
9130
|
+
};
|
|
9131
|
+
daily_gains: {
|
|
9132
|
+
intelligence: number;
|
|
9133
|
+
manual_labor: number;
|
|
9134
|
+
endurance: number;
|
|
9135
|
+
};
|
|
9136
|
+
};
|
|
9137
|
+
}
|
|
9138
|
+
|
|
9139
|
+
export interface TornCompanySpecial {
|
|
9140
|
+
id: CompanySpecialId;
|
|
9141
|
+
name: string;
|
|
9142
|
+
effect: string;
|
|
9143
|
+
cost: number;
|
|
9144
|
+
rating: number;
|
|
9145
|
+
}
|
|
9146
|
+
|
|
9147
|
+
export interface TornCompanyStock {
|
|
9148
|
+
id: CompanyStockId;
|
|
9149
|
+
name: string;
|
|
9150
|
+
cost: number;
|
|
9151
|
+
rrp: number;
|
|
9152
|
+
}
|
|
9153
|
+
|
|
9102
9154
|
export interface TornStock {
|
|
9103
9155
|
id: StockId;
|
|
9104
9156
|
name: string;
|
|
@@ -13675,6 +13727,10 @@ export interface TornV2 extends BaseSchema {
|
|
|
13675
13727
|
response: TornCalendarResponse;
|
|
13676
13728
|
params: "timestamp";
|
|
13677
13729
|
};
|
|
13730
|
+
companies: {
|
|
13731
|
+
response: TornCompaniesResponse;
|
|
13732
|
+
params: "timestamp";
|
|
13733
|
+
};
|
|
13678
13734
|
crimes: {
|
|
13679
13735
|
response: TornCrimesResponse;
|
|
13680
13736
|
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.
|
|
6
|
+
"version": "6.7.0"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -3287,7 +3287,7 @@
|
|
|
3287
3287
|
"User"
|
|
3288
3288
|
],
|
|
3289
3289
|
"summary": "Get daily active players snapshot CSV",
|
|
3290
|
-
"description": "Requires public access key.<br>Returns a CSV daily snapshot of active players.<br>This selection is standalone and cannot be used together with other selections.<br>\nCSV columns: id, name, gender,
|
|
3290
|
+
"description": "Requires public access key.<br>Returns a CSV daily snapshot of active players.<br>This selection is standalone and cannot be used together with other selections.<br>\nCSV columns: id, name, gender, signed_up, level, rank, donator, faction, company, job, spouse, display_case, bazaar, fed, fed_reason, time_played, awards",
|
|
3291
3291
|
"operationId": "getUsersSnapshot",
|
|
3292
3292
|
"parameters": [
|
|
3293
3293
|
{
|
|
@@ -3307,7 +3307,7 @@
|
|
|
3307
3307
|
"text/csv": {
|
|
3308
3308
|
"schema": {
|
|
3309
3309
|
"type": "string",
|
|
3310
|
-
"example": "id,name,gender,
|
|
3310
|
+
"example": "id,name,gender,signed_up,level,rank,donator,faction,company,job,spouse,display_case,bazaar,fed,fed_reason,time_played,awards\\n33,1,Chedburn,Male,1100521336,15,Outstanding,1,40992,79286,,2103253,1,1,0,,48076299,1388"
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
3313
|
}
|
|
@@ -9411,6 +9411,93 @@
|
|
|
9411
9411
|
"x-stability": "Stable"
|
|
9412
9412
|
}
|
|
9413
9413
|
},
|
|
9414
|
+
"/torn/companies": {
|
|
9415
|
+
"get": {
|
|
9416
|
+
"tags": [
|
|
9417
|
+
"Torn"
|
|
9418
|
+
],
|
|
9419
|
+
"summary": "Get all companies details",
|
|
9420
|
+
"description": "Requires public access key. <br>",
|
|
9421
|
+
"operationId": "getTornCompanies",
|
|
9422
|
+
"parameters": [
|
|
9423
|
+
{
|
|
9424
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
9425
|
+
},
|
|
9426
|
+
{
|
|
9427
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
9428
|
+
},
|
|
9429
|
+
{
|
|
9430
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
9431
|
+
}
|
|
9432
|
+
],
|
|
9433
|
+
"responses": {
|
|
9434
|
+
"200": {
|
|
9435
|
+
"description": "Successful operation",
|
|
9436
|
+
"content": {
|
|
9437
|
+
"application/json": {
|
|
9438
|
+
"schema": {
|
|
9439
|
+
"$ref": "#/components/schemas/TornCompaniesResponse"
|
|
9440
|
+
}
|
|
9441
|
+
}
|
|
9442
|
+
}
|
|
9443
|
+
}
|
|
9444
|
+
},
|
|
9445
|
+
"security": [
|
|
9446
|
+
{
|
|
9447
|
+
"api_key": []
|
|
9448
|
+
}
|
|
9449
|
+
],
|
|
9450
|
+
"x-stability": "Unstable"
|
|
9451
|
+
}
|
|
9452
|
+
},
|
|
9453
|
+
"/torn/{typeId}/companies": {
|
|
9454
|
+
"get": {
|
|
9455
|
+
"tags": [
|
|
9456
|
+
"Torn"
|
|
9457
|
+
],
|
|
9458
|
+
"summary": "Get specific company details",
|
|
9459
|
+
"description": "Requires public access key. <br>",
|
|
9460
|
+
"operationId": "getTornCompaniesSpecific",
|
|
9461
|
+
"parameters": [
|
|
9462
|
+
{
|
|
9463
|
+
"name": "typeId",
|
|
9464
|
+
"in": "path",
|
|
9465
|
+
"description": "Company type id",
|
|
9466
|
+
"required": true,
|
|
9467
|
+
"schema": {
|
|
9468
|
+
"$ref": "#/components/schemas/CompanyTypeId"
|
|
9469
|
+
}
|
|
9470
|
+
},
|
|
9471
|
+
{
|
|
9472
|
+
"$ref": "#/components/parameters/ApiTimestamp"
|
|
9473
|
+
},
|
|
9474
|
+
{
|
|
9475
|
+
"$ref": "#/components/parameters/ApiComment"
|
|
9476
|
+
},
|
|
9477
|
+
{
|
|
9478
|
+
"$ref": "#/components/parameters/ApiKeyPublic"
|
|
9479
|
+
}
|
|
9480
|
+
],
|
|
9481
|
+
"responses": {
|
|
9482
|
+
"200": {
|
|
9483
|
+
"description": "Successful operation",
|
|
9484
|
+
"content": {
|
|
9485
|
+
"application/json": {
|
|
9486
|
+
"schema": {
|
|
9487
|
+
"$ref": "#/components/schemas/TornCompaniesResponse"
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9490
|
+
}
|
|
9491
|
+
}
|
|
9492
|
+
},
|
|
9493
|
+
"security": [
|
|
9494
|
+
{
|
|
9495
|
+
"api_key": []
|
|
9496
|
+
}
|
|
9497
|
+
],
|
|
9498
|
+
"x-stability": "Unstable"
|
|
9499
|
+
}
|
|
9500
|
+
},
|
|
9414
9501
|
"/torn/crimes": {
|
|
9415
9502
|
"get": {
|
|
9416
9503
|
"tags": [
|
|
@@ -16008,6 +16095,14 @@
|
|
|
16008
16095
|
"type": "integer",
|
|
16009
16096
|
"format": "int32"
|
|
16010
16097
|
},
|
|
16098
|
+
"CompanySpecialId": {
|
|
16099
|
+
"type": "integer",
|
|
16100
|
+
"format": "int32"
|
|
16101
|
+
},
|
|
16102
|
+
"CompanyStockId": {
|
|
16103
|
+
"type": "integer",
|
|
16104
|
+
"format": "int32"
|
|
16105
|
+
},
|
|
16011
16106
|
"TradeId": {
|
|
16012
16107
|
"type": "integer",
|
|
16013
16108
|
"format": "int64"
|
|
@@ -30046,8 +30141,7 @@
|
|
|
30046
30141
|
"type": "string"
|
|
30047
30142
|
},
|
|
30048
30143
|
"id": {
|
|
30049
|
-
"
|
|
30050
|
-
"format": "int32"
|
|
30144
|
+
"$ref": "#/components/schemas/CompanyStockId"
|
|
30051
30145
|
},
|
|
30052
30146
|
"cost": {
|
|
30053
30147
|
"type": "integer",
|
|
@@ -32443,6 +32537,197 @@
|
|
|
32443
32537
|
},
|
|
32444
32538
|
"type": "object"
|
|
32445
32539
|
},
|
|
32540
|
+
"TornCompaniesResponse": {
|
|
32541
|
+
"required": [
|
|
32542
|
+
"companies"
|
|
32543
|
+
],
|
|
32544
|
+
"properties": {
|
|
32545
|
+
"companies": {
|
|
32546
|
+
"type": "array",
|
|
32547
|
+
"items": {
|
|
32548
|
+
"$ref": "#/components/schemas/TornCompany"
|
|
32549
|
+
}
|
|
32550
|
+
}
|
|
32551
|
+
},
|
|
32552
|
+
"type": "object"
|
|
32553
|
+
},
|
|
32554
|
+
"TornCompany": {
|
|
32555
|
+
"required": [
|
|
32556
|
+
"id",
|
|
32557
|
+
"name",
|
|
32558
|
+
"cost",
|
|
32559
|
+
"employees",
|
|
32560
|
+
"positions",
|
|
32561
|
+
"specials",
|
|
32562
|
+
"stock"
|
|
32563
|
+
],
|
|
32564
|
+
"properties": {
|
|
32565
|
+
"id": {
|
|
32566
|
+
"$ref": "#/components/schemas/CompanyTypeId"
|
|
32567
|
+
},
|
|
32568
|
+
"name": {
|
|
32569
|
+
"type": "string"
|
|
32570
|
+
},
|
|
32571
|
+
"cost": {
|
|
32572
|
+
"type": "integer",
|
|
32573
|
+
"format": "int64"
|
|
32574
|
+
},
|
|
32575
|
+
"employees": {
|
|
32576
|
+
"type": "integer",
|
|
32577
|
+
"format": "int32"
|
|
32578
|
+
},
|
|
32579
|
+
"positions": {
|
|
32580
|
+
"type": "array",
|
|
32581
|
+
"items": {
|
|
32582
|
+
"$ref": "#/components/schemas/TornCompanyPosition"
|
|
32583
|
+
}
|
|
32584
|
+
},
|
|
32585
|
+
"specials": {
|
|
32586
|
+
"type": "array",
|
|
32587
|
+
"items": {
|
|
32588
|
+
"$ref": "#/components/schemas/TornCompanySpecial"
|
|
32589
|
+
}
|
|
32590
|
+
},
|
|
32591
|
+
"stock": {
|
|
32592
|
+
"type": "array",
|
|
32593
|
+
"items": {
|
|
32594
|
+
"$ref": "#/components/schemas/TornCompanyStock"
|
|
32595
|
+
}
|
|
32596
|
+
}
|
|
32597
|
+
},
|
|
32598
|
+
"type": "object"
|
|
32599
|
+
},
|
|
32600
|
+
"TornCompanyPosition": {
|
|
32601
|
+
"required": [
|
|
32602
|
+
"id",
|
|
32603
|
+
"name",
|
|
32604
|
+
"description",
|
|
32605
|
+
"ability",
|
|
32606
|
+
"working_stats"
|
|
32607
|
+
],
|
|
32608
|
+
"properties": {
|
|
32609
|
+
"id": {
|
|
32610
|
+
"$ref": "#/components/schemas/CompanyPositionId"
|
|
32611
|
+
},
|
|
32612
|
+
"name": {
|
|
32613
|
+
"type": "string"
|
|
32614
|
+
},
|
|
32615
|
+
"description": {
|
|
32616
|
+
"type": "string"
|
|
32617
|
+
},
|
|
32618
|
+
"ability": {
|
|
32619
|
+
"type": "string"
|
|
32620
|
+
},
|
|
32621
|
+
"working_stats": {
|
|
32622
|
+
"required": [
|
|
32623
|
+
"required",
|
|
32624
|
+
"daily_gains"
|
|
32625
|
+
],
|
|
32626
|
+
"properties": {
|
|
32627
|
+
"required": {
|
|
32628
|
+
"required": [
|
|
32629
|
+
"intelligence",
|
|
32630
|
+
"manual_labor",
|
|
32631
|
+
"endurance"
|
|
32632
|
+
],
|
|
32633
|
+
"properties": {
|
|
32634
|
+
"intelligence": {
|
|
32635
|
+
"type": "integer",
|
|
32636
|
+
"format": "int32"
|
|
32637
|
+
},
|
|
32638
|
+
"manual_labor": {
|
|
32639
|
+
"type": "integer",
|
|
32640
|
+
"format": "int32"
|
|
32641
|
+
},
|
|
32642
|
+
"endurance": {
|
|
32643
|
+
"type": "integer",
|
|
32644
|
+
"format": "int32"
|
|
32645
|
+
}
|
|
32646
|
+
},
|
|
32647
|
+
"type": "object"
|
|
32648
|
+
},
|
|
32649
|
+
"daily_gains": {
|
|
32650
|
+
"required": [
|
|
32651
|
+
"intelligence",
|
|
32652
|
+
"manual_labor",
|
|
32653
|
+
"endurance"
|
|
32654
|
+
],
|
|
32655
|
+
"properties": {
|
|
32656
|
+
"intelligence": {
|
|
32657
|
+
"type": "integer",
|
|
32658
|
+
"format": "int32"
|
|
32659
|
+
},
|
|
32660
|
+
"manual_labor": {
|
|
32661
|
+
"type": "integer",
|
|
32662
|
+
"format": "int32"
|
|
32663
|
+
},
|
|
32664
|
+
"endurance": {
|
|
32665
|
+
"type": "integer",
|
|
32666
|
+
"format": "int32"
|
|
32667
|
+
}
|
|
32668
|
+
},
|
|
32669
|
+
"type": "object"
|
|
32670
|
+
}
|
|
32671
|
+
},
|
|
32672
|
+
"type": "object"
|
|
32673
|
+
}
|
|
32674
|
+
},
|
|
32675
|
+
"type": "object"
|
|
32676
|
+
},
|
|
32677
|
+
"TornCompanySpecial": {
|
|
32678
|
+
"required": [
|
|
32679
|
+
"id",
|
|
32680
|
+
"name",
|
|
32681
|
+
"effect",
|
|
32682
|
+
"cost",
|
|
32683
|
+
"rating"
|
|
32684
|
+
],
|
|
32685
|
+
"properties": {
|
|
32686
|
+
"id": {
|
|
32687
|
+
"$ref": "#/components/schemas/CompanySpecialId"
|
|
32688
|
+
},
|
|
32689
|
+
"name": {
|
|
32690
|
+
"type": "string"
|
|
32691
|
+
},
|
|
32692
|
+
"effect": {
|
|
32693
|
+
"type": "string"
|
|
32694
|
+
},
|
|
32695
|
+
"cost": {
|
|
32696
|
+
"type": "integer",
|
|
32697
|
+
"format": "int32"
|
|
32698
|
+
},
|
|
32699
|
+
"rating": {
|
|
32700
|
+
"type": "integer",
|
|
32701
|
+
"format": "int32"
|
|
32702
|
+
}
|
|
32703
|
+
},
|
|
32704
|
+
"type": "object"
|
|
32705
|
+
},
|
|
32706
|
+
"TornCompanyStock": {
|
|
32707
|
+
"required": [
|
|
32708
|
+
"id",
|
|
32709
|
+
"name",
|
|
32710
|
+
"cost",
|
|
32711
|
+
"rrp"
|
|
32712
|
+
],
|
|
32713
|
+
"properties": {
|
|
32714
|
+
"id": {
|
|
32715
|
+
"$ref": "#/components/schemas/CompanyStockId"
|
|
32716
|
+
},
|
|
32717
|
+
"name": {
|
|
32718
|
+
"type": "string"
|
|
32719
|
+
},
|
|
32720
|
+
"cost": {
|
|
32721
|
+
"type": "integer",
|
|
32722
|
+
"format": "int64"
|
|
32723
|
+
},
|
|
32724
|
+
"rrp": {
|
|
32725
|
+
"type": "integer",
|
|
32726
|
+
"format": "int64"
|
|
32727
|
+
}
|
|
32728
|
+
},
|
|
32729
|
+
"type": "object"
|
|
32730
|
+
},
|
|
32446
32731
|
"TornStock": {
|
|
32447
32732
|
"required": [
|
|
32448
32733
|
"id",
|