Skip to content

Commit 8f2d44d

Browse files
committed
MINOR: Add the ability to filter logs by date (#1118)
* Add the ability to filter log by date * Improve logs
1 parent 4c40207 commit 8f2d44d

20 files changed

Lines changed: 185 additions & 158 deletions

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ with bimdata_api_client.ApiClient(configuration) as api_client:
144144
projects_pk = 1 # int | A unique integer value identifying this project.
145145
topics_guid = "topics_guid_example" # str |
146146
comment_request = CommentRequest(
147-
author="author_example",
148147
modified_author="modified_author_example",
149-
reply_to_comment_guid="reply_to_comment_guid_example",
150-
comment="comment_example",
151148
date=dateutil_parser('1970-01-01T00:00:00.00Z'),
149+
reply_to_comment_guid="reply_to_comment_guid_example",
150+
author="author_example",
152151
viewpoint_guid="viewpoint_guid_example",
152+
comment="comment_example",
153153
viewpoint_temp_id=1,
154154
guid="guid_example",
155155
) # CommentRequest | (optional)

‎bimdata_api_client/api/collaboration_api.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4847,6 +4847,8 @@ def __init__(self, api_client=None):
48474847
'all': [
48484848
'cloud_pk',
48494849
'project_pk',
4850+
'date_after',
4851+
'date_before',
48504852
],
48514853
'required': [
48524854
'cloud_pk',
@@ -4869,14 +4871,22 @@ def __init__(self, api_client=None):
48694871
(int,),
48704872
'project_pk':
48714873
(int,),
4874+
'date_after':
4875+
(datetime,),
4876+
'date_before':
4877+
(datetime,),
48724878
},
48734879
'attribute_map': {
48744880
'cloud_pk': 'cloud_pk',
48754881
'project_pk': 'project_pk',
4882+
'date_after': 'date_after',
4883+
'date_before': 'date_before',
48764884
},
48774885
'location_map': {
48784886
'cloud_pk': 'path',
48794887
'project_pk': 'path',
4888+
'date_after': 'query',
4889+
'date_before': 'query',
48804890
},
48814891
'collection_format_map': {
48824892
}
@@ -10241,7 +10251,7 @@ def create_document(
1024110251
):
1024210252
"""Create a document # noqa: E501
1024310253

10244-
Create a document. If the document is one of {'OBJ', 'GLTF', 'DWG', 'IFC', 'PHOTOSPHERE', 'DXF', 'POINT_CLOUD'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
10254+
Create a document. If the document is one of {'IFC', 'POINT_CLOUD', 'OBJ', 'DXF', 'PHOTOSPHERE', 'DWG', 'GLTF'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
1024510255
This method makes a synchronous HTTP request by default. To make an
1024610256
asynchronous HTTP request, please pass async_req=True
1024710257

@@ -14506,6 +14516,8 @@ def get_logs(
1450614516
project_pk (int):
1450714517

1450814518
Keyword Args:
14519+
date_after (datetime): Filter logs by date range using `date_after` and `date_before` (ISO 8601 datetimes, both bounds inclusive).. [optional]
14520+
date_before (datetime): Filter logs by date range using `date_after` and `date_before` (ISO 8601 datetimes, both bounds inclusive).. [optional]
1450914521
_return_http_data_only (bool): response data without head status
1451014522
code and headers. Default is True.
1451114523
_preload_content (bool): if False, the urllib3.HTTPResponse object

‎bimdata_api_client/model/comment.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class Comment(ModelNormal):
5959
}
6060

6161
validations = {
62-
('author',): {
62+
('modified_author',): {
6363
'max_length': 254,
6464
},
65-
('modified_author',): {
65+
('author',): {
6666
'max_length': 254,
6767
},
6868
}
@@ -90,12 +90,12 @@ def openapi_types():
9090
return {
9191
'topic_guid': (str,), # noqa: E501
9292
'modified_date': (datetime,), # noqa: E501
93-
'author': (str, none_type,), # noqa: E501
9493
'modified_author': (str, none_type,), # noqa: E501
95-
'reply_to_comment_guid': (str, none_type,), # noqa: E501
96-
'comment': (str,), # noqa: E501
9794
'date': (datetime,), # noqa: E501
95+
'reply_to_comment_guid': (str, none_type,), # noqa: E501
96+
'author': (str, none_type,), # noqa: E501
9897
'viewpoint_guid': (str, none_type,), # noqa: E501
98+
'comment': (str,), # noqa: E501
9999
'guid': (str,), # noqa: E501
100100
}
101101

@@ -107,12 +107,12 @@ def discriminator():
107107
attribute_map = {
108108
'topic_guid': 'topic_guid', # noqa: E501
109109
'modified_date': 'modified_date', # noqa: E501
110-
'author': 'author', # noqa: E501
111110
'modified_author': 'modified_author', # noqa: E501
112-
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
113-
'comment': 'comment', # noqa: E501
114111
'date': 'date', # noqa: E501
112+
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
113+
'author': 'author', # noqa: E501
115114
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
115+
'comment': 'comment', # noqa: E501
116116
'guid': 'guid', # noqa: E501
117117
}
118118

@@ -163,12 +163,12 @@ def _from_openapi_data(cls, topic_guid, modified_date, *args, **kwargs): # noqa
163163
Animal class but this time we won't travel
164164
through its discriminator because we passed in
165165
_visited_composed_classes = (Animal,)
166-
author (str, none_type): [optional] # noqa: E501
167166
modified_author (str, none_type): [optional] # noqa: E501
168-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
169-
comment (str): [optional] # noqa: E501
170167
date (datetime): [optional] # noqa: E501
168+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
169+
author (str, none_type): [optional] # noqa: E501
171170
viewpoint_guid (str, none_type): [optional] # noqa: E501
171+
comment (str): [optional] # noqa: E501
172172
guid (str): [optional] # noqa: E501
173173
"""
174174

@@ -253,12 +253,12 @@ def __init__(self, *args, **kwargs): # noqa: E501
253253
Animal class but this time we won't travel
254254
through its discriminator because we passed in
255255
_visited_composed_classes = (Animal,)
256-
author (str, none_type): [optional] # noqa: E501
257256
modified_author (str, none_type): [optional] # noqa: E501
258-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
259-
comment (str): [optional] # noqa: E501
260257
date (datetime): [optional] # noqa: E501
258+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
259+
author (str, none_type): [optional] # noqa: E501
261260
viewpoint_guid (str, none_type): [optional] # noqa: E501
261+
comment (str): [optional] # noqa: E501
262262
guid (str): [optional] # noqa: E501
263263
"""
264264

‎bimdata_api_client/model/comment_request.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ class CommentRequest(ModelNormal):
5959
}
6060

6161
validations = {
62-
('author',): {
62+
('modified_author',): {
6363
'max_length': 254,
6464
},
65-
('modified_author',): {
65+
('author',): {
6666
'max_length': 254,
6767
},
6868
}
@@ -88,12 +88,12 @@ def openapi_types():
8888
and the value is attribute type.
8989
"""
9090
return {
91-
'author': (str, none_type,), # noqa: E501
9291
'modified_author': (str, none_type,), # noqa: E501
93-
'reply_to_comment_guid': (str, none_type,), # noqa: E501
94-
'comment': (str,), # noqa: E501
9592
'date': (datetime,), # noqa: E501
93+
'reply_to_comment_guid': (str, none_type,), # noqa: E501
94+
'author': (str, none_type,), # noqa: E501
9695
'viewpoint_guid': (str, none_type,), # noqa: E501
96+
'comment': (str,), # noqa: E501
9797
'viewpoint_temp_id': (int,), # noqa: E501
9898
'guid': (str,), # noqa: E501
9999
}
@@ -104,12 +104,12 @@ def discriminator():
104104

105105

106106
attribute_map = {
107-
'author': 'author', # noqa: E501
108107
'modified_author': 'modified_author', # noqa: E501
109-
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
110-
'comment': 'comment', # noqa: E501
111108
'date': 'date', # noqa: E501
109+
'reply_to_comment_guid': 'reply_to_comment_guid', # noqa: E501
110+
'author': 'author', # noqa: E501
112111
'viewpoint_guid': 'viewpoint_guid', # noqa: E501
112+
'comment': 'comment', # noqa: E501
113113
'viewpoint_temp_id': 'viewpoint_temp_id', # noqa: E501
114114
'guid': 'guid', # noqa: E501
115115
}
@@ -155,12 +155,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
155155
Animal class but this time we won't travel
156156
through its discriminator because we passed in
157157
_visited_composed_classes = (Animal,)
158-
author (str, none_type): [optional] # noqa: E501
159158
modified_author (str, none_type): [optional] # noqa: E501
160-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
161-
comment (str): [optional] # noqa: E501
162159
date (datetime): [optional] # noqa: E501
160+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
161+
author (str, none_type): [optional] # noqa: E501
163162
viewpoint_guid (str, none_type): [optional] # noqa: E501
163+
comment (str): [optional] # noqa: E501
164164
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
165165
guid (str): [optional] # noqa: E501
166166
"""
@@ -244,12 +244,12 @@ def __init__(self, *args, **kwargs): # noqa: E501
244244
Animal class but this time we won't travel
245245
through its discriminator because we passed in
246246
_visited_composed_classes = (Animal,)
247-
author (str, none_type): [optional] # noqa: E501
248247
modified_author (str, none_type): [optional] # noqa: E501
249-
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
250-
comment (str): [optional] # noqa: E501
251248
date (datetime): [optional] # noqa: E501
249+
reply_to_comment_guid (str, none_type): [optional] # noqa: E501
250+
author (str, none_type): [optional] # noqa: E501
252251
viewpoint_guid (str, none_type): [optional] # noqa: E501
252+
comment (str): [optional] # noqa: E501
253253
viewpoint_temp_id (int): Only used when using POST on the full-topic route to bind viewpoint with comment. [optional] # noqa: E501
254254
guid (str): [optional] # noqa: E501
255255
"""

‎bimdata_api_client/model/document_text.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'GERMAN': "german",
61+
'ENGLISH': "english",
6262
'FRENCH': "french",
6363
'ITALIAN': "italian",
64-
'ENGLISH': "english",
6564
'SPANISH': "spanish",
65+
'GERMAN': "german",
6666
'NULL': "null",
6767
},
6868
}
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
156+
language (str, none_type): * `english` - english * `french` - french * `italian` - italian * `spanish` - spanish * `german` - german. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `german` - german * `french` - french * `italian` - italian * `english` - english * `spanish` - spanish. [optional] # noqa: E501
240+
language (str, none_type): * `english` - english * `french` - french * `italian` - italian * `spanish` - spanish * `german` - german. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

