Skip to content

Commit

Permalink
Merge pull request #153 from pieces-app/refactor-wrapper
Browse files Browse the repository at this point in the history
Refactor wrapper
  • Loading branch information
bishoy-at-pieces authored Sep 9, 2024
2 parents ff429bd + feda016 commit 4b17bc8
Show file tree
Hide file tree
Showing 135 changed files with 7,920 additions and 3,539 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# CHANGELOG
# 1.3.0

## Sept 10, 2024

- Major speed stability
- Fix some typos
- Better Copilot UI
- Major bug fixes including many assets and Copilot commands
- New Pieces Close command

# [1.2.0](https://github.com/pieces-app/plugin_sublime/milestone/3)

## Jul 15, 2024
Expand Down
4 changes: 4 additions & 0 deletions Pieces.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,9 @@
{
"caption": "Pieces: Export Pieces Material",
"command":"pieces_export_asset_to_sublime"
},
{
"caption": "Pieces: Close Pieces OS",
"command":"pieces_close_os"
}
]
13 changes: 5 additions & 8 deletions _pieces_lib/pieces_os_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "2.7.0"
__version__ = "3.1.0"

# import apis into sdk package
from Pieces._pieces_lib.pieces_os_client.api.activities_api import ActivitiesApi
Expand Down Expand Up @@ -158,6 +158,7 @@
from Pieces._pieces_lib.pieces_os_client.models.backup_status_enum import BackupStatusEnum
from Pieces._pieces_lib.pieces_os_client.models.backup_streamed_progress import BackupStreamedProgress
from Pieces._pieces_lib.pieces_os_client.models.backups import Backups
from Pieces._pieces_lib.pieces_os_client.models.backups_streamed_progress import BackupsStreamedProgress
from Pieces._pieces_lib.pieces_os_client.models.browser_selection import BrowserSelection
from Pieces._pieces_lib.pieces_os_client.models.browser_tab import BrowserTab
from Pieces._pieces_lib.pieces_os_client.models.browser_tab_value import BrowserTabValue
Expand Down Expand Up @@ -232,6 +233,7 @@
from Pieces._pieces_lib.pieces_os_client.models.flattened_anchors import FlattenedAnchors
from Pieces._pieces_lib.pieces_os_client.models.flattened_annotation import FlattenedAnnotation
from Pieces._pieces_lib.pieces_os_client.models.flattened_annotations import FlattenedAnnotations
from Pieces._pieces_lib.pieces_os_client.models.flattened_application import FlattenedApplication
from Pieces._pieces_lib.pieces_os_client.models.flattened_asset import FlattenedAsset
from Pieces._pieces_lib.pieces_os_client.models.flattened_assets import FlattenedAssets
from Pieces._pieces_lib.pieces_os_client.models.flattened_conversation import FlattenedConversation
Expand Down Expand Up @@ -316,6 +318,7 @@
from Pieces._pieces_lib.pieces_os_client.models.mailgun_metadata import MailgunMetadata
from Pieces._pieces_lib.pieces_os_client.models.mechanism_enum import MechanismEnum
from Pieces._pieces_lib.pieces_os_client.models.model import Model
from Pieces._pieces_lib.pieces_os_client.models.model_capabilities import ModelCapabilities
from Pieces._pieces_lib.pieces_os_client.models.model_delete_cache_input import ModelDeleteCacheInput
from Pieces._pieces_lib.pieces_os_client.models.model_delete_cache_output import ModelDeleteCacheOutput
from Pieces._pieces_lib.pieces_os_client.models.model_download_progress import ModelDownloadProgress
Expand Down Expand Up @@ -413,6 +416,7 @@
from Pieces._pieces_lib.pieces_os_client.models.referenced_anchor import ReferencedAnchor
from Pieces._pieces_lib.pieces_os_client.models.referenced_anchor_point import ReferencedAnchorPoint
from Pieces._pieces_lib.pieces_os_client.models.referenced_annotation import ReferencedAnnotation
from Pieces._pieces_lib.pieces_os_client.models.referenced_application import ReferencedApplication
from Pieces._pieces_lib.pieces_os_client.models.referenced_asset import ReferencedAsset
from Pieces._pieces_lib.pieces_os_client.models.referenced_conversation import ReferencedConversation
from Pieces._pieces_lib.pieces_os_client.models.referenced_conversation_message import ReferencedConversationMessage
Expand Down Expand Up @@ -598,8 +602,6 @@
from Pieces._pieces_lib.pieces_os_client.models.textually_extracted_materials import TextuallyExtractedMaterials
from Pieces._pieces_lib.pieces_os_client.models.theme import Theme
from Pieces._pieces_lib.pieces_os_client.models.tokenized_pkce import TokenizedPKCE
from Pieces._pieces_lib.pieces_os_client.models.tracked_application_install import TrackedApplicationInstall
from Pieces._pieces_lib.pieces_os_client.models.tracked_application_update import TrackedApplicationUpdate
from Pieces._pieces_lib.pieces_os_client.models.tracked_asset_event_creation_metadata import TrackedAssetEventCreationMetadata
from Pieces._pieces_lib.pieces_os_client.models.tracked_asset_event_creation_metadata_clipboard import TrackedAssetEventCreationMetadataClipboard
from Pieces._pieces_lib.pieces_os_client.models.tracked_asset_event_creation_metadata_file import TrackedAssetEventCreationMetadataFile
Expand All @@ -613,15 +615,10 @@
from Pieces._pieces_lib.pieces_os_client.models.tracked_conversation_event_identifier_description_pairs import TrackedConversationEventIdentifierDescriptionPairs
from Pieces._pieces_lib.pieces_os_client.models.tracked_conversation_event_metadata import TrackedConversationEventMetadata
from Pieces._pieces_lib.pieces_os_client.models.tracked_conversation_event_rename_metadata import TrackedConversationEventRenameMetadata
from Pieces._pieces_lib.pieces_os_client.models.tracked_format import TrackedFormat
from Pieces._pieces_lib.pieces_os_client.models.tracked_format_event import TrackedFormatEvent
from Pieces._pieces_lib.pieces_os_client.models.tracked_format_event_identifier_description_pairs import TrackedFormatEventIdentifierDescriptionPairs
from Pieces._pieces_lib.pieces_os_client.models.tracked_format_event_metadata import TrackedFormatEventMetadata
from Pieces._pieces_lib.pieces_os_client.models.tracked_interaction_event import TrackedInteractionEvent
from Pieces._pieces_lib.pieces_os_client.models.tracked_keyboard_event import TrackedKeyboardEvent
from Pieces._pieces_lib.pieces_os_client.models.tracked_session_event_identifier_description_pairs import TrackedSessionEventIdentifierDescriptionPairs
from Pieces._pieces_lib.pieces_os_client.models.tracked_summary_totals import TrackedSummaryTotals
from Pieces._pieces_lib.pieces_os_client.models.tracked_user_profile import TrackedUserProfile
from Pieces._pieces_lib.pieces_os_client.models.transferable_bytes import TransferableBytes
from Pieces._pieces_lib.pieces_os_client.models.transferable_string import TransferableString
from Pieces._pieces_lib.pieces_os_client.models.unchecked_os_server_update import UncheckedOSServerUpdate
Expand Down
134 changes: 134 additions & 0 deletions _pieces_lib/pieces_os_client/api/activities_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from Pieces._pieces_lib.pieces_os_client.models.activities import Activities
from Pieces._pieces_lib.pieces_os_client.models.activity import Activity
from Pieces._pieces_lib.pieces_os_client.models.seeded_activity import SeededActivity
from Pieces._pieces_lib.pieces_os_client.models.streamed_identifiers import StreamedIdentifiers

