diff --git a/.codegen.json b/.codegen.json index d05c50a..d8f561e 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "3d3d072", "specHash": "d50ab5f", "version": "0.6.2" } +{ "engineHash": "88dd8b0", "specHash": "d50ab5f", "version": "0.6.2" } diff --git a/box_sdk_gen/internal/base_object.py b/box_sdk_gen/internal/base_object.py index 20ef273..f903465 100644 --- a/box_sdk_gen/internal/base_object.py +++ b/box_sdk_gen/internal/base_object.py @@ -1,3 +1,4 @@ +from datetime import datetime, date from enum import EnumMeta, Enum from typing import get_args, get_origin, Union, Optional @@ -35,6 +36,10 @@ def to_dict(self) -> dict: value = v.to_dict() elif isinstance(v, Enum): value = v.value + elif isinstance(v, date): + value = v.isoformat() + elif isinstance(v, datetime): + value = v.isoformat().replace('+00:00', 'Z') else: value = v result_dict[self._fields_to_json_mapping.get(k, k)] = value @@ -60,6 +65,10 @@ def _deserialize(cls, key, value, annotation=None): return cls._deserialize_union(key, value, annotation) elif isinstance(annotation, EnumMeta): return cls._deserialize_enum(key, value, annotation) + elif annotation == datetime: + return cls._deserialize_datetime(key, value, annotation) + elif annotation == date: + return cls._deserialize_date(key, value, annotation) else: return cls._deserialize_nested_type(key, value, annotation) @@ -104,6 +113,20 @@ def _deserialize_enum(cls, key, value, annotation): except Exception: return value + @classmethod + def _deserialize_datetime(cls, key, value, annotation): + try: + return datetime.fromisoformat(value.replace('Z', '+00:00')) + except Exception: + return value + + @classmethod + def _deserialize_date(cls, key, value, annotation): + try: + return date.fromisoformat(value) + except Exception: + return value + @classmethod def _deserialize_nested_type(cls, key, value, annotation): try: diff --git a/box_sdk_gen/internal/utils.py b/box_sdk_gen/internal/utils.py index 3e1aaf1..47d2315 100644 --- a/box_sdk_gen/internal/utils.py +++ b/box_sdk_gen/internal/utils.py @@ -1,4 +1,5 @@ import base64 +import datetime import hashlib import os import uuid @@ -276,3 +277,23 @@ def create_jwt_assertion(claims: dict, key: JwtKey, options: JwtSignOptions) -> algorithm=options.algorithm, headers={'kid': options.keyid}, ) + + +Date = datetime.date +DateTime = datetime.datetime + + +def date_to_string(date: Date) -> str: + return date.isoformat() + + +def date_from_string(date: str) -> Date: + return Date.fromisoformat(date) + + +def date_time_to_string(date_time: DateTime) -> str: + return date_time.isoformat().replace('+00:00', 'Z') + + +def date_time_from_string(date_time: str) -> DateTime: + return DateTime.fromisoformat(date_time.replace('Z', '+00:00')) diff --git a/box_sdk_gen/managers/events.py b/box_sdk_gen/managers/events.py index 234bd0b..7dedf77 100644 --- a/box_sdk_gen/managers/events.py +++ b/box_sdk_gen/managers/events.py @@ -26,6 +26,8 @@ from box_sdk_gen.internal.utils import ByteStream +from box_sdk_gen.internal.utils import DateTime + from box_sdk_gen.serialization.json.json_data import sd_to_json from box_sdk_gen.networking.fetch import FetchOptions @@ -194,8 +196,8 @@ def get_events( stream_position: Optional[str] = None, limit: Optional[int] = None, event_type: Optional[List[GetEventsEventType]] = None, - created_after: Optional[str] = None, - created_before: Optional[str] = None, + created_after: Optional[DateTime] = None, + created_before: Optional[DateTime] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> Events: """ @@ -263,11 +265,11 @@ def get_events( :param created_after: The lower bound date and time to return events for. This can only be used when requesting the events with a `stream_type` of `admin_logs`. For any other `stream_type` this value will be ignored., defaults to None - :type created_after: Optional[str], optional + :type created_after: Optional[DateTime], optional :param created_before: The upper bound date and time to return events for. This can only be used when requesting the events with a `stream_type` of `admin_logs`. For any other `stream_type` this value will be ignored., defaults to None - :type created_before: Optional[str], optional + :type created_before: Optional[DateTime], optional :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None :type extra_headers: Optional[Dict[str, Optional[str]]], optional """ diff --git a/box_sdk_gen/managers/file_requests.py b/box_sdk_gen/managers/file_requests.py index cf3733b..c0aa261 100644 --- a/box_sdk_gen/managers/file_requests.py +++ b/box_sdk_gen/managers/file_requests.py @@ -12,6 +12,8 @@ from box_sdk_gen.serialization.json.serializer import serialize +from box_sdk_gen.internal.utils import DateTime + from box_sdk_gen.schemas import FileRequest from box_sdk_gen.schemas import ClientError @@ -139,7 +141,7 @@ def update_file_request_by_id( status: Optional[UpdateFileRequestByIdStatus] = None, is_email_required: Optional[bool] = None, is_description_required: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, if_match: Optional[str] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> FileRequest: @@ -199,7 +201,7 @@ def update_file_request_by_id( `inactive`. This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param if_match: Ensures this item hasn't recently changed before making changes. @@ -295,7 +297,7 @@ def create_file_request_copy( status: Optional[CreateFileRequestCopyStatus] = None, is_email_required: Optional[bool] = None, is_description_required: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> FileRequest: """ @@ -356,7 +358,7 @@ def create_file_request_copy( `inactive`. This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param extra_headers: Extra headers that will be included in the HTTP request., defaults to None :type extra_headers: Optional[Dict[str, Optional[str]]], optional """ diff --git a/box_sdk_gen/managers/files.py b/box_sdk_gen/managers/files.py index 377dfc2..bf59441 100644 --- a/box_sdk_gen/managers/files.py +++ b/box_sdk_gen/managers/files.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class UpdateFileByIdParent(BaseObject): def __init__(self, *, id: Optional[str] = None, **kwargs): @@ -74,7 +76,7 @@ def __init__( access: Optional[UpdateFileByIdSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateFileByIdSharedLinkPermissionsField] = None, **kwargs ): @@ -108,7 +110,7 @@ def __init__( :param unshared_at: The timestamp at which this shared link will expire. This field can only be set by users with paid accounts., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access @@ -127,7 +129,7 @@ def __init__( self, *, access: Optional[UpdateFileByIdLockAccessField] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, is_download_prevented: Optional[bool] = None, **kwargs ): @@ -135,7 +137,7 @@ def __init__( :param access: The type of this object., defaults to None :type access: Optional[UpdateFileByIdLockAccessField], optional :param expires_at: Defines the time at which the lock expires., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param is_download_prevented: Defines if the file can be downloaded while it is locked., defaults to None :type is_download_prevented: Optional[bool], optional """ @@ -326,7 +328,7 @@ def update_file_by_id( parent: Optional[UpdateFileByIdParent] = None, shared_link: Optional[UpdateFileByIdSharedLink] = None, lock: Optional[UpdateFileByIdLock] = None, - disposition_at: Optional[str] = None, + disposition_at: Optional[DateTime] = None, permissions: Optional[UpdateFileByIdPermissions] = None, collections: Optional[List[UpdateFileByIdCollections]] = None, tags: Optional[List[str]] = None, @@ -364,7 +366,7 @@ def update_file_by_id( :type lock: Optional[UpdateFileByIdLock], optional :param disposition_at: The retention expiration timestamp for the given file. This date cannot be shortened once set on a file., defaults to None - :type disposition_at: Optional[str], optional + :type disposition_at: Optional[DateTime], optional :param permissions: Defines who can download a file., defaults to None :type permissions: Optional[UpdateFileByIdPermissions], optional :param collections: An array of collections to make this file diff --git a/box_sdk_gen/managers/folders.py b/box_sdk_gen/managers/folders.py index 5a7b30b..c0988c8 100644 --- a/box_sdk_gen/managers/folders.py +++ b/box_sdk_gen/managers/folders.py @@ -40,6 +40,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class GetFolderByIdSort(str, Enum): ID = 'id' @@ -94,7 +96,7 @@ def __init__( access: Optional[UpdateFolderByIdSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateFolderByIdSharedLinkPermissionsField] = None, **kwargs ): @@ -128,7 +130,7 @@ def __init__( :param unshared_at: The timestamp at which this shared link will expire. This field can only be set by users with paid accounts., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access diff --git a/box_sdk_gen/managers/legal_hold_policies.py b/box_sdk_gen/managers/legal_hold_policies.py index d0c2055..8635276 100644 --- a/box_sdk_gen/managers/legal_hold_policies.py +++ b/box_sdk_gen/managers/legal_hold_policies.py @@ -36,6 +36,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class LegalHoldPoliciesManager: def __init__( @@ -115,8 +117,8 @@ def create_legal_hold_policy( policy_name: str, *, description: Optional[str] = None, - filter_started_at: Optional[str] = None, - filter_ended_at: Optional[str] = None, + filter_started_at: Optional[DateTime] = None, + filter_ended_at: Optional[DateTime] = None, is_ongoing: Optional[bool] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> LegalHoldPolicy: @@ -135,7 +137,7 @@ def create_legal_hold_policy( files, will ignore the date filter. Required if `is_ongoing` is set to `false`., defaults to None - :type filter_started_at: Optional[str], optional + :type filter_started_at: Optional[DateTime], optional :param filter_ended_at: The filter end date. When this policy is applied using a `custodian` legal @@ -145,7 +147,7 @@ def create_legal_hold_policy( files, will ignore the date filter. Required if `is_ongoing` is set to `false`., defaults to None - :type filter_ended_at: Optional[str], optional + :type filter_ended_at: Optional[DateTime], optional :param is_ongoing: Whether new assignments under this policy should continue applying to files even after initialization. diff --git a/box_sdk_gen/managers/shared_links_files.py b/box_sdk_gen/managers/shared_links_files.py index 604758a..583e342 100644 --- a/box_sdk_gen/managers/shared_links_files.py +++ b/box_sdk_gen/managers/shared_links_files.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class AddShareLinkToFileSharedLinkAccessField(str, Enum): OPEN = 'open' @@ -83,7 +85,7 @@ def __init__( access: Optional[AddShareLinkToFileSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToFileSharedLinkPermissionsField] = None, **kwargs ): @@ -119,7 +121,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access @@ -173,7 +175,7 @@ def __init__( access: Optional[UpdateSharedLinkOnFileSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[UpdateSharedLinkOnFileSharedLinkPermissionsField] = None, **kwargs ): @@ -209,7 +211,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access diff --git a/box_sdk_gen/managers/shared_links_folders.py b/box_sdk_gen/managers/shared_links_folders.py index 3645695..2c8fa92 100644 --- a/box_sdk_gen/managers/shared_links_folders.py +++ b/box_sdk_gen/managers/shared_links_folders.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class AddShareLinkToFolderSharedLinkAccessField(str, Enum): OPEN = 'open' @@ -80,7 +82,7 @@ def __init__( access: Optional[AddShareLinkToFolderSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToFolderSharedLinkPermissionsField] = None, **kwargs ): @@ -116,7 +118,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access @@ -167,7 +169,7 @@ def __init__( access: Optional[UpdateSharedLinkOnFolderSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[ UpdateSharedLinkOnFolderSharedLinkPermissionsField ] = None, @@ -205,7 +207,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access diff --git a/box_sdk_gen/managers/shared_links_web_links.py b/box_sdk_gen/managers/shared_links_web_links.py index 44aaa18..c676c9b 100644 --- a/box_sdk_gen/managers/shared_links_web_links.py +++ b/box_sdk_gen/managers/shared_links_web_links.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class AddShareLinkToWebLinkSharedLinkAccessField(str, Enum): OPEN = 'open' @@ -79,7 +81,7 @@ def __init__( access: Optional[AddShareLinkToWebLinkSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[AddShareLinkToWebLinkSharedLinkPermissionsField] = None, **kwargs ): @@ -115,7 +117,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access @@ -165,7 +167,7 @@ def __init__( access: Optional[UpdateSharedLinkOnWebLinkSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[ UpdateSharedLinkOnWebLinkSharedLinkPermissionsField ] = None, @@ -203,7 +205,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access diff --git a/box_sdk_gen/managers/tasks.py b/box_sdk_gen/managers/tasks.py index 504dd26..39150e6 100644 --- a/box_sdk_gen/managers/tasks.py +++ b/box_sdk_gen/managers/tasks.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class CreateTaskItemTypeField(str, Enum): FILE = 'file' @@ -144,7 +146,7 @@ def create_task( *, action: Optional[CreateTaskAction] = None, message: Optional[str] = None, - due_at: Optional[str] = None, + due_at: Optional[DateTime] = None, completion_rule: Optional[CreateTaskCompletionRule] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> Task: @@ -165,7 +167,7 @@ def create_task( :type message: Optional[str], optional :param due_at: Defines when the task is due. Defaults to `null` if not provided., defaults to None - :type due_at: Optional[str], optional + :type due_at: Optional[DateTime], optional :param completion_rule: Defines which assignees need to complete this task before the task is considered completed. @@ -235,7 +237,7 @@ def update_task_by_id( *, action: Optional[UpdateTaskByIdAction] = None, message: Optional[str] = None, - due_at: Optional[str] = None, + due_at: Optional[DateTime] = None, completion_rule: Optional[UpdateTaskByIdCompletionRule] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> Task: @@ -256,7 +258,7 @@ def update_task_by_id( :param message: The message included with the task., defaults to None :type message: Optional[str], optional :param due_at: When the task is due at., defaults to None - :type due_at: Optional[str], optional + :type due_at: Optional[DateTime], optional :param completion_rule: Defines which assignees need to complete this task before the task is considered completed. diff --git a/box_sdk_gen/managers/uploads.py b/box_sdk_gen/managers/uploads.py index a3d8ec1..3686088 100644 --- a/box_sdk_gen/managers/uploads.py +++ b/box_sdk_gen/managers/uploads.py @@ -30,6 +30,8 @@ from box_sdk_gen.internal.utils import ByteStream +from box_sdk_gen.internal.utils import DateTime + from box_sdk_gen.serialization.json.json_data import sd_to_json from box_sdk_gen.networking.fetch import FetchOptions @@ -45,7 +47,7 @@ class UploadFileVersionAttributes(BaseObject): def __init__( - self, name: str, *, content_modified_at: Optional[str] = None, **kwargs + self, name: str, *, content_modified_at: Optional[DateTime] = None, **kwargs ): """ :param name: An optional new name for the file. If specified, the file @@ -54,7 +56,7 @@ def __init__( :param content_modified_at: Defines the time the file was last modified at. If not set, the upload time will be used., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.name = name @@ -78,8 +80,8 @@ def __init__( name: str, parent: UploadFileAttributesParentField, *, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -90,11 +92,11 @@ def __init__( :param content_created_at: Defines the time the file was originally created at. If not set, the upload time will be used., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: Defines the time the file was last modified at. If not set, the upload time will be used., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.name = name diff --git a/box_sdk_gen/managers/user_collaborations.py b/box_sdk_gen/managers/user_collaborations.py index fae91ff..021316d 100644 --- a/box_sdk_gen/managers/user_collaborations.py +++ b/box_sdk_gen/managers/user_collaborations.py @@ -38,6 +38,8 @@ from box_sdk_gen.serialization.json.json_data import SerializedData +from box_sdk_gen.internal.utils import DateTime + class UpdateCollaborationByIdRole(str, Enum): EDITOR = 'editor' @@ -194,7 +196,7 @@ def update_collaboration_by_id( role: UpdateCollaborationByIdRole, *, status: Optional[UpdateCollaborationByIdStatus] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, can_view_path: Optional[bool] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None ) -> Collaboration: @@ -228,7 +230,7 @@ def update_collaboration_by_id( Additionally, a collaboration can only be given an expiration if it was created after the **Automatically remove invited collaborator** setting was enabled., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param can_view_path: Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not @@ -318,7 +320,7 @@ def create_collaboration( *, is_access_only: Optional[bool] = None, can_view_path: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, fields: Optional[List[str]] = None, notify: Optional[bool] = None, extra_headers: Optional[Dict[str, Optional[str]]] = None @@ -390,7 +392,7 @@ def create_collaboration( of the **Admin Console**. When the setting is not enabled, collaborations can not have an expiry date and a value for this field will be result in an error., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param fields: A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. diff --git a/box_sdk_gen/managers/web_links.py b/box_sdk_gen/managers/web_links.py index b6570be..cb0009e 100644 --- a/box_sdk_gen/managers/web_links.py +++ b/box_sdk_gen/managers/web_links.py @@ -36,6 +36,8 @@ from box_sdk_gen.serialization.json.json_data import sd_to_json +from box_sdk_gen.internal.utils import DateTime + class CreateWebLinkParent(BaseObject): def __init__(self, id: str, **kwargs): @@ -70,7 +72,7 @@ def __init__( access: Optional[UpdateWebLinkByIdSharedLinkAccessField] = None, password: Optional[str] = None, vanity_name: Optional[str] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, **kwargs ): """ @@ -105,7 +107,7 @@ def __init__( expire. This field can only be set by users with paid accounts. The value must be greater than the current date and time., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.access = access diff --git a/box_sdk_gen/schemas.py b/box_sdk_gen/schemas.py index 684193b..68d1daf 100644 --- a/box_sdk_gen/schemas.py +++ b/box_sdk_gen/schemas.py @@ -10,6 +10,10 @@ from typing import Union +from box_sdk_gen.internal.utils import DateTime + +from box_sdk_gen.internal.utils import Date + class PostOAuth2TokenGrantTypeField(str, Enum): AUTHORIZATION_CODE = 'authorization_code' @@ -379,7 +383,7 @@ def __init__( status: Optional[FileRequestUpdateRequestStatusField] = None, is_email_required: Optional[bool] = None, is_description_required: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, **kwargs ): """ @@ -425,7 +429,7 @@ def __init__( `inactive`. This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.title = title @@ -472,7 +476,7 @@ def __init__( status: Optional[FileRequestUpdateRequestStatusField] = None, is_email_required: Optional[bool] = None, is_description_required: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, **kwargs ): """ @@ -520,7 +524,7 @@ def __init__( `inactive`. This will default to the value on the existing file request., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional """ super().__init__( title=title, @@ -995,7 +999,7 @@ def __init__( domain: Optional[str] = None, direction: Optional[CollaborationAllowlistEntryDirectionField] = None, enterprise: Optional[CollaborationAllowlistEntryEnterpriseField] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, **kwargs ): """ @@ -1008,7 +1012,7 @@ def __init__( :param direction: The direction of the collaborations to allow., defaults to None :type direction: Optional[CollaborationAllowlistEntryDirectionField], optional :param created_at: The time the entry was created at, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -1803,8 +1807,8 @@ def __init__( id: str, type: GroupBaseTypeField, *, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, name: Optional[str] = None, group_type: Optional[GroupMiniGroupTypeField] = None, **kwargs @@ -1815,9 +1819,9 @@ def __init__( :param type: `group` :type type: GroupBaseTypeField :param created_at: When the group object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the group object was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param name: The name of the group, defaults to None :type name: Optional[str], optional :param group_type: The type of the group., defaults to None @@ -1862,8 +1866,8 @@ def __init__( invitability_level: Optional[GroupFullInvitabilityLevelField] = None, member_viewability_level: Optional[GroupFullMemberViewabilityLevelField] = None, permissions: Optional[GroupFullPermissionsField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, name: Optional[str] = None, group_type: Optional[GroupMiniGroupTypeField] = None, **kwargs @@ -1912,9 +1916,9 @@ def __init__( enterprise, defaults to None :type member_viewability_level: Optional[GroupFullMemberViewabilityLevelField], optional :param created_at: When the group object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the group object was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param name: The name of the group, defaults to None :type name: Optional[str], optional :param group_type: The type of the group., defaults to None @@ -2746,8 +2750,8 @@ def __init__( type: Optional[FileVersionRetentionTypeField] = None, file_version: Optional[FileVersionMini] = None, file: Optional[FileMini] = None, - applied_at: Optional[str] = None, - disposition_at: Optional[str] = None, + applied_at: Optional[DateTime] = None, + disposition_at: Optional[DateTime] = None, winning_retention_policy: Optional[RetentionPolicyMini] = None, **kwargs ): @@ -2758,10 +2762,10 @@ def __init__( :type type: Optional[FileVersionRetentionTypeField], optional :param applied_at: When this file version retention object was created, defaults to None - :type applied_at: Optional[str], optional + :type applied_at: Optional[DateTime], optional :param disposition_at: When the retention expires on this file version retention, defaults to None - :type disposition_at: Optional[str], optional + :type disposition_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -3250,8 +3254,8 @@ def __init__( enterprise: Optional[TermsOfServiceEnterpriseField] = None, tos_type: Optional[TermsOfServiceTosTypeField] = None, text: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -3267,9 +3271,9 @@ def __init__( empty if the `status` is set to `disabled`., defaults to None :type text: Optional[str], optional :param created_at: When the legal item was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the legal item was modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(id=id, type=type, **kwargs) self.status = status @@ -3482,7 +3486,7 @@ def __init__( *, id: Optional[str] = None, type: Optional[UploadSessionTypeField] = None, - session_expires_at: Optional[str] = None, + session_expires_at: Optional[DateTime] = None, part_size: Optional[int] = None, total_parts: Optional[int] = None, num_parts_processed: Optional[int] = None, @@ -3495,7 +3499,7 @@ def __init__( :param type: `upload_session`, defaults to None :type type: Optional[UploadSessionTypeField], optional :param session_expires_at: The date and time when this session expires., defaults to None - :type session_expires_at: Optional[str], optional + :type session_expires_at: Optional[DateTime], optional :param part_size: The size in bytes that must be used for all parts of of the upload. @@ -3755,8 +3759,8 @@ def __init__( id: str, type: UserBaseTypeField, *, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, language: Optional[str] = None, timezone: Optional[str] = None, space_amount: Optional[int] = None, @@ -3778,9 +3782,9 @@ def __init__( :param type: `user` :type type: UserBaseTypeField :param created_at: When the user object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the user object was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param language: The language of the user, formatted in modified version of the [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional @@ -3866,8 +3870,8 @@ def __init__( url: Optional[str] = None, parent: Optional[FolderMini] = None, description: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, trashed_at: Optional[str] = None, purged_at: Optional[str] = None, created_by: Optional[UserMini] = None, @@ -3893,10 +3897,10 @@ def __init__( visible within the Box web application., defaults to None :type description: Optional[str], optional :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When this file was last updated on the Box servers., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: The time at which this bookmark was put in the trash - becomes `null` after restore., defaults to None :type trashed_at: Optional[str], optional @@ -3967,8 +3971,8 @@ def __init__( type: Optional[TrashFolderRestoredTypeField] = None, sequence_id: Optional[str] = None, name: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, description: Optional[str] = None, size: Optional[int] = None, path_collection: Optional[TrashFolderRestoredPathCollectionField] = None, @@ -3976,8 +3980,8 @@ def __init__( modified_by: Optional[UserMini] = None, trashed_at: Optional[str] = None, purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, owned_by: Optional[UserMini] = None, shared_link: Optional[str] = None, folder_upload_email: Optional[str] = None, @@ -4005,11 +4009,11 @@ def __init__( :param created_at: The date and time when the folder was created. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the folder was last updated. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param size: The folder size in bytes. Be careful parsing this integer as its @@ -4023,9 +4027,9 @@ def __init__( :type purged_at: Optional[str], optional :param content_created_at: The date and time at which this folder was originally created., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param shared_link: The shared link for this file. This will be `null` if a folder had been trashed, even though the original shared link does become active again., defaults to None @@ -4108,8 +4112,8 @@ def __init__( description: str, size: int, path_collection: TrashFileRestoredPathCollectionField, - created_at: str, - modified_at: str, + created_at: DateTime, + modified_at: DateTime, modified_by: UserMini, owned_by: UserMini, item_status: TrashFileRestoredItemStatusField, @@ -4119,8 +4123,8 @@ def __init__( file_version: Optional[FileVersionMini] = None, trashed_at: Optional[str] = None, purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, shared_link: Optional[str] = None, parent: Optional[FolderMini] = None, @@ -4146,9 +4150,9 @@ def __init__( get very large and cause an integer overflow. :type size: int :param created_at: The date and time when the file was created on Box. - :type created_at: str + :type created_at: DateTime :param modified_at: The date and time when the file was last updated on Box. - :type modified_at: str + :type modified_at: DateTime :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -4169,10 +4173,10 @@ def __init__( :type purged_at: Optional[str], optional :param content_created_at: The date and time at which this file was originally created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this file was last updated, which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param shared_link: The shared link for this file. This will be `null` if a file had been trashed, even though the original shared link does become active again., defaults to None @@ -4283,10 +4287,10 @@ def __init__( parent: Optional[FolderMini] = None, description: Optional[str] = None, path_collection: Optional[TrashWebLinkPathCollectionField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, owned_by: Optional[UserMini] = None, @@ -4310,14 +4314,14 @@ def __init__( visible within the Box web application., defaults to None :type description: Optional[str], optional :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When this file was last updated on the Box servers., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: When this file was last moved to the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: When this file will be permanently deleted., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param shared_link: The shared link for this bookmark. This will be `null` if a bookmark has been trashed, since the link will no longer be active., defaults to None @@ -4431,12 +4435,12 @@ def __init__( *, etag: Optional[str] = None, sequence_id: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, shared_link: Optional[str] = None, folder_upload_email: Optional[str] = None, parent: Optional[FolderMini] = None, @@ -4473,21 +4477,21 @@ def __init__( :param created_at: The date and time when the folder was created. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the folder was last updated. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this folder is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this folder was originally created., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param shared_link: The shared link for this folder. This will be `null` if a folder has been trashed, since the link will no longer be active., defaults to None @@ -4606,8 +4610,8 @@ def __init__( description: str, size: int, path_collection: TrashFilePathCollectionField, - created_at: str, - modified_at: str, + created_at: DateTime, + modified_at: DateTime, modified_by: UserMini, owned_by: UserMini, item_status: TrashFileItemStatusField, @@ -4615,10 +4619,10 @@ def __init__( etag: Optional[str] = None, name: Optional[str] = None, file_version: Optional[FileVersionMini] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, shared_link: Optional[str] = None, parent: Optional[FolderMini] = None, @@ -4644,9 +4648,9 @@ def __init__( get very large and cause an integer overflow. :type size: int :param created_at: The date and time when the file was created on Box. - :type created_at: str + :type created_at: DateTime :param modified_at: The date and time when the file was last updated on Box. - :type modified_at: str + :type modified_at: DateTime :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -4660,16 +4664,16 @@ def __init__( :param name: The name of the file, defaults to None :type name: Optional[str], optional :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this file is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this file was originally created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this file was last updated, which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param shared_link: The shared link for this file. This will be `null` if a file has been trashed, since the link will no longer be active., defaults to None @@ -4715,8 +4719,8 @@ def __init__( tos: Optional[TermsOfServiceBase] = None, user: Optional[UserMini] = None, is_accepted: Optional[bool] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -4727,9 +4731,9 @@ def __init__( :param is_accepted: If the user has accepted the terms of services, defaults to None :type is_accepted: Optional[bool], optional :param created_at: When the legal item was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the legal item was modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -4782,9 +4786,9 @@ def __init__( item: Optional[FileMini] = None, assigned_to: Optional[UserMini] = None, message: Optional[str] = None, - completed_at: Optional[str] = None, - assigned_at: Optional[str] = None, - reminded_at: Optional[str] = None, + completed_at: Optional[DateTime] = None, + assigned_at: Optional[DateTime] = None, + reminded_at: Optional[DateTime] = None, resolution_state: Optional[TaskAssignmentResolutionStateField] = None, assigned_by: Optional[UserMini] = None, **kwargs @@ -4800,12 +4804,12 @@ def __init__( :type message: Optional[str], optional :param completed_at: The date at which this task assignment was completed. This will be `null` if the task is not completed yet., defaults to None - :type completed_at: Optional[str], optional + :type completed_at: Optional[DateTime], optional :param assigned_at: The date at which this task was assigned to the user., defaults to None - :type assigned_at: Optional[str], optional + :type assigned_at: Optional[DateTime], optional :param reminded_at: The date at which the assigned user was reminded of this task assignment., defaults to None - :type reminded_at: Optional[str], optional + :type reminded_at: Optional[DateTime], optional :param resolution_state: The current state of the assignment. The available states depend on the `action` value of the task object., defaults to None :type resolution_state: Optional[TaskAssignmentResolutionStateField], optional @@ -4865,13 +4869,13 @@ def __init__( id: Optional[str] = None, type: Optional[TaskTypeField] = None, item: Optional[FileMini] = None, - due_at: Optional[str] = None, + due_at: Optional[DateTime] = None, action: Optional[TaskActionField] = None, message: Optional[str] = None, task_assignment_collection: Optional[TaskAssignments] = None, is_completed: Optional[bool] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, completion_rule: Optional[TaskCompletionRuleField] = None, **kwargs ): @@ -4881,7 +4885,7 @@ def __init__( :param type: `task`, defaults to None :type type: Optional[TaskTypeField], optional :param due_at: When the task is due, defaults to None - :type due_at: Optional[str], optional + :type due_at: Optional[DateTime], optional :param action: The type of task the task assignee will be prompted to perform., defaults to None :type action: Optional[TaskActionField], optional @@ -4890,7 +4894,7 @@ def __init__( :param is_completed: Whether the task has been completed, defaults to None :type is_completed: Optional[bool], optional :param created_at: When the task object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param completion_rule: Defines which assignees need to complete this task before the task is considered completed. @@ -4998,7 +5002,7 @@ def __init__( List[RetentionPolicyAssignmentFilterFieldsField] ] = None, assigned_by: Optional[UserMini] = None, - assigned_at: Optional[str] = None, + assigned_at: Optional[DateTime] = None, start_date_field: Optional[str] = None, **kwargs ): @@ -5016,7 +5020,7 @@ def __init__( :type filter_fields: Optional[List[RetentionPolicyAssignmentFilterFieldsField]], optional :param assigned_at: When the retention policy assignment object was created., defaults to None - :type assigned_at: Optional[str], optional + :type assigned_at: Optional[DateTime], optional :param start_date_field: The date the retention policy assignment begins. If the `assigned_to` type is `metadata_template`, this field can be a date field's metadata attribute key id., defaults to None @@ -5107,8 +5111,8 @@ def __init__( retention_type: Optional[RetentionPolicyRetentionTypeField] = None, status: Optional[RetentionPolicyStatusField] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, can_owner_extend_retention: Optional[bool] = None, are_owners_notified: Optional[bool] = None, custom_notification_recipients: Optional[List[UserMini]] = None, @@ -5154,9 +5158,9 @@ def __init__( active again., defaults to None :type status: Optional[RetentionPolicyStatusField], optional :param created_at: When the retention policy object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the retention policy object was last modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param can_owner_extend_retention: Determines if the owner of items under the policy can extend the retention when the original retention duration is about to end., defaults to None @@ -5278,11 +5282,11 @@ def __init__( status: Optional[LegalHoldPolicyStatusField] = None, assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - deleted_at: Optional[str] = None, - filter_started_at: Optional[str] = None, - filter_ended_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + deleted_at: Optional[DateTime] = None, + filter_started_at: Optional[DateTime] = None, + filter_ended_at: Optional[DateTime] = None, release_notes: Optional[str] = None, **kwargs ): @@ -5306,22 +5310,22 @@ def __init__( :param assignment_counts: Counts of assignments within this a legal hold policy by item type, defaults to None :type assignment_counts: Optional[LegalHoldPolicyAssignmentCountsField], optional :param created_at: When the legal hold policy object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the legal hold policy object was modified. Does not update when assignments are added or removed., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param deleted_at: When the policy release request was sent. (Because it can take time for a policy to fully delete, this isn't quite the same time that the policy is fully deleted). If `null`, the policy was not deleted., defaults to None - :type deleted_at: Optional[str], optional + :type deleted_at: Optional[DateTime], optional :param filter_started_at: User-specified, optional date filter applies to Custodian assignments only, defaults to None - :type filter_started_at: Optional[str], optional + :type filter_started_at: Optional[DateTime], optional :param filter_ended_at: User-specified, optional date filter applies to Custodian assignments only, defaults to None - :type filter_ended_at: Optional[str], optional + :type filter_ended_at: Optional[DateTime], optional :param release_notes: Optional notes about why the policy was created., defaults to None :type release_notes: Optional[str], optional """ @@ -5413,8 +5417,8 @@ def __init__( actionable_by: Optional[UserMini] = None, invited_by: Optional[UserMini] = None, status: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -5427,9 +5431,9 @@ def __init__( :param status: The status of the invite, defaults to None :type status: Optional[str], optional :param created_at: When the invite was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the invite was modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -5462,8 +5466,8 @@ def __init__( user: Optional[UserMini] = None, group: Optional[GroupMini] = None, role: Optional[GroupMembershipRoleField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -5474,9 +5478,9 @@ def __init__( :param role: The role of the user in the group., defaults to None :type role: Optional[GroupMembershipRoleField], optional :param created_at: The time this membership was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The time this membership was last modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -5565,14 +5569,14 @@ def __init__( *, name: Optional[str] = None, size: Optional[int] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, modified_by: Optional[UserMini] = None, - trashed_at: Optional[str] = None, + trashed_at: Optional[DateTime] = None, trashed_by: Optional[UserMini] = None, - restored_at: Optional[str] = None, + restored_at: Optional[DateTime] = None, restored_by: Optional[UserMini] = None, - purged_at: Optional[str] = None, + purged_at: Optional[DateTime] = None, uploader_display_name: Optional[str] = None, sha_1: Optional[str] = None, **kwargs @@ -5587,15 +5591,15 @@ def __init__( :param size: Size of the file version in bytes, defaults to None :type size: Optional[int], optional :param created_at: When the file version object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the file version object was last updated, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: When the file version object was trashed., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param restored_at: When the file version was restored from the trash., defaults to None - :type restored_at: Optional[str], optional + :type restored_at: Optional[DateTime], optional :param purged_at: When the file version object will be permanently deleted., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param sha_1: The SHA1 hash of this version of the file., defaults to None :type sha_1: Optional[str], optional """ @@ -5622,14 +5626,14 @@ def __init__( version_number: Optional[str] = None, name: Optional[str] = None, size: Optional[int] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, modified_by: Optional[UserMini] = None, - trashed_at: Optional[str] = None, + trashed_at: Optional[DateTime] = None, trashed_by: Optional[UserMini] = None, - restored_at: Optional[str] = None, + restored_at: Optional[DateTime] = None, restored_by: Optional[UserMini] = None, - purged_at: Optional[str] = None, + purged_at: Optional[DateTime] = None, uploader_display_name: Optional[str] = None, sha_1: Optional[str] = None, **kwargs @@ -5646,15 +5650,15 @@ def __init__( :param size: Size of the file version in bytes, defaults to None :type size: Optional[int], optional :param created_at: When the file version object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the file version object was last updated, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: When the file version object was trashed., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param restored_at: When the file version was restored from the trash., defaults to None - :type restored_at: Optional[str], optional + :type restored_at: Optional[DateTime], optional :param purged_at: When the file version object will be permanently deleted., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param sha_1: The SHA1 hash of this version of the file., defaults to None :type sha_1: Optional[str], optional """ @@ -5764,15 +5768,15 @@ def __init__( id: str, type: FileRequestTypeField, folder: FolderMini, - created_at: str, - updated_at: str, + created_at: DateTime, + updated_at: DateTime, *, title: Optional[str] = None, description: Optional[str] = None, status: Optional[FileRequestStatusField] = None, is_email_required: Optional[bool] = None, is_description_required: Optional[bool] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, url: Optional[str] = None, etag: Optional[str] = None, created_by: Optional[UserMini] = None, @@ -5785,9 +5789,9 @@ def __init__( :param type: `file_request` :type type: FileRequestTypeField :param created_at: The date and time when the file request was created. - :type created_at: str + :type created_at: DateTime :param updated_at: The date and time when the file request was last updated. - :type updated_at: str + :type updated_at: DateTime :param title: The title of file request. This is shown in the Box UI to users uploading files. @@ -5834,7 +5838,7 @@ def __init__( After this date, the `status` will automatically be set to `inactive`., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param url: The generated URL for this file request. This URL can be shared with users to let them upload files to the associated folder., defaults to None :type url: Optional[str], optional @@ -5935,7 +5939,7 @@ def __init__( vanity_url: Optional[str] = None, vanity_name: Optional[str] = None, access: Optional[FileSharedLinkAccessField] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[FileSharedLinkPermissionsField] = None, **kwargs ): @@ -5987,7 +5991,7 @@ def __init__( :type access: Optional[FileSharedLinkAccessField], optional :param unshared_at: The date and time when this link will be unshared. This field can only be set by users with paid accounts., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional :param permissions: Defines if this link allows a user to preview, edit, and download an item. These permissions refer to the shared link only and do not supersede permissions applied to the item itself., defaults to None @@ -6023,12 +6027,12 @@ def __init__( description: Optional[str] = None, size: Optional[int] = None, path_collection: Optional[FilePathCollectionField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, owned_by: Optional[UserMini] = None, @@ -6059,20 +6063,20 @@ def __init__( get very large and cause an integer overflow., defaults to None :type size: Optional[int], optional :param created_at: The date and time when the file was created on Box., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the file was last updated on Box., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this file is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this file was originally created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this file was last updated, which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -6200,8 +6204,8 @@ def __init__( id: Optional[str] = None, type: Optional[FileFullLockTypeField] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, - expired_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + expired_at: Optional[DateTime] = None, is_download_prevented: Optional[bool] = None, app_type: Optional[FileFullLockAppTypeField] = None, **kwargs @@ -6212,9 +6216,9 @@ def __init__( :param type: `lock`, defaults to None :type type: Optional[FileFullLockTypeField], optional :param created_at: The time this lock was created at., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param expired_at: The time this lock is to expire at, which might be in the past., defaults to None - :type expired_at: Optional[str], optional + :type expired_at: Optional[DateTime], optional :param is_download_prevented: Whether or not the file can be downloaded while locked., defaults to None :type is_download_prevented: Optional[bool], optional :param app_type: If the lock is managed by an application rather than a user, this @@ -6497,23 +6501,23 @@ def __init__( is_externally_owned: Optional[bool] = None, has_collaborations: Optional[bool] = None, metadata: Optional[FileFullMetadataField] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, representations: Optional[FileFullRepresentationsField] = None, classification: Optional[FileFullClassificationField] = None, uploader_display_name: Optional[str] = None, - disposition_at: Optional[str] = None, + disposition_at: Optional[DateTime] = None, shared_link_permission_options: Optional[ List[FileFullSharedLinkPermissionOptionsField] ] = None, description: Optional[str] = None, size: Optional[int] = None, path_collection: Optional[FilePathCollectionField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, owned_by: Optional[UserMini] = None, @@ -6561,9 +6565,9 @@ def __init__( :param has_collaborations: Specifies if this file has any other collaborators., defaults to None :type has_collaborations: Optional[bool], optional :param expires_at: When the file will automatically be deleted, defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param disposition_at: The retention expiration timestamp for the given file, defaults to None - :type disposition_at: Optional[str], optional + :type disposition_at: Optional[DateTime], optional :param shared_link_permission_options: A list of the types of roles that user can be invited at when sharing this file., defaults to None :type shared_link_permission_options: Optional[List[FileFullSharedLinkPermissionOptionsField]], optional @@ -6573,20 +6577,20 @@ def __init__( get very large and cause an integer overflow., defaults to None :type size: Optional[int], optional :param created_at: The date and time when the file was created on Box., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the file was last updated on Box., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: The time at which this file was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this file is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this file was originally created, which might be before it was uploaded to Box., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this file was last updated, which might be before it was uploaded to Box., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -6779,8 +6783,8 @@ def __init__( is_reply_comment: Optional[bool] = None, message: Optional[str] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, item: Optional[CommentItemField] = None, id: Optional[str] = None, type: Optional[CommentBaseTypeField] = None, @@ -6793,9 +6797,9 @@ def __init__( :param message: The text of the comment, as provided by the user, defaults to None :type message: Optional[str], optional :param created_at: The time this comment was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The time this comment was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param id: The unique identifier for this comment., defaults to None :type id: Optional[str], optional :param type: `comment`, defaults to None @@ -6818,8 +6822,8 @@ def __init__( is_reply_comment: Optional[bool] = None, message: Optional[str] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, item: Optional[CommentItemField] = None, id: Optional[str] = None, type: Optional[CommentBaseTypeField] = None, @@ -6837,9 +6841,9 @@ def __init__( :param message: The text of the comment, as provided by the user, defaults to None :type message: Optional[str], optional :param created_at: The time this comment was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The time this comment was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param id: The unique identifier for this comment., defaults to None :type id: Optional[str], optional :param type: `comment`, defaults to None @@ -6971,8 +6975,8 @@ def __init__( type: Optional[CollaborationAllowlistExemptTargetTypeField] = None, enterprise: Optional[CollaborationAllowlistExemptTargetEnterpriseField] = None, user: Optional[UserMini] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ @@ -6981,9 +6985,9 @@ def __init__( :param type: `collaboration_whitelist_exempt_target`, defaults to None :type type: Optional[CollaborationAllowlistExemptTargetTypeField], optional :param created_at: The time the entry was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The time the entry was modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -7034,9 +7038,9 @@ def __init__( restricted_segment: ShieldInformationBarrierSegmentRestrictionMiniRestrictedSegmentField, *, shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, - updated_at: Optional[str] = None, + updated_at: Optional[DateTime] = None, updated_by: Optional[UserBase] = None, type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField] = None, id: Optional[str] = None, @@ -7052,11 +7056,11 @@ def __init__( :param created_at: ISO date time string when this shield information barrier Segment Restriction object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param updated_at: ISO date time string when this shield information barrier segment Restriction was updated., defaults to None - :type updated_at: Optional[str], optional + :type updated_at: Optional[DateTime], optional :param type: Shield information barrier segment restriction, defaults to None :type type: Optional[ShieldInformationBarrierSegmentRestrictionBaseTypeField], optional :param id: The unique identifier for the @@ -7165,9 +7169,9 @@ def __init__( shield_information_barrier_segment: Optional[ ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField ] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, - updated_at: Optional[str] = None, + updated_at: Optional[DateTime] = None, updated_by: Optional[UserBase] = None, user: Optional[UserBase] = None, id: Optional[str] = None, @@ -7180,10 +7184,10 @@ def __init__( :type shield_information_barrier_segment: Optional[ShieldInformationBarrierSegmentMemberShieldInformationBarrierSegmentField], optional :param created_at: ISO date time string when this shield information barrier object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param updated_at: ISO date time string when this shield information barrier segment Member was updated., defaults to None - :type updated_at: Optional[str], optional + :type updated_at: Optional[DateTime], optional :param id: The unique identifier for the shield information barrier segment member, defaults to None :type id: Optional[str], optional @@ -7240,9 +7244,9 @@ def __init__( shield_information_barrier: Optional[ShieldInformationBarrierBase] = None, name: Optional[str] = None, description: Optional[str] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, - updated_at: Optional[str] = None, + updated_at: Optional[DateTime] = None, updated_by: Optional[UserBase] = None, **kwargs ): @@ -7257,10 +7261,10 @@ def __init__( :type description: Optional[str], optional :param created_at: ISO date time string when this shield information barrier object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param updated_at: ISO date time string when this shield information barrier segment was updated., defaults to None - :type updated_at: Optional[str], optional + :type updated_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -7322,11 +7326,11 @@ def __init__( type: Optional[ShieldInformationBarrierTypeField] = None, enterprise: Optional[EnterpriseBase] = None, status: Optional[ShieldInformationBarrierStatusField] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, - updated_at: Optional[str] = None, + updated_at: Optional[DateTime] = None, updated_by: Optional[UserBase] = None, - enabled_at: Optional[str] = None, + enabled_at: Optional[DateTime] = None, enabled_by: Optional[UserBase] = None, **kwargs ): @@ -7341,15 +7345,15 @@ def __init__( :type status: Optional[ShieldInformationBarrierStatusField], optional :param created_at: ISO date time string when this shield information barrier object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param created_by: The user who created this shield information barrier., defaults to None :type created_by: Optional[UserBase], optional :param updated_at: ISO date time string when this shield information barrier was updated., defaults to None - :type updated_at: Optional[str], optional + :type updated_at: Optional[DateTime], optional :param updated_by: The user that updated this shield information barrier., defaults to None :type updated_by: Optional[UserBase], optional :param enabled_at: ISO date time string when this shield information barrier was enabled., defaults to None - :type enabled_at: Optional[str], optional + :type enabled_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -7410,7 +7414,7 @@ def __init__( id: Optional[str] = None, type: Optional[str] = None, created_by: Optional[UserBase] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, locked_operations: Optional[FolderLockLockedOperationsField] = None, lock_type: Optional[str] = None, **kwargs @@ -7421,7 +7425,7 @@ def __init__( :param type: The object type, always `folder_lock`., defaults to None :type type: Optional[str], optional :param created_at: When the folder lock object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param locked_operations: The operations that have been locked. Currently the `move` and `delete` operations cannot be locked separately, and both need to be set to `true`. @@ -7469,15 +7473,15 @@ class WatermarkWatermarkField(BaseObject): def __init__( self, *, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, **kwargs ): """ :param created_at: When this watermark was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When this task was modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.created_at = created_at @@ -7624,7 +7628,7 @@ def __init__( self, *, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, address: Optional[str] = None, triggers: Optional[List[WebhookTriggersField]] = None, id: Optional[str] = None, @@ -7635,7 +7639,7 @@ def __init__( """ :param created_at: A timestamp identifying the time that the webhook was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param address: The URL that is notified by this webhook, defaults to None :type address: Optional[str], optional :param triggers: An array of event names that this webhook is @@ -7788,7 +7792,7 @@ def __init__( vanity_url: Optional[str] = None, vanity_name: Optional[str] = None, access: Optional[WebLinkSharedLinkAccessField] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[WebLinkSharedLinkPermissionsField] = None, **kwargs ): @@ -7840,7 +7844,7 @@ def __init__( :type access: Optional[WebLinkSharedLinkAccessField], optional :param unshared_at: The date and time when this link will be unshared. This field can only be set by users with paid accounts., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional :param permissions: Defines if this link allows a user to preview, edit, and download an item. These permissions refer to the shared link only and do not supersede permissions applied to the item itself., defaults to None @@ -7876,10 +7880,10 @@ def __init__( parent: Optional[FolderMini] = None, description: Optional[str] = None, path_collection: Optional[WebLinkPathCollectionField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, owned_by: Optional[UserMini] = None, @@ -7900,14 +7904,14 @@ def __init__( visible within the Box web application., defaults to None :type description: Optional[str], optional :param created_at: When this file was created on Box’s servers., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When this file was last updated on the Box servers., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param trashed_at: When this file was moved to the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: When this file will be permanently deleted., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param item_status: Whether this item is deleted or not. Values include `active`, `trashed` if the file has been moved to the trash, and `deleted` if the file has been permanently deleted, defaults to None @@ -8084,7 +8088,7 @@ def __init__( vanity_url: Optional[str] = None, vanity_name: Optional[str] = None, access: Optional[FolderSharedLinkAccessField] = None, - unshared_at: Optional[str] = None, + unshared_at: Optional[DateTime] = None, permissions: Optional[FolderSharedLinkPermissionsField] = None, **kwargs ): @@ -8136,7 +8140,7 @@ def __init__( :type access: Optional[FolderSharedLinkAccessField], optional :param unshared_at: The date and time when this link will be unshared. This field can only be set by users with paid accounts., defaults to None - :type unshared_at: Optional[str], optional + :type unshared_at: Optional[DateTime], optional :param permissions: Defines if this link allows a user to preview, edit, and download an item. These permissions refer to the shared link only and do not supersede permissions applied to the item itself., defaults to None @@ -8205,17 +8209,17 @@ def __init__( id: str, type: FolderBaseTypeField, *, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, description: Optional[str] = None, size: Optional[int] = None, path_collection: Optional[FolderPathCollectionField] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, owned_by: Optional[UserMini] = None, shared_link: Optional[FolderSharedLinkField] = None, folder_upload_email: Optional[FolderFolderUploadEmailField] = None, @@ -8241,26 +8245,26 @@ def __init__( :param created_at: The date and time when the folder was created. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the folder was last updated. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param size: The folder size in bytes. Be careful parsing this integer as its value can get very large., defaults to None :type size: Optional[int], optional :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this folder is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this folder was originally created., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -8333,8 +8337,8 @@ def __init__( legal_hold_policy: Optional[LegalHoldPolicyMini] = None, assigned_to: Optional[Union[File, Folder, WebLink]] = None, assigned_by: Optional[UserMini] = None, - assigned_at: Optional[str] = None, - deleted_at: Optional[str] = None, + assigned_at: Optional[DateTime] = None, + deleted_at: Optional[DateTime] = None, id: Optional[str] = None, type: Optional[LegalHoldPolicyAssignmentBaseTypeField] = None, **kwargs @@ -8342,13 +8346,13 @@ def __init__( """ :param assigned_at: When the legal hold policy assignment object was created, defaults to None - :type assigned_at: Optional[str], optional + :type assigned_at: Optional[DateTime], optional :param deleted_at: When the assignment release request was sent. (Because it can take time for an assignment to fully delete, this isn't quite the same time that the assignment is fully deleted). If null, Assignment was not deleted., defaults to None - :type deleted_at: Optional[str], optional + :type deleted_at: Optional[DateTime], optional :param id: The unique identifier for this legal hold assignment, defaults to None :type id: Optional[str], optional :param type: `legal_hold_policy_assignment`, defaults to None @@ -8407,7 +8411,7 @@ def __init__( file_version: Optional[FileVersionMini] = None, file: Optional[FileMini] = None, legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]] = None, - deleted_at: Optional[str] = None, + deleted_at: Optional[DateTime] = None, **kwargs ): """ @@ -8419,7 +8423,7 @@ def __init__( :type legal_hold_policy_assignments: Optional[List[LegalHoldPolicyAssignment]], optional :param deleted_at: Time that this File-Version-Legal-Hold was deleted., defaults to None - :type deleted_at: Optional[str], optional + :type deleted_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -8589,17 +8593,17 @@ def __init__( is_accessible_via_shared_link: Optional[bool] = None, can_non_owners_view_collaborators: Optional[bool] = None, classification: Optional[FolderFullClassificationField] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, description: Optional[str] = None, size: Optional[int] = None, path_collection: Optional[FolderPathCollectionField] = None, created_by: Optional[UserMini] = None, modified_by: Optional[UserMini] = None, - trashed_at: Optional[str] = None, - purged_at: Optional[str] = None, - content_created_at: Optional[str] = None, - content_modified_at: Optional[str] = None, + trashed_at: Optional[DateTime] = None, + purged_at: Optional[DateTime] = None, + content_created_at: Optional[DateTime] = None, + content_modified_at: Optional[DateTime] = None, owned_by: Optional[UserMini] = None, shared_link: Optional[FolderSharedLinkField] = None, folder_upload_email: Optional[FolderFolderUploadEmailField] = None, @@ -8650,26 +8654,26 @@ def __init__( :param created_at: The date and time when the folder was created. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the folder was last updated. This value may be `null` for some folders such as the root folder or the trash folder., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param size: The folder size in bytes. Be careful parsing this integer as its value can get very large., defaults to None :type size: Optional[int], optional :param trashed_at: The time at which this folder was put in the trash., defaults to None - :type trashed_at: Optional[str], optional + :type trashed_at: Optional[DateTime], optional :param purged_at: The time at which this folder is expected to be purged from the trash., defaults to None - :type purged_at: Optional[str], optional + :type purged_at: Optional[DateTime], optional :param content_created_at: The date and time at which this folder was originally created., defaults to None - :type content_created_at: Optional[str], optional + :type content_created_at: Optional[DateTime], optional :param content_modified_at: The date and time at which this folder was last updated., defaults to None - :type content_modified_at: Optional[str], optional + :type content_modified_at: Optional[DateTime], optional :param item_status: Defines if this item has been deleted or not. * `active` when the item has is not in the trash @@ -8851,7 +8855,7 @@ def __init__( type: Optional[str] = None, item: Optional[Union[FileFull, FolderFull, WebLink]] = None, interaction_type: Optional[RecentItemInteractionTypeField] = None, - interacted_at: Optional[str] = None, + interacted_at: Optional[DateTime] = None, interaction_shared_link: Optional[str] = None, **kwargs ): @@ -8862,7 +8866,7 @@ def __init__( the item., defaults to None :type interaction_type: Optional[RecentItemInteractionTypeField], optional :param interacted_at: The time of the most recent interaction., defaults to None - :type interacted_at: Optional[str], optional + :type interacted_at: Optional[DateTime], optional :param interaction_shared_link: If the item was accessed through a shared link it will appear here, otherwise this will be null., defaults to None :type interaction_shared_link: Optional[str], optional @@ -9066,8 +9070,8 @@ def __init__( self, *, type: Optional[str] = None, - created_at: Optional[str] = None, - recorded_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + recorded_at: Optional[DateTime] = None, event_id: Optional[str] = None, created_by: Optional[UserMini] = None, event_type: Optional[EventEventTypeField] = None, @@ -9080,9 +9084,9 @@ def __init__( :param type: `event`, defaults to None :type type: Optional[str], optional :param created_at: When the event object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param recorded_at: When the event object was recorded in database, defaults to None - :type recorded_at: Optional[str], optional + :type recorded_at: Optional[DateTime], optional :param event_id: The ID of the event object. You can use this to detect duplicate events, defaults to None :type event_id: Optional[str], optional :param session_id: The session of the user that performed the action. Not all events will @@ -9338,7 +9342,7 @@ def __init__( skill: Optional[SkillInvocationSkillField] = None, token: Optional[SkillInvocationTokenField] = None, status: Optional[SkillInvocationStatusField] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, trigger: Optional[str] = None, enterprise: Optional[SkillInvocationEnterpriseField] = None, source: Optional[Union[File, Folder]] = None, @@ -9355,7 +9359,7 @@ def __init__( :param status: The details status of this event., defaults to None :type status: Optional[SkillInvocationStatusField], optional :param created_at: The time this invocation was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param trigger: Action that triggered the invocation, defaults to None :type trigger: Optional[str], optional """ @@ -9505,13 +9509,13 @@ def __init__( accessible_by: Optional[Union[UserCollaborations, GroupMini]] = None, invite_email: Optional[str] = None, role: Optional[CollaborationRoleField] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, is_access_only: Optional[bool] = None, status: Optional[CollaborationStatusField] = None, - acknowledged_at: Optional[str] = None, + acknowledged_at: Optional[DateTime] = None, created_by: Optional[UserCollaborations] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, acceptance_requirements_status: Optional[ CollaborationAcceptanceRequirementsStatusField ] = None, @@ -9529,7 +9533,7 @@ def __init__( :type role: Optional[CollaborationRoleField], optional :param expires_at: When the collaboration will expire, or `null` if no expiration date is set., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param is_access_only: If set to `true`, collaborators have access to shared items, but such items won't be visible in the All Files list. Additionally, collaborators won't @@ -9541,11 +9545,11 @@ def __init__( :type status: Optional[CollaborationStatusField], optional :param acknowledged_at: When the `status` of the collaboration object changed to `accepted` or `rejected`., defaults to None - :type acknowledged_at: Optional[str], optional + :type acknowledged_at: Optional[DateTime], optional :param created_at: When the collaboration object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the collaboration object was last modified., defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -9690,7 +9694,7 @@ def __init__( type: Optional[WebhookInvocationTypeField] = None, webhook: Optional[Webhook] = None, created_by: Optional[UserMini] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, trigger: Optional[WebhookInvocationTriggerField] = None, source: Optional[Union[File, Folder]] = None, **kwargs @@ -9702,7 +9706,7 @@ def __init__( :type type: Optional[WebhookInvocationTypeField], optional :param created_at: A timestamp identifying the time that the webhook event was triggered., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -9971,7 +9975,7 @@ def __init__( type: Optional[WorkflowFlowsTypeField] = None, trigger: Optional[WorkflowFlowsTriggerField] = None, outcomes: Optional[List[WorkflowFlowsOutcomesField]] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, **kwargs ): @@ -9981,7 +9985,7 @@ def __init__( :param type: The flow's resource type, defaults to None :type type: Optional[WorkflowFlowsTypeField], optional :param created_at: When this flow was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional """ super().__init__(**kwargs) self.id = id @@ -10062,8 +10066,8 @@ class WorkflowFull(Workflow): def __init__( self, *, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, modified_by: Optional[UserBase] = None, flows: Optional[List[WorkflowFlowsField]] = None, @@ -10076,9 +10080,9 @@ def __init__( ): """ :param created_at: The date and time when the workflow was created on Box, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: The date and time when the workflow was last updated on Box, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param flows: A list of flows assigned to a workflow., defaults to None :type flows: Optional[List[WorkflowFlowsField]], optional :param id: The unique identifier for the workflow, defaults to None @@ -10148,7 +10152,7 @@ def __init__( *, download_url: Optional[str] = None, status_url: Optional[str] = None, - expires_at: Optional[str] = None, + expires_at: Optional[DateTime] = None, name_conflicts: Optional[List[List[ZipDownloadNameConflictsField]]] = None, **kwargs ): @@ -10179,7 +10183,7 @@ def __init__( is started after which the `download_url` is valid for the duration of the download, and the `status_url` is valid for 12 hours from the start of the download., defaults to None - :type expires_at: Optional[str], optional + :type expires_at: Optional[DateTime], optional :param name_conflicts: A list of conflicts that occurred when trying to create the archive. This would occur when multiple items have been requested with the same name. @@ -10430,7 +10434,7 @@ def __init__( invocation: KeywordSkillCardInvocationField, entries: List[KeywordSkillCardEntriesField], *, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, skill_card_title: Optional[KeywordSkillCardSkillCardTitleField] = None, **kwargs ): @@ -10447,7 +10451,7 @@ def __init__( :param entries: An list of entries in the metadata card. :type entries: List[KeywordSkillCardEntriesField] :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param skill_card_title: The title of the card., defaults to None :type skill_card_title: Optional[KeywordSkillCardSkillCardTitleField], optional """ @@ -10525,8 +10529,8 @@ def __init__( options: Optional[IntegrationMappingSlackOptions] = None, created_by: Optional[UserIntegrationMappings] = None, modified_by: Optional[UserIntegrationMappings] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, id: Optional[str] = None, integration_type: Optional[IntegrationMappingBaseIntegrationTypeField] = None, **kwargs @@ -10552,9 +10556,9 @@ def __init__( last modified the integration mapping, defaults to None :type modified_by: Optional[UserIntegrationMappings], optional :param created_at: When the integration mapping object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the integration mapping object was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param id: A unique identifier of a folder mapping (part of a composite key together with `integration_type`), defaults to None @@ -10830,7 +10834,7 @@ def __init__( invocation: TimelineSkillCardInvocationField, entries: List[TimelineSkillCardEntriesField], *, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, skill_card_title: Optional[TimelineSkillCardSkillCardTitleField] = None, duration: Optional[int] = None, **kwargs @@ -10848,7 +10852,7 @@ def __init__( :param entries: A list of entries on the timeline. :type entries: List[TimelineSkillCardEntriesField] :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param skill_card_title: The title of the card., defaults to None :type skill_card_title: Optional[TimelineSkillCardSkillCardTitleField], optional :param duration: An total duration in seconds of the timeline., defaults to None @@ -10972,7 +10976,7 @@ def __init__( invocation: TranscriptSkillCardInvocationField, entries: List[TranscriptSkillCardEntriesField], *, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField] = None, duration: Optional[int] = None, **kwargs @@ -10991,7 +10995,7 @@ def __init__( the transcription. :type entries: List[TranscriptSkillCardEntriesField] :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param skill_card_title: The title of the card., defaults to None :type skill_card_title: Optional[TranscriptSkillCardSkillCardTitleField], optional :param duration: An optional total duration in seconds. @@ -11117,7 +11121,7 @@ def __init__( skill: StatusSkillCardSkillField, invocation: StatusSkillCardInvocationField, *, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, skill_card_title: Optional[StatusSkillCardSkillCardTitleField] = None, **kwargs ): @@ -11134,7 +11138,7 @@ def __init__( which instance of a service applied the metadata. :type invocation: StatusSkillCardInvocationField :param created_at: The optional date and time this card was created at., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param skill_card_title: The title of the card., defaults to None :type skill_card_title: Optional[StatusSkillCardSkillCardTitleField], optional """ @@ -11324,7 +11328,7 @@ def __init__( document_tag_id: Optional[str] = None, text_value: Optional[str] = None, checkbox_value: Optional[bool] = None, - date_value: Optional[str] = None, + date_value: Optional[Date] = None, **kwargs ): """ @@ -11335,7 +11339,7 @@ def __init__( :param checkbox_value: Checkbox prefill value, defaults to None :type checkbox_value: Optional[bool], optional :param date_value: Date prefill value, defaults to None - :type date_value: Optional[str], optional + :type date_value: Optional[Date], optional """ super().__init__(**kwargs) self.document_tag_id = document_tag_id @@ -11382,7 +11386,7 @@ def __init__( document_tag_id: Optional[str] = None, text_value: Optional[str] = None, checkbox_value: Optional[bool] = None, - date_value: Optional[str] = None, + date_value: Optional[Date] = None, **kwargs ): """ @@ -11401,7 +11405,7 @@ def __init__( :param checkbox_value: Checkbox prefill value, defaults to None :type checkbox_value: Optional[bool], optional :param date_value: Date prefill value, defaults to None - :type date_value: Optional[str], optional + :type date_value: Optional[Date], optional """ super().__init__( document_tag_id=document_tag_id, @@ -11428,7 +11432,7 @@ def __init__( self, *, type: Optional[SignRequestSignerSignerDecisionTypeField] = None, - finalized_at: Optional[str] = None, + finalized_at: Optional[DateTime] = None, additional_info: Optional[str] = None, **kwargs ): @@ -11436,7 +11440,7 @@ def __init__( :param type: Type of decision made by the signer, defaults to None :type type: Optional[SignRequestSignerSignerDecisionTypeField], optional :param finalized_at: Date and Time that the decision was made, defaults to None - :type finalized_at: Optional[str], optional + :type finalized_at: Optional[DateTime], optional :param additional_info: Additional info about the decision, such as the decline reason from the signer, defaults to None :type additional_info: Optional[str], optional """ @@ -11669,7 +11673,7 @@ def __init__( signing_log: Optional[FileMini] = None, status: Optional[SignRequestStatusField] = None, sign_files: Optional[SignRequestSignFilesField] = None, - auto_expire_at: Optional[str] = None, + auto_expire_at: Optional[DateTime] = None, parent_folder: Optional[FolderMini] = None, is_document_preparation_needed: Optional[bool] = None, redirect_url: Optional[str] = None, @@ -11708,7 +11712,7 @@ def __init__( and can be downloaded at any point in the signing process., defaults to None :type sign_files: Optional[SignRequestSignFilesField], optional :param auto_expire_at: Uses `days_valid` to calculate the date and time, in GMT, the sign request will expire if unsigned., defaults to None - :type auto_expire_at: Optional[str], optional + :type auto_expire_at: Optional[DateTime], optional :param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation via UI., defaults to None :type is_document_preparation_needed: Optional[bool], optional :param redirect_url: When specified, signature request will be redirected to this url when a document is signed., defaults to None @@ -11951,7 +11955,7 @@ def __init__( document_tag_id: Optional[str] = None, text_value: Optional[str] = None, checkbox_value: Optional[bool] = None, - date_value: Optional[str] = None, + date_value: Optional[Date] = None, **kwargs ): """ @@ -11984,7 +11988,7 @@ def __init__( :param checkbox_value: Checkbox prefill value, defaults to None :type checkbox_value: Optional[bool], optional :param date_value: Date prefill value, defaults to None - :type date_value: Optional[str], optional + :type date_value: Optional[Date], optional """ super().__init__( document_tag_id=document_tag_id, @@ -12317,9 +12321,9 @@ def __init__( shield_information_barrier: Optional[ShieldInformationBarrierReference] = None, status: Optional[ShieldInformationBarrierReportStatusField] = None, details: Optional[ShieldInformationBarrierReportDetails] = None, - created_at: Optional[str] = None, + created_at: Optional[DateTime] = None, created_by: Optional[UserBase] = None, - updated_at: Optional[str] = None, + updated_at: Optional[DateTime] = None, id: Optional[str] = None, type: Optional[ShieldInformationBarrierReportBaseTypeField] = None, **kwargs @@ -12329,10 +12333,10 @@ def __init__( :type status: Optional[ShieldInformationBarrierReportStatusField], optional :param created_at: ISO date time string when this shield information barrier report object was created., defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param updated_at: ISO date time string when this shield information barrier report was updated., defaults to None - :type updated_at: Optional[str], optional + :type updated_at: Optional[DateTime], optional :param id: The unique identifier for the shield information barrier report, defaults to None :type id: Optional[str], optional :param type: The type of the shield information barrier report, defaults to None @@ -12456,8 +12460,8 @@ def __init__( hostname: Optional[str] = None, is_platform_access_only: Optional[bool] = None, external_app_user_id: Optional[str] = None, - created_at: Optional[str] = None, - modified_at: Optional[str] = None, + created_at: Optional[DateTime] = None, + modified_at: Optional[DateTime] = None, language: Optional[str] = None, timezone: Optional[str] = None, space_amount: Optional[int] = None, @@ -12509,9 +12513,9 @@ def __init__( providers to Box users., defaults to None :type external_app_user_id: Optional[str], optional :param created_at: When the user object was created, defaults to None - :type created_at: Optional[str], optional + :type created_at: Optional[DateTime], optional :param modified_at: When the user object was last modified, defaults to None - :type modified_at: Optional[str], optional + :type modified_at: Optional[DateTime], optional :param language: The language of the user, formatted in modified version of the [ISO 639-1](/guides/api-calls/language-codes) format., defaults to None :type language: Optional[str], optional @@ -12668,18 +12672,20 @@ def __init__( class MetadataFieldFilterDateRangeValue(BaseObject): - def __init__(self, *, lt: Optional[str] = None, gt: Optional[str] = None, **kwargs): + def __init__( + self, *, lt: Optional[DateTime] = None, gt: Optional[DateTime] = None, **kwargs + ): """ :param lt: Specifies the (inclusive) upper bound for the metadata field value. The value of a field must be lower than (`lt`) or equal to this value for the search query to match this template., defaults to None - :type lt: Optional[str], optional + :type lt: Optional[DateTime], optional :param gt: Specifies the (inclusive) lower bound for the metadata field value. The value of a field must be greater than (`gt`) or equal to this value for the search query to match this template., defaults to None - :type gt: Optional[str], optional + :type gt: Optional[DateTime], optional """ super().__init__(**kwargs) self.lt = lt diff --git a/docs/events.md b/docs/events.md index 36b9200..8a934b1 100644 --- a/docs/events.md +++ b/docs/events.md @@ -36,9 +36,9 @@ client.events.get_events(stream_type=GetEventsStreamType.CHANGES.value) - Limits the number of events returned Note: Sometimes, the events less than the limit requested can be returned even when there may be more events remaining. This is primarily done in the case where a number of events have already been retrieved and these retrieved events are returned rather than delaying for an unknown amount of time to see if there are any more results. - event_type `Optional[List[GetEventsEventType]]` - A comma-separated list of events to filter by. This can only be used when requesting the events with a `stream_type` of `admin_logs` or `adming_logs_streaming`. For any other `stream_type` this value will be ignored. -- created_after `Optional[str]` +- created_after `Optional[DateTime]` - The lower bound date and time to return events for. This can only be used when requesting the events with a `stream_type` of `admin_logs`. For any other `stream_type` this value will be ignored. -- created_before `Optional[str]` +- created_before `Optional[DateTime]` - The upper bound date and time to return events for. This can only be used when requesting the events with a `stream_type` of `admin_logs`. For any other `stream_type` this value will be ignored. - extra_headers `Optional[Dict[str, Optional[str]]]` - Extra headers that will be included in the HTTP request. diff --git a/docs/file_metadata.md b/docs/file_metadata.md index 841005c..8d3b2b4 100644 --- a/docs/file_metadata.md +++ b/docs/file_metadata.md @@ -88,7 +88,7 @@ See the endpoint docs at ```python -client.file_metadata.create_file_metadata_by_id(file.id, CreateFileMetadataByIdScope.ENTERPRISE.value, template_key, {'testName': 1}) +client.file_metadata.create_file_metadata_by_id(file.id, CreateFileMetadataByIdScope.ENTERPRISE.value, template_key, {'floatField': 10, 'stringField': 'stringValue', 'dateField': '2035-01-02T00:00:00Z', 'enumField': 'enumValue2', 'multiSelectField': ['multiSelectValue1', 'multiSelectValue2']}) ``` ### Arguments diff --git a/docs/file_requests.md b/docs/file_requests.md index d99c39f..ad7704e 100644 --- a/docs/file_requests.md +++ b/docs/file_requests.md @@ -63,7 +63,7 @@ client.file_requests.update_file_request_by_id(copied_file_request.id, title='up - Whether a file request submitter is required to provide their email address. When this setting is set to true, the Box UI will show an email field on the file request form. This will default to the value on the existing file request. - is_description_required `Optional[bool]` - Whether a file request submitter is required to provide a description of the files they are submitting. When this setting is set to true, the Box UI will show a description field on the file request form. This will default to the value on the existing file request. -- expires_at `Optional[str]` +- expires_at `Optional[DateTime]` - The date after which a file request will no longer accept new submissions. After this date, the `status` will automatically be set to `inactive`. This will default to the value on the existing file request. - if_match `Optional[str]` - Ensures this item hasn't recently changed before making changes. Pass in the item's last observed `etag` value into this header and the endpoint will fail with a `412 Precondition Failed` if it has changed since. @@ -137,7 +137,7 @@ client.file_requests.create_file_request_copy(file_request_id, CreateFileRequest - Whether a file request submitter is required to provide their email address. When this setting is set to true, the Box UI will show an email field on the file request form. This will default to the value on the existing file request. - is_description_required `Optional[bool]` - Whether a file request submitter is required to provide a description of the files they are submitting. When this setting is set to true, the Box UI will show a description field on the file request form. This will default to the value on the existing file request. -- expires_at `Optional[str]` +- expires_at `Optional[DateTime]` - The date after which a file request will no longer accept new submissions. After this date, the `status` will automatically be set to `inactive`. This will default to the value on the existing file request. - extra_headers `Optional[Dict[str, Optional[str]]]` - Extra headers that will be included in the HTTP request. diff --git a/docs/files.md b/docs/files.md index 430f878..186c8f8 100644 --- a/docs/files.md +++ b/docs/files.md @@ -76,7 +76,7 @@ client.files.update_file_by_id(file_to_update.id, name=updated_name, description - - lock `Optional[UpdateFileByIdLock]` - Defines a lock on an item. This prevents the item from being moved, renamed, or otherwise changed by anyone other than the user who created the lock. Set this to `null` to remove the lock. -- disposition_at `Optional[str]` +- disposition_at `Optional[DateTime]` - The retention expiration timestamp for the given file. This date cannot be shortened once set on a file. - permissions `Optional[UpdateFileByIdPermissions]` - Defines who can download a file. diff --git a/docs/legal_hold_policies.md b/docs/legal_hold_policies.md index 210091f..89e143d 100644 --- a/docs/legal_hold_policies.md +++ b/docs/legal_hold_policies.md @@ -62,9 +62,9 @@ client.legal_hold_policies.create_legal_hold_policy(legal_hold_policy_name, desc - The name of the policy. - description `Optional[str]` - A description for the policy. -- filter_started_at `Optional[str]` +- filter_started_at `Optional[DateTime]` - The filter start date. When this policy is applied using a `custodian` legal hold assignments, it will only apply to file versions created or uploaded inside of the date range. Other assignment types, such as folders and files, will ignore the date filter. Required if `is_ongoing` is set to `false`. -- filter_ended_at `Optional[str]` +- filter_ended_at `Optional[DateTime]` - The filter end date. When this policy is applied using a `custodian` legal hold assignments, it will only apply to file versions created or uploaded inside of the date range. Other assignment types, such as folders and files, will ignore the date filter. Required if `is_ongoing` is set to `false`. - is_ongoing `Optional[bool]` - Whether new assignments under this policy should continue applying to files even after initialization. When this policy is applied using a legal hold assignment, it will continue applying the policy to any new file versions even after it has been applied. For example, if a legal hold assignment is placed on a user today, and that user uploads a file tomorrow, that file will get held. This will continue until the policy is retired. Required if no filter dates are set. diff --git a/docs/metadata_templates.md b/docs/metadata_templates.md index e8e9664..6c22220 100644 --- a/docs/metadata_templates.md +++ b/docs/metadata_templates.md @@ -249,7 +249,7 @@ See the endpoint docs at ```python -client.metadata_templates.create_metadata_template('enterprise', template_key, template_key=template_key, fields=[CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.FLOAT.value, key='testName', display_name='testName')]) +client.metadata_templates.create_metadata_template('enterprise', template_key, template_key=template_key, fields=[CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.FLOAT.value, key='floatField', display_name='floatField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.STRING.value, key='stringField', display_name='stringField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.DATE.value, key='dateField', display_name='dateField'), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.ENUM.value, key='enumField', display_name='enumField', options=[CreateMetadataTemplateFieldsOptionsField(key='enumValue1'), CreateMetadataTemplateFieldsOptionsField(key='enumValue2')]), CreateMetadataTemplateFields(type=CreateMetadataTemplateFieldsTypeField.MULTISELECT.value, key='multiSelectField', display_name='multiSelectField', options=[CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue1'), CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue2')])]) ``` ### Arguments diff --git a/docs/search.md b/docs/search.md index 00a04a5..2c336c9 100644 --- a/docs/search.md +++ b/docs/search.md @@ -63,7 +63,7 @@ See the endpoint docs at ```python -client.search.search_for_content(query=keyword, ancestor_folder_ids=['0'], trash_content=SearchForContentTrashContent.NON_TRASHED_ONLY.value, include_recent_shared_links=True) +client.search.search_for_content(ancestor_folder_ids=['0'], mdfilters=[MetadataFilter(filters={'multiSelectField': ['multiSelectValue1', 'multiSelectValue2']}, scope=MetadataFilterScopeField.ENTERPRISE.value, template_key=template_key)]) ``` ### Arguments diff --git a/docs/tasks.md b/docs/tasks.md index a08f00f..11d7a5d 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -62,7 +62,7 @@ client.tasks.create_task(CreateTaskItem(type=CreateTaskItemTypeField.FILE.value, - The action the task assignee will be prompted to do. Must be _ `review` defines an approval task that can be approved or rejected _ `complete` defines a general task which can be completed - message `Optional[str]` - An optional message to include with the task. -- due_at `Optional[str]` +- due_at `Optional[DateTime]` - Defines when the task is due. Defaults to `null` if not provided. - completion_rule `Optional[CreateTaskCompletionRule]` - Defines which assignees need to complete this task before the task is considered completed. _ `all_assignees` (default) requires all assignees to review or approve the the task in order for it to be considered completed. _ `any_assignee` accepts any one assignee to review or approve the the task in order for it to be considered completed. @@ -127,7 +127,7 @@ client.tasks.update_task_by_id(task.id, message='updated message') - The action the task assignee will be prompted to do. Must be _ `review` defines an approval task that can be approved or rejected _ `complete` defines a general task which can be completed - message `Optional[str]` - The message included with the task. -- due_at `Optional[str]` +- due_at `Optional[DateTime]` - When the task is due at. - completion_rule `Optional[UpdateTaskByIdCompletionRule]` - Defines which assignees need to complete this task before the task is considered completed. _ `all_assignees` (default) requires all assignees to review or approve the the task in order for it to be considered completed. _ `any_assignee` accepts any one assignee to review or approve the the task in order for it to be considered completed. diff --git a/docs/user_collaborations.md b/docs/user_collaborations.md index 2f18454..dc7950f 100644 --- a/docs/user_collaborations.md +++ b/docs/user_collaborations.md @@ -60,7 +60,7 @@ client.user_collaborations.update_collaboration_by_id(collaboration_id, UpdateCo - The level of access granted. - status `Optional[UpdateCollaborationByIdStatus]` - Set the status of a `pending` collaboration invitation, effectively accepting, or rejecting the invite. -- expires_at `Optional[str]` +- expires_at `Optional[DateTime]` - Update the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item. This feature will only work if the **Automatically remove invited collaborators: Allow folder owners to extend the expiry date** setting has been enabled in the **Enterprise Settings** of the **Admin Console**. When the setting is not enabled, collaborations can not have an expiry date and a value for this field will be result in an error. Additionally, a collaboration can only be given an expiration if it was created after the **Automatically remove invited collaborator** setting was enabled. - can_view_path `Optional[bool]` - Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only owner or co-owners can invite collaborators with a `can_view_path` of `true`. `can_view_path` can only be used for folder collaborations. @@ -145,7 +145,7 @@ client.user_collaborations.create_collaboration(CreateCollaborationItem(type=Cre - If set to `true`, collaborators have access to shared items, but such items won't be visible in the All Files list. Additionally, collaborators won't see the the path to the root folder for the shared item. - can_view_path `Optional[bool]` - Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only owner or co-owners can invite collaborators with a `can_view_path` of `true`. `can_view_path` can only be used for folder collaborations. -- expires_at `Optional[str]` +- expires_at `Optional[DateTime]` - Set the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item. This feature will only work if the **Automatically remove invited collaborators: Allow folder owners to extend the expiry date** setting has been enabled in the **Enterprise Settings** of the **Admin Console**. When the setting is not enabled, collaborations can not have an expiry date and a value for this field will be result in an error. - fields `Optional[List[str]]` - A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested. diff --git a/test/legal_hold_policies.py b/test/legal_hold_policies.py index 9c60fb7..c2219d5 100644 --- a/test/legal_hold_policies.py +++ b/test/legal_hold_policies.py @@ -4,6 +4,10 @@ from box_sdk_gen.internal.utils import get_uuid +from box_sdk_gen.internal.utils import date_time_from_string + +from box_sdk_gen.internal.utils import date_time_to_string + from box_sdk_gen.client import BoxClient from test.commons import get_default_client @@ -38,3 +42,28 @@ def testCreateUpdateGetDeleteLegalHoldPolicy(): ) assert updated_legal_hold_policy.policy_name == updated_legal_hold_policy_name client.legal_hold_policies.delete_legal_hold_policy_by_id(legal_hold_policy_id) + + +def testCreateNotOngoingLegalHoldPolicy(): + legal_hold_policy_name: str = get_uuid() + legal_hold_description: str = 'test description' + legal_hold_policy: LegalHoldPolicy = ( + client.legal_hold_policies.create_legal_hold_policy( + legal_hold_policy_name, + description=legal_hold_description, + filter_started_at=date_time_from_string('2021-01-01T00:00:00-08:00'), + filter_ended_at=date_time_from_string('2022-01-01T00:00:00-08:00'), + is_ongoing=False, + ) + ) + assert legal_hold_policy.policy_name == legal_hold_policy_name + assert legal_hold_policy.description == legal_hold_description + assert ( + date_time_to_string(legal_hold_policy.filter_started_at) + == '2021-01-01T00:00:00-08:00' + ) + assert ( + date_time_to_string(legal_hold_policy.filter_ended_at) + == '2022-01-01T00:00:00-08:00' + ) + client.legal_hold_policies.delete_legal_hold_policy_by_id(legal_hold_policy.id) diff --git a/test/search.py b/test/search.py index c195684..5aa7925 100644 --- a/test/search.py +++ b/test/search.py @@ -34,6 +34,14 @@ from box_sdk_gen.managers.search import SearchForContentTrashContent +from box_sdk_gen.managers.metadata_templates import ( + CreateMetadataTemplateFieldsOptionsField, +) + +from box_sdk_gen.schemas import MetadataFilter + +from box_sdk_gen.schemas import MetadataFilterScopeField + from box_sdk_gen.internal.utils import get_uuid from box_sdk_gen.internal.utils import generate_byte_stream @@ -105,3 +113,111 @@ def testGetSearch(): ) assert len(search_with_shared_link.entries) >= 0 assert to_string(search_with_shared_link.type) == 'search_results_with_shared_links' + + +def testMetadataFilters(): + template_key: str = ''.join(['key', get_uuid()]) + template: MetadataTemplate = client.metadata_templates.create_metadata_template( + 'enterprise', + template_key, + template_key=template_key, + fields=[ + CreateMetadataTemplateFields( + type=CreateMetadataTemplateFieldsTypeField.FLOAT.value, + key='floatField', + display_name='floatField', + ), + CreateMetadataTemplateFields( + type=CreateMetadataTemplateFieldsTypeField.STRING.value, + key='stringField', + display_name='stringField', + ), + CreateMetadataTemplateFields( + type=CreateMetadataTemplateFieldsTypeField.DATE.value, + key='dateField', + display_name='dateField', + ), + CreateMetadataTemplateFields( + type=CreateMetadataTemplateFieldsTypeField.ENUM.value, + key='enumField', + display_name='enumField', + options=[ + CreateMetadataTemplateFieldsOptionsField(key='enumValue1'), + CreateMetadataTemplateFieldsOptionsField(key='enumValue2'), + ], + ), + CreateMetadataTemplateFields( + type=CreateMetadataTemplateFieldsTypeField.MULTISELECT.value, + key='multiSelectField', + display_name='multiSelectField', + options=[ + CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue1'), + CreateMetadataTemplateFieldsOptionsField(key='multiSelectValue2'), + ], + ), + ], + ) + files: Files = client.uploads.upload_file( + UploadFileAttributes( + name=get_uuid(), parent=UploadFileAttributesParentField(id='0') + ), + generate_byte_stream(10), + ) + file: FileFull = files.entries[0] + metadata: MetadataFull = client.file_metadata.create_file_metadata_by_id( + file.id, + CreateFileMetadataByIdScope.ENTERPRISE.value, + template_key, + { + 'floatField': 10, + 'stringField': 'stringValue', + 'dateField': '2035-01-02T00:00:00Z', + 'enumField': 'enumValue2', + 'multiSelectField': ['multiSelectValue1', 'multiSelectValue2'], + }, + ) + string_query: Union[SearchResults, SearchResultsWithSharedLinks] = ( + client.search.search_for_content( + ancestor_folder_ids=['0'], + mdfilters=[ + MetadataFilter( + filters={'stringField': 'stringValue'}, + scope=MetadataFilterScopeField.ENTERPRISE.value, + template_key=template_key, + ) + ], + ) + ) + assert len(string_query.entries) >= 0 + enum_query: Union[SearchResults, SearchResultsWithSharedLinks] = ( + client.search.search_for_content( + ancestor_folder_ids=['0'], + mdfilters=[ + MetadataFilter( + filters={'enumField': 'enumValue2'}, + scope=MetadataFilterScopeField.ENTERPRISE.value, + template_key=template_key, + ) + ], + ) + ) + assert len(enum_query.entries) >= 0 + multi_select_query: Union[SearchResults, SearchResultsWithSharedLinks] = ( + client.search.search_for_content( + ancestor_folder_ids=['0'], + mdfilters=[ + MetadataFilter( + filters={ + 'multiSelectField': ['multiSelectValue1', 'multiSelectValue2'] + }, + scope=MetadataFilterScopeField.ENTERPRISE.value, + template_key=template_key, + ) + ], + ) + ) + assert len(multi_select_query.entries) >= 0 + client.metadata_templates.delete_metadata_template( + DeleteMetadataTemplateScope.ENTERPRISE.value, template.template_key + ) + client.files.delete_file_by_id(file.id) diff --git a/test/sign_requests.py b/test/sign_requests.py index f74c7fd..6cb7f30 100644 --- a/test/sign_requests.py +++ b/test/sign_requests.py @@ -18,10 +18,16 @@ from box_sdk_gen.schemas import FolderBaseTypeField +from box_sdk_gen.schemas import SignRequestPrefillTag + from box_sdk_gen.schemas import SignRequests from box_sdk_gen.internal.utils import get_uuid +from box_sdk_gen.internal.utils import date_from_string + +from box_sdk_gen.internal.utils import date_to_string + from test.commons import upload_new_file from test.commons import create_new_folder @@ -41,10 +47,18 @@ def testCreateGetCancelAndListSignRequest(): parent_folder=FolderMini( id=destination_folder.id, type=FolderBaseTypeField.FOLDER.value ), + prefill_tags=[ + SignRequestPrefillTag( + date_value=date_from_string('2035-01-01'), document_tag_id='0' + ) + ], ) assert created_sign_request.sign_files.files[0].name == file_to_sign.name assert created_sign_request.signers[1].email == signer_email assert created_sign_request.parent_folder.id == destination_folder.id + assert ( + date_to_string(created_sign_request.prefill_tags[0].date_value) == '2035-01-01' + ) new_sign_request: SignRequest = client.sign_requests.get_sign_request_by_id( created_sign_request.id ) diff --git a/test/task_assignments.py b/test/task_assignments.py index 24f0752..2bc088e 100644 --- a/test/task_assignments.py +++ b/test/task_assignments.py @@ -6,6 +6,8 @@ from box_sdk_gen.schemas import FileFull +from box_sdk_gen.internal.utils import DateTime + from box_sdk_gen.schemas import Task from box_sdk_gen.managers.tasks import CreateTaskItem @@ -36,12 +38,14 @@ from test.commons import get_default_client +from box_sdk_gen.internal.utils import date_time_from_string + client: BoxClient = get_default_client() def testCreateUpdateGetDeleteTaskAssignment(): file: FileFull = upload_new_file() - date: str = '2035-01-01T00:00:00Z' + date: DateTime = date_time_from_string('2035-01-01T00:00:00Z') task: Task = client.tasks.create_task( CreateTaskItem(type=CreateTaskItemTypeField.FILE.value, id=file.id), action=CreateTaskAction.REVIEW.value, diff --git a/test/tasks.py b/test/tasks.py index 43721b2..d946189 100644 --- a/test/tasks.py +++ b/test/tasks.py @@ -8,6 +8,8 @@ from box_sdk_gen.schemas import FileFull +from box_sdk_gen.internal.utils import DateTime + from box_sdk_gen.schemas import Task from box_sdk_gen.managers.tasks import CreateTaskItem @@ -24,6 +26,10 @@ from box_sdk_gen.internal.utils import generate_byte_stream +from box_sdk_gen.internal.utils import date_time_from_string + +from box_sdk_gen.internal.utils import date_time_to_string + from test.commons import get_default_client client: BoxClient = get_default_client() @@ -37,7 +43,7 @@ def testCreateUpdateGetDeleteTask(): generate_byte_stream(10), ) file: FileFull = files.entries[0] - date: str = '2035-01-01T00:00:00Z' + date: DateTime = date_time_from_string('2035-01-01T00:00:00Z') task: Task = client.tasks.create_task( CreateTaskItem(type=CreateTaskItemTypeField.FILE.value, id=file.id), action=CreateTaskAction.REVIEW.value, @@ -47,6 +53,7 @@ def testCreateUpdateGetDeleteTask(): ) assert task.message == 'test message' assert task.item.id == file.id + assert date_time_to_string(task.due_at) == '2035-01-01T00:00:00Z' task_by_id: Task = client.tasks.get_task_by_id(task.id) assert task_by_id.id == task.id task_on_file: Tasks = client.tasks.get_file_tasks(file.id) diff --git a/test/zip_downloads.py b/test/zip_downloads.py index 3a70a06..6d6deae 100644 --- a/test/zip_downloads.py +++ b/test/zip_downloads.py @@ -30,6 +30,8 @@ from box_sdk_gen.internal.utils import generate_byte_buffer +from box_sdk_gen.internal.utils import date_time_to_string + client: BoxClient = get_default_client() @@ -75,7 +77,7 @@ def testManualZipDownloadAndCheckStatus(): ) assert not zip_download.download_url == '' assert not zip_download.status_url == '' - assert not zip_download.expires_at == '' + assert not date_time_to_string(zip_download.expires_at) == '' zip_stream: ByteStream = client.zip_downloads.get_zip_download_content( zip_download.download_url )