mergepythonclient 2.3.2__py3-none-any.whl → 2.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. merge/__init__.py +3 -1
  2. merge/client.py +49 -30
  3. merge/core/client_wrapper.py +2 -2
  4. merge/resources/__init__.py +3 -2
  5. merge/resources/knowledgebase/__init__.py +472 -0
  6. merge/resources/knowledgebase/client.py +480 -0
  7. merge/resources/knowledgebase/raw_client.py +13 -0
  8. merge/resources/knowledgebase/resources/__init__.py +128 -0
  9. merge/resources/knowledgebase/resources/account_details/__init__.py +4 -0
  10. merge/resources/knowledgebase/resources/account_details/client.py +102 -0
  11. merge/resources/knowledgebase/resources/account_details/raw_client.py +91 -0
  12. merge/resources/knowledgebase/resources/account_token/__init__.py +4 -0
  13. merge/resources/knowledgebase/resources/account_token/client.py +112 -0
  14. merge/resources/knowledgebase/resources/account_token/raw_client.py +98 -0
  15. merge/resources/knowledgebase/resources/articles/__init__.py +35 -0
  16. merge/resources/knowledgebase/resources/articles/client.py +378 -0
  17. merge/resources/knowledgebase/resources/articles/raw_client.py +363 -0
  18. merge/resources/knowledgebase/resources/articles/types/__init__.py +36 -0
  19. merge/resources/knowledgebase/resources/articles/types/articles_list_request_expand.py +625 -0
  20. merge/resources/knowledgebase/resources/articles/types/articles_retrieve_request_expand.py +631 -0
  21. merge/resources/knowledgebase/resources/async_passthrough/__init__.py +32 -0
  22. merge/resources/knowledgebase/resources/async_passthrough/client.py +201 -0
  23. merge/resources/knowledgebase/resources/async_passthrough/raw_client.py +189 -0
  24. merge/resources/knowledgebase/resources/async_passthrough/types/__init__.py +32 -0
  25. merge/resources/knowledgebase/resources/async_passthrough/types/async_passthrough_retrieve_response.py +7 -0
  26. merge/resources/knowledgebase/resources/attachments/__init__.py +4 -0
  27. merge/resources/knowledgebase/resources/attachments/client.py +326 -0
  28. merge/resources/knowledgebase/resources/attachments/raw_client.py +311 -0
  29. merge/resources/knowledgebase/resources/audit_trail/__init__.py +4 -0
  30. merge/resources/knowledgebase/resources/audit_trail/client.py +178 -0
  31. merge/resources/knowledgebase/resources/audit_trail/raw_client.py +161 -0
  32. merge/resources/knowledgebase/resources/available_actions/__init__.py +4 -0
  33. merge/resources/knowledgebase/resources/available_actions/client.py +102 -0
  34. merge/resources/knowledgebase/resources/available_actions/raw_client.py +91 -0
  35. merge/resources/knowledgebase/resources/containers/__init__.py +35 -0
  36. merge/resources/knowledgebase/resources/containers/client.py +378 -0
  37. merge/resources/knowledgebase/resources/containers/raw_client.py +363 -0
  38. merge/resources/knowledgebase/resources/containers/types/__init__.py +36 -0
  39. merge/resources/knowledgebase/resources/containers/types/containers_list_request_expand.py +41 -0
  40. merge/resources/knowledgebase/resources/containers/types/containers_retrieve_request_expand.py +41 -0
  41. merge/resources/knowledgebase/resources/delete_account/__init__.py +4 -0
  42. merge/resources/knowledgebase/resources/delete_account/client.py +99 -0
  43. merge/resources/knowledgebase/resources/delete_account/raw_client.py +71 -0
  44. merge/resources/knowledgebase/resources/field_mapping/__init__.py +4 -0
  45. merge/resources/knowledgebase/resources/field_mapping/client.py +652 -0
  46. merge/resources/knowledgebase/resources/field_mapping/raw_client.py +672 -0
  47. merge/resources/knowledgebase/resources/force_resync/__init__.py +4 -0
  48. merge/resources/knowledgebase/resources/force_resync/client.py +106 -0
  49. merge/resources/knowledgebase/resources/force_resync/raw_client.py +93 -0
  50. merge/resources/knowledgebase/resources/generate_key/__init__.py +4 -0
  51. merge/resources/knowledgebase/resources/generate_key/client.py +115 -0
  52. merge/resources/knowledgebase/resources/generate_key/raw_client.py +114 -0
  53. merge/resources/knowledgebase/resources/groups/__init__.py +32 -0
  54. merge/resources/knowledgebase/resources/groups/client.py +348 -0
  55. merge/resources/knowledgebase/resources/groups/raw_client.py +333 -0
  56. merge/resources/knowledgebase/resources/groups/types/__init__.py +36 -0
  57. merge/resources/knowledgebase/resources/groups/types/groups_list_request_expand.py +25 -0
  58. merge/resources/knowledgebase/resources/groups/types/groups_retrieve_request_expand.py +25 -0
  59. merge/resources/knowledgebase/resources/issues/__init__.py +32 -0
  60. merge/resources/knowledgebase/resources/issues/client.py +331 -0
  61. merge/resources/knowledgebase/resources/issues/raw_client.py +336 -0
  62. merge/resources/knowledgebase/resources/issues/types/__init__.py +32 -0
  63. merge/resources/knowledgebase/resources/issues/types/issues_list_request_status.py +17 -0
  64. merge/resources/knowledgebase/resources/link_token/__init__.py +32 -0
  65. merge/resources/knowledgebase/resources/link_token/client.py +273 -0
  66. merge/resources/knowledgebase/resources/link_token/raw_client.py +256 -0
  67. merge/resources/knowledgebase/resources/link_token/types/__init__.py +32 -0
  68. merge/resources/knowledgebase/resources/link_token/types/end_user_details_request_language.py +7 -0
  69. merge/resources/knowledgebase/resources/linked_accounts/__init__.py +32 -0
  70. merge/resources/knowledgebase/resources/linked_accounts/client.py +265 -0
  71. merge/resources/knowledgebase/resources/linked_accounts/raw_client.py +248 -0
  72. merge/resources/knowledgebase/resources/linked_accounts/types/__init__.py +34 -0
  73. merge/resources/knowledgebase/resources/linked_accounts/types/linked_accounts_list_request_category.py +45 -0
  74. merge/resources/knowledgebase/resources/passthrough/__init__.py +4 -0
  75. merge/resources/knowledgebase/resources/passthrough/client.py +126 -0
  76. merge/resources/knowledgebase/resources/passthrough/raw_client.py +111 -0
  77. merge/resources/knowledgebase/resources/regenerate_key/__init__.py +4 -0
  78. merge/resources/knowledgebase/resources/regenerate_key/client.py +115 -0
  79. merge/resources/knowledgebase/resources/regenerate_key/raw_client.py +114 -0
  80. merge/resources/knowledgebase/resources/scopes/__init__.py +4 -0
  81. merge/resources/knowledgebase/resources/scopes/client.py +320 -0
  82. merge/resources/knowledgebase/resources/scopes/raw_client.py +267 -0
  83. merge/resources/knowledgebase/resources/sync_status/__init__.py +4 -0
  84. merge/resources/knowledgebase/resources/sync_status/client.py +130 -0
  85. merge/resources/knowledgebase/resources/sync_status/raw_client.py +121 -0
  86. merge/resources/knowledgebase/resources/users/__init__.py +4 -0
  87. merge/resources/knowledgebase/resources/users/client.py +326 -0
  88. merge/resources/knowledgebase/resources/users/raw_client.py +311 -0
  89. merge/resources/knowledgebase/resources/webhook_receivers/__init__.py +4 -0
  90. merge/resources/knowledgebase/resources/webhook_receivers/client.py +201 -0
  91. merge/resources/knowledgebase/resources/webhook_receivers/raw_client.py +208 -0
  92. merge/resources/knowledgebase/types/__init__.py +374 -0
  93. merge/resources/knowledgebase/types/account_details.py +40 -0
  94. merge/resources/knowledgebase/types/account_details_and_actions.py +54 -0
  95. merge/resources/knowledgebase/types/account_details_and_actions_category.py +7 -0
  96. merge/resources/knowledgebase/types/account_details_and_actions_integration.py +29 -0
  97. merge/resources/knowledgebase/types/account_details_and_actions_status.py +7 -0
  98. merge/resources/knowledgebase/types/account_details_and_actions_status_enum.py +36 -0
  99. merge/resources/knowledgebase/types/account_details_category.py +7 -0
  100. merge/resources/knowledgebase/types/account_integration.py +67 -0
  101. merge/resources/knowledgebase/types/account_token.py +23 -0
  102. merge/resources/knowledgebase/types/advanced_metadata.py +25 -0
  103. merge/resources/knowledgebase/types/article.py +159 -0
  104. merge/resources/knowledgebase/types/article_attachments_item.py +7 -0
  105. merge/resources/knowledgebase/types/article_author.py +7 -0
  106. merge/resources/knowledgebase/types/article_last_edited_by.py +7 -0
  107. merge/resources/knowledgebase/types/article_parent_article.py +9 -0
  108. merge/resources/knowledgebase/types/article_parent_container.py +7 -0
  109. merge/resources/knowledgebase/types/article_permissions_item.py +7 -0
  110. merge/resources/knowledgebase/types/article_root_container.py +7 -0
  111. merge/resources/knowledgebase/types/article_status.py +7 -0
  112. merge/resources/knowledgebase/types/article_type.py +7 -0
  113. merge/resources/knowledgebase/types/article_type_enum.py +31 -0
  114. merge/resources/knowledgebase/types/article_visibility.py +7 -0
  115. merge/resources/knowledgebase/types/async_passthrough_reciept.py +20 -0
  116. merge/resources/knowledgebase/types/attachment.py +67 -0
  117. merge/resources/knowledgebase/types/audit_log_event.py +97 -0
  118. merge/resources/knowledgebase/types/audit_log_event_event_type.py +7 -0
  119. merge/resources/knowledgebase/types/audit_log_event_role.py +7 -0
  120. merge/resources/knowledgebase/types/available_actions.py +33 -0
  121. merge/resources/knowledgebase/types/categories_enum.py +56 -0
  122. merge/resources/knowledgebase/types/category_enum.py +56 -0
  123. merge/resources/knowledgebase/types/common_model_scope_api.py +24 -0
  124. merge/resources/knowledgebase/types/common_model_scopes_body_request.py +23 -0
  125. merge/resources/knowledgebase/types/completed_account_initial_screen_enum.py +5 -0
  126. merge/resources/knowledgebase/types/container.py +130 -0
  127. merge/resources/knowledgebase/types/container_permissions_item.py +7 -0
  128. merge/resources/knowledgebase/types/container_status.py +7 -0
  129. merge/resources/knowledgebase/types/container_type.py +7 -0
  130. merge/resources/knowledgebase/types/container_type_enum.py +46 -0
  131. merge/resources/knowledgebase/types/container_visibility.py +7 -0
  132. merge/resources/knowledgebase/types/data_passthrough_request.py +62 -0
  133. merge/resources/knowledgebase/types/data_passthrough_request_method.py +7 -0
  134. merge/resources/knowledgebase/types/data_passthrough_request_request_format.py +7 -0
  135. merge/resources/knowledgebase/types/debug_mode_log.py +23 -0
  136. merge/resources/knowledgebase/types/debug_model_log_summary.py +22 -0
  137. merge/resources/knowledgebase/types/enabled_actions_enum.py +22 -0
  138. merge/resources/knowledgebase/types/encoding_enum.py +31 -0
  139. merge/resources/knowledgebase/types/error_validation_problem.py +24 -0
  140. merge/resources/knowledgebase/types/event_type_enum.py +231 -0
  141. merge/resources/knowledgebase/types/external_target_field_api.py +22 -0
  142. merge/resources/knowledgebase/types/external_target_field_api_response.py +25 -0
  143. merge/resources/knowledgebase/types/field_mapping_api_instance.py +26 -0
  144. merge/resources/knowledgebase/types/field_mapping_api_instance_remote_field.py +27 -0
  145. merge/resources/knowledgebase/types/field_mapping_api_instance_remote_field_remote_endpoint_info.py +22 -0
  146. merge/resources/knowledgebase/types/field_mapping_api_instance_response.py +25 -0
  147. merge/resources/knowledgebase/types/field_mapping_api_instance_target_field.py +22 -0
  148. merge/resources/knowledgebase/types/field_mapping_instance_response.py +27 -0
  149. merge/resources/knowledgebase/types/field_permission_deserializer.py +21 -0
  150. merge/resources/knowledgebase/types/field_permission_deserializer_request.py +21 -0
  151. merge/resources/knowledgebase/types/group.py +71 -0
  152. merge/resources/knowledgebase/types/group_parent_group.py +9 -0
  153. merge/resources/knowledgebase/types/group_users_item.py +7 -0
  154. merge/resources/knowledgebase/types/individual_common_model_scope_deserializer.py +24 -0
  155. merge/resources/knowledgebase/types/individual_common_model_scope_deserializer_request.py +24 -0
  156. merge/resources/knowledgebase/types/issue.py +36 -0
  157. merge/resources/knowledgebase/types/issue_status.py +7 -0
  158. merge/resources/knowledgebase/types/issue_status_enum.py +22 -0
  159. merge/resources/knowledgebase/types/language_enum.py +22 -0
  160. merge/resources/knowledgebase/types/last_sync_result_enum.py +46 -0
  161. merge/resources/knowledgebase/types/link_token.py +22 -0
  162. merge/resources/knowledgebase/types/method_enum.py +51 -0
  163. merge/resources/knowledgebase/types/model_operation.py +32 -0
  164. merge/resources/knowledgebase/types/model_permission_deserializer.py +20 -0
  165. merge/resources/knowledgebase/types/model_permission_deserializer_request.py +20 -0
  166. merge/resources/knowledgebase/types/multipart_form_field_request.py +57 -0
  167. merge/resources/knowledgebase/types/multipart_form_field_request_encoding.py +7 -0
  168. merge/resources/knowledgebase/types/paginated_account_details_and_actions_list.py +23 -0
  169. merge/resources/knowledgebase/types/paginated_article_list.py +30 -0
  170. merge/resources/knowledgebase/types/paginated_attachment_list.py +23 -0
  171. merge/resources/knowledgebase/types/paginated_audit_log_event_list.py +23 -0
  172. merge/resources/knowledgebase/types/paginated_container_list.py +30 -0
  173. merge/resources/knowledgebase/types/paginated_group_list.py +29 -0
  174. merge/resources/knowledgebase/types/paginated_issue_list.py +23 -0
  175. merge/resources/knowledgebase/types/paginated_sync_status_list.py +23 -0
  176. merge/resources/knowledgebase/types/paginated_user_list.py +23 -0
  177. merge/resources/knowledgebase/types/permission.py +77 -0
  178. merge/resources/knowledgebase/types/permission_group.py +7 -0
  179. merge/resources/knowledgebase/types/permission_type.py +7 -0
  180. merge/resources/knowledgebase/types/permission_type_enum.py +36 -0
  181. merge/resources/knowledgebase/types/permission_user.py +7 -0
  182. merge/resources/knowledgebase/types/remote_data.py +34 -0
  183. merge/resources/knowledgebase/types/remote_endpoint_info.py +22 -0
  184. merge/resources/knowledgebase/types/remote_field_api.py +28 -0
  185. merge/resources/knowledgebase/types/remote_field_api_advanced_metadata.py +7 -0
  186. merge/resources/knowledgebase/types/remote_field_api_coverage.py +5 -0
  187. merge/resources/knowledgebase/types/remote_field_api_response.py +25 -0
  188. merge/resources/knowledgebase/types/remote_key.py +30 -0
  189. merge/resources/knowledgebase/types/remote_response.py +36 -0
  190. merge/resources/knowledgebase/types/remote_response_response_type.py +7 -0
  191. merge/resources/knowledgebase/types/request_format_enum.py +31 -0
  192. merge/resources/knowledgebase/types/response_type_enum.py +22 -0
  193. merge/resources/knowledgebase/types/role_enum.py +46 -0
  194. merge/resources/knowledgebase/types/roles_enum.py +31 -0
  195. merge/resources/knowledgebase/types/selective_sync_configurations_usage_enum.py +24 -0
  196. merge/resources/knowledgebase/types/status_3_c_6_enum.py +36 -0
  197. merge/resources/knowledgebase/types/status_fd_5_enum.py +46 -0
  198. merge/resources/knowledgebase/types/sync_status.py +41 -0
  199. merge/resources/knowledgebase/types/sync_status_last_sync_result.py +7 -0
  200. merge/resources/knowledgebase/types/sync_status_status.py +7 -0
  201. merge/resources/knowledgebase/types/user.py +60 -0
  202. merge/resources/knowledgebase/types/validation_problem_source.py +20 -0
  203. merge/resources/knowledgebase/types/visibility_enum.py +31 -0
  204. merge/resources/knowledgebase/types/warning_validation_problem.py +24 -0
  205. merge/resources/knowledgebase/types/webhook_receiver.py +22 -0
  206. {mergepythonclient-2.3.2.dist-info → mergepythonclient-2.4.0.dist-info}/METADATA +2 -1
  207. {mergepythonclient-2.3.2.dist-info → mergepythonclient-2.4.0.dist-info}/RECORD +209 -8
  208. {mergepythonclient-2.3.2.dist-info → mergepythonclient-2.4.0.dist-info}/LICENSE.md +0 -0
  209. {mergepythonclient-2.3.2.dist-info → mergepythonclient-2.4.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,178 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from .....core.request_options import RequestOptions
7
+ from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
8
+ from .raw_client import AsyncRawAuditTrailClient, RawAuditTrailClient
9
+
10
+
11
+ class AuditTrailClient:
12
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
13
+ self._raw_client = RawAuditTrailClient(client_wrapper=client_wrapper)
14
+
15
+ @property
16
+ def with_raw_response(self) -> RawAuditTrailClient:
17
+ """
18
+ Retrieves a raw implementation of this client that returns raw responses.
19
+
20
+ Returns
21
+ -------
22
+ RawAuditTrailClient
23
+ """
24
+ return self._raw_client
25
+
26
+ def list(
27
+ self,
28
+ *,
29
+ cursor: typing.Optional[str] = None,
30
+ end_date: typing.Optional[str] = None,
31
+ event_type: typing.Optional[str] = None,
32
+ page_size: typing.Optional[int] = None,
33
+ start_date: typing.Optional[str] = None,
34
+ user_email: typing.Optional[str] = None,
35
+ request_options: typing.Optional[RequestOptions] = None,
36
+ ) -> PaginatedAuditLogEventList:
37
+ """
38
+ Gets a list of audit trail events.
39
+
40
+ Parameters
41
+ ----------
42
+ cursor : typing.Optional[str]
43
+ The pagination cursor value.
44
+
45
+ end_date : typing.Optional[str]
46
+ If included, will only include audit trail events that occurred before this time
47
+
48
+ event_type : typing.Optional[str]
49
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
50
+
51
+ page_size : typing.Optional[int]
52
+ Number of results to return per page.
53
+
54
+ start_date : typing.Optional[str]
55
+ If included, will only include audit trail events that occurred after this time
56
+
57
+ user_email : typing.Optional[str]
58
+ If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
59
+
60
+ request_options : typing.Optional[RequestOptions]
61
+ Request-specific configuration.
62
+
63
+ Returns
64
+ -------
65
+ PaginatedAuditLogEventList
66
+
67
+
68
+ Examples
69
+ --------
70
+ from merge import Merge
71
+
72
+ client = Merge(
73
+ account_token="YOUR_ACCOUNT_TOKEN",
74
+ api_key="YOUR_API_KEY",
75
+ )
76
+ client.knowledgebase.audit_trail.list(
77
+ cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
78
+ )
79
+ """
80
+ _response = self._raw_client.list(
81
+ cursor=cursor,
82
+ end_date=end_date,
83
+ event_type=event_type,
84
+ page_size=page_size,
85
+ start_date=start_date,
86
+ user_email=user_email,
87
+ request_options=request_options,
88
+ )
89
+ return _response.data
90
+
91
+
92
+ class AsyncAuditTrailClient:
93
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
94
+ self._raw_client = AsyncRawAuditTrailClient(client_wrapper=client_wrapper)
95
+
96
+ @property
97
+ def with_raw_response(self) -> AsyncRawAuditTrailClient:
98
+ """
99
+ Retrieves a raw implementation of this client that returns raw responses.
100
+
101
+ Returns
102
+ -------
103
+ AsyncRawAuditTrailClient
104
+ """
105
+ return self._raw_client
106
+
107
+ async def list(
108
+ self,
109
+ *,
110
+ cursor: typing.Optional[str] = None,
111
+ end_date: typing.Optional[str] = None,
112
+ event_type: typing.Optional[str] = None,
113
+ page_size: typing.Optional[int] = None,
114
+ start_date: typing.Optional[str] = None,
115
+ user_email: typing.Optional[str] = None,
116
+ request_options: typing.Optional[RequestOptions] = None,
117
+ ) -> PaginatedAuditLogEventList:
118
+ """
119
+ Gets a list of audit trail events.
120
+
121
+ Parameters
122
+ ----------
123
+ cursor : typing.Optional[str]
124
+ The pagination cursor value.
125
+
126
+ end_date : typing.Optional[str]
127
+ If included, will only include audit trail events that occurred before this time
128
+
129
+ event_type : typing.Optional[str]
130
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
131
+
132
+ page_size : typing.Optional[int]
133
+ Number of results to return per page.
134
+
135
+ start_date : typing.Optional[str]
136
+ If included, will only include audit trail events that occurred after this time
137
+
138
+ user_email : typing.Optional[str]
139
+ If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
140
+
141
+ request_options : typing.Optional[RequestOptions]
142
+ Request-specific configuration.
143
+
144
+ Returns
145
+ -------
146
+ PaginatedAuditLogEventList
147
+
148
+
149
+ Examples
150
+ --------
151
+ import asyncio
152
+
153
+ from merge import AsyncMerge
154
+
155
+ client = AsyncMerge(
156
+ account_token="YOUR_ACCOUNT_TOKEN",
157
+ api_key="YOUR_API_KEY",
158
+ )
159
+
160
+
161
+ async def main() -> None:
162
+ await client.knowledgebase.audit_trail.list(
163
+ cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
164
+ )
165
+
166
+
167
+ asyncio.run(main())
168
+ """
169
+ _response = await self._raw_client.list(
170
+ cursor=cursor,
171
+ end_date=end_date,
172
+ event_type=event_type,
173
+ page_size=page_size,
174
+ start_date=start_date,
175
+ user_email=user_email,
176
+ request_options=request_options,
177
+ )
178
+ return _response.data
@@ -0,0 +1,161 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from .....core.api_error import ApiError
7
+ from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from .....core.http_response import AsyncHttpResponse, HttpResponse
9
+ from .....core.request_options import RequestOptions
10
+ from .....core.unchecked_base_model import construct_type
11
+ from ...types.paginated_audit_log_event_list import PaginatedAuditLogEventList
12
+
13
+
14
+ class RawAuditTrailClient:
15
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
16
+ self._client_wrapper = client_wrapper
17
+
18
+ def list(
19
+ self,
20
+ *,
21
+ cursor: typing.Optional[str] = None,
22
+ end_date: typing.Optional[str] = None,
23
+ event_type: typing.Optional[str] = None,
24
+ page_size: typing.Optional[int] = None,
25
+ start_date: typing.Optional[str] = None,
26
+ user_email: typing.Optional[str] = None,
27
+ request_options: typing.Optional[RequestOptions] = None,
28
+ ) -> HttpResponse[PaginatedAuditLogEventList]:
29
+ """
30
+ Gets a list of audit trail events.
31
+
32
+ Parameters
33
+ ----------
34
+ cursor : typing.Optional[str]
35
+ The pagination cursor value.
36
+
37
+ end_date : typing.Optional[str]
38
+ If included, will only include audit trail events that occurred before this time
39
+
40
+ event_type : typing.Optional[str]
41
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
42
+
43
+ page_size : typing.Optional[int]
44
+ Number of results to return per page.
45
+
46
+ start_date : typing.Optional[str]
47
+ If included, will only include audit trail events that occurred after this time
48
+
49
+ user_email : typing.Optional[str]
50
+ If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
51
+
52
+ request_options : typing.Optional[RequestOptions]
53
+ Request-specific configuration.
54
+
55
+ Returns
56
+ -------
57
+ HttpResponse[PaginatedAuditLogEventList]
58
+
59
+ """
60
+ _response = self._client_wrapper.httpx_client.request(
61
+ "knowledgebase/v1/audit-trail",
62
+ method="GET",
63
+ params={
64
+ "cursor": cursor,
65
+ "end_date": end_date,
66
+ "event_type": event_type,
67
+ "page_size": page_size,
68
+ "start_date": start_date,
69
+ "user_email": user_email,
70
+ },
71
+ request_options=request_options,
72
+ )
73
+ try:
74
+ if 200 <= _response.status_code < 300:
75
+ _data = typing.cast(
76
+ PaginatedAuditLogEventList,
77
+ construct_type(
78
+ type_=PaginatedAuditLogEventList, # type: ignore
79
+ object_=_response.json(),
80
+ ),
81
+ )
82
+ return HttpResponse(response=_response, data=_data)
83
+ _response_json = _response.json()
84
+ except JSONDecodeError:
85
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
86
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
87
+
88
+
89
+ class AsyncRawAuditTrailClient:
90
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
91
+ self._client_wrapper = client_wrapper
92
+
93
+ async def list(
94
+ self,
95
+ *,
96
+ cursor: typing.Optional[str] = None,
97
+ end_date: typing.Optional[str] = None,
98
+ event_type: typing.Optional[str] = None,
99
+ page_size: typing.Optional[int] = None,
100
+ start_date: typing.Optional[str] = None,
101
+ user_email: typing.Optional[str] = None,
102
+ request_options: typing.Optional[RequestOptions] = None,
103
+ ) -> AsyncHttpResponse[PaginatedAuditLogEventList]:
104
+ """
105
+ Gets a list of audit trail events.
106
+
107
+ Parameters
108
+ ----------
109
+ cursor : typing.Optional[str]
110
+ The pagination cursor value.
111
+
112
+ end_date : typing.Optional[str]
113
+ If included, will only include audit trail events that occurred before this time
114
+
115
+ event_type : typing.Optional[str]
116
+ If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
117
+
118
+ page_size : typing.Optional[int]
119
+ Number of results to return per page.
120
+
121
+ start_date : typing.Optional[str]
122
+ If included, will only include audit trail events that occurred after this time
123
+
124
+ user_email : typing.Optional[str]
125
+ If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email.
126
+
127
+ request_options : typing.Optional[RequestOptions]
128
+ Request-specific configuration.
129
+
130
+ Returns
131
+ -------
132
+ AsyncHttpResponse[PaginatedAuditLogEventList]
133
+
134
+ """
135
+ _response = await self._client_wrapper.httpx_client.request(
136
+ "knowledgebase/v1/audit-trail",
137
+ method="GET",
138
+ params={
139
+ "cursor": cursor,
140
+ "end_date": end_date,
141
+ "event_type": event_type,
142
+ "page_size": page_size,
143
+ "start_date": start_date,
144
+ "user_email": user_email,
145
+ },
146
+ request_options=request_options,
147
+ )
148
+ try:
149
+ if 200 <= _response.status_code < 300:
150
+ _data = typing.cast(
151
+ PaginatedAuditLogEventList,
152
+ construct_type(
153
+ type_=PaginatedAuditLogEventList, # type: ignore
154
+ object_=_response.json(),
155
+ ),
156
+ )
157
+ return AsyncHttpResponse(response=_response, data=_data)
158
+ _response_json = _response.json()
159
+ except JSONDecodeError:
160
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
161
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
@@ -0,0 +1,102 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from .....core.request_options import RequestOptions
7
+ from ...types.available_actions import AvailableActions
8
+ from .raw_client import AsyncRawAvailableActionsClient, RawAvailableActionsClient
9
+
10
+
11
+ class AvailableActionsClient:
12
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
13
+ self._raw_client = RawAvailableActionsClient(client_wrapper=client_wrapper)
14
+
15
+ @property
16
+ def with_raw_response(self) -> RawAvailableActionsClient:
17
+ """
18
+ Retrieves a raw implementation of this client that returns raw responses.
19
+
20
+ Returns
21
+ -------
22
+ RawAvailableActionsClient
23
+ """
24
+ return self._raw_client
25
+
26
+ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvailableActions:
27
+ """
28
+ Returns a list of models and actions available for an account.
29
+
30
+ Parameters
31
+ ----------
32
+ request_options : typing.Optional[RequestOptions]
33
+ Request-specific configuration.
34
+
35
+ Returns
36
+ -------
37
+ AvailableActions
38
+
39
+
40
+ Examples
41
+ --------
42
+ from merge import Merge
43
+
44
+ client = Merge(
45
+ account_token="YOUR_ACCOUNT_TOKEN",
46
+ api_key="YOUR_API_KEY",
47
+ )
48
+ client.knowledgebase.available_actions.retrieve()
49
+ """
50
+ _response = self._raw_client.retrieve(request_options=request_options)
51
+ return _response.data
52
+
53
+
54
+ class AsyncAvailableActionsClient:
55
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
56
+ self._raw_client = AsyncRawAvailableActionsClient(client_wrapper=client_wrapper)
57
+
58
+ @property
59
+ def with_raw_response(self) -> AsyncRawAvailableActionsClient:
60
+ """
61
+ Retrieves a raw implementation of this client that returns raw responses.
62
+
63
+ Returns
64
+ -------
65
+ AsyncRawAvailableActionsClient
66
+ """
67
+ return self._raw_client
68
+
69
+ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> AvailableActions:
70
+ """
71
+ Returns a list of models and actions available for an account.
72
+
73
+ Parameters
74
+ ----------
75
+ request_options : typing.Optional[RequestOptions]
76
+ Request-specific configuration.
77
+
78
+ Returns
79
+ -------
80
+ AvailableActions
81
+
82
+
83
+ Examples
84
+ --------
85
+ import asyncio
86
+
87
+ from merge import AsyncMerge
88
+
89
+ client = AsyncMerge(
90
+ account_token="YOUR_ACCOUNT_TOKEN",
91
+ api_key="YOUR_API_KEY",
92
+ )
93
+
94
+
95
+ async def main() -> None:
96
+ await client.knowledgebase.available_actions.retrieve()
97
+
98
+
99
+ asyncio.run(main())
100
+ """
101
+ _response = await self._raw_client.retrieve(request_options=request_options)
102
+ return _response.data
@@ -0,0 +1,91 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from .....core.api_error import ApiError
7
+ from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from .....core.http_response import AsyncHttpResponse, HttpResponse
9
+ from .....core.request_options import RequestOptions
10
+ from .....core.unchecked_base_model import construct_type
11
+ from ...types.available_actions import AvailableActions
12
+
13
+
14
+ class RawAvailableActionsClient:
15
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
16
+ self._client_wrapper = client_wrapper
17
+
18
+ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AvailableActions]:
19
+ """
20
+ Returns a list of models and actions available for an account.
21
+
22
+ Parameters
23
+ ----------
24
+ request_options : typing.Optional[RequestOptions]
25
+ Request-specific configuration.
26
+
27
+ Returns
28
+ -------
29
+ HttpResponse[AvailableActions]
30
+
31
+ """
32
+ _response = self._client_wrapper.httpx_client.request(
33
+ "knowledgebase/v1/available-actions",
34
+ method="GET",
35
+ request_options=request_options,
36
+ )
37
+ try:
38
+ if 200 <= _response.status_code < 300:
39
+ _data = typing.cast(
40
+ AvailableActions,
41
+ construct_type(
42
+ type_=AvailableActions, # type: ignore
43
+ object_=_response.json(),
44
+ ),
45
+ )
46
+ return HttpResponse(response=_response, data=_data)
47
+ _response_json = _response.json()
48
+ except JSONDecodeError:
49
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
50
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
51
+
52
+
53
+ class AsyncRawAvailableActionsClient:
54
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
55
+ self._client_wrapper = client_wrapper
56
+
57
+ async def retrieve(
58
+ self, *, request_options: typing.Optional[RequestOptions] = None
59
+ ) -> AsyncHttpResponse[AvailableActions]:
60
+ """
61
+ Returns a list of models and actions available for an account.
62
+
63
+ Parameters
64
+ ----------
65
+ request_options : typing.Optional[RequestOptions]
66
+ Request-specific configuration.
67
+
68
+ Returns
69
+ -------
70
+ AsyncHttpResponse[AvailableActions]
71
+
72
+ """
73
+ _response = await self._client_wrapper.httpx_client.request(
74
+ "knowledgebase/v1/available-actions",
75
+ method="GET",
76
+ request_options=request_options,
77
+ )
78
+ try:
79
+ if 200 <= _response.status_code < 300:
80
+ _data = typing.cast(
81
+ AvailableActions,
82
+ construct_type(
83
+ type_=AvailableActions, # type: ignore
84
+ object_=_response.json(),
85
+ ),
86
+ )
87
+ return AsyncHttpResponse(response=_response, data=_data)
88
+ _response_json = _response.json()
89
+ except JSONDecodeError:
90
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
91
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -0,0 +1,35 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .types import ContainersListRequestExpand, ContainersRetrieveRequestExpand
10
+ _dynamic_imports: typing.Dict[str, str] = {
11
+ "ContainersListRequestExpand": ".types",
12
+ "ContainersRetrieveRequestExpand": ".types",
13
+ }
14
+
15
+
16
+ def __getattr__(attr_name: str) -> typing.Any:
17
+ module_name = _dynamic_imports.get(attr_name)
18
+ if module_name is None:
19
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
20
+ try:
21
+ module = import_module(module_name, __package__)
22
+ result = getattr(module, attr_name)
23
+ return result
24
+ except ImportError as e:
25
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
26
+ except AttributeError as e:
27
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
28
+
29
+
30
+ def __dir__():
31
+ lazy_attrs = list(_dynamic_imports.keys())
32
+ return sorted(lazy_attrs)
33
+
34
+
35
+ __all__ = ["ContainersListRequestExpand", "ContainersRetrieveRequestExpand"]