‎bimdata_api_client/model/edit_folder.py‎

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ def openapi_types():
109109
"""
110110
lazy_import()
111111
return {
112-
'user_permission': (int,), # noqa: E501
113-
'nature': (str,), # noqa: E501
114112
'name': (str,), # noqa: E501
115-
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
113+
'groups_permissions': ([GroupFolderRead],), # noqa: E501
116114
'type': (str,), # noqa: E501
117-
'created_at': (datetime,), # noqa: E501
115+
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
116+
'nature': (str,), # noqa: E501
117+
'user_permission': (int,), # noqa: E501
118118
'updated_at': (datetime,), # noqa: E501
119119
'id': (int,), # noqa: E501
120-
'groups_permissions': ([GroupFolderRead],), # noqa: E501
120+
'created_at': (datetime,), # noqa: E501
121121
'conflicting_documents': ([LightDocument],), # noqa: E501
122122
'parent_id': (int, none_type,), # noqa: E501
123123
'default_permission': (int,), # noqa: E501
@@ -129,49 +129,49 @@ def discriminator():
129129

130130

131131
attribute_map = {
132-
'user_permission': 'user_permission', # noqa: E501
133-
'nature': 'nature', # noqa: E501
134132
'name': 'name', # noqa: E501
135-
'created_by': 'created_by', # noqa: E501
133+
'groups_permissions': 'groups_permissions', # noqa: E501
136134
'type': 'type', # noqa: E501
137-
'created_at': 'created_at', # noqa: E501
135+
'created_by': 'created_by', # noqa: E501
136+
'nature': 'nature', # noqa: E501
137+
'user_permission': 'user_permission', # noqa: E501
138138
'updated_at': 'updated_at', # noqa: E501
139139
'id': 'id', # noqa: E501
140-
'groups_permissions': 'groups_permissions', # noqa: E501
140+
'created_at': 'created_at', # noqa: E501
141141
'conflicting_documents': 'conflicting_documents', # noqa: E501
142142
'parent_id': 'parent_id', # noqa: E501
143143
'default_permission': 'default_permission', # noqa: E501
144144
}
145145

146146
read_only_vars = {
147-
'user_permission', # noqa: E501
148-
'nature', # noqa: E501
149-
'created_by', # noqa: E501
147+
'groups_permissions', # noqa: E501
150148
'type', # noqa: E501
151-
'created_at', # noqa: E501
149+
'created_by', # noqa: E501
150+
'nature', # noqa: E501
151+
'user_permission', # noqa: E501
152152
'updated_at', # noqa: E501
153153
'id', # noqa: E501
154-
'groups_permissions', # noqa: E501
154+
'created_at', # noqa: E501
155155
'conflicting_documents', # noqa: E501
156156
}
157157

158158
_composed_schemas = {}
159159

160160
@classmethod
161161
@convert_js_args_to_python_args
162-
def _from_openapi_data(cls, user_permission, nature, name, created_by, type, created_at, updated_at, id, groups_permissions, conflicting_documents, *args, **kwargs): # noqa: E501
162+
def _from_openapi_data(cls, name, groups_permissions, type, created_by, nature, user_permission, updated_at, id, created_at, conflicting_documents, *args, **kwargs): # noqa: E501
163163
"""EditFolder - a model defined in OpenAPI
164164
165165
Args:
166-
user_permission (int): Aggregate of group user permissions and folder default permission
167-
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
168166
name (str): Name of the folder
169-
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
167+
groups_permissions ([GroupFolderRead]): List of group permissions
170168
type (str): DEPRECATED: Use 'nature' instead. Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
171-
created_at (datetime): Creation date
169+
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
170+
nature (str): Value is \"Folder\". It is usefull to parse the tree and discriminate folders and files
171+
user_permission (int): Aggregate of group user permissions and folder default permission
172172
updated_at (datetime): Date of the last update
173173
id (int):
174-
groups_permissions ([GroupFolderRead]): List of group permissions
174+
created_at (datetime): Creation date
175175
conflicting_documents ([LightDocument]): Return document with naming conflict. This is only set when you move a folder
176176
177177
Keyword Args:
@@ -234,15 +234,15 @@ def _from_openapi_data(cls, user_permission, nature, name, created_by, type, cre
234234
self._configuration = _configuration
235235
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
236236

237-
self.user_permission = user_permission
238-
self.nature = nature
239237
self.name = name
240-
self.created_by = created_by
238+
self.groups_permissions = groups_permissions
241239
self.type = type
242-
self.created_at = created_at
240+
self.created_by = created_by
241+
self.nature = nature
242+
self.user_permission = user_permission
243243
self.updated_at = updated_at
244244
self.id = id
245-
self.groups_permissions = groups_permissions
245+
self.created_at = created_at
246246
self.conflicting_documents = conflicting_documents
247247
for var_name, var_value in kwargs.items():
248248
if var_name not in self.attribute_map and \
@@ -267,6 +267,7 @@ def _from_openapi_data(cls, user_permission, nature, name, created_by, type, cre
267267
def __init__(self, name, *args, **kwargs): # noqa: E501
268268
"""EditFolder - a model defined in OpenAPI
269269
270+
Args:
270271
name (str): Name of the folder
271272
Keyword Args:
272273
_check_type (bool): if True, values for parameters in openapi_types

0 commit comments

Comments
 (0)