tcex 4.0.11.dev6__tar.gz → 5.0.0__tar.gz

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.
Files changed (412) hide show
  1. {tcex-4.0.11.dev6/tcex.egg-info → tcex-5.0.0}/PKG-INFO +4 -3
  2. {tcex-4.0.11.dev6 → tcex-5.0.0}/README.md +1 -1
  3. {tcex-4.0.11.dev6 → tcex-5.0.0}/pyproject.toml +59 -18
  4. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/__init__.py +1 -3
  5. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/__metadata__.py +1 -1
  6. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/api.py +1 -6
  7. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/tc.py +9 -13
  8. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/__init__.py +1 -6
  9. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/model/__init__.py +0 -2
  10. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/model/transform_model.py +59 -81
  11. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/ti_predefined_functions.py +14 -20
  12. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/ti_transform.py +1 -2
  13. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/transform_abc.py +29 -26
  14. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/transform_builder/__init__.py +5 -7
  15. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/transform_builder/v2/errors.py +11 -17
  16. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/transform_builder/v2/load_transform.py +26 -8
  17. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/util/threat_intel_util.py +1 -4
  18. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/__init__.py +0 -1
  19. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/__init__.py +0 -1
  20. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/association.py +0 -1
  21. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/attribute.py +0 -2
  22. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/batch.py +0 -3
  23. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/batch_cleaner.py +0 -2
  24. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/batch_submit.py +0 -3
  25. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/batch_writer.py +2 -35
  26. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/group.py +0 -2
  27. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/indicator.py +0 -2
  28. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/security_label.py +0 -1
  29. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/batch/tag.py +0 -1
  30. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/datastore/cache.py +0 -3
  31. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/datastore/datastore.py +0 -3
  32. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/metric/metric.py +0 -3
  33. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/notification/notification.py +0 -3
  34. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group.py +0 -3
  35. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/adversary.py +0 -3
  36. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/attack_pattern.py +0 -3
  37. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/campaign.py +0 -3
  38. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/course_of_action.py +0 -3
  39. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/document.py +0 -3
  40. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/email.py +0 -3
  41. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/event.py +0 -3
  42. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/incident.py +0 -3
  43. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/intrusion_set.py +0 -3
  44. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/malware.py +0 -3
  45. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/report.py +0 -3
  46. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/signature.py +0 -3
  47. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tactic.py +0 -3
  48. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/threat.py +0 -3
  49. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/tool.py +0 -3
  50. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/vulnerability.py +0 -3
  51. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator.py +0 -3
  52. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/address.py +0 -3
  53. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/email_address.py +0 -3
  54. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/file.py +0 -3
  55. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/host.py +0 -3
  56. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/url.py +0 -3
  57. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/mapping.py +0 -4
  58. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/owner.py +0 -3
  59. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/security_label.py +0 -3
  60. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/tag.py +0 -3
  61. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/tags.py +0 -3
  62. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/task.py +0 -2
  63. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/victim.py +0 -3
  64. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/tcex_ti_tc_request.py +0 -3
  65. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/threat_intelligence.py +0 -3
  66. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/v2.py +0 -2
  67. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen.py +12 -8
  68. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen_abc.py +19 -8
  69. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen_args_abc.py +5 -6
  70. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen_filter_abc.py +92 -38
  71. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen_model_abc.py +131 -124
  72. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_gen_object_abc.py +17 -29
  73. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_options_abc.py +2 -3
  74. tcex-5.0.0/tcex/api/tc/v3/_gen/_options_data.py +394 -0
  75. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_options_data_filter.py +0 -3
  76. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/_options_data_object.py +0 -3
  77. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/model/__init__.py +0 -1
  78. tcex-5.0.0/tcex/api/tc/v3/_gen/model/_extra_model.py +31 -0
  79. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/model/_filter_model.py +12 -15
  80. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/model/_property_model.py +35 -52
  81. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/api_endpoints.py +5 -6
  82. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifact_types/artifact_type.py +0 -2
  83. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifact_types/artifact_type_filter.py +0 -2
  84. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifact_types/artifact_type_model.py +33 -34
  85. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifacts/artifact.py +1 -27
  86. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifacts/artifact_filter.py +5 -8
  87. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifacts/artifact_model.py +105 -110
  88. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attribute_types/attribute_type.py +1 -13
  89. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attribute_types/attribute_type_filter.py +0 -2
  90. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attribute_types/attribute_type_model.py +36 -37
  91. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attributes/attribute_model.py +25 -23
  92. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_attributes/case_attribute.py +1 -18
  93. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_attributes/case_attribute_filter.py +1 -4
  94. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_attributes/case_attribute_model.py +56 -59
  95. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_management/case_management.py +0 -3
  96. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/cases/case.py +1 -41
  97. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/cases/case_filter.py +7 -10
  98. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/cases/case_model.py +161 -170
  99. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/file_actions/file_action_model.py +19 -14
  100. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/file_occurrences/file_occurrence_model.py +10 -13
  101. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/filter_abc.py +0 -3
  102. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/group_attributes/group_attribute.py +1 -18
  103. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/group_attributes/group_attribute_filter.py +2 -5
  104. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/group_attributes/group_attribute_model.py +57 -65
  105. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/groups/group.py +4 -66
  106. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/groups/group_filter.py +10 -13
  107. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/groups/group_model.py +244 -261
  108. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute.py +1 -18
  109. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_filter.py +2 -5
  110. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicator_attributes/indicator_attribute_model.py +57 -65
  111. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicators/indicator.py +1 -68
  112. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicators/indicator_filter.py +10 -13
  113. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicators/indicator_model.py +255 -260
  114. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirement/ir.py +0 -2
  115. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/categories/category.py +1 -8
  116. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/categories/category_filter.py +0 -2
  117. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/categories/category_model.py +23 -24
  118. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/intel_req_type_model.py +6 -9
  119. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/intel_requirement.py +3 -35
  120. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/intel_requirement_filter.py +7 -10
  121. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/intel_requirement_model.py +108 -111
  122. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/keyword_sections/keyword_section_model.py +7 -12
  123. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/results/result.py +1 -9
  124. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/results/result_filter.py +1 -4
  125. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/results/result_model.py +66 -68
  126. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype.py +1 -8
  127. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_filter.py +0 -2
  128. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/subtypes/subtype_model.py +23 -24
  129. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/notes/note.py +1 -13
  130. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/notes/note_filter.py +3 -6
  131. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/notes/note_model.py +70 -80
  132. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/object_abc.py +3 -5
  133. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/object_collection_abc.py +3 -3
  134. tcex-5.0.0/tcex/api/tc/v3/security/assignee_model.py +66 -0
  135. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/assignee_user_group_model.py +2 -5
  136. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/assignee_user_model.py +4 -5
  137. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list.py +1 -13
  138. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_filter.py +0 -2
  139. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/exclusion_lists/exclusion_list_model.py +43 -44
  140. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owner_roles/owner_role.py +0 -2
  141. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owner_roles/owner_role_filter.py +0 -2
  142. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owner_roles/owner_role_model.py +44 -45
  143. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owners/owner.py +0 -2
  144. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owners/owner_filter.py +0 -2
  145. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owners/owner_model.py +95 -96
  146. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/security.py +8 -10
  147. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/system_roles/system_role.py +0 -2
  148. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/system_roles/system_role_filter.py +0 -2
  149. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/system_roles/system_role_model.py +32 -33
  150. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/task_assignee_model.py +19 -18
  151. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/user_groups/user_group.py +0 -2
  152. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/user_groups/user_group_filter.py +0 -2
  153. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/user_groups/user_group_model.py +28 -30
  154. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/users/user.py +0 -2
  155. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/users/user_filter.py +0 -3
  156. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/users/user_model.py +20 -21
  157. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security_labels/security_label.py +1 -10
  158. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security_labels/security_label_filter.py +3 -6
  159. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security_labels/security_label_model.py +32 -34
  160. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/mitre_tags.py +0 -3
  161. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/naics_tags.py +0 -3
  162. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/tag.py +1 -13
  163. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/tag_filter.py +4 -7
  164. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/tag_model.py +67 -75
  165. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tasks/task.py +1 -25
  166. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tasks/task_filter.py +3 -6
  167. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tasks/task_model.py +88 -98
  168. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/threat_intelligence/threat_intelligence.py +0 -3
  169. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tql/tql.py +0 -3
  170. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tql/tql_operator.py +0 -1
  171. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tql/tql_type.py +0 -1
  172. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/v3.py +0 -1
  173. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/v3_model_abc.py +14 -17
  174. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/v3_types.py +0 -2
  175. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_assets/victim_asset.py +1 -19
  176. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_assets/victim_asset_filter.py +3 -5
  177. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_assets/victim_asset_model.py +72 -68
  178. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_attributes/victim_attribute.py +1 -18
  179. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_attributes/victim_attribute_filter.py +2 -5
  180. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_attributes/victim_attribute_model.py +56 -59
  181. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victims/victim.py +1 -25
  182. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victims/victim_filter.py +7 -9
  183. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victims/victim_model.py +66 -74
  184. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_events/workflow_event.py +1 -15
  185. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_events/workflow_event_filter.py +0 -3
  186. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_events/workflow_event_model.py +60 -70
  187. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_templates/workflow_template.py +1 -10
  188. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_templates/workflow_template_filter.py +0 -2
  189. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_templates/workflow_template_model.py +54 -61
  190. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/app.py +0 -6
  191. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/app_spec_yml.py +25 -8
  192. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/install_json.py +36 -4
  193. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/install_json_update.py +0 -2
  194. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/install_json_validate.py +0 -1
  195. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/job_json.py +0 -1
  196. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/layout_json.py +20 -7
  197. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/app_spec_yml_model.py +51 -79
  198. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/install_json_model.py +75 -106
  199. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/job_json_model.py +19 -37
  200. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/layout_json_model.py +15 -38
  201. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/tcex_json_model.py +9 -22
  202. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/permutation.py +2 -3
  203. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/tcex_json.py +17 -2
  204. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/tcex_json_update.py +1 -2
  205. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/__init__.py +0 -1
  206. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/benchmark.py +6 -7
  207. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/debug.py +1 -5
  208. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/fail_on_output.py +1 -5
  209. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/on_exception.py +1 -5
  210. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/on_success.py +1 -4
  211. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/decorator/output.py +1 -4
  212. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/advanced_request.py +4 -1
  213. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/playbook_create.py +4 -5
  214. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/__init__.py +0 -1
  215. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/api_service.py +1 -3
  216. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/common_service.py +54 -18
  217. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/common_service_trigger.py +4 -6
  218. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/mqtt_message_broker.py +12 -11
  219. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/service/webhook_trigger_service.py +3 -6
  220. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/token/token.py +0 -3
  221. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/exit/__init__.py +0 -1
  222. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/exit/error_code.py +0 -2
  223. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/exit/exit.py +0 -3
  224. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/__init__.py +0 -1
  225. tcex-5.0.0/tcex/input/field_type/binary.py +84 -0
  226. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/case_management_entity.py +10 -11
  227. tcex-5.0.0/tcex/input/field_type/choice.py +78 -0
  228. tcex-5.0.0/tcex/input/field_type/datetime.py +34 -0
  229. tcex-5.0.0/tcex/input/field_type/edit_choice.py +417 -0
  230. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/exception.py +2 -2
  231. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/group_entity.py +10 -11
  232. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/indicator_entity.py +10 -11
  233. tcex-5.0.0/tcex/input/field_type/integer.py +69 -0
  234. tcex-5.0.0/tcex/input/field_type/ip_address.py +75 -0
  235. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/key_value.py +12 -30
  236. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/sensitive.py +59 -65
  237. tcex-5.0.0/tcex/input/field_type/string.py +92 -0
  238. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/tc_entity.py +8 -14
  239. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/field_type/validator.py +42 -37
  240. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/input.py +10 -22
  241. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/advanced_request_model.py +35 -22
  242. tcex-5.0.0/tcex/input/model/api_model.py +104 -0
  243. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_api_service_model.py +0 -1
  244. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_external_model.py +0 -1
  245. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_feed_api_service_model.py +0 -1
  246. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_organization_model.py +0 -1
  247. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_playbook_model.py +0 -1
  248. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_system_model.py +0 -1
  249. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_trigger_service_model.py +0 -1
  250. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/app_webhook_trigger_service_model.py +0 -1
  251. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/batch_model.py +29 -18
  252. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/cal_setting_model.py +13 -6
  253. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/cert_model.py +10 -11
  254. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/common_advanced_model.py +0 -1
  255. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/common_model.py +0 -1
  256. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/create_config_model.py +4 -10
  257. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/logging_model.py +18 -13
  258. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/model_map.py +0 -1
  259. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/module_app_model.py +2 -7
  260. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/module_requests_session_model.py +2 -7
  261. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/organization_model.py +2 -3
  262. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/path_model.py +9 -11
  263. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/playbook_common_model.py +15 -12
  264. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/playbook_model.py +7 -8
  265. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/proxy_model.py +12 -9
  266. tcex-5.0.0/tcex/input/model/service_model.py +71 -0
  267. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/smtp_setting_model.py +16 -13
  268. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/api_handler.py +1 -3
  269. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/cache_handler.py +0 -1
  270. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/logger.py +0 -3
  271. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/rotating_file_handler_custom.py +0 -1
  272. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/sensitive_filter.py +0 -1
  273. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/trace_logger.py +0 -1
  274. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/registry.py +5 -4
  275. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_external/__init__.py +0 -1
  276. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_external/external_session.py +4 -10
  277. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_external/rate_limit_handler.py +0 -3
  278. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_external/requests_external.py +0 -2
  279. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/tcex.py +0 -2
  280. {tcex-4.0.11.dev6 → tcex-5.0.0/tcex.egg-info}/PKG-INFO +4 -3
  281. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex.egg-info/SOURCES.txt +2 -0
  282. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex.egg-info/requires.txt +2 -1
  283. tcex-4.0.11.dev6/tcex/api/tc/v3/security/assignee_model.py +0 -53
  284. tcex-4.0.11.dev6/tcex/input/field_type/binary.py +0 -85
  285. tcex-4.0.11.dev6/tcex/input/field_type/choice.py +0 -48
  286. tcex-4.0.11.dev6/tcex/input/field_type/datetime.py +0 -30
  287. tcex-4.0.11.dev6/tcex/input/field_type/edit_choice.py +0 -112
  288. tcex-4.0.11.dev6/tcex/input/field_type/integer.py +0 -92
  289. tcex-4.0.11.dev6/tcex/input/field_type/ip_address.py +0 -60
  290. tcex-4.0.11.dev6/tcex/input/field_type/string.py +0 -103
  291. tcex-4.0.11.dev6/tcex/input/model/api_model.py +0 -92
  292. tcex-4.0.11.dev6/tcex/input/model/service_model.py +0 -71
  293. {tcex-4.0.11.dev6 → tcex-5.0.0}/LICENSE +0 -0
  294. {tcex-4.0.11.dev6 → tcex-5.0.0}/setup.cfg +0 -0
  295. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/__init__.py +0 -0
  296. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/__init__.py +0 -0
  297. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/ti_transform/transform_builder/v2/__init__.py +0 -0
  298. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/util/__init__.py +0 -0
  299. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/datastore/__init__.py +0 -0
  300. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/metric/__init__.py +0 -0
  301. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/notification/__init__.py +0 -0
  302. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/__init__.py +0 -0
  303. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/__init__.py +0 -0
  304. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/filters.py +0 -0
  305. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/__init__.py +0 -0
  306. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/group/group_type/__init__.py +0 -0
  307. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/__init__.py +0 -0
  308. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v2/threat_intelligence/mapping/indicator/indicator_type/__init__.py +0 -0
  309. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/__init__.py +0 -0
  310. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/_gen/__init__.py +0 -0
  311. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/adversary_assets/__init__.py +0 -0
  312. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifact_types/__init__.py +0 -0
  313. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/artifacts/__init__.py +0 -0
  314. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attribute_types/__init__.py +0 -0
  315. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/attributes/__init__.py +0 -0
  316. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_attributes/__init__.py +0 -0
  317. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/case_management/__init__.py +0 -0
  318. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/cases/__init__.py +0 -0
  319. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/file_actions/__init__.py +0 -0
  320. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/file_occurrences/__init__.py +0 -0
  321. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/group_attributes/__init__.py +0 -0
  322. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/groups/__init__.py +0 -0
  323. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicator_attributes/__init__.py +0 -0
  324. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/indicators/__init__.py +0 -0
  325. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirement/__init__.py +0 -0
  326. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/__init__.py +0 -0
  327. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/categories/__init__.py +0 -0
  328. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/keyword_sections/__init__.py +0 -0
  329. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/results/__init__.py +0 -0
  330. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/intel_requirements/subtypes/__init__.py +0 -0
  331. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/notes/__init__.py +0 -0
  332. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/__init__.py +0 -0
  333. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/exclusion_lists/__init__.py +0 -0
  334. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owner_roles/__init__.py +0 -0
  335. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/owners/__init__.py +0 -0
  336. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/system_roles/__init__.py +0 -0
  337. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/user_groups/__init__.py +0 -0
  338. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security/users/__init__.py +0 -0
  339. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/security_labels/__init__.py +0 -0
  340. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/__init__.py +0 -0
  341. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tags/default_naics_tags.py +0 -0
  342. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tasks/__init__.py +0 -0
  343. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/threat_intelligence/__init__.py +0 -0
  344. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/tql/__init__.py +0 -0
  345. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_assets/__init__.py +0 -0
  346. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victim_attributes/__init__.py +0 -0
  347. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/victims/__init__.py +0 -0
  348. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_events/__init__.py +0 -0
  349. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/api/tc/v3/workflow_templates/__init__.py +0 -0
  350. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/__init__.py +0 -0
  351. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/__init__.py +0 -0
  352. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/config/model/__init__.py +0 -0
  353. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/__init__.py +0 -0
  354. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/key_value_abc.py +0 -0
  355. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/key_value_api.py +0 -0
  356. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/key_value_mock.py +0 -0
  357. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/key_value_redis.py +0 -0
  358. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/key_value_store.py +0 -0
  359. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/redis_client.py +0 -0
  360. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/key_value_store/redis_client_ssl.py +0 -0
  361. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/__init__.py +0 -0
  362. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/playbook.py +0 -0
  363. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/playbook_delete.py +0 -0
  364. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/playbook_output.py +0 -0
  365. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/playbook/playbook_read.py +0 -0
  366. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/app/token/__init__.py +0 -0
  367. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/__init__.py +0 -0
  368. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/input/model/__init__.py +0 -0
  369. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/logger/__init__.py +0 -0
  370. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/__init__.py +0 -0
  371. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/cached_property.py +0 -0
  372. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/cached_property_filesystem.py +0 -0
  373. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/event.py +0 -0
  374. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/exception_thread.py +0 -0
  375. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_custom.py +0 -0
  376. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_array_mixin.py +0 -0
  377. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_base.py +0 -0
  378. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_control_mixin.py +0 -0
  379. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_crypto_mixin.py +0 -0
  380. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_datetime_mixin.py +0 -0
  381. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_math_mixin.py +0 -0
  382. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_object_mixin.py +0 -0
  383. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/jmespath_functions_string_mixin.py +0 -0
  384. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/none_model.py +0 -0
  385. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/proxies.py +0 -0
  386. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/scoped_property.py +0 -0
  387. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/pleb/singleton.py +0 -0
  388. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/__init__.py +0 -0
  389. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/auth/__init__.py +0 -0
  390. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/auth/hmac_auth.py +0 -0
  391. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/auth/tc_auth.py +0 -0
  392. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/auth/token_auth.py +0 -0
  393. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/requests_tc.py +0 -0
  394. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/requests_tc/tc_session.py +0 -0
  395. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/__init__.py +0 -0
  396. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/aes_operation.py +0 -0
  397. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/code_operation.py +0 -0
  398. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/datetime_operation.py +0 -0
  399. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/file_operation.py +0 -0
  400. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/model/__init__.py +0 -0
  401. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/model/playbook_variable_model.py +0 -0
  402. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/render/__init__.py +0 -0
  403. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/render/render.py +0 -0
  404. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/render/render_panel.py +0 -0
  405. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/render/render_prompt.py +0 -0
  406. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/render/render_table.py +0 -0
  407. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/requests_to_curl.py +0 -0
  408. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/string_operation.py +0 -0
  409. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/util.py +0 -0
  410. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex/util/variable.py +0 -0
  411. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex.egg-info/dependency_links.txt +0 -0
  412. {tcex-4.0.11.dev6 → tcex-5.0.0}/tcex.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tcex
