tornapi-typescript 6.6.1 → 6.8.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 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;
@@ -144,6 +146,7 @@ export type CompanyStorageSizeEnum = "Small room" | "Standard room" | "Large roo
144
146
  export type HonorRarityEnum = "Extremely Rare" | "Very Rare" | "Rare" | "Limited" | "Uncommon" | "Common" | "Very Common" | "Unknown" | "Unknown Rarity";
145
147
  export type AwardCrimesVersionEnum = "v1" | "v2";
146
148
  export type CompanySearchParameter = string;
149
+ export type UserSearchParameter = string;
147
150
  export type Parameters = string;
148
151
  export type ReviveSetting = "Everyone" | "Friends & faction" | "No one" | "Unknown";
149
152
  export type FactionWarfareTypeEnum = "ranked" | "territory" | "raid" | "chain" | "chainOngoing" | "db";
@@ -504,6 +507,18 @@ export interface ErrorFileDoesNotExist {
504
507
  error: string;
505
508
  }
506
509
  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;
510
+ export interface UserSearch {
511
+ id: UserId;
512
+ name: string;
513
+ level: number;
514
+ online: UserLastActionStatusEnum;
515
+ faction_id: FactionId;
516
+ icons: UserIconPublic[];
517
+ }
518
+ export interface UserSearchResponse {
519
+ search: UserSearch[];
520
+ _metadata: RequestMetadataWithLinksAndTotal;
521
+ }
507
522
  export interface UserPerksResponse {
508
523
  perks: {
509
524
  faction: string[];
@@ -2883,7 +2898,7 @@ export interface CompanyStockResponse {
2883
2898
  }
2884
2899
  export interface CompanyStockItem {
2885
2900
  name: string;
2886
- id: number;
2901
+ id: CompanyStockId;
2887
2902
  cost: number;
2888
2903
  rrp: number;
2889
2904
  price: number;
@@ -3358,6 +3373,49 @@ export type PropertySelectionName = string;
3358
3373
  export interface PropertyLookupResponse {
3359
3374
  selections: PropertySelectionName[];
3360
3375
  }
3376
+ export interface TornCompaniesResponse {
3377
+ companies: TornCompany[];
3378
+ }
3379
+ export interface TornCompany {
3380
+ id: CompanyTypeId;
3381
+ name: string;
3382
+ cost: number;
3383
+ employees: number;
3384
+ positions: TornCompanyPosition[];
3385
+ specials: TornCompanySpecial[];
3386
+ stock: TornCompanyStock[];
3387
+ }
3388
+ export interface TornCompanyPosition {
3389
+ id: CompanyPositionId;
3390
+ name: string;
3391
+ description: string;
3392
+ ability: string;
3393
+ working_stats: {
3394
+ required: {
3395
+ intelligence: number;
3396
+ manual_labor: number;
3397
+ endurance: number;
3398
+ };
3399
+ daily_gains: {
3400
+ intelligence: number;
3401
+ manual_labor: number;
3402
+ endurance: number;
3403
+ };
3404
+ };
3405
+ }
3406
+ export interface TornCompanySpecial {
3407
+ id: CompanySpecialId;
3408
+ name: string;
3409
+ effect: string;
3410
+ cost: number;
3411
+ rating: number;
3412
+ }
3413
+ export interface TornCompanyStock {
3414
+ id: CompanyStockId;
3415
+ name: string;
3416
+ cost: number;
3417
+ rrp: number;
3418
+ }
3361
3419
  export interface TornStock {
3362
3420
  id: StockId;
3363
3421
  name: string;
@@ -7341,6 +7399,10 @@ export interface UserV2 extends BaseSchema {
7341
7399
  response: UserSkillsResponse;
7342
7400
  params: "timestamp";
7343
7401
  };
7402
+ search: {
7403
+ response: UserSearchResponse;
7404
+ params: "name" | "filters" | "offset" | "timestamp";
7405
+ };
7344
7406
  snapshot: {
7345
7407
  response: null;
7346
7408
  params: "timestamp";
@@ -7717,6 +7779,10 @@ export interface TornV2 extends BaseSchema {
7717
7779
  response: TornCalendarResponse;
7718
7780
  params: "timestamp";
7719
7781
  };
7782
+ companies: {
7783
+ response: TornCompaniesResponse;
7784
+ params: "timestamp";
7785
+ };
7720
7786
  crimes: {
7721
7787
  response: TornCrimesResponse;
7722
7788
  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;
@@ -4860,6 +4864,8 @@ export type AwardCrimesVersionEnum = "v1" | "v2";
4860
4864
 
4861
4865
  export type CompanySearchParameter = string;
4862
4866
 
4867
+ export type UserSearchParameter = string;
4868
+
4863
4869
  export type Parameters = string;
4864
4870
 
4865
4871
  export type ReviveSetting =
@@ -5517,6 +5523,20 @@ export type ApiError =
5517
5523
  | ErrorCategorySelectionUnavailableForInteractionLogs
5518
5524
  | ErrorFileDoesNotExist;
5519
5525
 
5526
+ export interface UserSearch {
5527
+ id: UserId;
5528
+ name: string;
5529
+ level: number;
5530
+ online: UserLastActionStatusEnum;
5531
+ faction_id: FactionId;
5532
+ icons: UserIconPublic[];
5533
+ }
5534
+
5535
+ export interface UserSearchResponse {
5536
+ search: UserSearch[];
5537
+ _metadata: RequestMetadataWithLinksAndTotal;
5538
+ }
5539
+
5520
5540
  export interface UserPerksResponse {
5521
5541
  perks: {
5522
5542
  faction: string[];
@@ -8547,7 +8567,7 @@ export interface CompanyStockResponse {
8547
8567
 
8548
8568
  export interface CompanyStockItem {
8549
8569
  name: string;
8550
- id: number;
8570
+ id: CompanyStockId;
8551
8571
  cost: number;
8552
8572
  rrp: number;
8553
8573
  price: number;
@@ -9099,6 +9119,54 @@ export interface PropertyLookupResponse {
9099
9119
  selections: PropertySelectionName[];
9100
9120
  }
9101
9121
 
9122
+ export interface TornCompaniesResponse {
9123
+ companies: TornCompany[];
9124
+ }
9125
+
9126
+ export interface TornCompany {
9127
+ id: CompanyTypeId;
9128
+ name: string;
9129
+ cost: number;
9130
+ employees: number;
9131
+ positions: TornCompanyPosition[];
9132
+ specials: TornCompanySpecial[];
9133
+ stock: TornCompanyStock[];
9134
+ }
9135
+
9136
+ export interface TornCompanyPosition {
9137
+ id: CompanyPositionId;
9138
+ name: string;
9139
+ description: string;
9140
+ ability: string;
9141
+ working_stats: {
9142
+ required: {
9143
+ intelligence: number;
9144
+ manual_labor: number;
9145
+ endurance: number;
9146
+ };
9147
+ daily_gains: {
9148
+ intelligence: number;
9149
+ manual_labor: number;
9150
+ endurance: number;
9151
+ };
9152
+ };
9153
+ }
9154
+
9155
+ export interface TornCompanySpecial {
9156
+ id: CompanySpecialId;
9157
+ name: string;
9158
+ effect: string;
9159
+ cost: number;
9160
+ rating: number;
9161
+ }
9162
+
9163
+ export interface TornCompanyStock {
9164
+ id: CompanyStockId;
9165
+ name: string;
9166
+ cost: number;
9167
+ rrp: number;
9168
+ }
9169
+
9102
9170
  export interface TornStock {
9103
9171
  id: StockId;
9104
9172
  name: string;
@@ -13253,6 +13321,10 @@ export interface UserV2 extends BaseSchema {
13253
13321
  response: UserSkillsResponse;
13254
13322
  params: "timestamp";
13255
13323
  };
13324
+ search: {
13325
+ response: UserSearchResponse;
13326
+ params: "name" | "filters" | "offset" | "timestamp";
13327
+ };
13256
13328
  snapshot: {
13257
13329
  response: null;
13258
13330
  params: "timestamp";
@@ -13675,6 +13747,10 @@ export interface TornV2 extends BaseSchema {
13675
13747
  response: TornCalendarResponse;
13676
13748
  params: "timestamp";
13677
13749
  };
13750
+ companies: {
13751
+ response: TornCompaniesResponse;
13752
+ params: "timestamp";
13753
+ };
13678
13754
  crimes: {
13679
13755
  response: TornCrimesResponse;
13680
13756
  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.1"
6
+ "version": "6.8.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -3281,6 +3281,54 @@
3281
3281
  "x-stability": "Stable"
3282
3282
  }
3283
3283
  },
3284
+ "/user/search": {
3285
+ "get": {
3286
+ "tags": [
3287
+ "User"
3288
+ ],
3289
+ "summary": "Search users by name or other criteria",
3290
+ "description": "Requires public access key. <br>This selection is standalone and cannot be used together with other selections.<br>It's always limited to return just 25 records.",
3291
+ "operationId": "getUsersSearch",
3292
+ "parameters": [
3293
+ {
3294
+ "$ref": "#/components/parameters/ApiName"
3295
+ },
3296
+ {
3297
+ "$ref": "#/components/parameters/ApiUserSearchFilter"
3298
+ },
3299
+ {
3300
+ "$ref": "#/components/parameters/ApiOffset"
3301
+ },
3302
+ {
3303
+ "$ref": "#/components/parameters/ApiTimestamp"
3304
+ },
3305
+ {
3306
+ "$ref": "#/components/parameters/ApiComment"
3307
+ },
3308
+ {
3309
+ "$ref": "#/components/parameters/ApiKeyPublic"
3310
+ }
3311
+ ],
3312
+ "responses": {
3313
+ "200": {
3314
+ "description": "Successful operation",
3315
+ "content": {
3316
+ "application/json": {
3317
+ "schema": {
3318
+ "$ref": "#/components/schemas/UserSearchResponse"
3319
+ }
3320
+ }
3321
+ }
3322
+ }
3323
+ },
3324
+ "security": [
3325
+ {
3326
+ "api_key": []
3327
+ }
3328
+ ],
3329
+ "x-stability": "Unstable"
3330
+ }
3331
+ },
3284
3332
  "/user/snapshot": {
3285
3333
  "get": {
3286
3334
  "tags": [
@@ -9411,6 +9459,93 @@
9411
9459
  "x-stability": "Stable"
9412
9460
  }
9413
9461
  },
9462
+ "/torn/companies": {
9463
+ "get": {
9464
+ "tags": [
9465
+ "Torn"
9466
+ ],
9467
+ "summary": "Get all companies details",
9468
+ "description": "Requires public access key. <br>",
9469
+ "operationId": "getTornCompanies",
9470
+ "parameters": [
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
+ },
9501
+ "/torn/{typeId}/companies": {
9502
+ "get": {
9503
+ "tags": [
9504
+ "Torn"
9505
+ ],
9506
+ "summary": "Get specific company details",
9507
+ "description": "Requires public access key. <br>",
9508
+ "operationId": "getTornCompaniesSpecific",
9509
+ "parameters": [
9510
+ {
9511
+ "name": "typeId",
9512
+ "in": "path",
9513
+ "description": "Company type id",
9514
+ "required": true,
9515
+ "schema": {
9516
+ "$ref": "#/components/schemas/CompanyTypeId"
9517
+ }
9518
+ },
9519
+ {
9520
+ "$ref": "#/components/parameters/ApiTimestamp"
9521
+ },
9522
+ {
9523
+ "$ref": "#/components/parameters/ApiComment"
9524
+ },
9525
+ {
9526
+ "$ref": "#/components/parameters/ApiKeyPublic"
9527
+ }
9528
+ ],
9529
+ "responses": {
9530
+ "200": {
9531
+ "description": "Successful operation",
9532
+ "content": {
9533
+ "application/json": {
9534
+ "schema": {
9535
+ "$ref": "#/components/schemas/TornCompaniesResponse"
9536
+ }
9537
+ }
9538
+ }
9539
+ }
9540
+ },
9541
+ "security": [
9542
+ {
9543
+ "api_key": []
9544
+ }
9545
+ ],
9546
+ "x-stability": "Unstable"
9547
+ }
9548
+ },
9414
9549
  "/torn/crimes": {
9415
9550
  "get": {
9416
9551
  "tags": [
@@ -16008,6 +16143,14 @@
16008
16143
  "type": "integer",
16009
16144
  "format": "int32"
16010
16145
  },
16146
+ "CompanySpecialId": {
16147
+ "type": "integer",
16148
+ "format": "int32"
16149
+ },
16150
+ "CompanyStockId": {
16151
+ "type": "integer",
16152
+ "format": "int32"
16153
+ },
16011
16154
  "TradeId": {
16012
16155
  "type": "integer",
16013
16156
  "format": "int64"
@@ -16260,6 +16403,47 @@
16260
16403
  }
16261
16404
  ]
16262
16405
  },
16406
+ "UserSearchParameter": {
16407
+ "oneOf": [
16408
+ {
16409
+ "type": "string",
16410
+ "enum": [
16411
+ "married",
16412
+ "notMarried",
16413
+ "traveling",
16414
+ "notTraveling",
16415
+ "inFaction",
16416
+ "notInFaction",
16417
+ "inCompany",
16418
+ "notInCompany",
16419
+ "inHospital",
16420
+ "notInHospital",
16421
+ "inJail",
16422
+ "notInJail",
16423
+ "inFederalJail",
16424
+ "notInFederalJail",
16425
+ "male",
16426
+ "female",
16427
+ "enby",
16428
+ "lastActionNow",
16429
+ "lastActionRecent",
16430
+ "lastActionHourAgo",
16431
+ "lastActionDayAgo",
16432
+ "lastActionWeekAgo",
16433
+ "lastActionMonthAgo",
16434
+ "lastActionYearAgo"
16435
+ ]
16436
+ },
16437
+ {
16438
+ "type": "string",
16439
+ "pattern": "^(level|daysOld|offences):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
16440
+ },
16441
+ {
16442
+ "type": "string",
16443
+ "pattern": "^factions:\\d+(;\\d+)*$"
16444
+ }
16445
+ ]
16446
+ },
16263
16447
  "Parameters": {
16264
16448
  "oneOf": [
16265
16449
  {
@@ -18350,6 +18534,59 @@
18350
18534
  }
18351
18535
  ]
18352
18536
  },
18537
+ "UserSearch": {
18538
+ "required": [
18539
+ "id",
18540
+ "name",
18541
+ "level",
18542
+ "online",
18543
+ "faction_id",
18544
+ "icons"
18545
+ ],
18546
+ "properties": {
18547
+ "id": {
18548
+ "$ref": "#/components/schemas/UserId"
18549
+ },
18550
+ "name": {
18551
+ "type": "string"
18552
+ },
18553
+ "level": {
18554
+ "type": "integer",
18555
+ "format": "int32"
18556
+ },
18557
+ "online": {
18558
+ "$ref": "#/components/schemas/UserLastActionStatusEnum"
18559
+ },
18560
+ "faction_id": {
18561
+ "$ref": "#/components/schemas/FactionId"
18562
+ },
18563
+ "icons": {
18564
+ "type": "array",
18565
+ "items": {
18566
+ "$ref": "#/components/schemas/UserIconPublic"
18567
+ }
18568
+ }
18569
+ },
18570
+ "type": "object"
18571
+ },
18572
+ "UserSearchResponse": {
18573
+ "required": [
18574
+ "search",
18575
+ "_metadata"
18576
+ ],
18577
+ "properties": {
18578
+ "search": {
18579
+ "type": "array",
18580
+ "items": {
18581
+ "$ref": "#/components/schemas/UserSearch"
18582
+ }
18583
+ },
18584
+ "_metadata": {
18585
+ "$ref": "#/components/schemas/RequestMetadataWithLinksAndTotal"
18586
+ }
18587
+ },
18588
+ "type": "object"
18589
+ },
18353
18590
  "UserPerksResponse": {
18354
18591
  "required": [
18355
18592
  "perks"
@@ -30046,8 +30283,7 @@
30046
30283
  "type": "string"
30047
30284
  },
30048
30285
  "id": {
30049
- "type": "integer",
30050
- "format": "int32"
30286
+ "$ref": "#/components/schemas/CompanyStockId"
30051
30287
  },
30052
30288
  "cost": {
30053
30289
  "type": "integer",
@@ -32443,6 +32679,197 @@
32443
32679
  },
32444
32680
  "type": "object"
32445
32681
  },
32682
+ "TornCompaniesResponse": {
32683
+ "required": [
32684
+ "companies"
32685
+ ],
32686
+ "properties": {
32687
+ "companies": {
32688
+ "type": "array",
32689
+ "items": {
32690
+ "$ref": "#/components/schemas/TornCompany"
32691
+ }
32692
+ }
32693
+ },
32694
+ "type": "object"
32695
+ },
32696
+ "TornCompany": {
32697
+ "required": [
32698
+ "id",
32699
+ "name",
32700
+ "cost",
32701
+ "employees",
32702
+ "positions",
32703
+ "specials",
32704
+ "stock"
32705
+ ],
32706
+ "properties": {
32707
+ "id": {
32708
+ "$ref": "#/components/schemas/CompanyTypeId"
32709
+ },
32710
+ "name": {
32711
+ "type": "string"
32712
+ },
32713
+ "cost": {
32714
+ "type": "integer",
32715
+ "format": "int64"
32716
+ },
32717
+ "employees": {
32718
+ "type": "integer",
32719
+ "format": "int32"
32720
+ },
32721
+ "positions": {
32722
+ "type": "array",
32723
+ "items": {
32724
+ "$ref": "#/components/schemas/TornCompanyPosition"
32725
+ }
32726
+ },
32727
+ "specials": {
32728
+ "type": "array",
32729
+ "items": {
32730
+ "$ref": "#/components/schemas/TornCompanySpecial"
32731
+ }
32732
+ },
32733
+ "stock": {
32734
+ "type": "array",
32735
+ "items": {
32736
+ "$ref": "#/components/schemas/TornCompanyStock"
32737
+ }
32738
+ }
32739
+ },
32740
+ "type": "object"
32741
+ },
32742
+ "TornCompanyPosition": {
32743
+ "required": [
32744
+ "id",
32745
+ "name",
32746
+ "description",
32747
+ "ability",
32748
+ "working_stats"
32749
+ ],
32750
+ "properties": {
32751
+ "id": {
32752
+ "$ref": "#/components/schemas/CompanyPositionId"
32753
+ },
32754
+ "name": {
32755
+ "type": "string"
32756
+ },
32757
+ "description": {
32758
+ "type": "string"
32759
+ },
32760
+ "ability": {
32761
+ "type": "string"
32762
+ },
32763
+ "working_stats": {
32764
+ "required": [
32765
+ "required",
32766
+ "daily_gains"
32767
+ ],
32768
+ "properties": {
32769
+ "required": {
32770
+ "required": [
32771
+ "intelligence",
32772
+ "manual_labor",
32773
+ "endurance"
32774
+ ],
32775
+ "properties": {
32776
+ "intelligence": {
32777
+ "type": "integer",
32778
+ "format": "int32"
32779
+ },
32780
+ "manual_labor": {
32781
+ "type": "integer",
32782
+ "format": "int32"
32783
+ },
32784
+ "endurance": {
32785
+ "type": "integer",
32786
+ "format": "int32"
32787
+ }
32788
+ },
32789
+ "type": "object"
32790
+ },
32791
+ "daily_gains": {
32792
+ "required": [
32793
+ "intelligence",
32794
+ "manual_labor",
32795
+ "endurance"
32796
+ ],
32797
+ "properties": {
32798
+ "intelligence": {
32799
+ "type": "integer",
32800
+ "format": "int32"
32801
+ },
32802
+ "manual_labor": {
32803
+ "type": "integer",
32804
+ "format": "int32"
32805
+ },
32806
+ "endurance": {
32807
+ "type": "integer",
32808
+ "format": "int32"
32809
+ }
32810
+ },
32811
+ "type": "object"
32812
+ }
32813
+ },
32814
+ "type": "object"
32815
+ }
32816
+ },
32817
+ "type": "object"
32818
+ },
32819
+ "TornCompanySpecial": {
32820
+ "required": [
32821
+ "id",
32822
+ "name",
32823
+ "effect",
32824
+ "cost",
32825
+ "rating"
32826
+ ],
32827
+ "properties": {
32828
+ "id": {
32829
+ "$ref": "#/components/schemas/CompanySpecialId"
32830
+ },
32831
+ "name": {
32832
+ "type": "string"
32833
+ },
32834
+ "effect": {
32835
+ "type": "string"
32836
+ },
32837
+ "cost": {
32838
+ "type": "integer",
32839
+ "format": "int32"
32840
+ },
32841
+ "rating": {
32842
+ "type": "integer",
32843
+ "format": "int32"
32844
+ }
32845
+ },
32846
+ "type": "object"
32847
+ },
32848
+ "TornCompanyStock": {
32849
+ "required": [
32850
+ "id",
32851
+ "name",
32852
+ "cost",
32853
+ "rrp"
32854
+ ],
32855
+ "properties": {
32856
+ "id": {
32857
+ "$ref": "#/components/schemas/CompanyStockId"
32858
+ },
32859
+ "name": {
32860
+ "type": "string"
32861
+ },
32862
+ "cost": {
32863
+ "type": "integer",
32864
+ "format": "int64"
32865
+ },
32866
+ "rrp": {
32867
+ "type": "integer",
32868
+ "format": "int64"
32869
+ }
32870
+ },
32871
+ "type": "object"
32872
+ },
32446
32873
  "TornStock": {
32447
32874
  "required": [
32448
32875
  "id",
@@ -34822,7 +35249,7 @@
34822
35249
  "ApiCompanySearchFilter": {
34823
35250
  "name": "filters",
34824
35251
  "in": "query",
34825
- "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`",
35252
+ "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:\n * `filters=recruiting`,\n * `filters=weeklyIncome:>=:20000,id:<:1000,notRecruiting`,\n * `filters=type:Equal:10,rating:=:10,dailyIncome:<=:6666666`",
34826
35253
  "required": false,
34827
35254
  "style": "form",
34828
35255
  "explode": false,
@@ -34846,6 +35273,59 @@
34846
35273
  }
34847
35274
  }
34848
35275
  },
35276
+ "ApiUserSearchFilter": {
35277
+ "name": "filters",
35278
+ "in": "query",
35279
+ "description": "A filtering query parameter allowing a comma-separated list of filters. <br>\n * Filters in this selection reflect on-site filters, and they can be:\n * One of: `married`, `notMarried`, `traveling`, `notTraveling`, `inFaction`, `notInFaction`, `inCompany`, `notInCompany`, `inHospital`, `notInHospital`, `inJail`, `notInJail`, `inFederalJail`, `notInFederalJail`\n * Additionally, one of last action: `lastActionNow`, `lastActionRecent`, `lastActionHourAgo`, `lastActionDayAgo`, `lastActionWeekAgo`, `lastActionMonthAgo`, `lastActionYearAgo`\n * Additionally, one of gender: `male`, `female`, `enby`\n * Any dynamic option: `fieldName`+`condition`+`number`. Each dynamic filter is made out of 3 parts separated by colon `:`:\n * * `fieldName` is one of: `level`, `daysOld`, `offences`\n * * `condition` is one of: `=`, `!=`, `<`, `<=`, `>=`, `>`, `Equal`, `NotEqual`, `Less`, `LessOrEqual`, `GreaterOrEqual`, `Greater`\n * * `number`: any integer value\n * Additionally, a dynamic list of faction ids (negates `inFaction` and `notInFaction` filters): `factions`+`:`+`list of ids separated by semicolon ;`\n * Examples:\n * `filters=married`,\n * `filters=daysOld:>=:5000,offences:>:100000,notInFaction`,\n * `filters=factions:1;2;3`,\n * `filters=level:=:100,lastActionYearAgo,male,inFaction,offences:>=:1000,offences:<=:1000000,daysOld:>:500,daysOld:<:7000`",
35280
+ "required": false,
35281
+ "style": "form",
35282
+ "explode": false,
35283
+ "schema": {
35284
+ "type": "array",
35285
+ "items": {
35286
+ "schema": "UserSearchParameter",
35287
+ "oneOf": [
35288
+ {
35289
+ "type": "string",
35290
+ "enum": [
35291
+ "married",
35292
+ "notMarried",
35293
+ "traveling",
35294
+ "notTraveling",
35295
+ "inFaction",
35296
+ "notInFaction",
35297
+ "inCompany",
35298
+ "notInCompany",
35299
+ "inHospital",
35300
+ "notInHospital",
35301
+ "inJail",
35302
+ "notInJail",
35303
+ "inFederalJail",
35304
+ "notInFederalJail",
35305
+ "male",
35306
+ "female",
35307
+ "enby",
35308
+ "lastActionNow",
35309
+ "lastActionRecent",
35310
+ "lastActionHourAgo",
35311
+ "lastActionDayAgo",
35312
+ "lastActionWeekAgo",
35313
+ "lastActionMonthAgo",
35314
+ "lastActionYearAgo"
35315
+ ]
35316
+ },
35317
+ {
35318
+ "type": "string",
35319
+ "pattern": "^(level|daysOld|offences):(=|!=|<|<=|>=|>|Equal|NotEqual|Less|LessOrEqual|GreaterOrEqual|Greater):\\d+$"
35320
+ },
35321
+ {
35322
+ "type": "string",
35323
+ "pattern": "^factions:\\d+(;\\d+)*$"
35324
+ }
35325
+ ]
35326
+ }
35327
+ }
35328
+ },
34849
35329
  "ApiKeyPublic": {
34850
35330
  "name": "key",
34851
35331
  "in": "query",
@@ -34961,7 +35441,7 @@
34961
35441
  "ApiFactionSearchFilter": {
34962
35442
  "name": "filters",
34963
35443
  "in": "query",
34964
- "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`",
35444
+ "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:\n * `filters=destroyed`,\n * `filters=notDestroyed,recruiting`,\n * `filters=respect:>=:20000,id:<:100,notRecruiting`",
34965
35445
  "required": false,
34966
35446
  "style": "form",
34967
35447
  "explode": false,
@@ -34999,7 +35479,7 @@
34999
35479
  "ApiName": {
35000
35480
  "name": "name",
35001
35481
  "in": "query",
35002
- "description": "Name to search for.",
35482
+ "description": "Name to search for.",
35003
35483
  "required": false,
35004
35484
  "schema": {
35005
35485
  "type": "string"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tornapi-typescript",
3
3
  "type": "module",
4
- "version": "6.6.1",
4
+ "version": "6.8.0",
5
5
  "repository": {
6
6
  "url": "git+https://github.com/Torn-Playground/tornapi-typescript.git"
7
7
  },