@lootlog/sdk 0.1.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.
@@ -0,0 +1,922 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "Search API",
5
+ "version": "1.0",
6
+ "description": "Meilisearch-powered search microservice",
7
+ "contact": {}
8
+ },
9
+ "servers": [
10
+ {
11
+ "url": "https://search.lootlog.pl"
12
+ }
13
+ ],
14
+ "paths": {
15
+ "/players": {
16
+ "get": {
17
+ "tags": ["Players"],
18
+ "operationId": "PlayersController_getPlayers",
19
+ "parameters": [
20
+ {
21
+ "name": "limit",
22
+ "in": "query",
23
+ "schema": {
24
+ "type": "number",
25
+ "default": 10
26
+ },
27
+ "required": false
28
+ },
29
+ {
30
+ "name": "search",
31
+ "in": "query",
32
+ "schema": {
33
+ "anyOf": [
34
+ {
35
+ "type": "string"
36
+ },
37
+ {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ "required": false
46
+ },
47
+ {
48
+ "name": "world",
49
+ "in": "query",
50
+ "schema": {
51
+ "type": "string"
52
+ },
53
+ "required": false
54
+ }
55
+ ],
56
+ "responses": {
57
+ "200": {
58
+ "description": "List of matching players",
59
+ "content": {
60
+ "application/json": {
61
+ "schema": {
62
+ "type": "array",
63
+ "items": {
64
+ "$ref": "#/components/schemas/PlayerHitDto_Output"
65
+ }
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "401": {
71
+ "description": "",
72
+ "content": {
73
+ "application/json": {
74
+ "schema": {
75
+ "type": "object",
76
+ "properties": {
77
+ "message": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "required": ["message"]
82
+ }
83
+ }
84
+ }
85
+ },
86
+ "403": {
87
+ "description": "",
88
+ "content": {
89
+ "application/json": {
90
+ "schema": {
91
+ "type": "object",
92
+ "properties": {
93
+ "message": {
94
+ "type": "string"
95
+ }
96
+ },
97
+ "required": ["message"]
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "429": {
103
+ "description": "",
104
+ "content": {
105
+ "application/json": {
106
+ "schema": {
107
+ "type": "object",
108
+ "properties": {
109
+ "message": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "required": ["message"]
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "503": {
119
+ "description": "",
120
+ "content": {
121
+ "application/json": {
122
+ "schema": {
123
+ "$ref": "#/components/schemas/SearchUnavailableEncoded"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "summary": "Search players by name",
130
+ "security": [
131
+ {
132
+ "apiKey": []
133
+ }
134
+ ],
135
+ "x-lootlog-access": "read",
136
+ "x-lootlog-data": "public"
137
+ }
138
+ },
139
+ "/npcs": {
140
+ "get": {
141
+ "tags": ["NPCs"],
142
+ "operationId": "NpcsController_getNpcs",
143
+ "parameters": [
144
+ {
145
+ "name": "ids",
146
+ "in": "query",
147
+ "schema": {
148
+ "type": "array",
149
+ "items": {
150
+ "type": "integer",
151
+ "minimum": -9007199254740991,
152
+ "maximum": 9007199254740991
153
+ }
154
+ },
155
+ "required": false
156
+ },
157
+ {
158
+ "name": "limit",
159
+ "in": "query",
160
+ "schema": {
161
+ "type": "number",
162
+ "default": 10
163
+ },
164
+ "required": false
165
+ },
166
+ {
167
+ "name": "search",
168
+ "in": "query",
169
+ "schema": {
170
+ "anyOf": [
171
+ {
172
+ "type": "string"
173
+ },
174
+ {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "string"
178
+ }
179
+ }
180
+ ]
181
+ },
182
+ "required": false
183
+ },
184
+ {
185
+ "name": "world",
186
+ "in": "query",
187
+ "schema": {
188
+ "type": "string"
189
+ },
190
+ "required": false
191
+ }
192
+ ],
193
+ "responses": {
194
+ "200": {
195
+ "description": "List of matching NPCs",
196
+ "content": {
197
+ "application/json": {
198
+ "schema": {
199
+ "type": "array",
200
+ "items": {
201
+ "$ref": "#/components/schemas/NpcHitDto_Output"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "401": {
208
+ "description": "",
209
+ "content": {
210
+ "application/json": {
211
+ "schema": {
212
+ "type": "object",
213
+ "properties": {
214
+ "message": {
215
+ "type": "string"
216
+ }
217
+ },
218
+ "required": ["message"]
219
+ }
220
+ }
221
+ }
222
+ },
223
+ "403": {
224
+ "description": "",
225
+ "content": {
226
+ "application/json": {
227
+ "schema": {
228
+ "type": "object",
229
+ "properties": {
230
+ "message": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": ["message"]
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "429": {
240
+ "description": "",
241
+ "content": {
242
+ "application/json": {
243
+ "schema": {
244
+ "type": "object",
245
+ "properties": {
246
+ "message": {
247
+ "type": "string"
248
+ }
249
+ },
250
+ "required": ["message"]
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "503": {
256
+ "description": "",
257
+ "content": {
258
+ "application/json": {
259
+ "schema": {
260
+ "$ref": "#/components/schemas/SearchUnavailableEncoded"
261
+ }
262
+ }
263
+ }
264
+ }
265
+ },
266
+ "summary": "Search NPCs by name",
267
+ "security": [
268
+ {
269
+ "apiKey": []
270
+ }
271
+ ],
272
+ "x-lootlog-access": "read",
273
+ "x-lootlog-data": "public"
274
+ }
275
+ },
276
+ "/items": {
277
+ "get": {
278
+ "tags": ["Items"],
279
+ "operationId": "ItemsController_getItems",
280
+ "parameters": [
281
+ {
282
+ "name": "limit",
283
+ "in": "query",
284
+ "schema": {
285
+ "type": "number",
286
+ "default": 20
287
+ },
288
+ "required": false
289
+ },
290
+ {
291
+ "name": "offset",
292
+ "in": "query",
293
+ "schema": {
294
+ "type": "number",
295
+ "default": 0
296
+ },
297
+ "required": false
298
+ },
299
+ {
300
+ "name": "search",
301
+ "in": "query",
302
+ "schema": {
303
+ "type": "string"
304
+ },
305
+ "required": false
306
+ },
307
+ {
308
+ "name": "world",
309
+ "in": "query",
310
+ "schema": {
311
+ "type": "string"
312
+ },
313
+ "required": false
314
+ },
315
+ {
316
+ "name": "filter",
317
+ "in": "query",
318
+ "schema": {
319
+ "anyOf": [
320
+ {
321
+ "type": "string"
322
+ },
323
+ {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "string"
327
+ }
328
+ }
329
+ ]
330
+ },
331
+ "required": false,
332
+ "style": "form",
333
+ "explode": true
334
+ },
335
+ {
336
+ "name": "facets",
337
+ "in": "query",
338
+ "schema": {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "string"
342
+ }
343
+ },
344
+ "required": false,
345
+ "style": "form",
346
+ "explode": true
347
+ },
348
+ {
349
+ "name": "sort",
350
+ "in": "query",
351
+ "schema": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "string"
355
+ }
356
+ },
357
+ "required": false,
358
+ "style": "form",
359
+ "explode": true
360
+ }
361
+ ],
362
+ "responses": {
363
+ "200": {
364
+ "description": "Item search results",
365
+ "content": {
366
+ "application/json": {
367
+ "schema": {
368
+ "$ref": "#/components/schemas/SearchItemsResponseDto_Output"
369
+ }
370
+ }
371
+ }
372
+ },
373
+ "401": {
374
+ "description": "",
375
+ "content": {
376
+ "application/json": {
377
+ "schema": {
378
+ "type": "object",
379
+ "properties": {
380
+ "message": {
381
+ "type": "string"
382
+ }
383
+ },
384
+ "required": ["message"]
385
+ }
386
+ }
387
+ }
388
+ },
389
+ "403": {
390
+ "description": "",
391
+ "content": {
392
+ "application/json": {
393
+ "schema": {
394
+ "type": "object",
395
+ "properties": {
396
+ "message": {
397
+ "type": "string"
398
+ }
399
+ },
400
+ "required": ["message"]
401
+ }
402
+ }
403
+ }
404
+ },
405
+ "429": {
406
+ "description": "",
407
+ "content": {
408
+ "application/json": {
409
+ "schema": {
410
+ "type": "object",
411
+ "properties": {
412
+ "message": {
413
+ "type": "string"
414
+ }
415
+ },
416
+ "required": ["message"]
417
+ }
418
+ }
419
+ }
420
+ },
421
+ "503": {
422
+ "description": "",
423
+ "content": {
424
+ "application/json": {
425
+ "schema": {
426
+ "$ref": "#/components/schemas/SearchUnavailableEncoded"
427
+ }
428
+ }
429
+ }
430
+ }
431
+ },
432
+ "summary": "Search items with filters, sorting, and facets",
433
+ "security": [
434
+ {
435
+ "apiKey": []
436
+ }
437
+ ],
438
+ "x-lootlog-access": "read",
439
+ "x-lootlog-data": "public"
440
+ }
441
+ },
442
+ "/all": {
443
+ "get": {
444
+ "tags": ["All"],
445
+ "operationId": "AllController_searchAll",
446
+ "parameters": [
447
+ {
448
+ "name": "limit",
449
+ "in": "query",
450
+ "schema": {
451
+ "type": "number",
452
+ "default": 10
453
+ },
454
+ "required": false
455
+ },
456
+ {
457
+ "name": "search",
458
+ "in": "query",
459
+ "schema": {
460
+ "type": "string"
461
+ },
462
+ "required": false
463
+ },
464
+ {
465
+ "name": "world",
466
+ "in": "query",
467
+ "schema": {
468
+ "type": "string"
469
+ },
470
+ "required": false
471
+ }
472
+ ],
473
+ "responses": {
474
+ "200": {
475
+ "description": "Aggregated search results across items, players, and NPCs",
476
+ "content": {
477
+ "application/json": {
478
+ "schema": {
479
+ "$ref": "#/components/schemas/SearchAllResponseDto_Output"
480
+ }
481
+ }
482
+ }
483
+ },
484
+ "401": {
485
+ "description": "",
486
+ "content": {
487
+ "application/json": {
488
+ "schema": {
489
+ "type": "object",
490
+ "properties": {
491
+ "message": {
492
+ "type": "string"
493
+ }
494
+ },
495
+ "required": ["message"]
496
+ }
497
+ }
498
+ }
499
+ },
500
+ "403": {
501
+ "description": "",
502
+ "content": {
503
+ "application/json": {
504
+ "schema": {
505
+ "type": "object",
506
+ "properties": {
507
+ "message": {
508
+ "type": "string"
509
+ }
510
+ },
511
+ "required": ["message"]
512
+ }
513
+ }
514
+ }
515
+ },
516
+ "429": {
517
+ "description": "",
518
+ "content": {
519
+ "application/json": {
520
+ "schema": {
521
+ "type": "object",
522
+ "properties": {
523
+ "message": {
524
+ "type": "string"
525
+ }
526
+ },
527
+ "required": ["message"]
528
+ }
529
+ }
530
+ }
531
+ },
532
+ "503": {
533
+ "description": "",
534
+ "content": {
535
+ "application/json": {
536
+ "schema": {
537
+ "$ref": "#/components/schemas/SearchUnavailableEncoded"
538
+ }
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "summary": "Search across all categories",
544
+ "security": [
545
+ {
546
+ "apiKey": []
547
+ }
548
+ ],
549
+ "x-lootlog-access": "read",
550
+ "x-lootlog-data": "public"
551
+ }
552
+ }
553
+ },
554
+ "components": {
555
+ "securitySchemes": {
556
+ "apiKey": {
557
+ "type": "apiKey",
558
+ "in": "header",
559
+ "name": "X-Api-Key"
560
+ }
561
+ },
562
+ "schemas": {
563
+ "PlayerHitDto_Output": {
564
+ "type": "object",
565
+ "properties": {
566
+ "id": {
567
+ "type": "string"
568
+ },
569
+ "name": {
570
+ "type": "string"
571
+ },
572
+ "lvl": {
573
+ "type": "number"
574
+ },
575
+ "prof": {
576
+ "type": "string"
577
+ },
578
+ "icon": {
579
+ "type": "string"
580
+ },
581
+ "characterId": {
582
+ "type": "number"
583
+ },
584
+ "accountId": {
585
+ "type": "number"
586
+ },
587
+ "world": {
588
+ "type": "string"
589
+ }
590
+ },
591
+ "required": [
592
+ "id",
593
+ "name",
594
+ "lvl",
595
+ "prof",
596
+ "icon",
597
+ "characterId",
598
+ "accountId",
599
+ "world"
600
+ ],
601
+ "description": "Player search hit"
602
+ },
603
+ "SearchUnavailableEncoded": {
604
+ "type": "object",
605
+ "properties": {
606
+ "_tag": {
607
+ "type": "string",
608
+ "enum": ["SearchUnavailable"]
609
+ },
610
+ "message": {
611
+ "type": "string"
612
+ }
613
+ },
614
+ "required": ["_tag", "message"]
615
+ },
616
+ "NpcHitDto_Output": {
617
+ "type": "object",
618
+ "properties": {
619
+ "id": {
620
+ "type": "number"
621
+ },
622
+ "prof": {
623
+ "type": "string"
624
+ },
625
+ "icon": {
626
+ "type": "string"
627
+ },
628
+ "name": {
629
+ "type": "string"
630
+ },
631
+ "lvl": {
632
+ "type": "number"
633
+ },
634
+ "wt": {
635
+ "type": "number"
636
+ },
637
+ "type": {
638
+ "type": "string",
639
+ "enum": [
640
+ "COMMON",
641
+ "ELITE",
642
+ "ELITE2",
643
+ "ELITE3",
644
+ "HERO",
645
+ "EVENT_HERO",
646
+ "COLOSSUS",
647
+ "TITAN",
648
+ "NPC"
649
+ ]
650
+ },
651
+ "margonemType": {
652
+ "type": "number"
653
+ },
654
+ "world": {
655
+ "type": "string"
656
+ }
657
+ },
658
+ "required": [
659
+ "id",
660
+ "prof",
661
+ "icon",
662
+ "name",
663
+ "lvl",
664
+ "wt",
665
+ "type",
666
+ "margonemType",
667
+ "world"
668
+ ],
669
+ "description": "NPC search hit"
670
+ },
671
+ "SearchItemsResponseDto_Output": {
672
+ "type": "object",
673
+ "properties": {
674
+ "hits": {
675
+ "type": "array",
676
+ "items": {
677
+ "type": "object",
678
+ "properties": {
679
+ "id": {
680
+ "type": "number"
681
+ },
682
+ "name": {
683
+ "type": "string"
684
+ },
685
+ "icon": {
686
+ "type": "string"
687
+ },
688
+ "stat": {
689
+ "type": "string",
690
+ "default": ""
691
+ },
692
+ "lvl": {
693
+ "type": "number"
694
+ },
695
+ "rarity": {
696
+ "nullable": true,
697
+ "type": "string"
698
+ },
699
+ "type": {
700
+ "nullable": true,
701
+ "type": "string"
702
+ },
703
+ "worlds": {
704
+ "type": "array",
705
+ "items": {
706
+ "type": "string"
707
+ },
708
+ "default": []
709
+ }
710
+ },
711
+ "required": [
712
+ "id",
713
+ "name",
714
+ "icon",
715
+ "stat",
716
+ "lvl",
717
+ "rarity",
718
+ "type",
719
+ "worlds"
720
+ ],
721
+ "description": "Item search hit"
722
+ }
723
+ },
724
+ "estimatedTotalHits": {
725
+ "type": "number"
726
+ },
727
+ "facetDistribution": {
728
+ "type": "object",
729
+ "additionalProperties": {
730
+ "type": "object",
731
+ "additionalProperties": {
732
+ "type": "number"
733
+ }
734
+ },
735
+ "default": {}
736
+ },
737
+ "facetStats": {
738
+ "type": "object",
739
+ "additionalProperties": {
740
+ "type": "object",
741
+ "properties": {
742
+ "min": {
743
+ "type": "number"
744
+ },
745
+ "max": {
746
+ "type": "number"
747
+ }
748
+ },
749
+ "required": ["min", "max"]
750
+ },
751
+ "default": {}
752
+ }
753
+ },
754
+ "required": [
755
+ "hits",
756
+ "estimatedTotalHits",
757
+ "facetDistribution",
758
+ "facetStats"
759
+ ],
760
+ "description": "Item search results"
761
+ },
762
+ "SearchAllResponseDto_Output": {
763
+ "type": "object",
764
+ "properties": {
765
+ "items": {
766
+ "type": "array",
767
+ "items": {
768
+ "type": "object",
769
+ "properties": {
770
+ "id": {
771
+ "type": "number"
772
+ },
773
+ "name": {
774
+ "type": "string"
775
+ },
776
+ "icon": {
777
+ "type": "string"
778
+ },
779
+ "stat": {
780
+ "type": "string",
781
+ "default": ""
782
+ },
783
+ "lvl": {
784
+ "type": "number"
785
+ },
786
+ "rarity": {
787
+ "nullable": true,
788
+ "type": "string"
789
+ },
790
+ "type": {
791
+ "nullable": true,
792
+ "type": "string"
793
+ },
794
+ "worlds": {
795
+ "type": "array",
796
+ "items": {
797
+ "type": "string"
798
+ },
799
+ "default": []
800
+ }
801
+ },
802
+ "required": [
803
+ "id",
804
+ "name",
805
+ "icon",
806
+ "stat",
807
+ "lvl",
808
+ "rarity",
809
+ "type",
810
+ "worlds"
811
+ ],
812
+ "description": "Item search hit"
813
+ }
814
+ },
815
+ "players": {
816
+ "type": "array",
817
+ "items": {
818
+ "type": "object",
819
+ "properties": {
820
+ "id": {
821
+ "type": "string"
822
+ },
823
+ "name": {
824
+ "type": "string"
825
+ },
826
+ "lvl": {
827
+ "type": "number"
828
+ },
829
+ "prof": {
830
+ "type": "string"
831
+ },
832
+ "icon": {
833
+ "type": "string"
834
+ },
835
+ "characterId": {
836
+ "type": "number"
837
+ },
838
+ "accountId": {
839
+ "type": "number"
840
+ },
841
+ "world": {
842
+ "type": "string"
843
+ }
844
+ },
845
+ "required": [
846
+ "id",
847
+ "name",
848
+ "lvl",
849
+ "prof",
850
+ "icon",
851
+ "characterId",
852
+ "accountId",
853
+ "world"
854
+ ],
855
+ "description": "Player search hit"
856
+ }
857
+ },
858
+ "npcs": {
859
+ "type": "array",
860
+ "items": {
861
+ "type": "object",
862
+ "properties": {
863
+ "id": {
864
+ "type": "number"
865
+ },
866
+ "prof": {
867
+ "type": "string"
868
+ },
869
+ "icon": {
870
+ "type": "string"
871
+ },
872
+ "name": {
873
+ "type": "string"
874
+ },
875
+ "lvl": {
876
+ "type": "number"
877
+ },
878
+ "wt": {
879
+ "type": "number"
880
+ },
881
+ "type": {
882
+ "type": "string",
883
+ "enum": [
884
+ "COMMON",
885
+ "ELITE",
886
+ "ELITE2",
887
+ "ELITE3",
888
+ "HERO",
889
+ "EVENT_HERO",
890
+ "COLOSSUS",
891
+ "TITAN",
892
+ "NPC"
893
+ ]
894
+ },
895
+ "margonemType": {
896
+ "type": "number"
897
+ },
898
+ "world": {
899
+ "type": "string"
900
+ }
901
+ },
902
+ "required": [
903
+ "id",
904
+ "prof",
905
+ "icon",
906
+ "name",
907
+ "lvl",
908
+ "wt",
909
+ "type",
910
+ "margonemType",
911
+ "world"
912
+ ],
913
+ "description": "NPC search hit"
914
+ }
915
+ }
916
+ },
917
+ "required": ["items", "players", "npcs"],
918
+ "description": "Aggregated search results"
919
+ }
920
+ }
921
+ }
922
+ }