crowdsec-tracker-api 1.92.0__py3-none-any.whl

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,945 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: <stdin>
3
+ # timestamp: 2025-12-17T10:47:38+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from datetime import datetime
8
+ from enum import StrEnum
9
+ from typing import Annotated, Dict, List, Optional, Union
10
+
11
+ from pydantic import AnyUrl, ConfigDict, Field, RootModel
12
+
13
+ from .base_model import BaseModelSdk, RootModelSdk
14
+
15
+
16
+ class ApiKeyCredentials(BaseModelSdk):
17
+ api_key: Annotated[
18
+ str, Field(description='API key for the integration', title='Api Key')
19
+ ]
20
+
21
+
22
+ class BasicAuthCredentials(BaseModelSdk):
23
+ username: Annotated[
24
+ str,
25
+ Field(description='Basic auth username for the integration', title='Username'),
26
+ ]
27
+ password: Annotated[
28
+ str,
29
+ Field(description='Basic auth password for the integration', title='Password'),
30
+ ]
31
+
32
+
33
+ class BlocklistSubscription(BaseModelSdk):
34
+ id: Annotated[str, Field(title='Id')]
35
+ remediation: Annotated[Optional[str], Field(title='Remediation')] = None
36
+
37
+
38
+ class CVESubscription(BaseModelSdk):
39
+ id: Annotated[str, Field(description='CVE ID', title='Id')]
40
+
41
+
42
+ class IntegrationType(StrEnum):
43
+ FIREWALL_INTEGRATION = 'firewall_integration'
44
+ REMEDIATION_COMPONENT_INTEGRATION = 'remediation_component_integration'
45
+
46
+
47
+ class Links(BaseModelSdk):
48
+ first: Annotated[
49
+ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='First')
50
+ ] = None
51
+ last: Annotated[
52
+ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Last')
53
+ ] = None
54
+ self: Annotated[
55
+ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Self')
56
+ ] = None
57
+ next: Annotated[
58
+ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Next')
59
+ ] = None
60
+ prev: Annotated[
61
+ Optional[str], Field(examples=['/api/v1/users?limit=1&offset1'], title='Prev')
62
+ ] = None
63
+
64
+
65
+ class OutputFormat(StrEnum):
66
+ PLAIN_TEXT = 'plain_text'
67
+ F5 = 'f5'
68
+ REMEDIATION_COMPONENT = 'remediation_component'
69
+ FORTIGATE = 'fortigate'
70
+ PALOALTO = 'paloalto'
71
+ CHECKPOINT = 'checkpoint'
72
+ CISCO = 'cisco'
73
+ JUNIPER = 'juniper'
74
+ MIKROTIK = 'mikrotik'
75
+ PFSENSE = 'pfsense'
76
+ OPNSENSE = 'opnsense'
77
+ SOPHOS = 'sophos'
78
+
79
+
80
+ class Stats(BaseModelSdk):
81
+ count: Annotated[
82
+ int,
83
+ Field(
84
+ description='Number of total blocklists items the integration will pull',
85
+ title='Count',
86
+ ),
87
+ ]
88
+
89
+
90
+ class ValidationError(BaseModelSdk):
91
+ loc: Annotated[List[Union[str, int]], Field(title='Location')]
92
+ msg: Annotated[str, Field(title='Message')]
93
+ type: Annotated[str, Field(title='Error Type')]
94
+
95
+
96
+ class AffectedComponent(BaseModelSdk):
97
+ vendor: Annotated[
98
+ Optional[str],
99
+ Field(description='Vendor of the affected component', title='Vendor'),
100
+ ] = None
101
+ product: Annotated[
102
+ Optional[str],
103
+ Field(description='Product name of the affected component', title='Product'),
104
+ ] = None
105
+
106
+
107
+ class AllowlistSubscription(BaseModelSdk):
108
+ id: Annotated[str, Field(title='Id')]
109
+
110
+
111
+ class AttackDetail(BaseModelSdk):
112
+ name: Annotated[str, Field(description='Attack detail name', title='Name')]
113
+ label: Annotated[str, Field(description='Attack detail label', title='Label')]
114
+ description: Annotated[
115
+ str, Field(description='Attack detail description', title='Description')
116
+ ]
117
+ references: Annotated[
118
+ Optional[List[str]],
119
+ Field(description='Attack detail references', title='References'),
120
+ ] = None
121
+
122
+
123
+ class Behavior(BaseModelSdk):
124
+ name: Annotated[str, Field(description='Behavior name', title='Name')]
125
+ label: Annotated[str, Field(description='Behavior label', title='Label')]
126
+ description: Annotated[
127
+ str, Field(description='Behavior description', title='Description')
128
+ ]
129
+
130
+
131
+ class CVEEvent(BaseModelSdk):
132
+ date: Annotated[datetime, Field(description='Date of the event', title='Date')]
133
+ description: Annotated[
134
+ str, Field(description='Description of the event', title='Description')
135
+ ]
136
+ label: Annotated[str, Field(description='Label of the event', title='Label')]
137
+ name: Annotated[str, Field(description='Name of the event', title='Name')]
138
+
139
+
140
+ class CvssScore(RootModelSdk[float]):
141
+ root: Annotated[
142
+ float,
143
+ Field(description='CVSS score of the CVE', ge=0.0, le=10.0, title='Cvss Score'),
144
+ ]
145
+
146
+
147
+ class CVEResponseBase(BaseModelSdk):
148
+ id: Annotated[str, Field(description='ID of the CVE', title='Id')]
149
+ name: Annotated[str, Field(description='Name of the CVE', title='Name')]
150
+ title: Annotated[str, Field(description='Title of the CVE', title='Title')]
151
+ affected_components: Annotated[
152
+ List[AffectedComponent],
153
+ Field(description='List of affected components', title='Affected Components'),
154
+ ]
155
+ crowdsec_score: Annotated[
156
+ int,
157
+ Field(
158
+ description='Live Exploit Tracker score of the CVE',
159
+ ge=0,
160
+ le=10,
161
+ title='Crowdsec Score',
162
+ ),
163
+ ]
164
+ first_seen: Annotated[
165
+ Optional[datetime], Field(description='First seen date', title='First Seen')
166
+ ] = None
167
+ last_seen: Annotated[
168
+ Optional[datetime], Field(description='Last seen date', title='Last Seen')
169
+ ] = None
170
+ nb_ips: Annotated[
171
+ int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips')
172
+ ]
173
+ published_date: Annotated[
174
+ datetime, Field(description='Published date of the CVE', title='Published Date')
175
+ ]
176
+ cvss_score: Annotated[
177
+ Optional[CvssScore],
178
+ Field(description='CVSS score of the CVE', title='Cvss Score'),
179
+ ] = None
180
+ has_public_exploit: Annotated[
181
+ bool,
182
+ Field(
183
+ description='Indicates if there is a public exploit for the CVE',
184
+ title='Has Public Exploit',
185
+ ),
186
+ ]
187
+ rule_release_date: Annotated[
188
+ Optional[datetime],
189
+ Field(
190
+ description='Release date of the associated detection rule',
191
+ title='Rule Release Date',
192
+ ),
193
+ ] = None
194
+
195
+
196
+ class CVEsubscription(BaseModelSdk):
197
+ id: Annotated[str, Field(title='Id')]
198
+
199
+
200
+ class CWE(BaseModelSdk):
201
+ name: Annotated[str, Field(description='Name of the CWE', title='Name')]
202
+ label: Annotated[str, Field(description='Label of the CWE', title='Label')]
203
+ description: Annotated[
204
+ str, Field(description='Description of the CWE', title='Description')
205
+ ]
206
+
207
+
208
+ class Classification(BaseModelSdk):
209
+ name: Annotated[str, Field(description='Classification name', title='Name')]
210
+ label: Annotated[str, Field(description='Classification label', title='Label')]
211
+ description: Annotated[
212
+ str, Field(description='Classification description', title='Description')
213
+ ]
214
+
215
+
216
+ class Classifications(BaseModelSdk):
217
+ false_positives: Annotated[
218
+ Optional[List[Classification]],
219
+ Field(description='False positive classifications', title='False Positives'),
220
+ ] = None
221
+ classifications: Annotated[
222
+ Optional[List[Classification]],
223
+ Field(description='Main classifications', title='Classifications'),
224
+ ] = None
225
+
226
+
227
+ class EntityType(StrEnum):
228
+ ORG = 'org'
229
+ TAG = 'tag'
230
+ ENGINE = 'engine'
231
+ FIREWALL_INTEGRATION = 'firewall_integration'
232
+ REMEDIATION_COMPONENT_INTEGRATION = 'remediation_component_integration'
233
+ REMEDIATION_COMPONENT = 'remediation_component'
234
+ LOG_PROCESSOR = 'log_processor'
235
+
236
+
237
+ class GetCVEResponse(BaseModelSdk):
238
+ id: Annotated[str, Field(description='ID of the CVE', title='Id')]
239
+ name: Annotated[str, Field(description='Name of the CVE', title='Name')]
240
+ title: Annotated[str, Field(description='Title of the CVE', title='Title')]
241
+ affected_components: Annotated[
242
+ List[AffectedComponent],
243
+ Field(description='List of affected components', title='Affected Components'),
244
+ ]
245
+ crowdsec_score: Annotated[
246
+ int,
247
+ Field(
248
+ description='Live Exploit Tracker score of the CVE',
249
+ ge=0,
250
+ le=10,
251
+ title='Crowdsec Score',
252
+ ),
253
+ ]
254
+ first_seen: Annotated[
255
+ Optional[datetime], Field(description='First seen date', title='First Seen')
256
+ ] = None
257
+ last_seen: Annotated[
258
+ Optional[datetime], Field(description='Last seen date', title='Last Seen')
259
+ ] = None
260
+ nb_ips: Annotated[
261
+ int, Field(description='Number of unique IPs affected', ge=0, title='Nb Ips')
262
+ ]
263
+ published_date: Annotated[
264
+ datetime, Field(description='Published date of the CVE', title='Published Date')
265
+ ]
266
+ cvss_score: Annotated[
267
+ Optional[CvssScore],
268
+ Field(description='CVSS score of the CVE', title='Cvss Score'),
269
+ ] = None
270
+ has_public_exploit: Annotated[
271
+ bool,
272
+ Field(
273
+ description='Indicates if there is a public exploit for the CVE',
274
+ title='Has Public Exploit',
275
+ ),
276
+ ]
277
+ rule_release_date: Annotated[
278
+ Optional[datetime],
279
+ Field(
280
+ description='Release date of the associated detection rule',
281
+ title='Rule Release Date',
282
+ ),
283
+ ] = None
284
+ references: Annotated[
285
+ List[str],
286
+ Field(description='List of references for the CVE', title='References'),
287
+ ]
288
+ description: Annotated[
289
+ str, Field(description='Description of the CVE', title='Description')
290
+ ]
291
+ crowdsec_analysis: Annotated[
292
+ Optional[str],
293
+ Field(description='CrowdSec analysis of the CVE', title='Crowdsec Analysis'),
294
+ ] = None
295
+ cwes: Annotated[
296
+ List[CWE],
297
+ Field(description='List of CWEs associated with the CVE', title='Cwes'),
298
+ ]
299
+ events: Annotated[
300
+ Optional[List[CVEEvent]],
301
+ Field(description='List of events related to the CVE', title='Events'),
302
+ ] = None
303
+
304
+
305
+ class GetCVEsResponsePage(BaseModelSdk):
306
+ items: Annotated[List[CVEResponseBase], Field(title='Items')]
307
+ total: Annotated[int, Field(ge=0, title='Total')]
308
+ page: Annotated[int, Field(ge=1, title='Page')]
309
+ size: Annotated[int, Field(ge=1, title='Size')]
310
+ pages: Annotated[int, Field(ge=0, title='Pages')]
311
+ links: Links
312
+
313
+
314
+ class GetCVEsSortBy(StrEnum):
315
+ RULE_RELEASE_DATE = 'rule_release_date'
316
+ TRENDING = 'trending'
317
+ NB_IPS = 'nb_ips'
318
+ NAME = 'name'
319
+
320
+
321
+ class GetCVEsSortOrder(StrEnum):
322
+ ASC = 'asc'
323
+ DESC = 'desc'
324
+
325
+
326
+ class History(BaseModelSdk):
327
+ first_seen: Annotated[
328
+ datetime, Field(description='First seen timestamp', title='First Seen')
329
+ ]
330
+ last_seen: Annotated[
331
+ datetime, Field(description='Last seen timestamp', title='Last Seen')
332
+ ]
333
+ full_age: Annotated[int, Field(description='Full age in days', title='Full Age')]
334
+ days_age: Annotated[int, Field(description='Days age', title='Days Age')]
335
+
336
+
337
+ class IntegrationResponse(BaseModelSdk):
338
+ tags: Annotated[Optional[List[str]], Field(title='Tags')] = []
339
+ organization_id: Annotated[str, Field(title='Organization Id')]
340
+ created_at: Annotated[
341
+ Optional[datetime],
342
+ Field(description='Time the integration was created', title='Created At'),
343
+ ] = None
344
+ entity_type: Annotated[EntityType, Field(description='Type of the integration')]
345
+ id: Annotated[
346
+ Optional[str], Field(description='ID of the integration', title='Id')
347
+ ] = None
348
+ blocklists: Annotated[
349
+ Optional[List[BlocklistSubscription]], Field(title='Blocklists')
350
+ ] = []
351
+ allowlists: Annotated[
352
+ Optional[List[AllowlistSubscription]], Field(title='Allowlists')
353
+ ] = []
354
+ cves: Annotated[Optional[List[CVEsubscription]], Field(title='Cves')] = []
355
+ name: Annotated[str, Field(description='Name of the integration', title='Name')]
356
+ updated_at: Annotated[
357
+ Optional[datetime],
358
+ Field(description='Last time the integration was updated', title='Updated At'),
359
+ ] = None
360
+ description: Annotated[
361
+ Optional[str],
362
+ Field(description='Description of the integration', title='Description'),
363
+ ] = None
364
+ output_format: Annotated[
365
+ OutputFormat, Field(description='Output format of the integration')
366
+ ]
367
+ last_pull: Annotated[
368
+ Optional[datetime],
369
+ Field(
370
+ description='Last time the integration pulled blocklists', title='Last Pull'
371
+ ),
372
+ ] = None
373
+
374
+
375
+ class Location(BaseModelSdk):
376
+ country: Annotated[
377
+ Optional[str], Field(description='Country code', title='Country')
378
+ ] = None
379
+ city: Annotated[Optional[str], Field(description='City name', title='City')] = None
380
+ latitude: Annotated[
381
+ Optional[float], Field(description='Latitude coordinate', title='Latitude')
382
+ ] = None
383
+ longitude: Annotated[
384
+ Optional[float], Field(description='Longitude coordinate', title='Longitude')
385
+ ] = None
386
+
387
+
388
+ class MitreTechnique(BaseModelSdk):
389
+ name: Annotated[str, Field(description='MITRE technique ID', title='Name')]
390
+ label: Annotated[str, Field(description='MITRE technique label', title='Label')]
391
+ description: Annotated[
392
+ str, Field(description='MITRE technique description', title='Description')
393
+ ]
394
+
395
+
396
+ class Reference(BaseModelSdk):
397
+ name: Annotated[str, Field(description='Reference name', title='Name')]
398
+ label: Annotated[str, Field(description='Reference label', title='Label')]
399
+ description: Annotated[
400
+ str, Field(description='Reference description', title='Description')
401
+ ]
402
+
403
+
404
+ class ScoreBreakdown(BaseModelSdk):
405
+ aggressiveness: Annotated[
406
+ int, Field(description='Aggressiveness score', title='Aggressiveness')
407
+ ]
408
+ threat: Annotated[int, Field(description='Threat score', title='Threat')]
409
+ trust: Annotated[int, Field(description='Trust score', title='Trust')]
410
+ anomaly: Annotated[int, Field(description='Anomaly score', title='Anomaly')]
411
+ total: Annotated[int, Field(description='Total score', title='Total')]
412
+
413
+
414
+ class Scores(BaseModelSdk):
415
+ overall: Annotated[ScoreBreakdown, Field(description='Overall scores')]
416
+ last_day: Annotated[ScoreBreakdown, Field(description='Last day scores')]
417
+ last_week: Annotated[ScoreBreakdown, Field(description='Last week scores')]
418
+ last_month: Annotated[ScoreBreakdown, Field(description='Last month scores')]
419
+
420
+
421
+ class SubscribeCVEIntegrationRequest(BaseModelSdk):
422
+ model_config = ConfigDict(
423
+ extra='forbid',
424
+ )
425
+ name: Annotated[
426
+ str, Field(description='Name of the integration to subscribe', title='Name')
427
+ ]
428
+
429
+
430
+ class IntegrationsGetIntegrationsQueryParameters(BaseModelSdk):
431
+ tag: Annotated[
432
+ Optional[List[str]],
433
+ Field(
434
+ description='List of tags associated with the integrations (any of)',
435
+ title='Tag',
436
+ ),
437
+ ] = None
438
+
439
+
440
+ class IntegrationsGetIntegrationPathParameters(BaseModelSdk):
441
+ integration_id: Annotated[str, Field(title='Integration Id')]
442
+
443
+
444
+ class IntegrationsUpdateIntegrationPathParameters(BaseModelSdk):
445
+ integration_id: Annotated[str, Field(title='Integration Id')]
446
+
447
+
448
+ class IntegrationsDeleteIntegrationPathParameters(BaseModelSdk):
449
+ integration_id: Annotated[str, Field(title='Integration Id')]
450
+
451
+
452
+ class IntegrationsHeadIntegrationContentPathParameters(BaseModelSdk):
453
+ integration_id: Annotated[
454
+ str, Field(examples=['5f9d88b9e5c4f5b9a3d3e8b1'], title='Integration Id')
455
+ ]
456
+
457
+
458
+ class PageSize(RootModelSdk[int]):
459
+ root: Annotated[
460
+ int,
461
+ Field(
462
+ description='Maximum number of items to return, 0 means no limit (default), should be greater than 10000',
463
+ ge=10000,
464
+ title='Page Size',
465
+ ),
466
+ ]
467
+
468
+
469
+ class IntegrationsGetIntegrationContentQueryParameters(BaseModelSdk):
470
+ page: Annotated[
471
+ Optional[int], Field(description='Page number to return', ge=1, title='Page')
472
+ ] = 1
473
+ page_size: Annotated[
474
+ Optional[PageSize],
475
+ Field(
476
+ description='Maximum number of items to return, 0 means no limit (default), should be greater than 10000',
477
+ title='Page Size',
478
+ ),
479
+ ] = None
480
+
481
+
482
+ class IntegrationsGetIntegrationContentPathParameters(BaseModelSdk):
483
+ integration_id: Annotated[
484
+ str, Field(examples=['5f9d88b9e5c4f5b9a3d3e8b1'], title='Integration Id')
485
+ ]
486
+
487
+
488
+ class IntegrationsGetIntegrationContentStreamQueryParameters(BaseModelSdk):
489
+ startup: Annotated[
490
+ Optional[bool],
491
+ Field(
492
+ description="Set to true if it's the first run to fetch all the content, otherwise only changes since the last pull.",
493
+ title='Startup',
494
+ ),
495
+ ] = False
496
+
497
+
498
+ class IntegrationsGetIntegrationContentStreamPathParameters(BaseModelSdk):
499
+ integration_id: Annotated[
500
+ str, Field(examples=['5f9d88b9e5c4f5b9a3d3e8b1'], title='Integration Id')
501
+ ]
502
+
503
+
504
+ class CvesGetCvesQueryParameters(BaseModelSdk):
505
+ query: Annotated[
506
+ Optional[str], Field(description='Search query for CVEs', title='Query')
507
+ ] = None
508
+ sort_by: Annotated[
509
+ Optional[GetCVEsSortBy], Field(description='Field to sort by', title='Sort By')
510
+ ] = 'rule_release_date'
511
+ sort_order: Annotated[
512
+ Optional[GetCVEsSortOrder],
513
+ Field(description='Sort order: ascending or descending', title='Sort Order'),
514
+ ] = 'desc'
515
+ page: Annotated[
516
+ Optional[int], Field(description='Page number', ge=1, title='Page')
517
+ ] = 1
518
+ size: Annotated[
519
+ Optional[int], Field(description='Page size', ge=1, le=100, title='Size')
520
+ ] = 50
521
+
522
+
523
+ class CvesGetCvePathParameters(BaseModelSdk):
524
+ cve_id: Annotated[str, Field(title='Cve Id')]
525
+
526
+
527
+ class CvesDownloadCveIpsPathParameters(BaseModelSdk):
528
+ cve_id: Annotated[str, Field(title='Cve Id')]
529
+
530
+
531
+ class Since(RootModelSdk[str]):
532
+ root: Annotated[
533
+ str,
534
+ Field(
535
+ description='Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d',
536
+ pattern='^\\d+[hd]$',
537
+ title='Since',
538
+ ),
539
+ ]
540
+
541
+
542
+ class CvesGetCveIpsDetailsQueryParameters(BaseModelSdk):
543
+ since: Annotated[
544
+ Optional[Since],
545
+ Field(
546
+ description='Filter IPs seen since this date, format duration (e.g., 7d, 24h), default to 14d',
547
+ title='Since',
548
+ ),
549
+ ] = Since('14d')
550
+ page: Annotated[
551
+ Optional[int], Field(description='Page number', ge=1, title='Page')
552
+ ] = 1
553
+ size: Annotated[
554
+ Optional[int], Field(description='Page size', ge=1, le=100, title='Size')
555
+ ] = 50
556
+
557
+
558
+ class CvesGetCveIpsDetailsPathParameters(BaseModelSdk):
559
+ cve_id: Annotated[str, Field(title='Cve Id')]
560
+
561
+
562
+ class CvesSubscribeIntegrationToCvePathParameters(BaseModelSdk):
563
+ cve_id: Annotated[str, Field(title='Cve Id')]
564
+
565
+
566
+ class CvesGetCveSubscribedIntegrationsQueryParameters(BaseModelSdk):
567
+ page: Annotated[
568
+ Optional[int], Field(description='Page number', ge=1, title='Page')
569
+ ] = 1
570
+ size: Annotated[
571
+ Optional[int], Field(description='Page size', ge=1, le=100, title='Size')
572
+ ] = 50
573
+
574
+
575
+ class CvesGetCveSubscribedIntegrationsPathParameters(BaseModelSdk):
576
+ cve_id: Annotated[str, Field(title='Cve Id')]
577
+
578
+
579
+ class CvesUnsubscribeIntegrationFromCvePathParameters(BaseModelSdk):
580
+ cve_id: Annotated[str, Field(title='Cve Id')]
581
+ integration_name: Annotated[str, Field(title='Integration Name')]
582
+
583
+
584
+ class HTTPValidationError(BaseModelSdk):
585
+ detail: Annotated[Optional[List[ValidationError]], Field(title='Detail')] = None
586
+
587
+
588
+ class IntegrationCreateRequest(BaseModelSdk):
589
+ model_config = ConfigDict(
590
+ extra='forbid',
591
+ )
592
+ name: Annotated[
593
+ str, Field(description='Name of the integration', min_length=1, title='Name')
594
+ ]
595
+ description: Annotated[
596
+ Optional[str],
597
+ Field(
598
+ description='Description of the integration',
599
+ min_length=1,
600
+ title='Description',
601
+ ),
602
+ ] = None
603
+ entity_type: Annotated[
604
+ IntegrationType, Field(description='Type of the integration')
605
+ ]
606
+ output_format: Annotated[
607
+ OutputFormat, Field(description='Output format of the integration')
608
+ ]
609
+
610
+
611
+ class IntegrationCreateResponse(BaseModelSdk):
612
+ id: Annotated[str, Field(description='ID of the integration', title='Id')]
613
+ name: Annotated[
614
+ str,
615
+ Field(
616
+ description='Name of the integration. Should be unique within the organization',
617
+ title='Name',
618
+ ),
619
+ ]
620
+ organization_id: Annotated[
621
+ str, Field(description='ID of the owner organization', title='Organization Id')
622
+ ]
623
+ description: Annotated[
624
+ Optional[str],
625
+ Field(description='Description of the integration', title='Description'),
626
+ ] = None
627
+ created_at: Annotated[
628
+ datetime,
629
+ Field(description='Time the integration was created', title='Created At'),
630
+ ]
631
+ updated_at: Annotated[
632
+ datetime,
633
+ Field(description='Last time the integration was updated', title='Updated At'),
634
+ ]
635
+ entity_type: Annotated[
636
+ IntegrationType, Field(description='Type of the integration')
637
+ ]
638
+ output_format: Annotated[
639
+ OutputFormat, Field(description='Output format of the integration')
640
+ ]
641
+ last_pull: Annotated[
642
+ Optional[datetime],
643
+ Field(
644
+ description='Last time the integration pulled blocklists', title='Last Pull'
645
+ ),
646
+ ] = None
647
+ blocklists: Annotated[
648
+ List[BlocklistSubscription],
649
+ Field(
650
+ description='Blocklists that are subscribed by the integration',
651
+ title='Blocklists',
652
+ ),
653
+ ]
654
+ cves: Annotated[
655
+ List[CVESubscription],
656
+ Field(description='CVEs that are subscribed by the integration', title='Cves'),
657
+ ]
658
+ endpoint: Annotated[
659
+ AnyUrl,
660
+ Field(
661
+ description="Url that should be used by the firewall or the remediation component to fetch the integration's content",
662
+ title='Endpoint',
663
+ ),
664
+ ]
665
+ stats: Annotated[
666
+ Optional[Stats],
667
+ Field(
668
+ default_factory=lambda: Stats.model_validate({'count': 0}),
669
+ description='Stats of the integration',
670
+ ),
671
+ ]
672
+ tags: Annotated[
673
+ Optional[List[str]],
674
+ Field(description='Tags associated with the integration', title='Tags'),
675
+ ] = []
676
+ credentials: Annotated[
677
+ Union[ApiKeyCredentials, BasicAuthCredentials],
678
+ Field(
679
+ description='Credentials that were generated for the integration',
680
+ title='Credentials',
681
+ ),
682
+ ]
683
+
684
+
685
+ class IntegrationGetResponse(BaseModelSdk):
686
+ id: Annotated[str, Field(description='ID of the integration', title='Id')]
687
+ name: Annotated[
688
+ str,
689
+ Field(
690
+ description='Name of the integration. Should be unique within the organization',
691
+ title='Name',
692
+ ),
693
+ ]
694
+ organization_id: Annotated[
695
+ str, Field(description='ID of the owner organization', title='Organization Id')
696
+ ]
697
+ description: Annotated[
698
+ Optional[str],
699
+ Field(description='Description of the integration', title='Description'),
700
+ ] = None
701
+ created_at: Annotated[
702
+ datetime,
703
+ Field(description='Time the integration was created', title='Created At'),
704
+ ]
705
+ updated_at: Annotated[
706
+ datetime,
707
+ Field(description='Last time the integration was updated', title='Updated At'),
708
+ ]
709
+ entity_type: Annotated[
710
+ IntegrationType, Field(description='Type of the integration')
711
+ ]
712
+ output_format: Annotated[
713
+ OutputFormat, Field(description='Output format of the integration')
714
+ ]
715
+ last_pull: Annotated[
716
+ Optional[datetime],
717
+ Field(
718
+ description='Last time the integration pulled blocklists', title='Last Pull'
719
+ ),
720
+ ] = None
721
+ blocklists: Annotated[
722
+ List[BlocklistSubscription],
723
+ Field(
724
+ description='Blocklists that are subscribed by the integration',
725
+ title='Blocklists',
726
+ ),
727
+ ]
728
+ cves: Annotated[
729
+ List[CVESubscription],
730
+ Field(description='CVEs that are subscribed by the integration', title='Cves'),
731
+ ]
732
+ endpoint: Annotated[
733
+ AnyUrl,
734
+ Field(
735
+ description="Url that should be used by the firewall or the remediation component to fetch the integration's content",
736
+ title='Endpoint',
737
+ ),
738
+ ]
739
+ stats: Annotated[
740
+ Optional[Stats],
741
+ Field(
742
+ default_factory=lambda: Stats.model_validate({'count': 0}),
743
+ description='Stats of the integration',
744
+ ),
745
+ ]
746
+ tags: Annotated[
747
+ Optional[List[str]],
748
+ Field(description='Tags associated with the integration', title='Tags'),
749
+ ] = []
750
+
751
+
752
+ class IntegrationGetResponsePage(BaseModelSdk):
753
+ items: Annotated[List[IntegrationGetResponse], Field(title='Items')]
754
+ total: Annotated[int, Field(ge=0, title='Total')]
755
+ page: Annotated[int, Field(ge=1, title='Page')]
756
+ size: Annotated[int, Field(ge=1, title='Size')]
757
+ pages: Annotated[int, Field(ge=0, title='Pages')]
758
+ links: Links
759
+
760
+
761
+ class IntegrationUpdateRequest(BaseModelSdk):
762
+ model_config = ConfigDict(
763
+ extra='forbid',
764
+ )
765
+ name: Annotated[
766
+ Optional[str], Field(description='New name', min_length=1, title='Name')
767
+ ] = None
768
+ description: Annotated[
769
+ Optional[str],
770
+ Field(description='New description', min_length=1, title='Description'),
771
+ ] = None
772
+ output_format: Annotated[
773
+ Optional[OutputFormat], Field(description='New output format')
774
+ ] = None
775
+ regenerate_credentials: Annotated[
776
+ Optional[bool],
777
+ Field(
778
+ description='Regenerate credentials for the integration',
779
+ title='Regenerate Credentials',
780
+ ),
781
+ ] = None
782
+
783
+
784
+ class IntegrationUpdateResponse(BaseModelSdk):
785
+ id: Annotated[str, Field(description='ID of the integration', title='Id')]
786
+ name: Annotated[
787
+ str,
788
+ Field(
789
+ description='Name of the integration. Should be unique within the organization',
790
+ title='Name',
791
+ ),
792
+ ]
793
+ organization_id: Annotated[
794
+ str, Field(description='ID of the owner organization', title='Organization Id')
795
+ ]
796
+ description: Annotated[
797
+ Optional[str],
798
+ Field(description='Description of the integration', title='Description'),
799
+ ] = None
800
+ created_at: Annotated[
801
+ datetime,
802
+ Field(description='Time the integration was created', title='Created At'),
803
+ ]
804
+ updated_at: Annotated[
805
+ datetime,
806
+ Field(description='Last time the integration was updated', title='Updated At'),
807
+ ]
808
+ entity_type: Annotated[
809
+ IntegrationType, Field(description='Type of the integration')
810
+ ]
811
+ output_format: Annotated[
812
+ OutputFormat, Field(description='Output format of the integration')
813
+ ]
814
+ last_pull: Annotated[
815
+ Optional[datetime],
816
+ Field(
817
+ description='Last time the integration pulled blocklists', title='Last Pull'
818
+ ),
819
+ ] = None
820
+ blocklists: Annotated[
821
+ List[BlocklistSubscription],
822
+ Field(
823
+ description='Blocklists that are subscribed by the integration',
824
+ title='Blocklists',
825
+ ),
826
+ ]
827
+ cves: Annotated[
828
+ List[CVESubscription],
829
+ Field(description='CVEs that are subscribed by the integration', title='Cves'),
830
+ ]
831
+ endpoint: Annotated[
832
+ AnyUrl,
833
+ Field(
834
+ description="Url that should be used by the firewall or the remediation component to fetch the integration's content",
835
+ title='Endpoint',
836
+ ),
837
+ ]
838
+ stats: Annotated[
839
+ Optional[Stats],
840
+ Field(
841
+ default_factory=lambda: Stats.model_validate({'count': 0}),
842
+ description='Stats of the integration',
843
+ ),
844
+ ]
845
+ tags: Annotated[
846
+ Optional[List[str]],
847
+ Field(description='Tags associated with the integration', title='Tags'),
848
+ ] = []
849
+ credentials: Annotated[
850
+ Optional[Union[ApiKeyCredentials, BasicAuthCredentials]],
851
+ Field(description='Credentials for the integration', title='Credentials'),
852
+ ] = None
853
+
854
+
855
+ class GetCVESubscribedIntegrationsResponsePage(BaseModelSdk):
856
+ items: Annotated[List[IntegrationResponse], Field(title='Items')]
857
+ total: Annotated[int, Field(ge=0, title='Total')]
858
+ page: Annotated[int, Field(ge=1, title='Page')]
859
+ size: Annotated[int, Field(ge=1, title='Size')]
860
+ pages: Annotated[int, Field(ge=0, title='Pages')]
861
+ links: Links
862
+
863
+
864
+ class IPItem(BaseModelSdk):
865
+ ip: Annotated[str, Field(description='IP address', title='Ip')]
866
+ reputation: Annotated[
867
+ Optional[str], Field(description='Reputation of the IP', title='Reputation')
868
+ ] = None
869
+ ip_range: Annotated[
870
+ Optional[str], Field(description='IP range', title='Ip Range')
871
+ ] = None
872
+ ip_range_score: Annotated[
873
+ Optional[int], Field(description='IP range score', title='Ip Range Score')
874
+ ] = None
875
+ ip_range_24: Annotated[
876
+ Optional[str], Field(description='IP range /24', title='Ip Range 24')
877
+ ] = None
878
+ ip_range_24_reputation: Annotated[
879
+ Optional[str],
880
+ Field(description='IP range /24 reputation', title='Ip Range 24 Reputation'),
881
+ ] = None
882
+ ip_range_24_score: Annotated[
883
+ Optional[int],
884
+ Field(description='IP range /24 score', title='Ip Range 24 Score'),
885
+ ] = None
886
+ as_name: Annotated[Optional[str], Field(description='AS name', title='As Name')] = (
887
+ None
888
+ )
889
+ as_num: Annotated[Optional[int], Field(description='AS number', title='As Num')] = (
890
+ None
891
+ )
892
+ background_noise_score: Annotated[
893
+ Optional[int],
894
+ Field(description='Background noise score', title='Background Noise Score'),
895
+ ] = None
896
+ background_noise: Annotated[
897
+ Optional[str],
898
+ Field(description='Background noise level', title='Background Noise'),
899
+ ] = None
900
+ confidence: Annotated[
901
+ Optional[str], Field(description='Confidence level', title='Confidence')
902
+ ] = None
903
+ location: Annotated[
904
+ Optional[Location], Field(description='IP location information')
905
+ ] = None
906
+ reverse_dns: Annotated[
907
+ Optional[str], Field(description='Reverse DNS', title='Reverse Dns')
908
+ ] = None
909
+ behaviors: Annotated[
910
+ Optional[List[Behavior]],
911
+ Field(description='List of behaviors', title='Behaviors'),
912
+ ] = None
913
+ references: Annotated[
914
+ Optional[List[Reference]],
915
+ Field(description='List of references', title='References'),
916
+ ] = None
917
+ history: Annotated[Optional[History], Field(description='Historical data')] = None
918
+ classifications: Annotated[
919
+ Optional[Classifications], Field(description='Classification data')
920
+ ] = None
921
+ mitre_techniques: Annotated[
922
+ Optional[List[MitreTechnique]],
923
+ Field(description='MITRE techniques', title='Mitre Techniques'),
924
+ ] = None
925
+ cves: Annotated[
926
+ Optional[List[str]], Field(description='List of CVEs', title='Cves')
927
+ ] = None
928
+ attack_details: Annotated[
929
+ Optional[List[AttackDetail]],
930
+ Field(description='Attack details', title='Attack Details'),
931
+ ] = None
932
+ target_countries: Annotated[
933
+ Optional[Dict[str, int]],
934
+ Field(description='Target countries', title='Target Countries'),
935
+ ] = None
936
+ scores: Annotated[Optional[Scores], Field(description='Scoring information')] = None
937
+
938
+
939
+ class GetCVEIPsResponsePage(BaseModelSdk):
940
+ items: Annotated[List[IPItem], Field(title='Items')]
941
+ total: Annotated[int, Field(ge=0, title='Total')]
942
+ page: Annotated[int, Field(ge=1, title='Page')]
943
+ size: Annotated[int, Field(ge=1, title='Size')]
944
+ pages: Annotated[int, Field(ge=0, title='Pages')]
945
+ links: Links