binalyze-air-sdk 1.0.2__py3-none-any.whl → 1.0.3__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.
- binalyze_air/__init__.py +77 -77
- binalyze_air/apis/__init__.py +67 -27
- binalyze_air/apis/acquisitions.py +107 -0
- binalyze_air/apis/api_tokens.py +49 -0
- binalyze_air/apis/assets.py +161 -0
- binalyze_air/apis/audit_logs.py +26 -0
- binalyze_air/apis/{authentication.py → auth.py} +29 -27
- binalyze_air/apis/auto_asset_tags.py +79 -75
- binalyze_air/apis/backup.py +177 -0
- binalyze_air/apis/baseline.py +46 -0
- binalyze_air/apis/cases.py +225 -0
- binalyze_air/apis/cloud_forensics.py +116 -0
- binalyze_air/apis/event_subscription.py +96 -96
- binalyze_air/apis/evidence.py +249 -53
- binalyze_air/apis/interact.py +153 -36
- binalyze_air/apis/investigation_hub.py +234 -0
- binalyze_air/apis/license.py +104 -0
- binalyze_air/apis/logger.py +83 -0
- binalyze_air/apis/multipart_upload.py +201 -0
- binalyze_air/apis/notifications.py +115 -0
- binalyze_air/apis/organizations.py +267 -0
- binalyze_air/apis/params.py +44 -39
- binalyze_air/apis/policies.py +186 -0
- binalyze_air/apis/preset_filters.py +79 -0
- binalyze_air/apis/recent_activities.py +71 -0
- binalyze_air/apis/relay_server.py +104 -0
- binalyze_air/apis/settings.py +395 -27
- binalyze_air/apis/tasks.py +80 -0
- binalyze_air/apis/triage.py +197 -0
- binalyze_air/apis/user_management.py +183 -74
- binalyze_air/apis/webhook_executions.py +50 -0
- binalyze_air/apis/webhooks.py +322 -230
- binalyze_air/base.py +207 -133
- binalyze_air/client.py +217 -1337
- binalyze_air/commands/__init__.py +175 -145
- binalyze_air/commands/acquisitions.py +661 -387
- binalyze_air/commands/api_tokens.py +55 -0
- binalyze_air/commands/assets.py +324 -362
- binalyze_air/commands/{authentication.py → auth.py} +36 -36
- binalyze_air/commands/auto_asset_tags.py +230 -230
- binalyze_air/commands/backup.py +47 -0
- binalyze_air/commands/baseline.py +32 -396
- binalyze_air/commands/cases.py +609 -602
- binalyze_air/commands/cloud_forensics.py +88 -0
- binalyze_air/commands/event_subscription.py +101 -101
- binalyze_air/commands/evidences.py +918 -988
- binalyze_air/commands/interact.py +172 -58
- binalyze_air/commands/investigation_hub.py +315 -0
- binalyze_air/commands/license.py +183 -0
- binalyze_air/commands/logger.py +126 -0
- binalyze_air/commands/multipart_upload.py +363 -0
- binalyze_air/commands/notifications.py +45 -0
- binalyze_air/commands/organizations.py +200 -221
- binalyze_air/commands/policies.py +175 -203
- binalyze_air/commands/preset_filters.py +55 -0
- binalyze_air/commands/recent_activities.py +32 -0
- binalyze_air/commands/relay_server.py +144 -0
- binalyze_air/commands/settings.py +431 -29
- binalyze_air/commands/tasks.py +95 -56
- binalyze_air/commands/triage.py +224 -360
- binalyze_air/commands/user_management.py +351 -126
- binalyze_air/commands/webhook_executions.py +77 -0
- binalyze_air/config.py +244 -244
- binalyze_air/exceptions.py +49 -49
- binalyze_air/http_client.py +426 -305
- binalyze_air/models/__init__.py +287 -285
- binalyze_air/models/acquisitions.py +365 -250
- binalyze_air/models/api_tokens.py +73 -0
- binalyze_air/models/assets.py +438 -438
- binalyze_air/models/audit.py +247 -272
- binalyze_air/models/audit_logs.py +14 -0
- binalyze_air/models/{authentication.py → auth.py} +69 -69
- binalyze_air/models/auto_asset_tags.py +227 -116
- binalyze_air/models/backup.py +138 -0
- binalyze_air/models/baseline.py +231 -231
- binalyze_air/models/cases.py +275 -275
- binalyze_air/models/cloud_forensics.py +145 -0
- binalyze_air/models/event_subscription.py +170 -171
- binalyze_air/models/evidence.py +65 -65
- binalyze_air/models/evidences.py +367 -348
- binalyze_air/models/interact.py +266 -135
- binalyze_air/models/investigation_hub.py +265 -0
- binalyze_air/models/license.py +150 -0
- binalyze_air/models/logger.py +83 -0
- binalyze_air/models/multipart_upload.py +352 -0
- binalyze_air/models/notifications.py +138 -0
- binalyze_air/models/organizations.py +293 -293
- binalyze_air/models/params.py +153 -127
- binalyze_air/models/policies.py +260 -249
- binalyze_air/models/preset_filters.py +79 -0
- binalyze_air/models/recent_activities.py +70 -0
- binalyze_air/models/relay_server.py +121 -0
- binalyze_air/models/settings.py +538 -84
- binalyze_air/models/tasks.py +215 -149
- binalyze_air/models/triage.py +141 -142
- binalyze_air/models/user_management.py +200 -97
- binalyze_air/models/webhook_executions.py +33 -0
- binalyze_air/queries/__init__.py +121 -133
- binalyze_air/queries/acquisitions.py +155 -155
- binalyze_air/queries/api_tokens.py +46 -0
- binalyze_air/queries/assets.py +186 -105
- binalyze_air/queries/audit.py +400 -416
- binalyze_air/queries/{authentication.py → auth.py} +55 -55
- binalyze_air/queries/auto_asset_tags.py +59 -59
- binalyze_air/queries/backup.py +66 -0
- binalyze_air/queries/baseline.py +21 -185
- binalyze_air/queries/cases.py +292 -292
- binalyze_air/queries/cloud_forensics.py +137 -0
- binalyze_air/queries/event_subscription.py +54 -54
- binalyze_air/queries/evidence.py +139 -139
- binalyze_air/queries/evidences.py +279 -279
- binalyze_air/queries/interact.py +140 -28
- binalyze_air/queries/investigation_hub.py +329 -0
- binalyze_air/queries/license.py +85 -0
- binalyze_air/queries/logger.py +58 -0
- binalyze_air/queries/multipart_upload.py +180 -0
- binalyze_air/queries/notifications.py +71 -0
- binalyze_air/queries/organizations.py +222 -222
- binalyze_air/queries/params.py +154 -115
- binalyze_air/queries/policies.py +149 -149
- binalyze_air/queries/preset_filters.py +60 -0
- binalyze_air/queries/recent_activities.py +44 -0
- binalyze_air/queries/relay_server.py +42 -0
- binalyze_air/queries/settings.py +533 -20
- binalyze_air/queries/tasks.py +125 -81
- binalyze_air/queries/triage.py +230 -230
- binalyze_air/queries/user_management.py +193 -83
- binalyze_air/queries/webhook_executions.py +39 -0
- binalyze_air_sdk-1.0.3.dist-info/METADATA +752 -0
- binalyze_air_sdk-1.0.3.dist-info/RECORD +132 -0
- {binalyze_air_sdk-1.0.2.dist-info → binalyze_air_sdk-1.0.3.dist-info}/WHEEL +1 -1
- binalyze_air/apis/endpoints.py +0 -22
- binalyze_air/apis/evidences.py +0 -216
- binalyze_air/apis/users.py +0 -68
- binalyze_air/commands/users.py +0 -101
- binalyze_air/models/endpoints.py +0 -76
- binalyze_air/models/users.py +0 -82
- binalyze_air/queries/endpoints.py +0 -25
- binalyze_air/queries/users.py +0 -69
- binalyze_air_sdk-1.0.2.dist-info/METADATA +0 -706
- binalyze_air_sdk-1.0.2.dist-info/RECORD +0 -82
- {binalyze_air_sdk-1.0.2.dist-info → binalyze_air_sdk-1.0.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,132 @@
|
|
1
|
+
binalyze_air/__init__.py,sha256=gpqRimooDU5-TU2k_hGOLbg4ewkXpErp11AXkT_n2vA,1772
|
2
|
+
binalyze_air/base.py,sha256=3hNXsZ6lrOMzns-s3CdcmYTSSMakHsJrdc8WS_u2o-E,7140
|
3
|
+
binalyze_air/client.py,sha256=slTMJY18ZrI1zMWfeEs25TvVaLM8HLOMqbonnhDbFXQ,8835
|
4
|
+
binalyze_air/config.py,sha256=m8ylotfkwr0hEukRUVHmIhpRdho811zQRYpk20ygB4w,9975
|
5
|
+
binalyze_air/exceptions.py,sha256=-dtvS6TTWnEU73gO0iWBdk7BGKS72A_BIbG-_ktzpBE,1118
|
6
|
+
binalyze_air/http_client.py,sha256=a-upXl3cU_bTOPrLNN88gYkNXqJ31ocZNuzJsLHxkgY,17405
|
7
|
+
binalyze_air/apis/__init__.py,sha256=ubn9ZJl3uwFytAJ-F3QWGLnF8RLlZn1p1KUwqu3Y_Ds,1840
|
8
|
+
binalyze_air/apis/acquisitions.py,sha256=UfDqX__8c6Tz7quTS513romg1Kd6CNviLqRqYg09sFA,4646
|
9
|
+
binalyze_air/apis/api_tokens.py,sha256=m5GL1gMOCfA43uTQKy-pZqrNr7QawlyuBE-f6Iqle-o,1799
|
10
|
+
binalyze_air/apis/assets.py,sha256=xsUHQACU-zeB-7WzJ9-kVwBzGR54znzA3qsEiAuuvSE,8351
|
11
|
+
binalyze_air/apis/audit_logs.py,sha256=LGXp00d05oaFE7QgHSDckypakoLb2wAvCyKRjMQzMv8,1166
|
12
|
+
binalyze_air/apis/auth.py,sha256=YQV14pIGfYYHOz8LV6zakKFbDZO9PqhDZ3Znl6adCNI,915
|
13
|
+
binalyze_air/apis/auto_asset_tags.py,sha256=ggmIIbZ2M8_EZysJpuWTGPM7QDuXetzKUr61vvxA_k0,3319
|
14
|
+
binalyze_air/apis/backup.py,sha256=30SUIS7xWyplFXsCOWQuBSYJjZbWb0Qh-skISvWm4X4,6517
|
15
|
+
binalyze_air/apis/baseline.py,sha256=BvCyyvddRaN0-kAV1MUr056dHYabHc4xveS3jtp7efo,1611
|
16
|
+
binalyze_air/apis/cases.py,sha256=ZOwctg1JOLG6GeXAO1QSjrFyHL1w9lmZs9PRmgYaqB4,9531
|
17
|
+
binalyze_air/apis/cloud_forensics.py,sha256=jsg3j2eamscz3AimTITXVSm-yJBeikwiakyuTp0lRJI,5104
|
18
|
+
binalyze_air/apis/event_subscription.py,sha256=MeTyaxdgRICfz1T_L8BSKqPHh8-jIpKwudxL3ZaXwhc,4323
|
19
|
+
binalyze_air/apis/evidence.py,sha256=7r6gHzSUjm1ECu4F9cWdfO0Dcn-0gldoR5jlF_8coe8,12385
|
20
|
+
binalyze_air/apis/interact.py,sha256=-g6NUw1Ha5hR9UFyAB7c4xUJ1nWU5Qo6gaq7mwvT-FY,7238
|
21
|
+
binalyze_air/apis/investigation_hub.py,sha256=V7R-7g6gm_bVYSduQvcd46nZhKFQ80yjl7q1_MlOXSM,12231
|
22
|
+
binalyze_air/apis/license.py,sha256=ASbC-7Tiot_oq9aPGnI7cxniY0luAEzvVxBjUWrpAsI,3197
|
23
|
+
binalyze_air/apis/logger.py,sha256=sWIztjT33Otv6gu0njTLtsLlJOPUS2Px_aKEv0x7wns,2837
|
24
|
+
binalyze_air/apis/multipart_upload.py,sha256=i-YqoyYKi-wyhGeRwKY9o6xXgcb90dMXgHYtR5W6Jsk,6941
|
25
|
+
binalyze_air/apis/notifications.py,sha256=cTmNLDGz_UKkm2gjHRL3Rwr4IYgmPgzaTzGA5n3sto4,5131
|
26
|
+
binalyze_air/apis/organizations.py,sha256=so5ogsxMzh31J9jPJIXzWs7a2cFSvxbFSlgkZKES24A,10956
|
27
|
+
binalyze_air/apis/params.py,sha256=3giI1Utr3aVMkEnt_FyUrXASOd4TLi4fjosp74U4Wsk,1729
|
28
|
+
binalyze_air/apis/policies.py,sha256=CLaBWvkVOLE2eOuIsgi0Hz6JfnbQQ1T2QzbaPUyh0iY,7335
|
29
|
+
binalyze_air/apis/preset_filters.py,sha256=mLJTqKXvFFS1LD0QhB-I2pfLqptbo53bpiT399A-nkM,3659
|
30
|
+
binalyze_air/apis/recent_activities.py,sha256=ZOI5XEvZ9iTjrOYNxtX4eMKDxjlaqkPXlJl9fpRFcls,3500
|
31
|
+
binalyze_air/apis/relay_server.py,sha256=RTA5GlN9qoRk7XJ_ryGqJ8qBn8DoUhJSyWy0FwdR1Dk,5237
|
32
|
+
binalyze_air/apis/settings.py,sha256=USJMVCUP1_ik8J0O1FT3G9irzJNbckf9AEPek7278kU,16094
|
33
|
+
binalyze_air/apis/tasks.py,sha256=ZbEipdNLfsNzkADJ4l90XEnL692ihBpjpgMLCPjUxu0,3071
|
34
|
+
binalyze_air/apis/triage.py,sha256=qjraBuw_C2OvSYlimOe4bjqBZNSyM1eeqo4GDYteacw,8599
|
35
|
+
binalyze_air/apis/user_management.py,sha256=rBRX_RNklqvILRFvdEZoITbwZD7M_enFi3c4s3XX7Iw,7484
|
36
|
+
binalyze_air/apis/webhook_executions.py,sha256=boCRGKS3e2cII9J4eVht8dPaHpxC3znjSvzLqhtaxbY,2327
|
37
|
+
binalyze_air/apis/webhooks.py,sha256=q4JTuw6UlOo-EN8QbOVW6SKWAOnuOEHgtLTBygnaf-I,11866
|
38
|
+
binalyze_air/commands/__init__.py,sha256=uD6DvyBKWEjTUPo_NmaUYVgQ2O9FTf8ZUhephKbNwHk,4720
|
39
|
+
binalyze_air/commands/acquisitions.py,sha256=iwvWWn4I9UbfxLLmt3shX6aUzIDeOYAQj5RqGGbVUAI,29908
|
40
|
+
binalyze_air/commands/api_tokens.py,sha256=QTHdHP09YtXt0-Vv2rdyFnT0F9KSloYGpbbahWGD694,1765
|
41
|
+
binalyze_air/commands/assets.py,sha256=_qe7A3BRy5KwP8Lb8dr2j1nhAVlTF8mxAVbm9td7oRU,10953
|
42
|
+
binalyze_air/commands/auth.py,sha256=yWpUms9j2-y9wwm2937mkl9OhpwwARbSgrvN0IATVCU,1227
|
43
|
+
binalyze_air/commands/auto_asset_tags.py,sha256=CJdA8V2Xme6La_PGeQUdTxRbZYWCmB-arbjzoq4eSJk,10703
|
44
|
+
binalyze_air/commands/backup.py,sha256=-vRuNkzDka4z8Jxfph_AL0o-1FicbaphiC6wyVjyQmw,1570
|
45
|
+
binalyze_air/commands/baseline.py,sha256=LOZF48LybFozWvt50Xckd1TGiFCsdLJZCFXIwvH_m84,1103
|
46
|
+
binalyze_air/commands/cases.py,sha256=JIvmJcGAd4YwUnpJZm_EuqtEjNvg_O6CFkriypm597c,26113
|
47
|
+
binalyze_air/commands/cloud_forensics.py,sha256=RyNpHrD0_2UtnxHFIZfOOGS3cc3vFE_-050QZcWRGBA,3308
|
48
|
+
binalyze_air/commands/event_subscription.py,sha256=nySvm7TIkwvUI_P_VkllJqYb1PUu3XA1CkKSjKJ2TVY,3972
|
49
|
+
binalyze_air/commands/evidences.py,sha256=DN7waWDHp3goUwxkvyDF_EZtsyISYlQQnFseHLBXEDU,42101
|
50
|
+
binalyze_air/commands/interact.py,sha256=QmcOjAbcCfPSQHTKZtEG5Xr2tM9Jy4mKxAkYvrVfJa8,6471
|
51
|
+
binalyze_air/commands/investigation_hub.py,sha256=A7_E7fgeoSXZxuxiscw2jsCJid8SYXgrQPIdhY5OG5w,11602
|
52
|
+
binalyze_air/commands/license.py,sha256=NvhVppkiS17s7S5WTPIfK-QaOp91Rk9iwb-ghQ57-qU,6106
|
53
|
+
binalyze_air/commands/logger.py,sha256=gCfBY8oawUpQxfVdug2rkbe1QmtOHgv4Ht8UMx9NBRo,4070
|
54
|
+
binalyze_air/commands/multipart_upload.py,sha256=Y_JV_2EjrHdR04jGT5pOtSlChvh6j2h9RrsY7Tc5Y4Q,13469
|
55
|
+
binalyze_air/commands/notifications.py,sha256=jIcGhsMom8L_E4n2a6X6PiXWNKFfy7FbHzjGoBx5hYo,1486
|
56
|
+
binalyze_air/commands/organizations.py,sha256=KQyXLjd-Z9tMQEzHvwP2IElvSSWrAxzHYiAHrdG6W2g,8343
|
57
|
+
binalyze_air/commands/policies.py,sha256=iFZOUVpf_EgdHNHSC7v_7ATrzUvZUC-JhoYicc_VhOk,6694
|
58
|
+
binalyze_air/commands/preset_filters.py,sha256=ZaNW-y4BngYih3jzS5oaj07PjFAOJxqLAY_p0ndkOFM,1964
|
59
|
+
binalyze_air/commands/recent_activities.py,sha256=_kAJudm-UB_O4Bf8IFU9TpTu5vjBoOGH40yNVWr45_E,1053
|
60
|
+
binalyze_air/commands/relay_server.py,sha256=eQECu4eWi_v1SU3EFFqAZongCYF8UpQzMgWzIcych1o,5538
|
61
|
+
binalyze_air/commands/settings.py,sha256=KRQmIwNKWrOHA687xRA0JdaalpCfeXS7XIvfdRbtdbU,17018
|
62
|
+
binalyze_air/commands/tasks.py,sha256=3Y4ae0e0ioeK98TITL3JU27SI-kPilVPb8PijQeVlvA,3663
|
63
|
+
binalyze_air/commands/triage.py,sha256=bcYSizFNkruIry3SUrvVnWKbbxGUgN_CusA86oLbYdc,9531
|
64
|
+
binalyze_air/commands/user_management.py,sha256=Ilo1op_0Bt735lvxgWrvSXVh7s_TXZ2Wani5WKTbxQo,13021
|
65
|
+
binalyze_air/commands/webhook_executions.py,sha256=ZKPoWNYcVSl0oDvv7-QGrhjmWwFro57DUcDfDJXS_mY,2890
|
66
|
+
binalyze_air/models/__init__.py,sha256=sjrJ3epRg-_VDZP2dS29_cmsR6nQF17yZBXRyimlhvo,7916
|
67
|
+
binalyze_air/models/acquisitions.py,sha256=BW8vtXxp8eBRCwwpfKpCB7kfTFck06y3d-_JIRus5Hk,13252
|
68
|
+
binalyze_air/models/api_tokens.py,sha256=VvPVgtxzk3dgIQcbwkNASw34SnBvZRWnWWWJccfhjFA,2582
|
69
|
+
binalyze_air/models/assets.py,sha256=AOgHBFYE_w7okxUCodj6oT5wyqjoRlSlnwUKXgxdUyM,17656
|
70
|
+
binalyze_air/models/audit.py,sha256=NXXgyTWZg80KRMr9nqIrJ-wjZsiOgr2ANpEyp_CDAx8,7806
|
71
|
+
binalyze_air/models/audit_logs.py,sha256=dyb6DJfU4VhSBbLzlOIJFXWaKG2eShTZglYkyKVmBo8,534
|
72
|
+
binalyze_air/models/auth.py,sha256=m6Ul-X2tDnmTeAeLrs5sNWMyf8FTPl9BM-AMn8RQVv4,2382
|
73
|
+
binalyze_air/models/auto_asset_tags.py,sha256=Cc7HFZAI1sXu9UwVGRSCrhZWYDskpoU8oz90pfC-EGM,7942
|
74
|
+
binalyze_air/models/backup.py,sha256=kJNpVRECC3sOy6TJJLEqBguWpT0avy7HsRFFQvwfHYg,5211
|
75
|
+
binalyze_air/models/baseline.py,sha256=IqwZLGiP-JidUrNribOJNvHGw8PyUZ0S6FK-hwqFbpc,8638
|
76
|
+
binalyze_air/models/cases.py,sha256=VdsHhvyIXd7uO0fk_wlJmr0gkbap0dtNDrOA8xompuI,11938
|
77
|
+
binalyze_air/models/cloud_forensics.py,sha256=9GWoFQKMNQXFVU1kn9oYlSNXOlArHj5_95kWtapAeic,5708
|
78
|
+
binalyze_air/models/event_subscription.py,sha256=-47_YaTKSFbtkpBip7iYLIqVUdFJJGl4oLApzK3LT8c,7232
|
79
|
+
binalyze_air/models/evidence.py,sha256=kQ9B2FV0rW9MkYjV4WLHZlsBVyJqvO1Nu9uCa1pcIAw,2133
|
80
|
+
binalyze_air/models/evidences.py,sha256=eiSxdUfYlq204Ydr3dlsx8F0EkhP7oLonx59MCEB-pY,11403
|
81
|
+
binalyze_air/models/interact.py,sha256=EExuLebf2mfa2DyzsxcHxGKVt8Z9YO86eh58X4POc7M,7420
|
82
|
+
binalyze_air/models/investigation_hub.py,sha256=Idpx5IFUQEAXVOcGhosEyg0T7TBKRNleNZkcgKxzkT8,8080
|
83
|
+
binalyze_air/models/license.py,sha256=qjIHkJfbjZVIC-Rg-XHnQYp8T3K8uLsHqOwTZHJSZMQ,4857
|
84
|
+
binalyze_air/models/logger.py,sha256=cifVsSBiGolmSAdcpPvwcYbY6zWcAsJUwZO2FtWj7RA,2459
|
85
|
+
binalyze_air/models/multipart_upload.py,sha256=WNI8KcRgdNJO2K59XEG63jaYnAnn8kwAjkIF-oeFJF0,10166
|
86
|
+
binalyze_air/models/notifications.py,sha256=Gy-J4kW82zD8KGEHCiWo-vgJfjOVPcdsk8ueJ9LapDg,5227
|
87
|
+
binalyze_air/models/organizations.py,sha256=2WKk2S9ALRvvA-NHYtBSu4gBPgpyRpifCwlXPILP3Ig,9186
|
88
|
+
binalyze_air/models/params.py,sha256=bozcdJjTUA6WnyaHP48HB-mptdlkF_69tfPzEmMrtWM,3904
|
89
|
+
binalyze_air/models/policies.py,sha256=MldXp_Dij0Rf7kdvxI0bXlFsLrzT88998W5aAiwW10s,8048
|
90
|
+
binalyze_air/models/preset_filters.py,sha256=jVD04UJv8GrhLYtifKySHjoF8151OZpf1Z-25SVH1E0,2650
|
91
|
+
binalyze_air/models/recent_activities.py,sha256=-toZ3--qBDClCVvu2YbATKoFkh7zQDVOBb9AkmA9an4,2056
|
92
|
+
binalyze_air/models/relay_server.py,sha256=D7lXlHjiG2VoX7tcxXZG3BiWMnJKadtORFAaxAMoNHQ,3716
|
93
|
+
binalyze_air/models/settings.py,sha256=RAlHXxOl33hvSIb_HWt00-NXp9Qn61Ka4L-t9mTMXuA,19742
|
94
|
+
binalyze_air/models/tasks.py,sha256=XX8DEX0sWX9i-Gd9UXWiqu_EzYT0L7DlGJi5bd_5uPU,7410
|
95
|
+
binalyze_air/models/triage.py,sha256=tH_qJbuzjJDaC8dy4lJ68FOE9OJ1MKw2RwX6su0EPzE,3564
|
96
|
+
binalyze_air/models/user_management.py,sha256=VG30Hy7Xu86Wriy5vYQM4-kMzavDzxPqQyFXadDvxTk,4904
|
97
|
+
binalyze_air/models/webhook_executions.py,sha256=yqtW-LIgqKHmP_9tAsCRqPzqNIPq7alAPbrwKSlkQeg,736
|
98
|
+
binalyze_air/queries/__init__.py,sha256=LhoUspCxxQEqR7G-Oms5r7FDJDhppRH1ffHeDrTWRmk,2739
|
99
|
+
binalyze_air/queries/acquisitions.py,sha256=3CKuGolICqRApiW3EW0BbsJysu9iMsZIAmtn4RkcrDs,6468
|
100
|
+
binalyze_air/queries/api_tokens.py,sha256=nGmrpbiXL6ZwGxNIehU97h98MS9GSvjimON0qIgRckc,1715
|
101
|
+
binalyze_air/queries/assets.py,sha256=yRWnjQVJQhe4zpxDGPgYqO4cez7su10KiLvvXNGIyFE,7220
|
102
|
+
binalyze_air/queries/audit.py,sha256=Yk-Lpcw8J2813vk_iHsgAtSTOfpf7qjSoRTsnsoypV4,17642
|
103
|
+
binalyze_air/queries/auth.py,sha256=GMQ9QjcZCmI-7zJZJZnzostGS6bHXtf8QlRl_Q4Nbfc,2193
|
104
|
+
binalyze_air/queries/auto_asset_tags.py,sha256=rsleyfDb9dNlrMv_2VJ7NZQseVxw_rgcbxnuRHpnzhU,2227
|
105
|
+
binalyze_air/queries/backup.py,sha256=n_y0dtMs6rsmQplzVVIa315PjRTX47sbafCXT9XK9pw,2737
|
106
|
+
binalyze_air/queries/baseline.py,sha256=ToqZJDBVH8aFcf8lRVaMC-KEggeUv_L7EHTXRcLTDvw,704
|
107
|
+
binalyze_air/queries/cases.py,sha256=MHtDK2WY90f-SvNdM6QFxuHW1Yelh6Z9Pqc-2YKXuFY,13275
|
108
|
+
binalyze_air/queries/cloud_forensics.py,sha256=qHBwN6tSwOqsRf44Pr9gACq7IHw2ZS31lfEjTZXev_c,5823
|
109
|
+
binalyze_air/queries/event_subscription.py,sha256=XTV2Dx8DlXf4eAeTqVkAa2Vtb9Efb_YedHaEGB-FQbA,2072
|
110
|
+
binalyze_air/queries/evidence.py,sha256=Z8tMZ_UB_gVseuhu0eg-Pyo3eMQ09eZeZerIlAAf_-c,6455
|
111
|
+
binalyze_air/queries/evidences.py,sha256=sfgHW2VZfCuAWc7-Ps7vH3-l3HgsMcYcu1TsZcI8WJY,10635
|
112
|
+
binalyze_air/queries/interact.py,sha256=tmSmeayW3SNTH9dZh0XClKwJpx6LxFgBpGF0O3nich8,4942
|
113
|
+
binalyze_air/queries/investigation_hub.py,sha256=4BUC7Ksjk5pX2Y6iyvVXUHxUeMlvM_hGlpNhV1XtTY0,12739
|
114
|
+
binalyze_air/queries/license.py,sha256=U7hXt_C0-IBSqjLINkFUFqpNumh0FjJ1SSE7ZO66r7I,2261
|
115
|
+
binalyze_air/queries/logger.py,sha256=ElOavkAut_dNyXjO_9x6OkKE6LEFq0OFUxBdZvno1wc,1592
|
116
|
+
binalyze_air/queries/multipart_upload.py,sha256=hbogW4Zsrh_bEDMrApNc3UpgFSi-w7lArwabQqeQlRM,5044
|
117
|
+
binalyze_air/queries/notifications.py,sha256=TNrGPMSy63t9dSz5JDgDz162PPMI6BWi0nKAgoEcJAI,2663
|
118
|
+
binalyze_air/queries/organizations.py,sha256=XbvlbzxIlNv8EsFw7Bi7MaA6Lx703gH0RvwMmdp0_8M,9127
|
119
|
+
binalyze_air/queries/params.py,sha256=ZepuLA3yMkpvJ6wfG4haVhIJf-igPuW0w3FJ4OWkmCw,5645
|
120
|
+
binalyze_air/queries/policies.py,sha256=PjU0OgT1mdAIda3rWkDqKEaj_o2NfyIf-O6FltTN_vA,5877
|
121
|
+
binalyze_air/queries/preset_filters.py,sha256=SMEBdxU5Ft_Ck-kYGy1zBkjUkc_HL-SPO-YPmzwhvoE,2350
|
122
|
+
binalyze_air/queries/recent_activities.py,sha256=YEVDL6iAUdQgU4A7oE8tnOq7LVRSRrUIeihVRXDafJM,1812
|
123
|
+
binalyze_air/queries/relay_server.py,sha256=nxhnIAUGYq3jsdtQSqfok1LIYHia4AhqmqkEyZLBa8I,1531
|
124
|
+
binalyze_air/queries/settings.py,sha256=65yZLFXPjZjVAfQ7FTd4xybV54zRRPg4aHyd9dYC-IU,19096
|
125
|
+
binalyze_air/queries/tasks.py,sha256=yEVQzMLo3OR6Sttjpn2vBzTUT6lILbHAMOQhc1Ou9bc,5398
|
126
|
+
binalyze_air/queries/triage.py,sha256=qqZ2cE0PT5pcG3Wj4p801CyTnzUr0xK_7ZChzK27zpI,9770
|
127
|
+
binalyze_air/queries/user_management.py,sha256=tIO6BeZNAkSZnhL1D6yZLX5VLKuu6sxXnzdtyBUG4e8,6702
|
128
|
+
binalyze_air/queries/webhook_executions.py,sha256=GMz-vpd3ESfWvHDrnxiKaGm7ijBE9guUVPUlwY6kgH8,1366
|
129
|
+
binalyze_air_sdk-1.0.3.dist-info/METADATA,sha256=QMsBApskZrcUsO7B6NzfZchBhzOKByGzGsaFuJv2ZmE,28997
|
130
|
+
binalyze_air_sdk-1.0.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
131
|
+
binalyze_air_sdk-1.0.3.dist-info/top_level.txt,sha256=tBLzGUUsOn0B7c9llmzWSwCFiQpjmB-NREAdQhuIFZQ,13
|
132
|
+
binalyze_air_sdk-1.0.3.dist-info/RECORD,,
|
binalyze_air/apis/endpoints.py
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Endpoints API for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import List, Optional
|
6
|
-
|
7
|
-
from ..http_client import HTTPClient
|
8
|
-
from ..models.endpoints import EndpointTag, EndpointTagFilter
|
9
|
-
from ..queries.endpoints import GetEndpointTagsQuery
|
10
|
-
|
11
|
-
|
12
|
-
class EndpointsAPI:
|
13
|
-
"""Endpoints API with CQRS pattern - read operations for endpoint management."""
|
14
|
-
|
15
|
-
def __init__(self, http_client: HTTPClient):
|
16
|
-
self.http_client = http_client
|
17
|
-
|
18
|
-
# QUERIES (Read operations)
|
19
|
-
def get_tags(self, filter_params: Optional[EndpointTagFilter] = None) -> List[EndpointTag]:
|
20
|
-
"""Get endpoint tags with optional filtering."""
|
21
|
-
query = GetEndpointTagsQuery(self.http_client, filter_params)
|
22
|
-
return query.execute()
|
binalyze_air/apis/evidences.py
DELETED
@@ -1,216 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Evidences API for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import List, Optional, Dict, Any
|
6
|
-
|
7
|
-
from ..http_client import HTTPClient
|
8
|
-
from ..models.evidences import (
|
9
|
-
EvidenceRepository, AmazonS3Repository, AzureStorageRepository,
|
10
|
-
FTPSRepository, SFTPRepository, SMBRepository, RepositoryFilter,
|
11
|
-
CreateAmazonS3RepositoryRequest, UpdateAmazonS3RepositoryRequest,
|
12
|
-
CreateAzureStorageRepositoryRequest, UpdateAzureStorageRepositoryRequest,
|
13
|
-
CreateFTPSRepositoryRequest, UpdateFTPSRepositoryRequest,
|
14
|
-
CreateSFTPRepositoryRequest, UpdateSFTPRepositoryRequest,
|
15
|
-
CreateSMBRepositoryRequest, UpdateSMBRepositoryRequest,
|
16
|
-
ValidateRepositoryRequest, ValidationResult
|
17
|
-
)
|
18
|
-
from ..queries.evidences import (
|
19
|
-
ListRepositoriesQuery, GetRepositoryQuery,
|
20
|
-
ListAmazonS3RepositoriesQuery, GetAmazonS3RepositoryQuery,
|
21
|
-
ListAzureStorageRepositoriesQuery, GetAzureStorageRepositoryQuery,
|
22
|
-
ListFTPSRepositoriesQuery, GetFTPSRepositoryQuery,
|
23
|
-
ListSFTPRepositoriesQuery, GetSFTPRepositoryQuery,
|
24
|
-
ListSMBRepositoriesQuery, GetSMBRepositoryQuery
|
25
|
-
)
|
26
|
-
from ..commands.evidences import (
|
27
|
-
UpdateRepositoryCommand, DeleteRepositoryCommand,
|
28
|
-
CreateAmazonS3RepositoryCommand, UpdateAmazonS3RepositoryCommand, DeleteAmazonS3RepositoryCommand,
|
29
|
-
ValidateAmazonS3RepositoryCommand,
|
30
|
-
CreateAzureStorageRepositoryCommand, UpdateAzureStorageRepositoryCommand, DeleteAzureStorageRepositoryCommand,
|
31
|
-
ValidateAzureStorageRepositoryCommand,
|
32
|
-
CreateFTPSRepositoryCommand, UpdateFTPSRepositoryCommand, DeleteFTPSRepositoryCommand,
|
33
|
-
ValidateFTPSRepositoryCommand,
|
34
|
-
CreateSFTPRepositoryCommand, UpdateSFTPRepositoryCommand, DeleteSFTPRepositoryCommand,
|
35
|
-
CreateSMBRepositoryCommand, UpdateSMBRepositoryCommand, DeleteSMBRepositoryCommand
|
36
|
-
)
|
37
|
-
|
38
|
-
|
39
|
-
class EvidencesAPI:
|
40
|
-
"""Evidences API with CQRS pattern - separated queries and commands for evidence repositories."""
|
41
|
-
|
42
|
-
def __init__(self, http_client: HTTPClient):
|
43
|
-
self.http_client = http_client
|
44
|
-
|
45
|
-
# GENERAL REPOSITORY QUERIES
|
46
|
-
def list_repositories(self, filter_params: Optional[RepositoryFilter] = None, organization_ids: Optional[List[int]] = None) -> List[EvidenceRepository]:
|
47
|
-
"""List evidence repositories with optional filtering."""
|
48
|
-
query = ListRepositoriesQuery(self.http_client, filter_params, organization_ids)
|
49
|
-
return query.execute()
|
50
|
-
|
51
|
-
def get_repository(self, repository_id: str) -> EvidenceRepository:
|
52
|
-
"""Get a specific evidence repository by ID."""
|
53
|
-
query = GetRepositoryQuery(self.http_client, repository_id)
|
54
|
-
return query.execute()
|
55
|
-
|
56
|
-
def get_repository_statistics(self, repository_id: str) -> Dict[str, Any]:
|
57
|
-
"""Get statistics for a specific evidence repository."""
|
58
|
-
# Simple statistics query - this could be enhanced based on actual API needs
|
59
|
-
response = self.http_client.get(f"repositories/{repository_id}/statistics")
|
60
|
-
return response.get("result", {})
|
61
|
-
|
62
|
-
# GENERAL REPOSITORY COMMANDS
|
63
|
-
def update_repository(self, repository_id: str, update_data: Dict[str, Any]) -> EvidenceRepository:
|
64
|
-
"""Update an evidence repository."""
|
65
|
-
command = UpdateRepositoryCommand(self.http_client, repository_id, update_data)
|
66
|
-
return command.execute()
|
67
|
-
|
68
|
-
def delete_repository(self, repository_id: str) -> Dict[str, Any]:
|
69
|
-
"""Delete an evidence repository."""
|
70
|
-
command = DeleteRepositoryCommand(self.http_client, repository_id)
|
71
|
-
return command.execute()
|
72
|
-
|
73
|
-
# AMAZON S3 REPOSITORY OPERATIONS
|
74
|
-
def list_amazon_s3_repositories(self, filter_params: Optional[RepositoryFilter] = None) -> List[AmazonS3Repository]:
|
75
|
-
"""List Amazon S3 repositories with optional filtering."""
|
76
|
-
query = ListAmazonS3RepositoriesQuery(self.http_client, filter_params)
|
77
|
-
return query.execute()
|
78
|
-
|
79
|
-
def get_amazon_s3_repository(self, repository_id: str) -> AmazonS3Repository:
|
80
|
-
"""Get a specific Amazon S3 repository by ID."""
|
81
|
-
query = GetAmazonS3RepositoryQuery(self.http_client, repository_id)
|
82
|
-
return query.execute()
|
83
|
-
|
84
|
-
def create_amazon_s3_repository(self, request: CreateAmazonS3RepositoryRequest) -> AmazonS3Repository:
|
85
|
-
"""Create a new Amazon S3 repository."""
|
86
|
-
command = CreateAmazonS3RepositoryCommand(self.http_client, request)
|
87
|
-
return command.execute()
|
88
|
-
|
89
|
-
def update_amazon_s3_repository(self, repository_id: str, request: UpdateAmazonS3RepositoryRequest) -> AmazonS3Repository:
|
90
|
-
"""Update an existing Amazon S3 repository."""
|
91
|
-
command = UpdateAmazonS3RepositoryCommand(self.http_client, repository_id, request)
|
92
|
-
return command.execute()
|
93
|
-
|
94
|
-
def delete_amazon_s3_repository(self, repository_id: str) -> Dict[str, Any]:
|
95
|
-
"""Delete an Amazon S3 repository."""
|
96
|
-
command = DeleteAmazonS3RepositoryCommand(self.http_client, repository_id)
|
97
|
-
return command.execute()
|
98
|
-
|
99
|
-
def validate_amazon_s3_repository(self, request: ValidateRepositoryRequest) -> ValidationResult:
|
100
|
-
"""Validate Amazon S3 repository configuration."""
|
101
|
-
command = ValidateAmazonS3RepositoryCommand(self.http_client, request)
|
102
|
-
return command.execute()
|
103
|
-
|
104
|
-
# AZURE STORAGE REPOSITORY OPERATIONS
|
105
|
-
def list_azure_storage_repositories(self, filter_params: Optional[RepositoryFilter] = None) -> List[AzureStorageRepository]:
|
106
|
-
"""List Azure Storage repositories with optional filtering."""
|
107
|
-
query = ListAzureStorageRepositoriesQuery(self.http_client, filter_params)
|
108
|
-
return query.execute()
|
109
|
-
|
110
|
-
def get_azure_storage_repository(self, repository_id: str) -> AzureStorageRepository:
|
111
|
-
"""Get a specific Azure Storage repository by ID."""
|
112
|
-
query = GetAzureStorageRepositoryQuery(self.http_client, repository_id)
|
113
|
-
return query.execute()
|
114
|
-
|
115
|
-
def create_azure_storage_repository(self, request: CreateAzureStorageRepositoryRequest) -> AzureStorageRepository:
|
116
|
-
"""Create a new Azure Storage repository."""
|
117
|
-
command = CreateAzureStorageRepositoryCommand(self.http_client, request)
|
118
|
-
return command.execute()
|
119
|
-
|
120
|
-
def update_azure_storage_repository(self, repository_id: str, request: UpdateAzureStorageRepositoryRequest) -> AzureStorageRepository:
|
121
|
-
"""Update an existing Azure Storage repository."""
|
122
|
-
command = UpdateAzureStorageRepositoryCommand(self.http_client, repository_id, request)
|
123
|
-
return command.execute()
|
124
|
-
|
125
|
-
def delete_azure_storage_repository(self, repository_id: str) -> Dict[str, Any]:
|
126
|
-
"""Delete an Azure Storage repository."""
|
127
|
-
command = DeleteAzureStorageRepositoryCommand(self.http_client, repository_id)
|
128
|
-
return command.execute()
|
129
|
-
|
130
|
-
def validate_azure_storage_repository(self, request: ValidateRepositoryRequest) -> ValidationResult:
|
131
|
-
"""Validate Azure Storage repository configuration."""
|
132
|
-
command = ValidateAzureStorageRepositoryCommand(self.http_client, request)
|
133
|
-
return command.execute()
|
134
|
-
|
135
|
-
# FTPS REPOSITORY OPERATIONS
|
136
|
-
def list_ftps_repositories(self, filter_params: Optional[RepositoryFilter] = None) -> List[FTPSRepository]:
|
137
|
-
"""List FTPS repositories with optional filtering."""
|
138
|
-
query = ListFTPSRepositoriesQuery(self.http_client, filter_params)
|
139
|
-
return query.execute()
|
140
|
-
|
141
|
-
def get_ftps_repository(self, repository_id: str) -> FTPSRepository:
|
142
|
-
"""Get a specific FTPS repository by ID."""
|
143
|
-
query = GetFTPSRepositoryQuery(self.http_client, repository_id)
|
144
|
-
return query.execute()
|
145
|
-
|
146
|
-
def create_ftps_repository(self, request: CreateFTPSRepositoryRequest) -> FTPSRepository:
|
147
|
-
"""Create a new FTPS repository."""
|
148
|
-
command = CreateFTPSRepositoryCommand(self.http_client, request)
|
149
|
-
return command.execute()
|
150
|
-
|
151
|
-
def update_ftps_repository(self, repository_id: str, request: UpdateFTPSRepositoryRequest) -> FTPSRepository:
|
152
|
-
"""Update an existing FTPS repository."""
|
153
|
-
command = UpdateFTPSRepositoryCommand(self.http_client, repository_id, request)
|
154
|
-
return command.execute()
|
155
|
-
|
156
|
-
def delete_ftps_repository(self, repository_id: str) -> Dict[str, Any]:
|
157
|
-
"""Delete an FTPS repository."""
|
158
|
-
command = DeleteFTPSRepositoryCommand(self.http_client, repository_id)
|
159
|
-
return command.execute()
|
160
|
-
|
161
|
-
def validate_ftps_repository(self, request: ValidateRepositoryRequest) -> ValidationResult:
|
162
|
-
"""Validate FTPS repository configuration."""
|
163
|
-
command = ValidateFTPSRepositoryCommand(self.http_client, request)
|
164
|
-
return command.execute()
|
165
|
-
|
166
|
-
# SFTP REPOSITORY OPERATIONS
|
167
|
-
def list_sftp_repositories(self, filter_params: Optional[RepositoryFilter] = None) -> List[SFTPRepository]:
|
168
|
-
"""List SFTP repositories with optional filtering."""
|
169
|
-
query = ListSFTPRepositoriesQuery(self.http_client, filter_params)
|
170
|
-
return query.execute()
|
171
|
-
|
172
|
-
def get_sftp_repository(self, repository_id: str) -> SFTPRepository:
|
173
|
-
"""Get a specific SFTP repository by ID."""
|
174
|
-
query = GetSFTPRepositoryQuery(self.http_client, repository_id)
|
175
|
-
return query.execute()
|
176
|
-
|
177
|
-
def create_sftp_repository(self, request: CreateSFTPRepositoryRequest) -> SFTPRepository:
|
178
|
-
"""Create a new SFTP repository."""
|
179
|
-
command = CreateSFTPRepositoryCommand(self.http_client, request)
|
180
|
-
return command.execute()
|
181
|
-
|
182
|
-
def update_sftp_repository(self, repository_id: str, request: UpdateSFTPRepositoryRequest) -> SFTPRepository:
|
183
|
-
"""Update an existing SFTP repository."""
|
184
|
-
command = UpdateSFTPRepositoryCommand(self.http_client, repository_id, request)
|
185
|
-
return command.execute()
|
186
|
-
|
187
|
-
def delete_sftp_repository(self, repository_id: str) -> Dict[str, Any]:
|
188
|
-
"""Delete an SFTP repository."""
|
189
|
-
command = DeleteSFTPRepositoryCommand(self.http_client, repository_id)
|
190
|
-
return command.execute()
|
191
|
-
|
192
|
-
# SMB REPOSITORY OPERATIONS
|
193
|
-
def list_smb_repositories(self, filter_params: Optional[RepositoryFilter] = None) -> List[SMBRepository]:
|
194
|
-
"""List SMB repositories with optional filtering."""
|
195
|
-
query = ListSMBRepositoriesQuery(self.http_client, filter_params)
|
196
|
-
return query.execute()
|
197
|
-
|
198
|
-
def get_smb_repository(self, repository_id: str) -> SMBRepository:
|
199
|
-
"""Get a specific SMB repository by ID."""
|
200
|
-
query = GetSMBRepositoryQuery(self.http_client, repository_id)
|
201
|
-
return query.execute()
|
202
|
-
|
203
|
-
def create_smb_repository(self, request: CreateSMBRepositoryRequest) -> SMBRepository:
|
204
|
-
"""Create a new SMB repository."""
|
205
|
-
command = CreateSMBRepositoryCommand(self.http_client, request)
|
206
|
-
return command.execute()
|
207
|
-
|
208
|
-
def update_smb_repository(self, repository_id: str, request: UpdateSMBRepositoryRequest) -> SMBRepository:
|
209
|
-
"""Update an existing SMB repository."""
|
210
|
-
command = UpdateSMBRepositoryCommand(self.http_client, repository_id, request)
|
211
|
-
return command.execute()
|
212
|
-
|
213
|
-
def delete_smb_repository(self, repository_id: str) -> Dict[str, Any]:
|
214
|
-
"""Delete an SMB repository."""
|
215
|
-
command = DeleteSMBRepositoryCommand(self.http_client, repository_id)
|
216
|
-
return command.execute()
|
binalyze_air/apis/users.py
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Users API for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import List, Optional, Dict, Any
|
6
|
-
|
7
|
-
from ..http_client import HTTPClient
|
8
|
-
from ..models.users import (
|
9
|
-
User, UserFilter, CreateUserRequest, UpdateUserRequest,
|
10
|
-
APIUser, CreateAPIUserRequest
|
11
|
-
)
|
12
|
-
from ..queries.users import (
|
13
|
-
ListUsersQuery, GetUserQuery
|
14
|
-
)
|
15
|
-
from ..commands.users import (
|
16
|
-
CreateUserCommand, UpdateUserCommand, DeleteUserCommand,
|
17
|
-
CreateAPIUserCommand
|
18
|
-
)
|
19
|
-
|
20
|
-
|
21
|
-
class UsersAPI:
|
22
|
-
"""Users API with CQRS pattern - separated queries and commands."""
|
23
|
-
|
24
|
-
def __init__(self, http_client: HTTPClient):
|
25
|
-
self.http_client = http_client
|
26
|
-
|
27
|
-
# USER QUERIES (Read operations)
|
28
|
-
def list(self, page_number: int = 1, page_size: int = 10,
|
29
|
-
sort_by: str = "createdAt", sort_type: str = "ASC") -> List[User]:
|
30
|
-
"""List users with pagination support."""
|
31
|
-
query = ListUsersQuery(self.http_client, page_number, page_size, sort_by, sort_type)
|
32
|
-
return query.execute()
|
33
|
-
|
34
|
-
def get(self, user_id: str) -> User:
|
35
|
-
"""Get a specific user by ID."""
|
36
|
-
query = GetUserQuery(self.http_client, user_id)
|
37
|
-
return query.execute()
|
38
|
-
|
39
|
-
# USER COMMANDS (Write operations)
|
40
|
-
def create_user(self, request: CreateUserRequest) -> User:
|
41
|
-
"""Create a new user."""
|
42
|
-
command = CreateUserCommand(self.http_client, request)
|
43
|
-
return command.execute()
|
44
|
-
|
45
|
-
def update_user(self, user_id: str, request: UpdateUserRequest) -> User:
|
46
|
-
"""Update an existing user."""
|
47
|
-
command = UpdateUserCommand(self.http_client, user_id, request)
|
48
|
-
return command.execute()
|
49
|
-
|
50
|
-
def delete_user(self, user_id: str) -> Dict[str, Any]:
|
51
|
-
"""Delete a user."""
|
52
|
-
command = DeleteUserCommand(self.http_client, user_id)
|
53
|
-
return command.execute()
|
54
|
-
|
55
|
-
# API USER OPERATIONS
|
56
|
-
def create_api_user(self, username: str, email: str, organization_ids: List[int],
|
57
|
-
profile: Optional[Dict[str, str]] = None) -> Dict[str, Any]:
|
58
|
-
"""Create a new API user for programmatic access."""
|
59
|
-
request_data = {
|
60
|
-
"username": username,
|
61
|
-
"email": email,
|
62
|
-
"organizationIds": organization_ids
|
63
|
-
}
|
64
|
-
if profile:
|
65
|
-
request_data["profile"] = profile
|
66
|
-
|
67
|
-
command = CreateAPIUserCommand(self.http_client, request_data)
|
68
|
-
return command.execute()
|
binalyze_air/commands/users.py
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Users-related commands for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import Dict, Any, Union
|
6
|
-
|
7
|
-
from ..base import Command
|
8
|
-
from ..models.users import (
|
9
|
-
User, CreateUserRequest, UpdateUserRequest,
|
10
|
-
APIUser, CreateAPIUserRequest
|
11
|
-
)
|
12
|
-
from ..http_client import HTTPClient
|
13
|
-
|
14
|
-
|
15
|
-
class CreateUserCommand(Command[User]):
|
16
|
-
"""Command to create user."""
|
17
|
-
|
18
|
-
def __init__(self, http_client: HTTPClient, request: Union[CreateUserRequest, Dict[str, Any]]):
|
19
|
-
self.http_client = http_client
|
20
|
-
self.request = request
|
21
|
-
|
22
|
-
def execute(self) -> User:
|
23
|
-
"""Execute the create user command."""
|
24
|
-
# Handle both dict and model objects
|
25
|
-
if isinstance(self.request, dict):
|
26
|
-
payload = self.request
|
27
|
-
else:
|
28
|
-
payload = self.request.model_dump(exclude_none=True)
|
29
|
-
|
30
|
-
# Use the correct endpoint path from API JSON files
|
31
|
-
response = self.http_client.post("user-management/users", json_data=payload)
|
32
|
-
|
33
|
-
if response.get("success"):
|
34
|
-
user_data = response.get("result", {})
|
35
|
-
return User(**user_data)
|
36
|
-
|
37
|
-
raise Exception(f"Failed to create user: {response.get('error', 'Unknown error')}")
|
38
|
-
|
39
|
-
|
40
|
-
class UpdateUserCommand(Command[User]):
|
41
|
-
"""Command to update user."""
|
42
|
-
|
43
|
-
def __init__(self, http_client: HTTPClient, user_id: str, request: Union[UpdateUserRequest, Dict[str, Any]]):
|
44
|
-
self.http_client = http_client
|
45
|
-
self.user_id = user_id
|
46
|
-
self.request = request
|
47
|
-
|
48
|
-
def execute(self) -> User:
|
49
|
-
"""Execute the update user command."""
|
50
|
-
# Handle both dict and model objects
|
51
|
-
if isinstance(self.request, dict):
|
52
|
-
payload = self.request
|
53
|
-
else:
|
54
|
-
payload = self.request.model_dump(exclude_none=True)
|
55
|
-
|
56
|
-
# Use the correct endpoint path from API JSON files
|
57
|
-
response = self.http_client.put(f"user-management/users/{self.user_id}", json_data=payload)
|
58
|
-
|
59
|
-
if response.get("success"):
|
60
|
-
user_data = response.get("result", {})
|
61
|
-
return User(**user_data)
|
62
|
-
|
63
|
-
raise Exception(f"Failed to update user: {response.get('error', 'Unknown error')}")
|
64
|
-
|
65
|
-
|
66
|
-
class DeleteUserCommand(Command[Dict[str, Any]]):
|
67
|
-
"""Command to delete user."""
|
68
|
-
|
69
|
-
def __init__(self, http_client: HTTPClient, user_id: str):
|
70
|
-
self.http_client = http_client
|
71
|
-
self.user_id = user_id
|
72
|
-
|
73
|
-
def execute(self) -> Dict[str, Any]:
|
74
|
-
"""Execute the delete user command."""
|
75
|
-
# Use the correct endpoint path from API JSON files
|
76
|
-
response = self.http_client.delete(f"user-management/users/{self.user_id}")
|
77
|
-
|
78
|
-
if response.get("success"):
|
79
|
-
return response
|
80
|
-
|
81
|
-
raise Exception(f"Failed to delete user: {response.get('error', 'Unknown error')}")
|
82
|
-
|
83
|
-
|
84
|
-
class CreateAPIUserCommand(Command[Dict[str, Any]]):
|
85
|
-
"""Command to create API user."""
|
86
|
-
|
87
|
-
def __init__(self, http_client: HTTPClient, request: Union[Dict[str, Any], CreateAPIUserRequest]):
|
88
|
-
self.http_client = http_client
|
89
|
-
self.request = request
|
90
|
-
|
91
|
-
def execute(self) -> Dict[str, Any]:
|
92
|
-
"""Execute the create API user command."""
|
93
|
-
# Handle both dict and model objects
|
94
|
-
if isinstance(self.request, dict):
|
95
|
-
payload = self.request
|
96
|
-
else:
|
97
|
-
payload = self.request.model_dump(exclude_none=True)
|
98
|
-
|
99
|
-
# Use the correct endpoint path from API JSON files
|
100
|
-
response = self.http_client.post("user-management/users/api-user", json_data=payload)
|
101
|
-
return response
|
binalyze_air/models/endpoints.py
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
Endpoints API models for the Binalyze AIR SDK.
|
3
|
-
"""
|
4
|
-
|
5
|
-
from typing import List, Optional, Dict, Any
|
6
|
-
from datetime import datetime
|
7
|
-
from enum import Enum
|
8
|
-
|
9
|
-
from ..base import AIRBaseModel, Filter
|
10
|
-
|
11
|
-
|
12
|
-
class TagType(str, Enum):
|
13
|
-
"""Endpoint tag types."""
|
14
|
-
SYSTEM = "system"
|
15
|
-
USER = "user"
|
16
|
-
CUSTOM = "custom"
|
17
|
-
AUTO = "auto"
|
18
|
-
|
19
|
-
|
20
|
-
class TagScope(str, Enum):
|
21
|
-
"""Tag scope."""
|
22
|
-
GLOBAL = "global"
|
23
|
-
ORGANIZATION = "organization"
|
24
|
-
GROUP = "group"
|
25
|
-
|
26
|
-
|
27
|
-
class EndpointTag(AIRBaseModel):
|
28
|
-
"""Endpoint tag model."""
|
29
|
-
|
30
|
-
id: str
|
31
|
-
name: str
|
32
|
-
description: Optional[str] = None
|
33
|
-
color: Optional[str] = None
|
34
|
-
tag_type: TagType = TagType.USER
|
35
|
-
scope: TagScope = TagScope.ORGANIZATION
|
36
|
-
organization_id: Optional[int] = None
|
37
|
-
created_by: Optional[str] = None
|
38
|
-
created_at: Optional[datetime] = None
|
39
|
-
updated_at: Optional[datetime] = None
|
40
|
-
usage_count: int = 0
|
41
|
-
is_system: bool = False
|
42
|
-
is_deletable: bool = True
|
43
|
-
metadata: Optional[Dict[str, Any]] = None
|
44
|
-
rules: Optional[Dict[str, Any]] = None # Auto-tagging rules
|
45
|
-
|
46
|
-
|
47
|
-
class CreateEndpointTagRequest(AIRBaseModel):
|
48
|
-
"""Request model for creating endpoint tags."""
|
49
|
-
|
50
|
-
name: str
|
51
|
-
description: Optional[str] = None
|
52
|
-
color: Optional[str] = None
|
53
|
-
tag_type: TagType = TagType.USER
|
54
|
-
scope: TagScope = TagScope.ORGANIZATION
|
55
|
-
organization_id: Optional[int] = None
|
56
|
-
metadata: Optional[Dict[str, Any]] = None
|
57
|
-
rules: Optional[Dict[str, Any]] = None
|
58
|
-
|
59
|
-
|
60
|
-
class UpdateEndpointTagRequest(AIRBaseModel):
|
61
|
-
"""Request model for updating endpoint tags."""
|
62
|
-
|
63
|
-
name: Optional[str] = None
|
64
|
-
description: Optional[str] = None
|
65
|
-
color: Optional[str] = None
|
66
|
-
metadata: Optional[Dict[str, Any]] = None
|
67
|
-
rules: Optional[Dict[str, Any]] = None
|
68
|
-
|
69
|
-
|
70
|
-
class EndpointTagFilter(Filter):
|
71
|
-
"""Filter for endpoint tag queries."""
|
72
|
-
|
73
|
-
name: Optional[str] = None
|
74
|
-
tag_type: Optional[TagType] = None
|
75
|
-
scope: Optional[TagScope] = None
|
76
|
-
created_by: Optional[str] = None
|