tornapi-typescript 4.3.4 → 4.3.7
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 +25 -16
- package/dist/index.ts +33 -21
- package/dist/openapi.json +36 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -603,7 +603,12 @@ export interface UserMoneyResponse {
|
|
|
603
603
|
cayman_bank: number;
|
|
604
604
|
city_bank: {
|
|
605
605
|
amount: number;
|
|
606
|
+
profit: number;
|
|
607
|
+
/** Initial duration in days. */
|
|
608
|
+
duration: number;
|
|
609
|
+
interest_rate: number;
|
|
606
610
|
until: number;
|
|
611
|
+
invested_at: number;
|
|
607
612
|
};
|
|
608
613
|
faction: {
|
|
609
614
|
money: number;
|
|
@@ -2914,6 +2919,8 @@ export interface TornCalendarActivity {
|
|
|
2914
2919
|
description: string;
|
|
2915
2920
|
start: number;
|
|
2916
2921
|
end: number;
|
|
2922
|
+
/** This value is false if the event uses personal calendar time. */
|
|
2923
|
+
fixed_start_time?: boolean;
|
|
2917
2924
|
}
|
|
2918
2925
|
export interface TornCalendarResponse {
|
|
2919
2926
|
calendar: {
|
|
@@ -4000,9 +4007,6 @@ export interface UserV1 extends BaseSchema {
|
|
|
4000
4007
|
current: number;
|
|
4001
4008
|
maximum: number;
|
|
4002
4009
|
increment: number;
|
|
4003
|
-
interval: number;
|
|
4004
|
-
ticktime: number;
|
|
4005
|
-
fulltime: number;
|
|
4006
4010
|
};
|
|
4007
4011
|
status: {
|
|
4008
4012
|
description: string;
|
|
@@ -5127,6 +5131,21 @@ export interface FactionV1 extends BaseSchema {
|
|
|
5127
5131
|
params: never;
|
|
5128
5132
|
requiredID: false;
|
|
5129
5133
|
};
|
|
5134
|
+
utilities: {
|
|
5135
|
+
response: {
|
|
5136
|
+
utilities: {
|
|
5137
|
+
ID: number;
|
|
5138
|
+
name: string;
|
|
5139
|
+
type: string;
|
|
5140
|
+
quantity: number;
|
|
5141
|
+
available: number;
|
|
5142
|
+
loaned: number;
|
|
5143
|
+
loaned_to: number | string;
|
|
5144
|
+
};
|
|
5145
|
+
};
|
|
5146
|
+
params: never;
|
|
5147
|
+
requiredID: false;
|
|
5148
|
+
};
|
|
5130
5149
|
weapons: {
|
|
5131
5150
|
response: {
|
|
5132
5151
|
weapons: {
|
|
@@ -6502,7 +6521,7 @@ export interface UserV2 extends BaseSchema {
|
|
|
6502
6521
|
};
|
|
6503
6522
|
log: {
|
|
6504
6523
|
response: UserLogsResponse;
|
|
6505
|
-
params: "log" | "cat" | "limit" | "to" | "from" | "timestamp";
|
|
6524
|
+
params: "log" | "cat" | "target" | "limit" | "to" | "from" | "timestamp";
|
|
6506
6525
|
};
|
|
6507
6526
|
medals: {
|
|
6508
6527
|
response: UserMedalsResponse;
|
|
@@ -7015,20 +7034,10 @@ export type CommonArgumentV1<Sec extends SectionV1, Sel extends keyof SectionsV1
|
|
|
7015
7034
|
selections?: Sel[];
|
|
7016
7035
|
} & CommonArgument;
|
|
7017
7036
|
export type GetArgumentV1<Sec extends SectionV1, Sel extends keyof SectionsV1Map[Sec]["selections"]> = ParamsV1<Sec, Sel> extends never ? {
|
|
7018
|
-
section: Sec;
|
|
7019
|
-
selections?: Sel[];
|
|
7020
|
-
id?: string | number;
|
|
7021
7037
|
params?: never;
|
|
7022
|
-
|
|
7023
|
-
comment?: string;
|
|
7024
|
-
} : {
|
|
7025
|
-
section: Sec;
|
|
7026
|
-
selections?: Sel[];
|
|
7027
|
-
id?: string | number;
|
|
7038
|
+
} & CommonArgumentV1<Sec, Sel> : {
|
|
7028
7039
|
params?: Partial<Record<ParamsV1<Sec, Sel>, string>>;
|
|
7029
|
-
|
|
7030
|
-
comment?: string;
|
|
7031
|
-
};
|
|
7040
|
+
} & CommonArgumentV1<Sec, Sel>;
|
|
7032
7041
|
export type CommonArgumentV2<Sec extends SectionV2, Sel extends keyof SectionsV2Map[Sec]["selections"]> = {
|
|
7033
7042
|
section: Sec;
|
|
7034
7043
|
selections?: Sel[];
|
package/dist/index.ts
CHANGED
|
@@ -5607,7 +5607,12 @@ export interface UserMoneyResponse {
|
|
|
5607
5607
|
cayman_bank: number;
|
|
5608
5608
|
city_bank: {
|
|
5609
5609
|
amount: number;
|
|
5610
|
+
profit: number;
|
|
5611
|
+
/** Initial duration in days. */
|
|
5612
|
+
duration: number;
|
|
5613
|
+
interest_rate: number;
|
|
5610
5614
|
until: number;
|
|
5615
|
+
invested_at: number;
|
|
5611
5616
|
};
|
|
5612
5617
|
faction: {
|
|
5613
5618
|
money: number;
|
|
@@ -8550,6 +8555,8 @@ export interface TornCalendarActivity {
|
|
|
8550
8555
|
description: string;
|
|
8551
8556
|
start: number;
|
|
8552
8557
|
end: number;
|
|
8558
|
+
/** This value is false if the event uses personal calendar time. */
|
|
8559
|
+
fixed_start_time?: boolean;
|
|
8553
8560
|
}
|
|
8554
8561
|
|
|
8555
8562
|
export interface TornCalendarResponse {
|
|
@@ -9676,14 +9683,7 @@ export interface UserV1 extends BaseSchema {
|
|
|
9676
9683
|
status: "rock" | "paper" | "scissors";
|
|
9677
9684
|
};
|
|
9678
9685
|
revivable: 0 | 1;
|
|
9679
|
-
life: {
|
|
9680
|
-
current: number;
|
|
9681
|
-
maximum: number;
|
|
9682
|
-
increment: number;
|
|
9683
|
-
interval: number;
|
|
9684
|
-
ticktime: number;
|
|
9685
|
-
fulltime: number;
|
|
9686
|
-
};
|
|
9686
|
+
life: { current: number; maximum: number; increment: number };
|
|
9687
9687
|
status: {
|
|
9688
9688
|
description: string;
|
|
9689
9689
|
details: string;
|
|
@@ -10843,6 +10843,21 @@ export interface FactionV1 extends BaseSchema {
|
|
|
10843
10843
|
params: never;
|
|
10844
10844
|
requiredID: false;
|
|
10845
10845
|
};
|
|
10846
|
+
utilities: {
|
|
10847
|
+
response: {
|
|
10848
|
+
utilities: {
|
|
10849
|
+
ID: number;
|
|
10850
|
+
name: string;
|
|
10851
|
+
type: string;
|
|
10852
|
+
quantity: number;
|
|
10853
|
+
available: number;
|
|
10854
|
+
loaned: number;
|
|
10855
|
+
loaned_to: number | string;
|
|
10856
|
+
};
|
|
10857
|
+
};
|
|
10858
|
+
params: never;
|
|
10859
|
+
requiredID: false;
|
|
10860
|
+
};
|
|
10846
10861
|
weapons: {
|
|
10847
10862
|
response: {
|
|
10848
10863
|
weapons: {
|
|
@@ -12251,7 +12266,14 @@ export interface UserV2 extends BaseSchema {
|
|
|
12251
12266
|
};
|
|
12252
12267
|
log: {
|
|
12253
12268
|
response: UserLogsResponse;
|
|
12254
|
-
params:
|
|
12269
|
+
params:
|
|
12270
|
+
| "log"
|
|
12271
|
+
| "cat"
|
|
12272
|
+
| "target"
|
|
12273
|
+
| "limit"
|
|
12274
|
+
| "to"
|
|
12275
|
+
| "from"
|
|
12276
|
+
| "timestamp";
|
|
12255
12277
|
};
|
|
12256
12278
|
medals: {
|
|
12257
12279
|
response: UserMedalsResponse;
|
|
@@ -12846,21 +12868,11 @@ export type GetArgumentV1<
|
|
|
12846
12868
|
> =
|
|
12847
12869
|
ParamsV1<Sec, Sel> extends never
|
|
12848
12870
|
? {
|
|
12849
|
-
section: Sec;
|
|
12850
|
-
selections?: Sel[];
|
|
12851
|
-
id?: string | number;
|
|
12852
12871
|
params?: never;
|
|
12853
|
-
|
|
12854
|
-
comment?: string;
|
|
12855
|
-
}
|
|
12872
|
+
} & CommonArgumentV1<Sec, Sel>
|
|
12856
12873
|
: {
|
|
12857
|
-
section: Sec;
|
|
12858
|
-
selections?: Sel[];
|
|
12859
|
-
id?: string | number;
|
|
12860
12874
|
params?: Partial<Record<ParamsV1<Sec, Sel>, string>>;
|
|
12861
|
-
|
|
12862
|
-
comment?: string;
|
|
12863
|
-
};
|
|
12875
|
+
} & CommonArgumentV1<Sec, Sel>;
|
|
12864
12876
|
export type CommonArgumentV2<
|
|
12865
12877
|
Sec extends SectionV2,
|
|
12866
12878
|
Sel extends keyof SectionsV2Map[Sec]["selections"],
|
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": "4.3.
|
|
6
|
+
"version": "4.3.7"
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -1704,6 +1704,15 @@
|
|
|
1704
1704
|
"$ref": "#/components/schemas/LogCategoryId"
|
|
1705
1705
|
}
|
|
1706
1706
|
},
|
|
1707
|
+
{
|
|
1708
|
+
"name": "target",
|
|
1709
|
+
"in": "query",
|
|
1710
|
+
"description": "Get logs where you interacted with a specific player by passing their player ID.",
|
|
1711
|
+
"required": false,
|
|
1712
|
+
"schema": {
|
|
1713
|
+
"$ref": "#/components/schemas/UserId"
|
|
1714
|
+
}
|
|
1715
|
+
},
|
|
1707
1716
|
{
|
|
1708
1717
|
"$ref": "#/components/parameters/ApiLimit100Default20"
|
|
1709
1718
|
},
|
|
@@ -16842,16 +16851,37 @@
|
|
|
16842
16851
|
"city_bank": {
|
|
16843
16852
|
"required": [
|
|
16844
16853
|
"amount",
|
|
16845
|
-
"
|
|
16854
|
+
"profit",
|
|
16855
|
+
"duration",
|
|
16856
|
+
"interest_rate",
|
|
16857
|
+
"until",
|
|
16858
|
+
"invested_at"
|
|
16846
16859
|
],
|
|
16847
16860
|
"properties": {
|
|
16848
16861
|
"amount": {
|
|
16849
16862
|
"type": "integer",
|
|
16850
16863
|
"format": "int64"
|
|
16851
16864
|
},
|
|
16865
|
+
"profit": {
|
|
16866
|
+
"type": "integer",
|
|
16867
|
+
"format": "int64"
|
|
16868
|
+
},
|
|
16869
|
+
"duration": {
|
|
16870
|
+
"description": "Initial duration in days.",
|
|
16871
|
+
"type": "integer",
|
|
16872
|
+
"format": "int32"
|
|
16873
|
+
},
|
|
16874
|
+
"interest_rate": {
|
|
16875
|
+
"type": "number",
|
|
16876
|
+
"format": "float"
|
|
16877
|
+
},
|
|
16852
16878
|
"until": {
|
|
16853
16879
|
"type": "integer",
|
|
16854
16880
|
"format": "int64"
|
|
16881
|
+
},
|
|
16882
|
+
"invested_at": {
|
|
16883
|
+
"type": "integer",
|
|
16884
|
+
"format": "int32"
|
|
16855
16885
|
}
|
|
16856
16886
|
},
|
|
16857
16887
|
"type": "object"
|
|
@@ -28257,6 +28287,10 @@
|
|
|
28257
28287
|
"end": {
|
|
28258
28288
|
"type": "integer",
|
|
28259
28289
|
"format": "int32"
|
|
28290
|
+
},
|
|
28291
|
+
"fixed_start_time": {
|
|
28292
|
+
"description": "This value is false if the event uses personal calendar time.",
|
|
28293
|
+
"type": "boolean"
|
|
28260
28294
|
}
|
|
28261
28295
|
},
|
|
28262
28296
|
"type": "object"
|