Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move notification suppression to public schema (box/box-openapi#425) #159

Closed
wants to merge 6 commits into from
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "5012b13", "specHash": "d5769a1", "version": "0.6.5" }
{ "engineHash": "3eadef2", "specHash": "6c3dd22", "version": "0.6.5" }
8 changes: 4 additions & 4 deletions box_sdk_gen/managers/legal_hold_policy_assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from box_sdk_gen.schemas.legal_hold_policy_assignment import LegalHoldPolicyAssignment

from box_sdk_gen.schemas.file_version_legal_holds import FileVersionLegalHolds
from box_sdk_gen.schemas.files_on_hold import FilesOnHold

from box_sdk_gen.networking.auth import Authentication

Expand Down Expand Up @@ -281,9 +281,9 @@ def get_legal_hold_policy_assignment_file_on_hold(
limit: Optional[int] = None,
fields: Optional[List[str]] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> FileVersionLegalHolds:
) -> FilesOnHold:
"""
Get a list of current file versions for a legal hold
Get a list of files with current file versions for a legal hold

assignment.

Expand Down Expand Up @@ -371,4 +371,4 @@ def get_legal_hold_policy_assignment_file_on_hold(
network_session=self.network_session,
),
)
return deserialize(response.data, FileVersionLegalHolds)
return deserialize(response.data, FilesOnHold)
2 changes: 1 addition & 1 deletion box_sdk_gen/managers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def search_for_content(
:type trash_content: Optional[SearchForContentTrashContent], optional
:param mdfilters: Limits the search results to any items for which the metadata matches the provided filter.
This parameter is a list that specifies exactly **one** metadata template used to filter the search results.
It unless the `query` parameter is provided., defaults to None
It is required unless the `query` parameter is provided., defaults to None
:type mdfilters: Optional[List[MetadataFilter]], optional
:param sort: Defines the order in which search results are returned. This API
defaults to returning items by relevance unless this parameter is
Expand Down
30 changes: 17 additions & 13 deletions box_sdk_gen/managers/sign_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def cancel_sign_request(
) -> SignRequest:
"""
Cancels a sign request.
:param sign_request_id: The ID of the sign request
:param sign_request_id: The ID of the signature request
Example: "33243242"
:type sign_request_id: str
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
Expand Down Expand Up @@ -110,8 +110,8 @@ def resend_sign_request(
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> None:
"""
Resends a sign request email to all outstanding signers.
:param sign_request_id: The ID of the sign request
Resends a signature request email to all outstanding signers.
:param sign_request_id: The ID of the signature request
Example: "33243242"
:type sign_request_id: str
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
Expand Down Expand Up @@ -147,7 +147,7 @@ def get_sign_request_by_id(
) -> SignRequest:
"""
Gets a sign request by ID.
:param sign_request_id: The ID of the sign request
:param sign_request_id: The ID of the signature request
Example: "33243242"
:type sign_request_id: str
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
Expand Down Expand Up @@ -182,9 +182,9 @@ def get_sign_requests(
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> SignRequests:
"""
Gets sign requests created by a user. If the `sign_files` and/or
Gets signature requests created by a user. If the `sign_files` and/or

`parent_folder` are deleted, the sign request will not return in the list.
`parent_folder` are deleted, the signature request will not return in the list.

:param marker: Defines the position marker at which to begin returning results. This is
used when paginating using marker-based pagination.
Expand Down Expand Up @@ -235,22 +235,23 @@ def create_sign_request(
external_id: Optional[str] = None,
is_phone_verification_required_to_view: Optional[bool] = None,
template_id: Optional[str] = None,
external_system_name: Optional[str] = None,
extra_headers: Optional[Dict[str, Optional[str]]] = None
) -> SignRequest:
"""
Creates a sign request. This involves preparing a document for signing and
Creates a signature request. This involves preparing a document for signing and

sending the sign request to signers.
sending the signature request to signers.

:param signers: Array of signers for the sign request. 35 is the max number of signers permitted.
:param signers: Array of signers for the signature request. 35 is the max number of signers permitted.
:type signers: List[SignRequestCreateSigner]
:param source_files: List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file., defaults to None
:type source_files: Optional[List[FileBase]], optional
:param signature_color: Force a specific color for the signature (blue, black, or red), defaults to None
:type signature_color: Optional[CreateSignRequestSignatureColor], 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
:param is_document_preparation_needed: Indicates if the sender should receive a `prepare_url` in the response to complete document preparation using the 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
:param redirect_url: When specified, the signature request will be redirected to this url when a document is signed., defaults to None
:type redirect_url: Optional[str], optional
:param declined_redirect_url: The uri that a signer will be redirected to after declining to sign a document., defaults to None
:type declined_redirect_url: Optional[str], optional
Expand All @@ -262,9 +263,9 @@ def create_sign_request(
:type email_message: Optional[str], optional
:param are_reminders_enabled: Reminds signers to sign a document on day 3, 8, 13 and 18. Reminders are only sent to outstanding signers., defaults to None
:type are_reminders_enabled: Optional[bool], optional
:param name: Name of the sign request., defaults to None
:param name: Name of the signature request., defaults to None
:type name: Optional[str], optional
:param prefill_tags: When a document contains sign related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None
:param prefill_tags: When a document contains sign-related tags in the content, you can prefill them using this `prefill_tags` by referencing the 'id' of the tag as the `external_id` field of the prefill tag., defaults to None
:type prefill_tags: Optional[List[SignRequestPrefillTag]], optional
:param days_valid: Set the number of days after which the created signature request will automatically expire if not completed. By default, we do not apply any expiration date on signature requests, and the signature request does not expire., defaults to None
:type days_valid: Optional[int], optional
Expand All @@ -274,6 +275,8 @@ def create_sign_request(
:type is_phone_verification_required_to_view: Optional[bool], optional
:param template_id: When a signature request is created from a template this field will indicate the id of that template., defaults to None
:type template_id: Optional[str], optional
:param external_system_name: Used as an optional system name to appear in the signature log next to the signers who have been assigned an `embed_url_external_id`, defaults to None
:type external_system_name: Optional[str], 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
"""
Expand All @@ -297,6 +300,7 @@ def create_sign_request(
'external_id': external_id,
'is_phone_verification_required_to_view': is_phone_verification_required_to_view,
'template_id': template_id,
'external_system_name': external_system_name,
}
headers_map: Dict[str, str] = prepare_params({**extra_headers})
response: FetchResponse = fetch(
Expand Down
2 changes: 2 additions & 0 deletions box_sdk_gen/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

from box_sdk_gen.schemas.file_mini import *

from box_sdk_gen.schemas.files_on_hold import *

from box_sdk_gen.schemas.files_under_retention import *

from box_sdk_gen.schemas.file_conflict import *
Expand Down
6 changes: 4 additions & 2 deletions box_sdk_gen/schemas/events.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Optional

from typing import Union

from typing import List

from box_sdk_gen.internal.base_object import BaseObject
Expand All @@ -12,7 +14,7 @@ def __init__(
self,
*,
chunk_size: Optional[int] = None,
next_stream_position: Optional[str] = None,
next_stream_position: Optional[Union[str, float]] = None,
entries: Optional[List[Event]] = None,
**kwargs
):
Expand All @@ -21,7 +23,7 @@ def __init__(
:type chunk_size: Optional[int], optional
:param next_stream_position: The stream position of the start of the next page (chunk)
of events., defaults to None
:type next_stream_position: Optional[str], optional
:type next_stream_position: Optional[Union[str, float]], optional
:param entries: A list of events, defaults to None
:type entries: Optional[List[Event]], optional
"""
Expand Down
4 changes: 3 additions & 1 deletion box_sdk_gen/schemas/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ def __init__(
for the URL `https://*.app.box.com/files/123`
the `file_id` is `123`.
:type id: str
:param description: The optional description of this file, defaults to None
:param description: The optional description of this file.
If the description exceeds 255 characters, the first 255 characters
are set as a file description and the rest of it is ignored., defaults to None
:type description: Optional[str], optional
:param size: The file size in bytes. Be careful parsing this integer as it can
get very large and cause an integer overflow., defaults to None
Expand Down
4 changes: 3 additions & 1 deletion box_sdk_gen/schemas/file_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ def __init__(
: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
:param description: The optional description of this file, defaults to None
:param description: The optional description of this file.
If the description exceeds 255 characters, the first 255 characters
are set as a file description and the rest of it is ignored., defaults to None
:type description: Optional[str], optional
:param size: The file size in bytes. Be careful parsing this integer as it can
get very large and cause an integer overflow., defaults to None
Expand Down
36 changes: 36 additions & 0 deletions box_sdk_gen/schemas/files_on_hold.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from typing import Optional

from typing import List

from box_sdk_gen.internal.base_object import BaseObject

from box_sdk_gen.schemas.file_mini import FileMini


class FilesOnHold(BaseObject):
def __init__(
self,
*,
limit: Optional[int] = None,
next_marker: Optional[str] = None,
prev_marker: Optional[str] = None,
entries: Optional[List[FileMini]] = None,
**kwargs
):
"""
:param limit: The limit that was used for these entries. This will be the same as the
`limit` query parameter unless that value exceeded the maximum value
allowed. The maximum value varies by API., defaults to None
:type limit: Optional[int], optional
:param next_marker: The marker for the start of the next page of results., defaults to None
:type next_marker: Optional[str], optional
:param prev_marker: The marker for the start of the previous page of results., defaults to None
:type prev_marker: Optional[str], optional
:param entries: A list of files, defaults to None
:type entries: Optional[List[FileMini]], optional
"""
super().__init__(**kwargs)
self.limit = limit
self.next_marker = next_marker
self.prev_marker = prev_marker
self.entries = entries
8 changes: 4 additions & 4 deletions box_sdk_gen/schemas/realtime_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def __init__(
*,
type: Optional[str] = None,
url: Optional[str] = None,
ttl: Optional[int] = None,
max_retries: Optional[int] = None,
ttl: Optional[str] = None,
max_retries: Optional[str] = None,
retry_timeout: Optional[int] = None,
**kwargs
):
Expand All @@ -20,11 +20,11 @@ def __init__(
:param url: The URL for the server., defaults to None
:type url: Optional[str], optional
:param ttl: The time in minutes for which this server is available, defaults to None
:type ttl: Optional[int], optional
:type ttl: Optional[str], optional
:param max_retries: The maximum number of retries this server will
allow before a new long poll should be started by
getting a [new list of server](#options-events)., defaults to None
:type max_retries: Optional[int], optional
:type max_retries: Optional[str], optional
:param retry_timeout: The maximum number of seconds without a response
after which you should retry the long poll connection.

Expand Down
Loading
Loading