3
- Version: 4.0.11.dev6
3
+ Version: 5.0.0
4
4
  Summary: ThreatConnect Exchange App Framework
5
5
  Author-email: ThreatConnect <support@threatconnect.com>
6
6
  License-Expression: Apache-2.0
@@ -27,7 +27,8 @@ Requires-Dist: isort~=8.0.1
27
27
  Requires-Dist: jmespath~=1.1.0
28
28
  Requires-Dist: paho-mqtt~=2.1.0
29
29
  Requires-Dist: pyaes~=1.6.1
30
- Requires-Dist: pydantic~=1.10.26
30
+ Requires-Dist: pydantic-core<3.0.0,>=2.10.0
31
+ Requires-Dist: pydantic<3.0.0,>=2.10.0
31
32
  Requires-Dist: python-dateutil~=2.9.0.post0
32
33
  Requires-Dist: pyyaml~=6.0.3
33
34
  Requires-Dist: redis~=8.0.0
@@ -63,9 +64,9 @@ The ThreatConnect&trade; TcEx App Framework provides functionality for writing T
63
64
 
64
65
  * bandit (https://pypi.org/project/bandit/)
65
66
  * pre-commit (https://pypi.org/project/pre-commit/)
66
- * pyright (https://pypi.org/project/pyright/)
67
67
  * pyupgrade (https://pypi.org/project/pyupgrade/)
68
68
  * ruff (https://pypi.org/project/ruff/)
69
+ * ty (https://pypi.org/project/ty/)
69
70
  * typer (https://pypi.python.org/pypi/typer/)
70
71
 
71
72
  ### Test Requirements
@@ -24,9 +24,9 @@ The ThreatConnect&trade; TcEx App Framework provides functionality for writing T
24
24
 
25
25
  * bandit (https://pypi.org/project/bandit/)
26
26
  * pre-commit (https://pypi.org/project/pre-commit/)
27
- * pyright (https://pypi.org/project/pyright/)
28
27
  * pyupgrade (https://pypi.org/project/pyupgrade/)
29
28
  * ruff (https://pypi.org/project/ruff/)
29
+ * ty (https://pypi.org/project/ty/)
30
30
  * typer (https://pypi.python.org/pypi/typer/)
31
31
 
32
32
  ### Test Requirements
@@ -1,7 +1,7 @@
1
1
  # Specify the build backend for PEP 517 builds
2
2
  [build-system]
3
3
  build-backend = "setuptools.build_meta"
4
- requires = ["setuptools>=61"]
4
+ requires = ["requests", "setuptools>=61"]
5
5
 
6
6
  # Project metadata and configuration
7
7
  [project]
@@ -31,7 +31,8 @@ dependencies = [
31
31
  "jmespath~=1.1.0",
32
32
  "paho-mqtt~=2.1.0",
33
33
  "pyaes~=1.6.1",
34
- "pydantic~=1.10.26",
34
+ "pydantic-core>=2.10.0,<3.0.0",
35
+ "pydantic>=2.10.0,<3.0.0",
35
36
  "python-dateutil~=2.9.0.post0",
36
37
  "pyyaml~=6.0.3",
37
38
  "redis~=8.0.0",
@@ -73,9 +74,10 @@ dev = [
73
74
  "pre-commit>=4.6.0",
74
75
  "pyupgrade>=3.21.2",
75
76
  "ruff>=0.15.16",
76
- "ty>=0.0.43",
77
+ "ty==0.0.51",
77
78
  "typer>=0.26.7",
78
79
  ]
80
+
79
81
  test = [
80
82
  "deepdiff>=9.1.0",
81
83
  "fakeredis>=2.36.0",
@@ -84,6 +86,7 @@ test = [
84
86
  "pytest-html>=4.2.0",
85
87
  "pytest-ordering>=0.6",
86
88
  "pytest-xdist>=3.8.0",
89
+ "python-dotenv>=1.2.1",
87
90
  ]
88
91
 
89
92
  # Dynamic configuration for setuptools
@@ -99,6 +102,24 @@ exclude = ["tests*", "local-*"]
99
102
  # Tool configurations
100
103
  #
101
104
 
105
+ [tool.uv.extra-build-dependencies]
106
+ tcex = [
107
+ "arrow>=1.3.0",
108
+ "black>=25.1.0",
109
+ "inflection>=0.5.1",
110
+ "jmespath>=1.0.1",
111
+ "paho-mqtt<2.0.0",
112
+ "pyaes>=1.6.1",
113
+ "pydantic>2.0.0",
114
+ "python-dateutil>=2.9.0.post0",
115
+ "pyyaml>=6.0.2",
116
+ "redis<5.0.0",
117
+ "requests>=2.32.3",
118
+ "rich>=13.9.4",
119
+ "semantic-version>=2.10.0",
120
+ "wrapt>=1.17.2",
121
+ ]
122
+
102
123
  # Configuration for bumpversion tool
103
124
  [tool.bumpversion]
104
125
  # Allow version bumping even if there are uncommitted changes
@@ -108,7 +129,7 @@ commit = false
108
129
  # Additional arguments to pass to the git commit command
109
130
  commit_args = "--no-verify"
110
131
  # The current version of the project
111
- current_version = "4.0.11-dev6"
132
+ current_version = "5.0.0"
112
133
  # The commit message template used when committing version bumps
113
134
  message = "Version updated from {current_version} to {new_version}"
114
135
  # Regular expression for parsing version strings
@@ -149,19 +170,6 @@ filename = "tcex/__metadata__.py"
149
170
  ignore-words-list = "ore"
150
171
  skip = "*.cspell*,*.history,*local,uv.lock,*enforce_us_spelling.sh"
151
172
 
152
- # Configuration for isort import sorter
153
- [tool.isort]
154
- dedup_headings = false
155
- import_heading_firstparty = "first-party"
156
- import_heading_stdlib = "standard library"
157
- import_heading_thirdparty = "third-party"
158
- include_trailing_comma = true
159
- known_first_party = ""
160
- known_local_folder = "."
161
- known_third_party = ""
162
- line_length = 100
163
- profile = "black"
164
-
165
173
  # Configuration for ty type checker
166
174
  # https://docs.astral.sh/ty/reference/configuration/
167
175
  [tool.ty.environment]
@@ -185,6 +193,8 @@ junit_family = "xunit2"
185
193
  testpaths = [
186
194
  "tests",
187
195
  ]
196
+ # Enable multiprocessing support for pytest
197
+ # addopts = "--numprocesses=auto --dist=loadgroup"
188
198
 
189
199
  # Configuration for ruff linter and formatter
190
200
  [tool.ruff]
@@ -197,6 +207,8 @@ exclude = [
197
207
  line-length = 100
198
208
  # set the python target
199
209
  target-version = "py311"
210
+ # define a default section for any imports that don't fit into the specified section-order.
211
+ src = ["tcex"]
200
212
 
201
213
  # Configuration for ruff formatter
202
214
  [tool.ruff.format]
@@ -240,7 +252,7 @@ ignore = [
240
252
  "PLR0915", # Too many statements
241
253
  "PT006", # Wrong name(s) type in ..., expected ...
242
254
  "TC001", # Move application import ... into a type-checking block
243
- "TC003", # Use `if TYPE_CHECKING:` for imports only used for type checking
255
+ "TC003", # Move standard library import ... into a type-checking block
244
256
  "TC006", # Checks for unquoted type expressions in typing.cast() calls.
245
257
  "TID252", # Prefer absolute imports over relative imports from parent modules
246
258
  ]
@@ -306,8 +318,37 @@ select = [
306
318
  [tool.ruff.lint.extend-per-file-ignores]
307
319
  "__init__.py" = ["F401"]
308
320
 
321
+ [tool.ruff.lint.isort]
322
+ # Define a default section for any imports that don't fit into the specified section-order.
323
+ default-section = "first-party"
324
+
325
+ # Map known_local_folder to known-local-folder
326
+ known-local-folder = ["tcex"]
327
+
328
+ # Override in which order the sections should be output. Can be used to move custom sections.
329
+ section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
330
+
331
+ # Equivalent to include_trailing_comma = true
332
+ split-on-trailing-comma = true
333
+
309
334
  # Pydocstyle configuration for ruff linter
310
335
  [tool.ruff.lint.pydocstyle]
311
336
  # https://docs.astral.sh/ruff/linter/
312
337
 
313
338
  convention = "google"
339
+
340
+ # [tool.cibuildwheel]
341
+ # # You can also put cibuildwheel config here instead of env vars
342
+ # build = "cp38-* cp39-* cp310-* cp311-* cp312-*"
343
+ # skip = "*-win32 *-manylinux_i686 *-musllinux_i686 pp*"
344
+ #
345
+ # [tool.cibuildwheel.linux]
346
+ # before-build = "pip install -U pip setuptools wheel"
347
+ # repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
348
+ #
349
+ # [tool.cibuildwheel.macos]
350
+ # before-build = "pip install -U pip setuptools wheel"
351
+ # repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
352
+ #
353
+ # [tool.cibuildwheel.windows]
354
+ # before-build = "pip install -U pip setuptools wheel"
@@ -1,10 +1,8 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
- # standard library
4
3
  import contextlib
5
4
  import logging
6
5
 
7
- # first-party
8
6
  from tcex.__metadata__ import __license__, __version__
9
7
  from tcex.logger.cache_handler import CacheHandler
10
8
  from tcex.logger.trace_logger import TraceLogger
@@ -33,6 +31,6 @@ def initialize_logger():
33
31
  # init logger before instantiating tcex
34
32
  initialize_logger()
35
33
 
34
+
36
35
  with contextlib.suppress(ImportError):
37
- # first-party
38
36
  from tcex.tcex import TcEx
@@ -1,4 +1,4 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
3
  __license__ = 'Apache-2.0'
4
- __version__ = '4.0.11-dev6'
4
+ __version__ = '5.0.0'
@@ -1,9 +1,7 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
- # third-party
4
3
  from requests import Session # TYPE-CHECKING
5
4
 
6
- # first-party
7
5
  from tcex.api.tc.tc import TC
8
6
  from tcex.input.input import Input # TYPE-CHECKING
9
7
  from tcex.pleb.cached_property import cached_property
@@ -24,8 +22,5 @@ class API:
24
22
 
25
23
  @cached_property
26
24
  def tc(self) -> TC:
27
- """Return a TC instance.
28
-
29
- TC is a top-level class for accessing the ThreatConnect API.
30
- """
25
+ """Return a case management instance."""
31
26
  return TC(self.inputs, self.session_tc)
@@ -1,15 +1,10 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
- # third-party
4
- from requests import Session # TYPE-CHECKING
3
+ from requests import Session
5
4
 
6
- # first-party
7
5
  from tcex.api.tc.ti_transform import TiTransform, TiTransforms
8
- from tcex.api.tc.ti_transform.model import (
9
- AssociationTransformModel,
10
- GroupTransformModel,
11
- IndicatorTransformModel,
12
- )
6
+ from tcex.api.tc.ti_transform.model import GroupTransformModel, IndicatorTransformModel
7
+ from tcex.api.tc.ti_transform.model.transform_model import AssociationTransformModel
13
8
  from tcex.api.tc.util.threat_intel_util import ThreatIntelUtil
14
9
  from tcex.api.tc.v2.v2 import V2
15
10
  from tcex.api.tc.v3.v3 import V3
@@ -30,6 +25,11 @@ class TC:
30
25
  self.inputs = inputs
31
26
  self.session_tc = session_tc
32
27
 
28
+ @staticmethod
29
+ def association_transform(transform: dict) -> AssociationTransformModel:
30
+ """Return a association transform model."""
31
+ return AssociationTransformModel(**transform)
32
+
33
33
  @staticmethod
34
34
  def group_transform(transform: dict) -> GroupTransformModel:
35
35
  """Return a group transform model."""
@@ -52,13 +52,9 @@ class TC:
52
52
  def ti_transforms(
53
53
  ti_dict: list[dict],
54
54
  transforms: list[AssociationTransformModel | GroupTransformModel | IndicatorTransformModel],
55
- *,
56
- separate_batch_associations: bool = False,
57
55
  ) -> TiTransforms:
58
56
  """Return an instance of TI Transforms class."""
59
- return TiTransforms(
60
- ti_dict, transforms, separate_batch_associations=separate_batch_associations
61
- )
57
+ return TiTransforms(ti_dict, transforms)
62
58
 
63
59
  @cached_property
64
60
  def utils(self) -> ThreatIntelUtil:
@@ -1,10 +1,6 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
- # first-party
4
- from tcex.api.tc.ti_transform.ti_predefined_functions import (
5
- ProcessingFunctions,
6
- transform_builder_to_model,
7
- )
3
+ from tcex.api.tc.ti_transform.ti_predefined_functions import ProcessingFunctions
8
4
  from tcex.api.tc.ti_transform.ti_transform import TiTransform, TiTransforms
9
5
  from tcex.api.tc.ti_transform.transform_abc import TransformException
10
6
 
@@ -13,5 +9,4 @@ __all__ = [
13
9
  'TiTransform',
14
10
  'TiTransforms',
15
11
  'TransformException',
16
- 'transform_builder_to_model',
17
12
  ]
@@ -1,8 +1,6 @@
1
1
  """TcEx Framework Module"""
2
2
 
3
- # first-party
4
3
  from tcex.api.tc.ti_transform.model.transform_model import (
5
- AssociationTransformModel,
6
4
  AttributeTransformModel,
7
5
  DatetimeTransformModel,
8
6
  GroupTransformModel,
@@ -1,11 +1,10 @@
1
1
  """Model Definition"""
2
2
 
3
- # standard library
4
3
  from collections.abc import Callable
4
+ from typing import Annotated, Any, TypeAlias
5
5
 
6
- # third-party
7
6
  from jmespath import compile as jmespath_compile
8
- from pydantic import BaseModel, Extra, Field, root_validator, validator
7
+ from pydantic import BaseModel, Discriminator, Field, Tag, field_validator, model_validator
9
8
 
10
9
 
11
10
  # reusable validator
@@ -16,14 +15,14 @@ def _always_array(value: list | str) -> list[str]:
16
15
  return value
17
16
 
18
17
 
19
- class PredefinedFunctionModel(BaseModel, extra=Extra.forbid):
18
+ class PredefinedFunctionModel(BaseModel, extra='forbid'):
20
19
  """Model Definitions"""
21
20
 
22
21
  name: str = Field(..., description='The name of the static method.')
23
22
  params: dict | None = Field({}, description='The parameters for the static method.')
24
23
 
25
24
 
26
- class TransformModel(BaseModel, extra=Extra.forbid):
25
+ class TransformModel(BaseModel, extra='forbid'):
27
26
  """Model Definition"""
28
27
 
29
28
  filter_map: dict | None = Field(None, description='')
@@ -32,7 +31,7 @@ class TransformModel(BaseModel, extra=Extra.forbid):
32
31
  for_each: Callable | PredefinedFunctionModel | None = Field(None, description='')
33
32
  static_map: dict | None = Field(None, description='')
34
33
 
35
- @validator('filter_map', 'static_map', pre=True)
34
+ @field_validator('filter_map', 'static_map', mode='before')
36
35
  @classmethod
37
36
  def _lower_map_keys(cls, v):
38
37
  """Validate static_map."""
@@ -41,7 +40,7 @@ class TransformModel(BaseModel, extra=Extra.forbid):
41
40
  return v
42
41
 
43
42
  # root validator that ensure at least one indicator value/summary is set
44
- @root_validator()
43
+ @model_validator(mode='before')
45
44
  @classmethod
46
45
  def _required_transform(cls, v: dict):
47
46
  """Validate either static_map or method is defined."""
@@ -58,13 +57,13 @@ class TransformModel(BaseModel, extra=Extra.forbid):
58
57
  return v
59
58
 
60
59
 
61
- class PathTransformModel(BaseModel, extra=Extra.forbid):
60
+ class PathTransformModel(BaseModel, extra='forbid'):
62
61
  """."""
63
62
 
64
- default: str | None = Field(None, description='')
63
+ default: int | str | None = Field(None, description='')
65
64
  path: str | None = Field(None, description='')
66
65
 
67
- @validator('path')
66
+ @field_validator('path')
68
67
  @classmethod
69
68
  def _validate_path(cls, v):
70
69
  """Validate path."""
@@ -77,7 +76,7 @@ class PathTransformModel(BaseModel, extra=Extra.forbid):
77
76
  return v
78
77
 
79
78
  # root validator that ensure at least one indicator value/summary is set
80
- @root_validator()
79
+ @model_validator(mode='before')
81
80
  @classmethod
82
81
  def _default_or_path(cls, values):
83
82
  """Validate either default or path is defined."""
@@ -87,22 +86,22 @@ class PathTransformModel(BaseModel, extra=Extra.forbid):
87
86
  return values
88
87
 
89
88
 
90
- class MetadataTransformModel(PathTransformModel, extra=Extra.forbid):
89
+ class MetadataTransformModel(PathTransformModel, extra='forbid'):
91
90
  """."""
92
91
 
93
92
  transform: list[TransformModel] | None = Field(None, description='')
94
93
 
95
94
  # validators
96
- _transform_array = validator('transform', allow_reuse=True, pre=True)(_always_array)
95
+ _transform_array = field_validator('transform', mode='before')(_always_array)
97
96
 
98
97
 
99
- class ValueTransformModel(BaseModel, extra=Extra.forbid):
98
+ class ValueTransformModel(BaseModel, extra='forbid'):
100
99
  """."""
101
100
 
102
101
  value: str | MetadataTransformModel
103
102
 
104
103
 
105
- class FileOccurrenceTransformModel(BaseModel, extra=Extra.forbid):
104
+ class FileOccurrenceTransformModel(BaseModel, extra='forbid'):
106
105
  """."""
107
106
 
108
107
  file_name: str | MetadataTransformModel | None = Field(None, description='')
@@ -110,22 +109,22 @@ class FileOccurrenceTransformModel(BaseModel, extra=Extra.forbid):
110
109
  date: str | MetadataTransformModel | None = Field(None, description='')
111
110
 
112
111
 
113
- class DatetimeTransformModel(PathTransformModel, extra=Extra.forbid):
112
+ class DatetimeTransformModel(PathTransformModel, extra='forbid'):
114
113
  """."""
115
114
 
116
115
 
117
- class AssociatedGroupTransform(ValueTransformModel, extra=Extra.forbid):
116
+ class AssociatedGroupTransform(ValueTransformModel, extra='forbid'):
118
117
  """."""
119
118
 
120
119
 
121
- class AssociatedIndicatorFromGroupTransform(BaseModel, extra=Extra.forbid):
120
+ class AssociatedIndicatorFromGroupTransform(BaseModel, extra='forbid'):
122
121
  """."""
123
122
 
124
123
  summary: str | MetadataTransformModel = Field(..., description='')
125
124
  indicator_type: str | MetadataTransformModel = Field(..., description='')
126
125
 
127
126
 
128
- class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra=Extra.forbid):
127
+ class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra='forbid'):
129
128
  """."""
130
129
 
131
130
  summary: str | MetadataTransformModel = Field(..., description='')
@@ -133,7 +132,7 @@ class AssociatedIndicatorFromIndicatorTransform(BaseModel, extra=Extra.forbid):
133
132
  association_type: str | MetadataTransformModel = Field(..., description='')
134
133
 
135
134
 
136
- class AttributeTransformModel(ValueTransformModel, extra=Extra.forbid):
135
+ class AttributeTransformModel(ValueTransformModel, extra='forbid'):
137
136
  """."""
138
137
 
139
138
  displayed: bool | MetadataTransformModel = Field(default=False, description='')
@@ -142,18 +141,18 @@ class AttributeTransformModel(ValueTransformModel, extra=Extra.forbid):
142
141
  pinned: bool | MetadataTransformModel = Field(default=False, description='')
143
142
 
144
143
 
145
- class SecurityLabelTransformModel(ValueTransformModel, extra=Extra.forbid):
144
+ class SecurityLabelTransformModel(ValueTransformModel, extra='forbid'):
146
145
  """."""
147
146
 
148
147
  color: MetadataTransformModel | None = Field(None, description='')
149
148
  description: MetadataTransformModel | None = Field(None, description='')
150
149
 
151
150
 
152
- class TagTransformModel(ValueTransformModel, extra=Extra.forbid):
151
+ class TagTransformModel(ValueTransformModel, extra='forbid'):
153
152
  """."""
154
153
 
155
154
 
156
- class TiTransformModel(BaseModel, extra=Extra.forbid):
155
+ class TiTransformModel(BaseModel, extra='forbid'):
157
156
  """."""
158
157
 
159
158
  applies: Callable | None = Field(None, description='')
@@ -172,7 +171,7 @@ class TiTransformModel(BaseModel, extra=Extra.forbid):
172
171
  xid: MetadataTransformModel | None = Field(None, description='')
173
172
 
174
173
 
175
- class GroupTransformModel(TiTransformModel, extra=Extra.forbid):
174
+ class GroupTransformModel(TiTransformModel, extra='forbid'):
176
175
  """."""
177
176
 
178
177
  associated_indicators: list[AssociatedIndicatorFromGroupTransform] = Field([], description='')
@@ -202,7 +201,7 @@ class GroupTransformModel(TiTransformModel, extra=Extra.forbid):
202
201
  severity: MetadataTransformModel | None = Field(None, description='')
203
202
 
204
203
 
205
- class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
204
+ class IndicatorTransformModel(TiTransformModel, extra='forbid'):
206
205
  """."""
207
206
 
208
207
  associated_indicators: list[AssociatedIndicatorFromIndicatorTransform] = Field(
@@ -223,10 +222,10 @@ class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
223
222
  active: MetadataTransformModel | None = Field(None, description='')
224
223
 
225
224
  # root validator that ensure at least one indicator value/summary is set
226
- @root_validator()
225
+ @model_validator(mode='before')
227
226
  @classmethod
228
227
  def _one_indicator_value(cls, values):
229
- """Validate that one set of credentials is provided for the TC API."""
228
+ """Validate that at least one indicator value is provided."""
230
229
 
231
230
  if not any(
232
231
  [
@@ -240,14 +239,14 @@ class IndicatorTransformModel(TiTransformModel, extra=Extra.forbid):
240
239
  return values
241
240
 
242
241
 
243
- class GroupToGroupAssociation(BaseModel, extra=Extra.forbid):
242
+ class GroupToGroupAssociation(BaseModel, extra='forbid'):
244
243
  """."""
245
244
 
246
245
  xid_1: MetadataTransformModel = Field(..., description='')
247
246
  xid_2: MetadataTransformModel = Field(..., description='')
248
247
 
249
248
 
250
- class GroupToIndicatorAssociation(BaseModel, extra=Extra.forbid):
249
+ class GroupToIndicatorAssociation(BaseModel, extra='forbid'):
251
250
  """."""
252
251
 
253
252
  xid: MetadataTransformModel = Field(..., description='')
@@ -255,7 +254,7 @@ class GroupToIndicatorAssociation(BaseModel, extra=Extra.forbid):
255
254
  indicator_type: MetadataTransformModel = Field(..., description='')
256
255
 
257
256
 
258
- class IndicatorToIndicatorAssociation(BaseModel, extra=Extra.forbid):
257
+ class IndicatorToIndicatorAssociation(BaseModel, extra='forbid'):
259
258
  """."""
260
259
 
261
260
  indicator_value_1: MetadataTransformModel = Field(..., description='')
@@ -265,58 +264,37 @@ class IndicatorToIndicatorAssociation(BaseModel, extra=Extra.forbid):
265
264
  custom_association_type: MetadataTransformModel = Field(..., description='')
266
265
 
267
266
 
267
+ def get_association_discriminator(v: Any) -> str:
268
+ """Return the association type discriminator value."""
269
+ if isinstance(v, BaseModel):
270
+ return v.__class__.__name__
271
+
272
+ if 'xid_1' in v and 'xid_2' in v:
273
+ return GroupToGroupAssociation.__name__
274
+ if 'xid' in v and 'indicator_value' in v and 'indicator_type' in v:
275
+ return GroupToIndicatorAssociation.__name__
276
+ if (
277
+ 'indicator_value_1' in v
278
+ and 'indicator_type_1' in v
279
+ and 'indicator_value_2' in v
280
+ and 'indicator_type_2' in v
281
+ and 'custom_association_type' in v
282
+ ):
283
+ return IndicatorToIndicatorAssociation.__name__
284
+ msg = f'Could not determine association type for {v}.'
285
+ raise ValueError(msg)
286
+
287
+
288
+ AssociationTypes: TypeAlias = Annotated[
289
+ Annotated[GroupToGroupAssociation, Tag(GroupToGroupAssociation.__name__)]
290
+ | Annotated[GroupToIndicatorAssociation, Tag(GroupToIndicatorAssociation.__name__)]
291
+ | Annotated[IndicatorToIndicatorAssociation, Tag(IndicatorToIndicatorAssociation.__name__)],
292
+ Discriminator(get_association_discriminator),
293
+ ]
294
+
295
+
268
296
  class AssociationTransformModel(BaseModel, extra='forbid'):
269
297
  """."""
270
298
 
271
299
  applies: Callable | None = Field(None, description='')
272
- associations: list[
273
- GroupToGroupAssociation | GroupToIndicatorAssociation | IndicatorToIndicatorAssociation
274
- ] = Field(default_factory=list, description='')
275
-
276
- # root validator to handle union of types in associations list
277
- @root_validator(pre=True)
278
- @classmethod
279
- def _one_indicator_value(cls, values):
280
- """Validate that one set of credentials is provided for the TC API."""
281
- association_types = {
282
- GroupToGroupAssociation,
283
- GroupToIndicatorAssociation,
284
- IndicatorToIndicatorAssociation,
285
- }
286
- if associations := values.get('associations'):
287
- validated_associations = []
288
- for association in associations:
289
- match association:
290
- case (
291
- GroupToGroupAssociation()
292
- | GroupToIndicatorAssociation()
293
- | IndicatorToIndicatorAssociation()
294
- ):
295
- validated_associations.append(association)
296
- case dict():
297
- for association_type in association_types:
298
- try:
299
- validated_association = association_type(**association)
300
- validated_associations.append(validated_association)
301
- break
302
- except Exception:
303
- continue # nosec
304
- else:
305
- ex_msg = (
306
- 'Association must be one of the following types: '
307
- f'{association_types}.'
308
- )
309
- raise ValueError(ex_msg)
310
-
311
- case _:
312
- ex_msg = (
313
- f'Association must be one of the following types: {association_types}.'
314
- )
315
- raise ValueError(ex_msg)
316
-
317
- values['associations'] = validated_associations
318
-
319
- else:
320
- ex_msg = 'At least one association must be defined.'
321
- raise ValueError(ex_msg)
322
- return values
300
+ associations: list[AssociationTypes] = Field(default_factory=list, description='')