from Pieces._pieces_lib.pieces_os_client.api_client import ApiClient
from Pieces._pieces_lib.pieces_os_client.api_response import ApiResponse
Expand Down Expand Up @@ -490,3 +491,136 @@ def activities_snapshot_with_http_info(self, transferables : Annotated[Optional[
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def activities_stream_identifiers(self, **kwargs) -> StreamedIdentifiers: # noqa: E501
"""/activities/stream/identifiers [WS] # noqa: E501
Provides a WebSocket connection that emits changes to your activity identifiers (UUIDs). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.activities_stream_identifiers(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request.
If one number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: StreamedIdentifiers
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
message = "Error! Please call the activities_stream_identifiers_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
return self.activities_stream_identifiers_with_http_info(**kwargs) # noqa: E501

@validate_arguments
def activities_stream_identifiers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501
"""/activities/stream/identifiers [WS] # noqa: E501
Provides a WebSocket connection that emits changes to your activity identifiers (UUIDs). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.activities_stream_identifiers_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(StreamedIdentifiers, status_code(int), headers(HTTPHeaderDict))
"""

_params = locals()

_all_params = [
]
_all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)

# validate the arguments
for _key, _val in _params['kwargs'].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method activities_stream_identifiers" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}

# process the query parameters
_query_params = []
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain']) # noqa: E501

# authentication setting
_auth_settings = [] # noqa: E501

_response_types_map = {
'200': "StreamedIdentifiers",
'500': "str",
}

return self.api_client.call_api(
'/activities/stream/identifiers', 'GET',
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get('async_req'),
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
_preload_content=_params.get('_preload_content', True),
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
Loading

0 comments on commit 4b17bc8

Please sign in to comment.