From 0dfdbb6df20d354d4cb1839b32eab21fe176548e Mon Sep 17 00:00:00 2001 From: Navneet Garg Date: Tue, 23 Sep 2025 21:24:24 -0400 Subject: [PATCH 1/2] Add new models for Exports and fix CallResult --- .openapi-generator/FILES | 24 + CHANGELOG.md | 13 + README.md | 15 +- docs/CallResult.md | 2 +- docs/CreateConference.md | 3 +- docs/DefaultApi.md | 408 +++++- docs/ExportList.md | 36 + docs/ExportOutputType.md | 11 + docs/ExportRequest.md | 32 + docs/ExportRequestOutput.md | 29 + docs/ExportResourceType.md | 13 + docs/ExportResult.md | 40 + docs/ExportResultOutput.md | 29 + docs/ExportStatus.md | 21 + freeclimb/__init__.py | 16 +- freeclimb/api/default_api.py | 1519 ++++++++++++++++++++- freeclimb/api_client.py | 2 +- freeclimb/configuration.py | 2 +- freeclimb/models/__init__.py | 14 + freeclimb/models/call_result.py | 12 +- freeclimb/models/create_conference.py | 9 +- freeclimb/models/export_list.py | 175 +++ freeclimb/models/export_output_type.py | 35 + freeclimb/models/export_request.py | 101 ++ freeclimb/models/export_request_output.py | 83 ++ freeclimb/models/export_resource_type.py | 36 + freeclimb/models/export_result.py | 150 ++ freeclimb/models/export_result_output.py | 83 ++ freeclimb/models/export_status.py | 40 + openapi.json | 372 ++++- pyproject.toml | 2 +- setup.py | 2 +- test/api/test_default_api.py | 108 +- test/models/test_account_result.py | 2 +- test/models/test_call_result.py | 38 +- test/models/test_conference_result.py | 2 +- test/models/test_create_conference.py | 11 +- test/models/test_export_list.py | 74 + test/models/test_export_output_type.py | 29 + test/models/test_export_request.py | 64 + test/models/test_export_request_output.py | 39 + test/models/test_export_resource_type.py | 29 + test/models/test_export_result.py | 129 ++ test/models/test_export_result_output.py | 39 + test/models/test_export_status.py | 29 + test/models/test_log_result.py | 2 +- test/models/test_queue_result.py | 2 +- 47 files changed, 3837 insertions(+), 89 deletions(-) create mode 100644 docs/ExportList.md create mode 100644 docs/ExportOutputType.md create mode 100644 docs/ExportRequest.md create mode 100644 docs/ExportRequestOutput.md create mode 100644 docs/ExportResourceType.md create mode 100644 docs/ExportResult.md create mode 100644 docs/ExportResultOutput.md create mode 100644 docs/ExportStatus.md create mode 100644 freeclimb/models/export_list.py create mode 100644 freeclimb/models/export_output_type.py create mode 100644 freeclimb/models/export_request.py create mode 100644 freeclimb/models/export_request_output.py create mode 100644 freeclimb/models/export_resource_type.py create mode 100644 freeclimb/models/export_result.py create mode 100644 freeclimb/models/export_result_output.py create mode 100644 freeclimb/models/export_status.py create mode 100644 test/models/test_export_list.py create mode 100644 test/models/test_export_output_type.py create mode 100644 test/models/test_export_request.py create mode 100644 test/models/test_export_request_output.py create mode 100644 test/models/test_export_resource_type.py create mode 100644 test/models/test_export_result.py create mode 100644 test/models/test_export_result_output.py create mode 100644 test/models/test_export_status.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8396f65..9393b39 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -41,6 +41,14 @@ docs/DefaultApi.md docs/Dequeue.md docs/DequeueWebhook.md docs/Enqueue.md +docs/ExportList.md +docs/ExportOutputType.md +docs/ExportRequest.md +docs/ExportRequestOutput.md +docs/ExportResourceType.md +docs/ExportResult.md +docs/ExportResultOutput.md +docs/ExportStatus.md docs/FilterLogsRequest.md docs/GetDigits.md docs/GetDigitsReason.md @@ -189,6 +197,14 @@ freeclimb/models/create_web_rtc_token.py freeclimb/models/dequeue.py freeclimb/models/dequeue_webhook.py freeclimb/models/enqueue.py +freeclimb/models/export_list.py +freeclimb/models/export_output_type.py +freeclimb/models/export_request.py +freeclimb/models/export_request_output.py +freeclimb/models/export_resource_type.py +freeclimb/models/export_result.py +freeclimb/models/export_result_output.py +freeclimb/models/export_status.py freeclimb/models/filter_logs_request.py freeclimb/models/get_digits.py freeclimb/models/get_digits_reason.py @@ -337,6 +353,14 @@ test/test_default_api.py test/test_dequeue.py test/test_dequeue_webhook.py test/test_enqueue.py +test/test_export_list.py +test/test_export_output_type.py +test/test_export_request.py +test/test_export_request_output.py +test/test_export_resource_type.py +test/test_export_result.py +test/test_export_result_output.py +test/test_export_status.py test/test_filter_logs_request.py test/test_get_digits.py test/test_get_digits_reason.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 277a12f..527c046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,19 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm None + + +## [5.2.0] - 2025-09-23 + +### Added + +- Add models for ExportResult and ExportRequest + +### Changed + +- CallResult.callStatus -> CallResult.status +- CreateConference now includes parentCallId + ## [5.1.1] - 2025-02-18 diff --git a/README.md b/README.md index 794d10c..95566b9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 5.1.1 +- Package version: 5.2.0 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) @@ -119,13 +119,16 @@ Class | Method | HTTP request | Description *DefaultApi* | [**create_a_conference**](docs/DefaultApi.md#create_a_conference) | **POST** /Accounts/{accountId}/Conferences | Create a Conference *DefaultApi* | [**create_a_queue**](docs/DefaultApi.md#create_a_queue) | **POST** /Accounts/{accountId}/Queues | Create a Queue *DefaultApi* | [**create_an_application**](docs/DefaultApi.md#create_an_application) | **POST** /Accounts/{accountId}/Applications | Create an application +*DefaultApi* | [**create_export**](docs/DefaultApi.md#create_export) | **POST** /Accounts/{accountId}/Exports | Create an Export *DefaultApi* | [**create_knowledge_base_completion**](docs/DefaultApi.md#create_knowledge_base_completion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base *DefaultApi* | [**delete_a_recording**](docs/DefaultApi.md#delete_a_recording) | **DELETE** /Accounts/{accountId}/Recordings/{recordingId} | Delete a Recording *DefaultApi* | [**delete_an_application**](docs/DefaultApi.md#delete_an_application) | **DELETE** /Accounts/{accountId}/Applications/{applicationId} | Delete an application +*DefaultApi* | [**delete_an_export**](docs/DefaultApi.md#delete_an_export) | **DELETE** /Accounts/{accountId}/Exports/{exportId} | Delete an Export *DefaultApi* | [**delete_an_incoming_number**](docs/DefaultApi.md#delete_an_incoming_number) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number *DefaultApi* | [**dequeue_a_member**](docs/DefaultApi.md#dequeue_a_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member *DefaultApi* | [**dequeue_head_member**](docs/DefaultApi.md#dequeue_head_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member *DefaultApi* | [**download_a_recording_file**](docs/DefaultApi.md#download_a_recording_file) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Download | Download a Recording File +*DefaultApi* | [**download_an_export**](docs/DefaultApi.md#download_an_export) | **GET** /Accounts/{accountId}/Exports/{exportId}/Download | Download an Export *DefaultApi* | [**filter_logs**](docs/DefaultApi.md#filter_logs) | **POST** /Accounts/{accountId}/Logs | Filter Logs *DefaultApi* | [**get_a_call**](docs/DefaultApi.md#get_a_call) | **GET** /Accounts/{accountId}/Calls/{callId} | Get a Call *DefaultApi* | [**get_a_conference**](docs/DefaultApi.md#get_a_conference) | **GET** /Accounts/{accountId}/Conferences/{conferenceId} | Get a Conference @@ -135,6 +138,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**get_a_recording**](docs/DefaultApi.md#get_a_recording) | **GET** /Accounts/{accountId}/Recordings/{recordingId} | Get a Recording *DefaultApi* | [**get_an_account**](docs/DefaultApi.md#get_an_account) | **GET** /Accounts/{accountId} | Get an Account *DefaultApi* | [**get_an_application**](docs/DefaultApi.md#get_an_application) | **GET** /Accounts/{accountId}/Applications/{applicationId} | Get an Application +*DefaultApi* | [**get_an_export**](docs/DefaultApi.md#get_an_export) | **GET** /Accounts/{accountId}/Exports/{exportId} | Get an Export *DefaultApi* | [**get_an_incoming_number**](docs/DefaultApi.md#get_an_incoming_number) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Get an Incoming Number *DefaultApi* | [**get_an_sms_message**](docs/DefaultApi.md#get_an_sms_message) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message *DefaultApi* | [**get_head_member**](docs/DefaultApi.md#get_head_member) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member @@ -155,6 +159,7 @@ Class | Method | HTTP request | Description *DefaultApi* | [**list_calls**](docs/DefaultApi.md#list_calls) | **GET** /Accounts/{accountId}/Calls | List Calls *DefaultApi* | [**list_conference_recordings**](docs/DefaultApi.md#list_conference_recordings) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Recordings | List Conference Recordings *DefaultApi* | [**list_conferences**](docs/DefaultApi.md#list_conferences) | **GET** /Accounts/{accountId}/Conferences | List Conferences +*DefaultApi* | [**list_exports**](docs/DefaultApi.md#list_exports) | **GET** /Accounts/{accountId}/Exports | List Exports *DefaultApi* | [**list_incoming_numbers**](docs/DefaultApi.md#list_incoming_numbers) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers | List Incoming Numbers *DefaultApi* | [**list_members**](docs/DefaultApi.md#list_members) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members | List Members *DefaultApi* | [**list_participants**](docs/DefaultApi.md#list_participants) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants | List Participants @@ -217,6 +222,14 @@ Class | Method | HTTP request | Description - [Dequeue](docs/Dequeue.md) - [DequeueWebhook](docs/DequeueWebhook.md) - [Enqueue](docs/Enqueue.md) + - [ExportList](docs/ExportList.md) + - [ExportOutputType](docs/ExportOutputType.md) + - [ExportRequest](docs/ExportRequest.md) + - [ExportRequestOutput](docs/ExportRequestOutput.md) + - [ExportResourceType](docs/ExportResourceType.md) + - [ExportResult](docs/ExportResult.md) + - [ExportResultOutput](docs/ExportResultOutput.md) + - [ExportStatus](docs/ExportStatus.md) - [FilterLogsRequest](docs/FilterLogsRequest.md) - [GetDigits](docs/GetDigits.md) - [GetDigitsReason](docs/GetDigitsReason.md) diff --git a/docs/CallResult.md b/docs/CallResult.md index 9459a5d..fbf17a1 100644 --- a/docs/CallResult.md +++ b/docs/CallResult.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **var_from** | **str** | Phone number that initiated this Call. | [optional] **to** | **str** | Phone number that received this Call. | [optional] **phone_number_id** | **str** | If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI). | [optional] -**call_status** | [**CallStatus**](CallStatus.md) | | [optional] +**status** | [**CallStatus**](CallStatus.md) | | [optional] **start_time** | **str** | Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] **connect_time** | **str** | Time the Call was answered (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed. | [optional] **end_time** | **str** | End time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call did not complete successfully. | [optional] diff --git a/docs/CreateConference.md b/docs/CreateConference.md index e6d4a16..8637d4f 100644 --- a/docs/CreateConference.md +++ b/docs/CreateConference.md @@ -7,11 +7,12 @@ The `CreateConference` command does exactly what its name implies — it creates Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **action_url** | **str** | This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. | -**alias** | **bool** | Descriptive name for the Conference. | [optional] +**alias** | **str** | Descriptive name for the Conference. | [optional] **play_beep** | [**PlayBeep**](PlayBeep.md) | | [optional] **record** | **bool** | When set to `true`, the entire Conference is recorded. The `statusCallbackUrl` of the Conference will receive a `conferenceRecordingEnded` Webhook when the Conference transitions from the `inProgress` to empty state. | [optional] **status_callback_url** | **str** | This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. | [optional] **wait_url** | **str** | If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb. | [optional] +**parent_call_id** | **str** | ID of the Call that created this leg (child call). | [optional] ## Example diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 6e79a46..adaa994 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -8,13 +8,16 @@ Method | HTTP request | Description [**create_a_conference**](DefaultApi.md#create_a_conference) | **POST** /Accounts/{accountId}/Conferences | Create a Conference [**create_a_queue**](DefaultApi.md#create_a_queue) | **POST** /Accounts/{accountId}/Queues | Create a Queue [**create_an_application**](DefaultApi.md#create_an_application) | **POST** /Accounts/{accountId}/Applications | Create an application +[**create_export**](DefaultApi.md#create_export) | **POST** /Accounts/{accountId}/Exports | Create an Export [**create_knowledge_base_completion**](DefaultApi.md#create_knowledge_base_completion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base [**delete_a_recording**](DefaultApi.md#delete_a_recording) | **DELETE** /Accounts/{accountId}/Recordings/{recordingId} | Delete a Recording [**delete_an_application**](DefaultApi.md#delete_an_application) | **DELETE** /Accounts/{accountId}/Applications/{applicationId} | Delete an application +[**delete_an_export**](DefaultApi.md#delete_an_export) | **DELETE** /Accounts/{accountId}/Exports/{exportId} | Delete an Export [**delete_an_incoming_number**](DefaultApi.md#delete_an_incoming_number) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number [**dequeue_a_member**](DefaultApi.md#dequeue_a_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member [**dequeue_head_member**](DefaultApi.md#dequeue_head_member) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member [**download_a_recording_file**](DefaultApi.md#download_a_recording_file) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Download | Download a Recording File +[**download_an_export**](DefaultApi.md#download_an_export) | **GET** /Accounts/{accountId}/Exports/{exportId}/Download | Download an Export [**filter_logs**](DefaultApi.md#filter_logs) | **POST** /Accounts/{accountId}/Logs | Filter Logs [**get_a_call**](DefaultApi.md#get_a_call) | **GET** /Accounts/{accountId}/Calls/{callId} | Get a Call [**get_a_conference**](DefaultApi.md#get_a_conference) | **GET** /Accounts/{accountId}/Conferences/{conferenceId} | Get a Conference @@ -24,6 +27,7 @@ Method | HTTP request | Description [**get_a_recording**](DefaultApi.md#get_a_recording) | **GET** /Accounts/{accountId}/Recordings/{recordingId} | Get a Recording [**get_an_account**](DefaultApi.md#get_an_account) | **GET** /Accounts/{accountId} | Get an Account [**get_an_application**](DefaultApi.md#get_an_application) | **GET** /Accounts/{accountId}/Applications/{applicationId} | Get an Application +[**get_an_export**](DefaultApi.md#get_an_export) | **GET** /Accounts/{accountId}/Exports/{exportId} | Get an Export [**get_an_incoming_number**](DefaultApi.md#get_an_incoming_number) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Get an Incoming Number [**get_an_sms_message**](DefaultApi.md#get_an_sms_message) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message [**get_head_member**](DefaultApi.md#get_head_member) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member @@ -44,6 +48,7 @@ Method | HTTP request | Description [**list_calls**](DefaultApi.md#list_calls) | **GET** /Accounts/{accountId}/Calls | List Calls [**list_conference_recordings**](DefaultApi.md#list_conference_recordings) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Recordings | List Conference Recordings [**list_conferences**](DefaultApi.md#list_conferences) | **GET** /Accounts/{accountId}/Conferences | List Conferences +[**list_exports**](DefaultApi.md#list_exports) | **GET** /Accounts/{accountId}/Exports | List Exports [**list_incoming_numbers**](DefaultApi.md#list_incoming_numbers) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers | List Incoming Numbers [**list_members**](DefaultApi.md#list_members) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members | List Members [**list_participants**](DefaultApi.md#list_participants) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants | List Participants @@ -383,6 +388,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_export** +> ExportResult create_export(account_id, export_request=export_request) + +Create an Export + +### Example + +* Basic Authentication (fc): + +```python +import freeclimb +from freeclimb.models.export_request import ExportRequest +from freeclimb.models.export_result import ExportResult +from freeclimb.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver +# See configuration.py for a list of all supported configuration parameters. +configuration = freeclimb.Configuration( + host = "https://www.freeclimb.com/apiserver" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: fc +configuration = freeclimb.Configuration( + username = 'ACCOUNT_ID', + password = 'API_KEY' +) + +# Enter a context with an instance of the API client +with freeclimb.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + export_request = freeclimb.ExportRequest() # ExportRequest | A JSON object containing export creation parameters (optional) + + try: + # Create an Export + api_response = api_instance.create_export(account_id, export_request=export_request) + print("The response of DefaultApi->create_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->create_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | + **export_request** | [**ExportRequest**](ExportRequest.md)| A JSON object containing export creation parameters | [optional] + +### Return type + +[**ExportResult**](ExportResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export successfully created | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_knowledge_base_completion** > CompletionResult create_knowledge_base_completion(account_id, knowledge_base_id, completion_request=completion_request) @@ -617,6 +702,82 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_an_export** +> delete_an_export(account_id, export_id) + +Delete an Export + +### Example + +* Basic Authentication (fc): + +```python +import freeclimb +from freeclimb.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver +# See configuration.py for a list of all supported configuration parameters. +configuration = freeclimb.Configuration( + host = "https://www.freeclimb.com/apiserver" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: fc +configuration = freeclimb.Configuration( + username = 'ACCOUNT_ID', + password = 'API_KEY' +) + +# Enter a context with an instance of the API client +with freeclimb.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + export_id = 'export_id_example' # str | A string that uniquely identifies this export resource. + + try: + # Delete an Export + api_instance.delete_an_export(account_id, export_id) + except Exception as e: + print("Exception when calling DefaultApi->delete_an_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | + **export_id** | **str**| A string that uniquely identifies this export resource. | + +### Return type + +void (empty response body) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successful Export deletion | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_an_incoming_number** > delete_an_incoming_number(account_id, phone_number_id) @@ -931,6 +1092,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **download_an_export** +> str download_an_export(account_id, export_id) + +Download an Export + +### Example + +* Basic Authentication (fc): + +```python +import freeclimb +from freeclimb.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver +# See configuration.py for a list of all supported configuration parameters. +configuration = freeclimb.Configuration( + host = "https://www.freeclimb.com/apiserver" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: fc +configuration = freeclimb.Configuration( + username = 'ACCOUNT_ID', + password = 'API_KEY' +) + +# Enter a context with an instance of the API client +with freeclimb.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + export_id = 'export_id_example' # str | A string that uniquely identifies this export resource. + + try: + # Download an Export + api_response = api_instance.download_an_export(account_id, export_id) + print("The response of DefaultApi->download_an_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->download_an_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | + **export_id** | **str**| A string that uniquely identifies this export resource. | + +### Return type + +**str** + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/csv + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export Details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **filter_logs** > LogList filter_logs(account_id, filter_logs_request) @@ -1645,6 +1884,85 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_an_export** +> ExportResult get_an_export(account_id, export_id) + +Get an Export + +### Example + +* Basic Authentication (fc): + +```python +import freeclimb +from freeclimb.models.export_result import ExportResult +from freeclimb.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver +# See configuration.py for a list of all supported configuration parameters. +configuration = freeclimb.Configuration( + host = "https://www.freeclimb.com/apiserver" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: fc +configuration = freeclimb.Configuration( + username = 'ACCOUNT_ID', + password = 'API_KEY' +) + +# Enter a context with an instance of the API client +with freeclimb.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + export_id = 'export_id_example' # str | A string that uniquely identifies this export resource. + + try: + # Get an Export + api_response = api_instance.get_an_export(account_id, export_id) + print("The response of DefaultApi->get_an_export:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->get_an_export: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | + **export_id** | **str**| A string that uniquely identifies this export resource. | + +### Return type + +[**ExportResult**](ExportResult.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Export Details | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_an_incoming_number** > IncomingNumberResult get_an_incoming_number(account_id, phone_number_id) @@ -3001,7 +3319,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_calls** -> CallList list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id) +> CallList list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, risk_score_min=risk_score_min, risk_score_max=risk_score_max) List Calls @@ -3046,10 +3364,12 @@ with freeclimb.ApiClient(configuration) as api_client: end_time = 'end_time_example' # str | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) parent_call_id = 'parent_call_id_example' # str | Only show Calls spawned by the call with this ID. (optional) application_id = ['application_id_example'] # List[str] | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + risk_score_min = 56 # int | The minimum riskScore that should be included in the list. (optional) + risk_score_max = 56 # int | The maximum riskScore that should be included in the list. (optional) try: # List Calls - api_response = api_instance.list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id) + api_response = api_instance.list_calls(account_id, active=active, to=to, var_from=var_from, status=status, start_time=start_time, end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, risk_score_min=risk_score_min, risk_score_max=risk_score_max) print("The response of DefaultApi->list_calls:\n") pprint(api_response) except Exception as e: @@ -3072,6 +3392,8 @@ Name | Type | Description | Notes **end_time** | **str**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional] **parent_call_id** | **str**| Only show Calls spawned by the call with this ID. | [optional] **application_id** | [**List[str]**](str.md)| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional] + **risk_score_min** | **int**| The minimum riskScore that should be included in the list. | [optional] + **risk_score_max** | **int**| The maximum riskScore that should be included in the list. | [optional] ### Return type @@ -3262,6 +3584,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_exports** +> ExportList list_exports(account_id, status=status, cursor=cursor) + +List Exports + +### Example + +* Basic Authentication (fc): + +```python +import freeclimb +from freeclimb.models.export_list import ExportList +from freeclimb.models.export_status import ExportStatus +from freeclimb.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver +# See configuration.py for a list of all supported configuration parameters. +configuration = freeclimb.Configuration( + host = "https://www.freeclimb.com/apiserver" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: fc +configuration = freeclimb.Configuration( + username = 'ACCOUNT_ID', + password = 'API_KEY' +) + +# Enter a context with an instance of the API client +with freeclimb.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = freeclimb.DefaultApi(api_client) + account_id = 'account_id_example' # str | ID of the account + status = freeclimb.ExportStatus() # ExportStatus | Status of export (optional) + cursor = 'cursor_example' # str | Used to reference pages of a list of exports (optional) + + try: + # List Exports + api_response = api_instance.list_exports(account_id, status=status, cursor=cursor) + print("The response of DefaultApi->list_exports:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->list_exports: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_id** | **str**| ID of the account | + **status** | [**ExportStatus**](.md)| Status of export | [optional] + **cursor** | **str**| Used to reference pages of a list of exports | [optional] + +### Return type + +[**ExportList**](ExportList.md) + +### Authorization + +[fc](../README.md#fc) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful retrieved export list | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_incoming_numbers** > IncomingNumberList list_incoming_numbers(account_id, phone_number=phone_number, alias=alias, region=region, country=country, application_id=application_id, has_application=has_application, voice_enabled=voice_enabled, sms_enabled=sms_enabled, has_campaign=has_campaign, capabilities_voice=capabilities_voice, capabilities_sms=capabilities_sms, capabilities_toll_free=capabilities_toll_free, capabilities_ten_dlc=capabilities_ten_dlc, capabilities_short_code=capabilities_short_code, tfn_campaign_id=tfn_campaign_id, offnet=offnet) diff --git a/docs/ExportList.md b/docs/ExportList.md new file mode 100644 index 0000000..c5214a7 --- /dev/null +++ b/docs/ExportList.md @@ -0,0 +1,36 @@ +# ExportList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **int** | Total amount of requested resource. | [optional] +**start** | **int** | Resource index at start of current page | [optional] +**end** | **int** | Resource index at end of current page | [optional] +**page** | **int** | Current page | [optional] +**num_pages** | **int** | Total number of pages | [optional] +**page_size** | **int** | Number of items per page | [optional] +**next_page_uri** | **str** | Uri to retrieve the next page of items | [optional] +**exports** | [**List[ExportResult]**](ExportResult.md) | | [optional] + +## Example + +```python +from freeclimb.models.export_list import ExportList + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportList from a JSON string +export_list_instance = ExportList.from_json(json) +# print the JSON string representation of the object +print(ExportList.to_json()) + +# convert the object into a dict +export_list_dict = export_list_instance.to_dict() +# create an instance of ExportList from a dict +export_list_from_dict = ExportList.from_dict(export_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportOutputType.md b/docs/ExportOutputType.md new file mode 100644 index 0000000..e262add --- /dev/null +++ b/docs/ExportOutputType.md @@ -0,0 +1,11 @@ +# ExportOutputType + +output type of the export + +## Enum + +* `CSV` (value: `'csv'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportRequest.md b/docs/ExportRequest.md new file mode 100644 index 0000000..14661ef --- /dev/null +++ b/docs/ExportRequest.md @@ -0,0 +1,32 @@ +# ExportRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_type** | [**ExportResourceType**](ExportResourceType.md) | | +**format** | **List[str]** | | [optional] +**output** | [**ExportRequestOutput**](ExportRequestOutput.md) | | +**query** | **object** | | [optional] + +## Example + +```python +from freeclimb.models.export_request import ExportRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportRequest from a JSON string +export_request_instance = ExportRequest.from_json(json) +# print the JSON string representation of the object +print(ExportRequest.to_json()) + +# convert the object into a dict +export_request_dict = export_request_instance.to_dict() +# create an instance of ExportRequest from a dict +export_request_from_dict = ExportRequest.from_dict(export_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportRequestOutput.md b/docs/ExportRequestOutput.md new file mode 100644 index 0000000..80055e5 --- /dev/null +++ b/docs/ExportRequestOutput.md @@ -0,0 +1,29 @@ +# ExportRequestOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**ExportOutputType**](ExportOutputType.md) | | + +## Example + +```python +from freeclimb.models.export_request_output import ExportRequestOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportRequestOutput from a JSON string +export_request_output_instance = ExportRequestOutput.from_json(json) +# print the JSON string representation of the object +print(ExportRequestOutput.to_json()) + +# convert the object into a dict +export_request_output_dict = export_request_output_instance.to_dict() +# create an instance of ExportRequestOutput from a dict +export_request_output_from_dict = ExportRequestOutput.from_dict(export_request_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportResourceType.md b/docs/ExportResourceType.md new file mode 100644 index 0000000..97866c8 --- /dev/null +++ b/docs/ExportResourceType.md @@ -0,0 +1,13 @@ +# ExportResourceType + +platform resource type + +## Enum + +* `MESSAGES` (value: `'Messages'`) + +* `CALLS` (value: `'Calls'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportResult.md b/docs/ExportResult.md new file mode 100644 index 0000000..fafd0d9 --- /dev/null +++ b/docs/ExportResult.md @@ -0,0 +1,40 @@ +# ExportResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **str** | String that uniquely identifies this account resource. | +**uri** | **str** | | +**date_created** | **str** | | +**date_updated** | **str** | | +**revision** | **int** | | +**export_id** | **str** | String that uniquely identifies this export resource | +**status** | [**ExportStatus**](ExportStatus.md) | | +**size** | **int** | | +**resource_type** | [**ExportResourceType**](ExportResourceType.md) | | +**query** | **object** | Query params used to filter exported documents | +**format** | **List[str]** | Desired fields of exported documents | +**output** | [**ExportResultOutput**](ExportResultOutput.md) | | + +## Example + +```python +from freeclimb.models.export_result import ExportResult + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportResult from a JSON string +export_result_instance = ExportResult.from_json(json) +# print the JSON string representation of the object +print(ExportResult.to_json()) + +# convert the object into a dict +export_result_dict = export_result_instance.to_dict() +# create an instance of ExportResult from a dict +export_result_from_dict = ExportResult.from_dict(export_result_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportResultOutput.md b/docs/ExportResultOutput.md new file mode 100644 index 0000000..065453e --- /dev/null +++ b/docs/ExportResultOutput.md @@ -0,0 +1,29 @@ +# ExportResultOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**ExportOutputType**](ExportOutputType.md) | | + +## Example + +```python +from freeclimb.models.export_result_output import ExportResultOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportResultOutput from a JSON string +export_result_output_instance = ExportResultOutput.from_json(json) +# print the JSON string representation of the object +print(ExportResultOutput.to_json()) + +# convert the object into a dict +export_result_output_dict = export_result_output_instance.to_dict() +# create an instance of ExportResultOutput from a dict +export_result_output_from_dict = ExportResultOutput.from_dict(export_result_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportStatus.md b/docs/ExportStatus.md new file mode 100644 index 0000000..d754202 --- /dev/null +++ b/docs/ExportStatus.md @@ -0,0 +1,21 @@ +# ExportStatus + +platform export status + +## Enum + +* `INTAKING` (value: `'intaking'`) + +* `QUEUED` (value: `'queued'`) + +* `INPROGRESS` (value: `'inProgress'`) + +* `COMPLETED` (value: `'completed'`) + +* `FAILED` (value: `'failed'`) + +* `DELETED` (value: `'deleted'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/freeclimb/__init__.py b/freeclimb/__init__.py index 57b96b3..3033d8c 100644 --- a/freeclimb/__init__.py +++ b/freeclimb/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "5.1.1" +__version__ = "5.2.0" # import apis into sdk package from freeclimb.api.default_api import DefaultApi as DefaultApi @@ -98,6 +98,20 @@ from freeclimb.models.dequeue import Dequeue as Dequeue from freeclimb.models.dequeue_webhook import DequeueWebhook as DequeueWebhook from freeclimb.models.enqueue import Enqueue as Enqueue +from freeclimb.models.export_list import ExportList as ExportList +from freeclimb.models.export_output_type import ExportOutputType as ExportOutputType +from freeclimb.models.export_request import ExportRequest as ExportRequest +from freeclimb.models.export_request_output import ( + ExportRequestOutput as ExportRequestOutput, +) +from freeclimb.models.export_resource_type import ( + ExportResourceType as ExportResourceType, +) +from freeclimb.models.export_result import ExportResult as ExportResult +from freeclimb.models.export_result_output import ( + ExportResultOutput as ExportResultOutput, +) +from freeclimb.models.export_status import ExportStatus as ExportStatus from freeclimb.models.filter_logs_request import FilterLogsRequest as FilterLogsRequest from freeclimb.models.get_digits import GetDigits as GetDigits from freeclimb.models.get_digits_reason import GetDigitsReason as GetDigitsReason diff --git a/freeclimb/api/default_api.py b/freeclimb/api/default_api.py index 350711c..55fbabd 100644 --- a/freeclimb/api/default_api.py +++ b/freeclimb/api/default_api.py @@ -17,7 +17,14 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictBytes, StrictStr, field_validator +from pydantic import ( + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, + field_validator, +) from typing import List, Optional, Tuple, Union from typing_extensions import Annotated from freeclimb.models.account_request import AccountRequest @@ -38,6 +45,10 @@ from freeclimb.models.conference_result import ConferenceResult from freeclimb.models.create_conference_request import CreateConferenceRequest from freeclimb.models.create_web_rtc_token import CreateWebRTCToken +from freeclimb.models.export_list import ExportList +from freeclimb.models.export_request import ExportRequest +from freeclimb.models.export_result import ExportResult +from freeclimb.models.export_status import ExportStatus from freeclimb.models.filter_logs_request import FilterLogsRequest from freeclimb.models.incoming_number_list import IncomingNumberList from freeclimb.models.incoming_number_request import IncomingNumberRequest @@ -1264,6 +1275,276 @@ def _create_an_application_serialize( _request_auth=_request_auth, ) + @validate_call + def create_export( + self, + export_request: Annotated[ + Optional[ExportRequest], + Field(description="A JSON object containing export creation parameters"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExportResult: + """Create an Export + + + :param export_request: A JSON object containing export creation parameters + :type export_request: ExportRequest + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_export_serialize( + account_id=account_id, + export_request=export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_export_with_http_info( + self, + export_request: Annotated[ + Optional[ExportRequest], + Field(description="A JSON object containing export creation parameters"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExportResult]: + """Create an Export + + + :param export_request: A JSON object containing export creation parameters + :type export_request: ExportRequest + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_export_serialize( + account_id=account_id, + export_request=export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_export_without_preload_content( + self, + export_request: Annotated[ + Optional[ExportRequest], + Field(description="A JSON object containing export creation parameters"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create an Export + + + :param export_request: A JSON object containing export creation parameters + :type export_request: ExportRequest + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._create_export_serialize( + account_id=account_id, + export_request=export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _create_export_serialize( + self, + account_id, + export_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if export_request is not None: + _body_params = export_request + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] + ) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="POST", + resource_path="/Accounts/{accountId}/Exports", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def create_knowledge_base_completion( self, @@ -2085,12 +2366,12 @@ def _delete_an_application_serialize( ) @validate_call - def delete_an_incoming_number( + def delete_an_export( self, - phone_number_id: Annotated[ + export_id: Annotated[ StrictStr, Field( - description="String that uniquely identifies this phone number resource." + description="A string that uniquely identifies this export resource." ), ], _request_timeout: Union[ @@ -2105,11 +2386,11 @@ def delete_an_incoming_number( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete an Incoming Number + """Delete an Export - :param phone_number_id: String that uniquely identifies this phone number resource. (required) - :type phone_number_id: str + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2134,9 +2415,9 @@ def delete_an_incoming_number( """ # noqa: E501 account_id = self.account_id - _param = self._delete_an_incoming_number_serialize( + _param = self._delete_an_export_serialize( account_id=account_id, - phone_number_id=phone_number_id, + export_id=export_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2156,12 +2437,12 @@ def delete_an_incoming_number( ).data @validate_call - def delete_an_incoming_number_with_http_info( + def delete_an_export_with_http_info( self, - phone_number_id: Annotated[ + export_id: Annotated[ StrictStr, Field( - description="String that uniquely identifies this phone number resource." + description="A string that uniquely identifies this export resource." ), ], _request_timeout: Union[ @@ -2176,11 +2457,11 @@ def delete_an_incoming_number_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Delete an Incoming Number + """Delete an Export - :param phone_number_id: String that uniquely identifies this phone number resource. (required) - :type phone_number_id: str + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2205,9 +2486,9 @@ def delete_an_incoming_number_with_http_info( """ # noqa: E501 account_id = self.account_id - _param = self._delete_an_incoming_number_serialize( + _param = self._delete_an_export_serialize( account_id=account_id, - phone_number_id=phone_number_id, + export_id=export_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2227,12 +2508,12 @@ def delete_an_incoming_number_with_http_info( ) @validate_call - def delete_an_incoming_number_without_preload_content( + def delete_an_export_without_preload_content( self, - phone_number_id: Annotated[ + export_id: Annotated[ StrictStr, Field( - description="String that uniquely identifies this phone number resource." + description="A string that uniquely identifies this export resource." ), ], _request_timeout: Union[ @@ -2247,11 +2528,271 @@ def delete_an_incoming_number_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete an Incoming Number + """Delete an Export - :param phone_number_id: String that uniquely identifies this phone number resource. (required) - :type phone_number_id: str + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_an_export_serialize( + self, + account_id, + export_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if export_id is not None: + _path_params["exportId"] = export_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/Accounts/{accountId}/Exports/{exportId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_an_incoming_number( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_an_incoming_number_with_http_info( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._delete_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_an_incoming_number_without_preload_content( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3161,10 +3702,276 @@ def _download_a_recording_file_serialize( ) @validate_call - def filter_logs( + def download_an_export( self, - filter_logs_request: Annotated[ - FilterLogsRequest, Field(description="Filter logs request paramters") + export_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this export resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Download an Export + + + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def download_an_export_with_http_info( + self, + export_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this export resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Download an Export + + + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def download_an_export_without_preload_content( + self, + export_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this export resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Download an Export + + + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._download_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "str", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _download_an_export_serialize( + self, + account_id, + export_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if export_id is not None: + _path_params["exportId"] = export_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["text/csv"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Exports/{exportId}/Download", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def filter_logs( + self, + filter_logs_request: Annotated[ + FilterLogsRequest, Field(description="Filter logs request paramters") ], _request_timeout: Union[ None, @@ -5553,12 +6360,12 @@ def _get_an_application_serialize( ) @validate_call - def get_an_incoming_number( + def get_an_export( self, - phone_number_id: Annotated[ + export_id: Annotated[ StrictStr, Field( - description="String that uniquely identifies this phone number resource." + description="A string that uniquely identifies this export resource." ), ], _request_timeout: Union[ @@ -5572,12 +6379,12 @@ def get_an_incoming_number( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IncomingNumberResult: - """Get an Incoming Number + ) -> ExportResult: + """Get an Export - :param phone_number_id: String that uniquely identifies this phone number resource. (required) - :type phone_number_id: str + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -5602,9 +6409,9 @@ def get_an_incoming_number( """ # noqa: E501 account_id = self.account_id - _param = self._get_an_incoming_number_serialize( + _param = self._get_an_export_serialize( account_id=account_id, - phone_number_id=phone_number_id, + export_id=export_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5612,7 +6419,7 @@ def get_an_incoming_number( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "IncomingNumberResult", + "200": "ExportResult", } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -5624,12 +6431,12 @@ def get_an_incoming_number( ).data @validate_call - def get_an_incoming_number_with_http_info( + def get_an_export_with_http_info( self, - phone_number_id: Annotated[ + export_id: Annotated[ StrictStr, Field( - description="String that uniquely identifies this phone number resource." + description="A string that uniquely identifies this export resource." ), ], _request_timeout: Union[ @@ -5643,12 +6450,278 @@ def get_an_incoming_number_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IncomingNumberResult]: - """Get an Incoming Number + ) -> ApiResponse[ExportResult]: + """Get an Export - :param phone_number_id: String that uniquely identifies this phone number resource. (required) - :type phone_number_id: str + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def get_an_export_without_preload_content( + self, + export_id: Annotated[ + StrictStr, + Field( + description="A string that uniquely identifies this export resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get an Export + + + :param export_id: A string that uniquely identifies this export resource. (required) + :type export_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_export_serialize( + account_id=account_id, + export_id=export_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _get_an_export_serialize( + self, + account_id, + export_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + if export_id is not None: + _path_params["exportId"] = export_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Exports/{exportId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def get_an_incoming_number( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IncomingNumberResult: + """Get an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._get_an_incoming_number_serialize( + account_id=account_id, + phone_number_id=phone_number_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "IncomingNumberResult", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def get_an_incoming_number_with_http_info( + self, + phone_number_id: Annotated[ + StrictStr, + Field( + description="String that uniquely identifies this phone number resource." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IncomingNumberResult]: + """Get an Incoming Number + + + :param phone_number_id: String that uniquely identifies this phone number resource. (required) + :type phone_number_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -10246,6 +11319,18 @@ def list_calls( description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." ), ] = None, + risk_score_min: Annotated[ + Optional[StrictInt], + Field( + description="The minimum riskScore that should be included in the list." + ), + ] = None, + risk_score_max: Annotated[ + Optional[StrictInt], + Field( + description="The maximum riskScore that should be included in the list." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10285,7 +11370,13 @@ def list_calls( :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. :type application_id: List[str] - :param _request_timeout: timeout setting for this request. If one + :param risk_score_min: The minimum riskScore that should be included in the list. + :type risk_score_min: int + + :param risk_score_max: The maximum riskScore that should be included in the list. + :type risk_score_max: int + + :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. @@ -10318,6 +11409,8 @@ def list_calls( end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, + risk_score_min=risk_score_min, + risk_score_max=risk_score_max, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10385,6 +11478,18 @@ def list_calls_with_http_info( description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." ), ] = None, + risk_score_min: Annotated[ + Optional[StrictInt], + Field( + description="The minimum riskScore that should be included in the list." + ), + ] = None, + risk_score_max: Annotated[ + Optional[StrictInt], + Field( + description="The maximum riskScore that should be included in the list." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10424,6 +11529,12 @@ def list_calls_with_http_info( :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. :type application_id: List[str] + :param risk_score_min: The minimum riskScore that should be included in the list. + :type risk_score_min: int + + :param risk_score_max: The maximum riskScore that should be included in the list. + :type risk_score_max: int + :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 @@ -10457,6 +11568,8 @@ def list_calls_with_http_info( end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, + risk_score_min=risk_score_min, + risk_score_max=risk_score_max, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10524,6 +11637,18 @@ def list_calls_without_preload_content( description="Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications." ), ] = None, + risk_score_min: Annotated[ + Optional[StrictInt], + Field( + description="The minimum riskScore that should be included in the list." + ), + ] = None, + risk_score_max: Annotated[ + Optional[StrictInt], + Field( + description="The maximum riskScore that should be included in the list." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10563,6 +11688,12 @@ def list_calls_without_preload_content( :param application_id: Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. :type application_id: List[str] + :param risk_score_min: The minimum riskScore that should be included in the list. + :type risk_score_min: int + + :param risk_score_max: The maximum riskScore that should be included in the list. + :type risk_score_max: int + :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 @@ -10596,6 +11727,8 @@ def list_calls_without_preload_content( end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, + risk_score_min=risk_score_min, + risk_score_max=risk_score_max, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10621,6 +11754,8 @@ def _list_calls_serialize( end_time, parent_call_id, application_id, + risk_score_min, + risk_score_max, _request_auth, _content_type, _headers, @@ -10678,6 +11813,14 @@ def _list_calls_serialize( _query_params.append(("applicationId", application_id)) + if risk_score_min is not None: + + _query_params.append(("riskScoreMin", risk_score_min)) + + if risk_score_max is not None: + + _query_params.append(("riskScoreMax", risk_score_max)) + # process the header parameters # process the form parameters # process the body parameter @@ -11415,6 +12558,294 @@ def _list_conferences_serialize( _request_auth=_request_auth, ) + @validate_call + def list_exports( + self, + status: Annotated[ + Optional[ExportStatus], Field(description="Status of export") + ] = None, + cursor: Annotated[ + Optional[StrictStr], + Field(description="Used to reference pages of a list of exports"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExportList: + """List Exports + + + :param status: Status of export + :type status: ExportStatus + + :param cursor: Used to reference pages of a list of exports + :type cursor: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_exports_serialize( + account_id=account_id, + status=status, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_exports_with_http_info( + self, + status: Annotated[ + Optional[ExportStatus], Field(description="Status of export") + ] = None, + cursor: Annotated[ + Optional[StrictStr], + Field(description="Used to reference pages of a list of exports"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExportList]: + """List Exports + + + :param status: Status of export + :type status: ExportStatus + + :param cursor: Used to reference pages of a list of exports + :type cursor: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_exports_serialize( + account_id=account_id, + status=status, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_exports_without_preload_content( + self, + status: Annotated[ + Optional[ExportStatus], Field(description="Status of export") + ] = None, + cursor: Annotated[ + Optional[StrictStr], + Field(description="Used to reference pages of a list of exports"), + ] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Exports + + + :param status: Status of export + :type status: ExportStatus + + :param cursor: Used to reference pages of a list of exports + :type cursor: str + + :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. + :type _request_timeout: int, tuple(int, int), optional + :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 + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + account_id = self.account_id + + _param = self._list_exports_serialize( + account_id=account_id, + status=status, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "ExportList", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _list_exports_serialize( + self, + account_id, + status, + cursor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if account_id is not None: + _path_params["accountId"] = account_id + # process the query parameters + if status is not None: + + _query_params.append(("status", status.value)) + + if cursor is not None: + + _query_params.append(("cursor", cursor)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # authentication setting + _auth_settings: List[str] = ["fc"] + + return self.api_client.param_serialize( + method="GET", + resource_path="/Accounts/{accountId}/Exports", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def list_incoming_numbers( self, diff --git a/freeclimb/api_client.py b/freeclimb/api_client.py index 7303eaa..4d69021 100644 --- a/freeclimb/api_client.py +++ b/freeclimb/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/5.1.1/python" + self.user_agent = "OpenAPI-Generator/5.2.0/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/freeclimb/configuration.py b/freeclimb/configuration.py index 54be454..8cc344a 100644 --- a/freeclimb/configuration.py +++ b/freeclimb/configuration.py @@ -427,7 +427,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.0.0\n" - "SDK Package Version: 5.1.1".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 5.2.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/freeclimb/models/__init__.py b/freeclimb/models/__init__.py index fb6d2f1..961dbcd 100644 --- a/freeclimb/models/__init__.py +++ b/freeclimb/models/__init__.py @@ -81,6 +81,20 @@ from freeclimb.models.dequeue import Dequeue as Dequeue from freeclimb.models.dequeue_webhook import DequeueWebhook as DequeueWebhook from freeclimb.models.enqueue import Enqueue as Enqueue +from freeclimb.models.export_list import ExportList as ExportList +from freeclimb.models.export_output_type import ExportOutputType as ExportOutputType +from freeclimb.models.export_request import ExportRequest as ExportRequest +from freeclimb.models.export_request_output import ( + ExportRequestOutput as ExportRequestOutput, +) +from freeclimb.models.export_resource_type import ( + ExportResourceType as ExportResourceType, +) +from freeclimb.models.export_result import ExportResult as ExportResult +from freeclimb.models.export_result_output import ( + ExportResultOutput as ExportResultOutput, +) +from freeclimb.models.export_status import ExportStatus as ExportStatus from freeclimb.models.filter_logs_request import FilterLogsRequest as FilterLogsRequest from freeclimb.models.get_digits import GetDigits as GetDigits from freeclimb.models.get_digits_reason import GetDigitsReason as GetDigitsReason diff --git a/freeclimb/models/call_result.py b/freeclimb/models/call_result.py index 9096259..d659fa9 100644 --- a/freeclimb/models/call_result.py +++ b/freeclimb/models/call_result.py @@ -78,7 +78,7 @@ class CallResult( description="If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).", alias="phoneNumberId", ) - call_status: Optional[CallStatus] = Field(default=None, alias="callStatus") + status: Optional[CallStatus] = None start_time: Optional[StrictStr] = Field( default=None, description="Start time of the Call (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). Empty if the Call has not yet been dialed.", @@ -127,7 +127,7 @@ class CallResult( "from", "to", "phoneNumberId", - "callStatus", + "status", "startTime", "connectTime", "endTime", @@ -200,10 +200,10 @@ def to_dict(self) -> Dict[str, Any]: if self.phone_number_id is None and "phone_number_id" in self.model_fields_set: _dict["phoneNumberId"] = None - # set to None if call_status (nullable) is None + # set to None if status (nullable) is None # and model_fields_set contains the field - if self.call_status is None and "call_status" in self.model_fields_set: - _dict["callStatus"] = None + if self.status is None and "status" in self.model_fields_set: + _dict["status"] = None # set to None if start_time (nullable) is None # and model_fields_set contains the field @@ -279,7 +279,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "from": obj.get("from"), "to": obj.get("to"), "phoneNumberId": obj.get("phoneNumberId"), - "callStatus": obj.get("callStatus"), + "status": obj.get("status"), "startTime": obj.get("startTime"), "connectTime": obj.get("connectTime"), "endTime": obj.get("endTime"), diff --git a/freeclimb/models/create_conference.py b/freeclimb/models/create_conference.py index f8aeb61..bb56ece 100644 --- a/freeclimb/models/create_conference.py +++ b/freeclimb/models/create_conference.py @@ -41,7 +41,7 @@ class CreateConference( description=" This URL is invoked once the Conference is successfully created. Actions on the Conference, such as adding Participants, can be performed via the PerCL script returned in the response. ", alias="actionUrl", ) - alias: Optional[StrictBool] = Field( + alias: Optional[StrictStr] = Field( default=None, description="Descriptive name for the Conference. " ) play_beep: Optional[PlayBeep] = Field(default=None, alias="playBeep") @@ -59,6 +59,11 @@ class CreateConference( description="If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.", alias="waitUrl", ) + parent_call_id: Optional[StrictStr] = Field( + default=None, + description="ID of the Call that created this leg (child call).", + alias="parentCallId", + ) command: StrictStr = "CreateConference" __properties: ClassVar[List[str]] = [ @@ -69,6 +74,7 @@ class CreateConference( "record", "statusCallbackUrl", "waitUrl", + "parentCallId", ] def to_str(self) -> str: @@ -127,6 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "record": obj.get("record"), "statusCallbackUrl": obj.get("statusCallbackUrl"), "waitUrl": obj.get("waitUrl"), + "parentCallId": obj.get("parentCallId"), } ) return _obj diff --git a/freeclimb/models/export_list.py b/freeclimb/models/export_list.py new file mode 100644 index 0000000..c9119ff --- /dev/null +++ b/freeclimb/models/export_list.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.export_result import ExportResult +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ExportList( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ExportList + """ # noqa: E501 + + total: Optional[StrictInt] = Field( + default=None, description="Total amount of requested resource." + ) + start: Optional[StrictInt] = Field( + default=None, description="Resource index at start of current page" + ) + end: Optional[StrictInt] = Field( + default=None, description="Resource index at end of current page" + ) + page: Optional[StrictInt] = Field(default=None, description="Current page") + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages", alias="numPages" + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Number of items per page", alias="pageSize" + ) + next_page_uri: Optional[StrictStr] = Field( + default=None, + description="Uri to retrieve the next page of items", + alias="nextPageUri", + ) + exports: Optional[List[ExportResult]] = None + + __properties: ClassVar[List[str]] = [ + "total", + "start", + "end", + "page", + "numPages", + "pageSize", + "nextPageUri", + "exports", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in exports (list) + _items = [] + if self.exports: + for _item_exports in self.exports: + if _item_exports: + _items.append(_item_exports.to_dict()) + _dict["exports"] = _items + # set to None if total (nullable) is None + # and model_fields_set contains the field + if self.total is None and "total" in self.model_fields_set: + _dict["total"] = None + + # set to None if start (nullable) is None + # and model_fields_set contains the field + if self.start is None and "start" in self.model_fields_set: + _dict["start"] = None + + # set to None if end (nullable) is None + # and model_fields_set contains the field + if self.end is None and "end" in self.model_fields_set: + _dict["end"] = None + + # set to None if page (nullable) is None + # and model_fields_set contains the field + if self.page is None and "page" in self.model_fields_set: + _dict["page"] = None + + # set to None if num_pages (nullable) is None + # and model_fields_set contains the field + if self.num_pages is None and "num_pages" in self.model_fields_set: + _dict["numPages"] = None + + # set to None if page_size (nullable) is None + # and model_fields_set contains the field + if self.page_size is None and "page_size" in self.model_fields_set: + _dict["pageSize"] = None + + # set to None if next_page_uri (nullable) is None + # and model_fields_set contains the field + if self.next_page_uri is None and "next_page_uri" in self.model_fields_set: + _dict["nextPageUri"] = None + + # set to None if exports (nullable) is None + # and model_fields_set contains the field + if self.exports is None and "exports" in self.model_fields_set: + _dict["exports"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "total": obj.get("total"), + "start": obj.get("start"), + "end": obj.get("end"), + "page": obj.get("page"), + "numPages": obj.get("numPages"), + "pageSize": obj.get("pageSize"), + "nextPageUri": obj.get("nextPageUri"), + "exports": ( + [ExportResult.from_dict(_item) for _item in obj["exports"]] + if obj.get("exports") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/export_output_type.py b/freeclimb/models/export_output_type.py new file mode 100644 index 0000000..3eee946 --- /dev/null +++ b/freeclimb/models/export_output_type.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ExportOutputType(str, Enum): + """ + output type of the export + """ + + """ + allowed enum values + """ + CSV = "csv" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ExportOutputType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/export_request.py b/freeclimb/models/export_request.py new file mode 100644 index 0000000..93f9cb4 --- /dev/null +++ b/freeclimb/models/export_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from freeclimb.models.export_request_output import ExportRequestOutput +from freeclimb.models.export_resource_type import ExportResourceType +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ExportRequest( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ExportRequest + """ # noqa: E501 + + resource_type: ExportResourceType = Field(alias="resourceType") + format: Optional[List[StrictStr]] = None + output: ExportRequestOutput + query: Optional[Dict[str, Any]] = None + + __properties: ClassVar[List[str]] = ["resourceType", "format", "output", "query"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of output + if self.output: + _dict["output"] = self.output.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "resourceType": obj.get("resourceType"), + "format": obj.get("format"), + "output": ( + ExportRequestOutput.from_dict(obj["output"]) + if obj.get("output") is not None + else None + ), + "query": obj.get("query"), + } + ) + return _obj diff --git a/freeclimb/models/export_request_output.py b/freeclimb/models/export_request_output.py new file mode 100644 index 0000000..f7b28a5 --- /dev/null +++ b/freeclimb/models/export_request_output.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.export_output_type import ExportOutputType +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ExportRequestOutput( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ExportRequestOutput + """ # noqa: E501 + + type: ExportOutputType + + __properties: ClassVar[List[str]] = ["type"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportRequestOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportRequestOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type")}) + return _obj diff --git a/freeclimb/models/export_resource_type.py b/freeclimb/models/export_resource_type.py new file mode 100644 index 0000000..7fe9365 --- /dev/null +++ b/freeclimb/models/export_resource_type.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ExportResourceType(str, Enum): + """ + platform resource type + """ + + """ + allowed enum values + """ + MESSAGES = "Messages" + CALLS = "Calls" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ExportResourceType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/freeclimb/models/export_result.py b/freeclimb/models/export_result.py new file mode 100644 index 0000000..4c4eae8 --- /dev/null +++ b/freeclimb/models/export_result.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from freeclimb.models.export_resource_type import ExportResourceType +from freeclimb.models.export_result_output import ExportResultOutput +from freeclimb.models.export_status import ExportStatus +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ExportResult( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ExportResult + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + description="String that uniquely identifies this account resource.", + alias="accountId", + ) + uri: StrictStr + date_created: StrictStr = Field(alias="dateCreated") + date_updated: StrictStr = Field(alias="dateUpdated") + revision: Annotated[int, Field(strict=True, ge=0)] + export_id: Optional[StrictStr] = Field( + description="String that uniquely identifies this export resource", + alias="exportId", + ) + status: ExportStatus + size: StrictInt + resource_type: ExportResourceType = Field(alias="resourceType") + query: Dict[str, Any] = Field( + description="Query params used to filter exported documents" + ) + format: List[StrictStr] = Field(description="Desired fields of exported documents") + output: ExportResultOutput + + __properties: ClassVar[List[str]] = [ + "accountId", + "uri", + "dateCreated", + "dateUpdated", + "revision", + "exportId", + "status", + "size", + "resourceType", + "query", + "format", + "output", + ] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of output + if self.output: + _dict["output"] = self.output.to_dict() + # set to None if account_id (nullable) is None + # and model_fields_set contains the field + if self.account_id is None and "account_id" in self.model_fields_set: + _dict["accountId"] = None + + # set to None if export_id (nullable) is None + # and model_fields_set contains the field + if self.export_id is None and "export_id" in self.model_fields_set: + _dict["exportId"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "accountId": obj.get("accountId"), + "uri": obj.get("uri"), + "dateCreated": obj.get("dateCreated"), + "dateUpdated": obj.get("dateUpdated"), + "revision": obj.get("revision"), + "exportId": obj.get("exportId"), + "status": obj.get("status"), + "size": obj.get("size"), + "resourceType": obj.get("resourceType"), + "query": obj.get("query"), + "format": obj.get("format"), + "output": ( + ExportResultOutput.from_dict(obj["output"]) + if obj.get("output") is not None + else None + ), + } + ) + return _obj diff --git a/freeclimb/models/export_result_output.py b/freeclimb/models/export_result_output.py new file mode 100644 index 0000000..884cca2 --- /dev/null +++ b/freeclimb/models/export_result_output.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from freeclimb.models.export_output_type import ExportOutputType +from pydantic import StrictStr +from typing import Optional, Set +from typing_extensions import Self + + +class ExportResultOutput( + BaseModel, populate_by_name=True, validate_assignment=True, protected_namespaces=() +): + """ + ExportResultOutput + """ # noqa: E501 + + type: ExportOutputType + + __properties: ClassVar[List[str]] = ["type"] + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportResultOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportResultOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type")}) + return _obj diff --git a/freeclimb/models/export_status.py b/freeclimb/models/export_status.py new file mode 100644 index 0000000..3eb5bfe --- /dev/null +++ b/freeclimb/models/export_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ExportStatus(str, Enum): + """ + platform export status + """ + + """ + allowed enum values + """ + INTAKING = "intaking" + QUEUED = "queued" + IN_PROGRESS = "inProgress" + COMPLETED = "completed" + FAILED = "failed" + DELETED = "deleted" + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ExportStatus from a JSON string""" + return cls(json.loads(json_str)) diff --git a/openapi.json b/openapi.json index e8f5da9..7561d69 100644 --- a/openapi.json +++ b/openapi.json @@ -1968,7 +1968,7 @@ }, "alias": { "description": "Descriptive name for the Conference. ", - "type": "boolean" + "type": "string" }, "playBeep": { "$ref": "#/components/schemas/PlayBeep" @@ -1986,6 +1986,10 @@ "description": "If specified, this URL provides the custom hold music for the Conference when it is in the populated state. This attribute is always fetched using HTTP GET and is fetched just once – when the Conference is created. The URL must be an audio file that is reachable and readable by FreeClimb.", "format": "uri", "type": "string" + }, + "parentCallId": { + "description": "ID of the Call that created this leg (child call).", + "type": "string" } } } @@ -3113,7 +3117,7 @@ "description": "If the Call was inbound, this is the ID of the IncomingPhoneNumber that received the Call (DNIS). If the Call was outbound, this is the ID of the phone number from which the Call was placed (ANI).", "nullable": true }, - "callStatus": { + "status": { "$ref": "#/components/schemas/CallStatus" }, "startTime": { @@ -4830,6 +4834,187 @@ "minimum": 1 } } + }, + "ExportStatus": { + "type": "string", + "description": "platform export status", + "enum": [ + "intaking", + "queued", + "inProgress", + "completed", + "failed", + "deleted" + ] + }, + "ExportResourceType": { + "type": "string", + "description": "platform resource type", + "enum": [ + "Messages", + "Calls" + ] + }, + "ExportOutputType": { + "type": "string", + "description": "output type of the export", + "enum": [ + "csv" + ] + }, + "ExportRequestOutput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ExportOutputType" + } + } + }, + "ExportResultOutput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/ExportOutputType" + } + } + }, + "ExportResult": { + "type": "object", + "required": [ + "accountId", + "uri", + "dateCreated", + "dateUpdated", + "revision", + "exportId", + "status", + "size", + "resourceType", + "query", + "format", + "output" + ], + "properties": { + "accountId": { + "type": "string", + "description": "String that uniquely identifies this account resource.", + "nullable": true + }, + "uri": { + "type": "string", + "format": "uri-reference" + }, + "dateCreated": { + "type": "string" + }, + "dateUpdated": { + "type": "string" + }, + "revision": { + "type": "integer", + "minimum": 0 + }, + "exportId": { + "type": "string", + "description": "String that uniquely identifies this export resource", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/ExportStatus" + }, + "size": { + "type": "integer" + }, + "resourceType": { + "$ref": "#/components/schemas/ExportResourceType" + }, + "query": { + "description": "Query params used to filter exported documents", + "type": "object" + }, + "format": { + "description": "Desired fields of exported documents", + "type": "array", + "items": { + "type": "string" + } + }, + "output": { + "$ref": "#/components/schemas/ExportResultOutput" + } + }, + "example": { + "accountId": "AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78", + "uri": "/Accounts/AC3ff5d5aed7fde9e6659673d850cbd18ea8bfca78/Exports/EX4d7500862e3abf4b9f4da24d54f559d3024252f8", + "dateCreated": "Wed, 26 Jun 2024 15:45:06 UTC", + "dateUpdated": "Wed, 26 Jun 2024 15:45:06 UTC", + "revision": 1, + "exportId": "EX4d7500862e3abf4b9f4da24d54f559d3024252f8", + "status": "completed", + "size": 12893786, + "resourceType": "Messages", + "query": { + "direction": "inbound" + }, + "format": [ + "messageId", + "dateUpdated", + "segmentCount", + "status" + ], + "output": { + "type": "csv" + } + } + }, + "ExportList": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginationModel" + }, + { + "type": "object", + "properties": { + "exports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportResult" + }, + "nullable": true + } + } + } + ] + }, + "ExportRequest": { + "type": "object", + "required": [ + "resourceType", + "output" + ], + "properties": { + "resourceType": { + "$ref": "#/components/schemas/ExportResourceType" + }, + "format": { + "type": "array", + "items": { + "type": "string" + } + }, + "output": { + "$ref": "#/components/schemas/ExportRequestOutput" + }, + "query": { + "type": "object" + } + } } } }, @@ -5654,6 +5839,24 @@ }, { "$ref": "#/components/parameters/AccountId" + }, + { + "name": "riskScoreMin", + "in": "query", + "description": "The minimum riskScore that should be included in the list.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "riskScoreMax", + "in": "query", + "description": "The maximum riskScore that should be included in the list.", + "required": false, + "schema": { + "type": "integer" + } } ], "deprecated": false, @@ -7331,6 +7534,171 @@ }, "deprecated": false } + }, + "/Accounts/{accountId}/Exports": { + "get": { + "tags": [], + "summary": "List Exports", + "operationId": "list-exports", + "responses": { + "200": { + "description": "Successful retrieved export list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportList" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + }, + { + "schema": { + "$ref": "#/components/schemas/ExportStatus" + }, + "in": "query", + "name": "status", + "description": "Status of export" + }, + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "cursor", + "description": "Used to reference pages of a list of exports" + } + ] + }, + "post": { + "summary": "Create an Export", + "operationId": "create-export", + "tags": [], + "requestBody": { + "description": "A JSON object containing export creation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Export successfully created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResult" + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + } + ] + } + }, + "/Accounts/{accountId}/Exports/{exportId}": { + "get": { + "tags": [], + "summary": "Get an Export", + "operationId": "get-an-export", + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + }, + { + "name": "exportId", + "in": "path", + "description": "A string that uniquely identifies this export resource.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false, + "responses": { + "200": { + "description": "Export Details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResult" + } + } + } + } + } + }, + "delete": { + "tags": [], + "summary": "Delete an Export", + "operationId": "delete-an-export", + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + }, + { + "name": "exportId", + "in": "path", + "description": "A string that uniquely identifies this export resource.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false, + "responses": { + "204": { + "description": "Successful Export deletion" + } + } + } + }, + "/Accounts/{accountId}/Exports/{exportId}/Download": { + "get": { + "tags": [], + "summary": "Download an Export", + "operationId": "download-an-export", + "parameters": [ + { + "$ref": "#/components/parameters/AccountId" + }, + { + "name": "exportId", + "in": "path", + "description": "A string that uniquely identifies this export resource.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "deprecated": false, + "responses": { + "200": { + "description": "Export Details", + "content": { + "text/csv": { + "schema": { + "type": "string" + } + } + } + } + } + } } }, "x-headers": [], diff --git a/pyproject.toml b/pyproject.toml index 44b6432..202b89f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "freeclimb" -version = "5.1.1" +version = "5.2.0" description = "FreeClimb API" authors = ["FreeClimb API Support "] license = "NoLicense" diff --git a/setup.py b/setup.py index 1455f48..566604e 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "FreeClimb" -VERSION = "5.1.1" +VERSION = "5.2.0" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/api/test_default_api.py b/test/api/test_default_api.py index 239343d..93f7fde 100644 --- a/test/api/test_default_api.py +++ b/test/api/test_default_api.py @@ -73,7 +73,10 @@ UpdateConferenceParticipantRequest, ) from freeclimb.models.update_conference_request import UpdateConferenceRequest - +from freeclimb.models.export_list import ExportList +from freeclimb.models.export_request import ExportRequest +from freeclimb.models.export_result import ExportResult +from freeclimb.models.export_result_output import ExportResultOutput import unittest from freeclimb.api.default_api import DefaultApi @@ -153,6 +156,18 @@ def test_create_an_application(self) -> None: assert isinstance(api_response, ApplicationResult) + def test_create_export(self) -> None: + """Test case for create_export + + Create an Export + """ + + export_request = export_request_create_export_test_value + + api_response = self.api.create_export(export_request=export_request) + + assert isinstance(api_response, ExportResult) + def test_create_knowledge_base_completion(self) -> None: """Test case for create_knowledge_base_completion @@ -193,6 +208,16 @@ def test_delete_an_application(self) -> None: api_response = self.api.delete_an_application(application_id=application_id) + def test_delete_an_export(self) -> None: + """Test case for delete_an_export + + Delete an Export + """ + + export_id = export_id_delete_an_export_test_value + + api_response = self.api.delete_an_export(export_id=export_id) + def test_delete_an_incoming_number(self) -> None: """Test case for delete_an_incoming_number @@ -243,6 +268,18 @@ def test_download_a_recording_file(self) -> None: assert isinstance(api_response, bytes) + def test_download_an_export(self) -> None: + """Test case for download_an_export + + Download an Export + """ + + export_id = export_id_download_an_export_test_value + + api_response = self.api.download_an_export(export_id=export_id) + + assert isinstance(api_response, str) + def test_filter_logs(self) -> None: """Test case for filter_logs @@ -355,6 +392,18 @@ def test_get_an_application(self) -> None: assert isinstance(api_response, ApplicationResult) + def test_get_an_export(self) -> None: + """Test case for get_an_export + + Get an Export + """ + + export_id = export_id_get_an_export_test_value + + api_response = self.api.get_an_export(export_id=export_id) + + assert isinstance(api_response, ExportResult) + def test_get_an_incoming_number(self) -> None: """Test case for get_an_incoming_number @@ -614,6 +663,10 @@ def test_list_calls(self) -> None: application_id = application_id_list_calls_test_value + risk_score_min = risk_score_min_list_calls_test_value + + risk_score_max = risk_score_max_list_calls_test_value + api_response = self.api.list_calls( active=active, to=to, @@ -623,6 +676,8 @@ def test_list_calls(self) -> None: end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, + risk_score_min=risk_score_min, + risk_score_max=risk_score_max, ) assert isinstance(api_response, CallList) @@ -668,6 +723,20 @@ def test_list_conferences(self) -> None: assert isinstance(api_response, ConferenceList) + def test_list_exports(self) -> None: + """Test case for list_exports + + List Exports + """ + + status = status_list_exports_test_value + + cursor = cursor_list_exports_test_value + + api_response = self.api.list_exports(status=status, cursor=cursor) + + assert isinstance(api_response, ExportList) + def test_list_incoming_numbers(self) -> None: """Test case for list_incoming_numbers @@ -1196,6 +1265,8 @@ def test_list_calls_get_next_page(self): end_time = end_time_list_calls_test_value parent_call_id = parent_call_id_list_calls_test_value application_id = application_id_list_calls_test_value + risk_score_min = risk_score_min_list_calls_test_value + risk_score_max = risk_score_max_list_calls_test_value api_response = self.api.list_calls( active=active, @@ -1206,6 +1277,8 @@ def test_list_calls_get_next_page(self): end_time=end_time, parent_call_id=parent_call_id, application_id=application_id, + risk_score_min=risk_score_min, + risk_score_max=risk_score_max, ) api_response.next_page_uri = "/Accounts/{accountId}/Calls?cursor=1" next_page_api_response = self.api.get_next_page(api_response) @@ -1254,6 +1327,21 @@ def test_list_conferences_get_next_page(self): assert isinstance(next_page_api_response, ConferenceList) + def test_list_exports_get_next_page(self): + """Test case for get_next_page using list_exports response + + Get Next Page for List Exports # noqa: E501 + """ + + status = status_list_exports_test_value + cursor = cursor_list_exports_test_value + + api_response = self.api.list_exports(status=status, cursor=cursor) + api_response.next_page_uri = "/Accounts/{accountId}/Exports?cursor=1" + next_page_api_response = self.api.get_next_page(api_response) + + assert isinstance(next_page_api_response, ExportList) + def test_list_incoming_numbers_get_next_page(self): """Test case for get_next_page using list_incoming_numbers response @@ -1696,5 +1784,23 @@ def test_list_sms_messages_get_next_page(self): dtmf_pass_through_list_participants_test_value = True +cursor_list_exports_test_value = "cursor_example" + +status_list_exports_test_value = None + +risk_score_min_list_calls_test_value = 10 + +risk_score_max_list_calls_test_value = 90 + +export_request_create_export_test_value = None + +export_id_get_an_export_test_value = "get_export_id_example" + +export_id_download_an_export_test_value = "download_export_id_example" + +status_list_exports_test_value = None + +export_id_delete_an_export_test_value = "delete_export_id_example" + if __name__ == "__main__": unittest.main() diff --git a/test/models/test_account_result.py b/test/models/test_account_result.py index 52b1ba7..e693c4f 100644 --- a/test/models/test_account_result.py +++ b/test/models/test_account_result.py @@ -92,7 +92,7 @@ def test_status(self): def test_subresource_uris(self): """Test AccountResult.subresource_uris""" - object = None + object = {} self.model.subresource_uris = object assert self.model.subresource_uris == object diff --git a/test/models/test_call_result.py b/test/models/test_call_result.py index c1f92dd..4a1aeb0 100644 --- a/test/models/test_call_result.py +++ b/test/models/test_call_result.py @@ -86,24 +86,24 @@ def test_phone_number_id(self): self.model.phone_number_id = "TEST_STRING" assert self.model.phone_number_id == "TEST_STRING" - def test_call_status(self): - """Test CallResult.call_status""" - self.model.call_status = CallStatus.QUEUED - assert self.model.call_status == CallStatus.QUEUED - self.model.call_status = CallStatus.RINGING - assert self.model.call_status == CallStatus.RINGING - self.model.call_status = CallStatus.IN_PROGRESS - assert self.model.call_status == CallStatus.IN_PROGRESS - self.model.call_status = CallStatus.CANCELED - assert self.model.call_status == CallStatus.CANCELED - self.model.call_status = CallStatus.COMPLETED - assert self.model.call_status == CallStatus.COMPLETED - self.model.call_status = CallStatus.FAILED - assert self.model.call_status == CallStatus.FAILED - self.model.call_status = CallStatus.BUSY - assert self.model.call_status == CallStatus.BUSY - self.model.call_status = CallStatus.NO_ANSWER - assert self.model.call_status == CallStatus.NO_ANSWER + def test_status(self): + """Test CallResult.status""" + self.model.status = CallStatus.QUEUED + assert self.model.status == CallStatus.QUEUED + self.model.status = CallStatus.RINGING + assert self.model.status == CallStatus.RINGING + self.model.status = CallStatus.IN_PROGRESS + assert self.model.status == CallStatus.IN_PROGRESS + self.model.status = CallStatus.CANCELED + assert self.model.status == CallStatus.CANCELED + self.model.status = CallStatus.COMPLETED + assert self.model.status == CallStatus.COMPLETED + self.model.status = CallStatus.FAILED + assert self.model.status == CallStatus.FAILED + self.model.status = CallStatus.BUSY + assert self.model.status == CallStatus.BUSY + self.model.status = CallStatus.NO_ANSWER + assert self.model.status == CallStatus.NO_ANSWER def test_start_time(self): """Test CallResult.start_time""" @@ -151,7 +151,7 @@ def test_answered_by(self): def test_subresource_uris(self): """Test CallResult.subresource_uris""" - object = None + object = {} self.model.subresource_uris = object assert self.model.subresource_uris == object diff --git a/test/models/test_conference_result.py b/test/models/test_conference_result.py index ab3113a..313a990 100644 --- a/test/models/test_conference_result.py +++ b/test/models/test_conference_result.py @@ -112,7 +112,7 @@ def test_status_callback_url(self): def test_subresource_uris(self): """Test ConferenceResult.subresource_uris""" - object = None + object = {} self.model.subresource_uris = object assert self.model.subresource_uris == object diff --git a/test/models/test_create_conference.py b/test/models/test_create_conference.py index e69d183..5e2afd8 100644 --- a/test/models/test_create_conference.py +++ b/test/models/test_create_conference.py @@ -36,8 +36,9 @@ def test_action_url(self): def test_alias(self): """Test CreateConference.alias""" - self.model.alias = False - assert self.model.alias == False + + self.model.alias = "TEST_STRING" + assert self.model.alias == "TEST_STRING" def test_play_beep(self): """Test CreateConference.play_beep""" @@ -65,6 +66,12 @@ def test_wait_url(self): self.model.wait_url = "TEST_STRING" assert self.model.wait_url == "TEST_STRING" + def test_parent_call_id(self): + """Test CreateConference.parent_call_id""" + + self.model.parent_call_id = "TEST_STRING" + assert self.model.parent_call_id == "TEST_STRING" + if __name__ == "__main__": unittest.main() diff --git a/test/models/test_export_list.py b/test/models/test_export_list.py new file mode 100644 index 0000000..a29f5e1 --- /dev/null +++ b/test/models/test_export_list.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_list import ExportList + + +class TestExportList(unittest.TestCase): + """ExportList unit test stubs""" + + def setUp(self): + self.model = ExportList() + + def test_total(self): + """Test ExportList.total""" + self.model.total = 1 + assert self.model.total == 1 + + def test_start(self): + """Test ExportList.start""" + self.model.start = 1 + assert self.model.start == 1 + + def test_end(self): + """Test ExportList.end""" + self.model.end = 1 + assert self.model.end == 1 + + def test_page(self): + """Test ExportList.page""" + self.model.page = 1 + assert self.model.page == 1 + + def test_num_pages(self): + """Test ExportList.num_pages""" + self.model.num_pages = 1 + assert self.model.num_pages == 1 + + def test_page_size(self): + """Test ExportList.page_size""" + self.model.page_size = 1 + assert self.model.page_size == 1 + + def test_next_page_uri(self): + """Test ExportList.next_page_uri""" + + self.model.next_page_uri = "TEST_STRING" + assert self.model.next_page_uri == "TEST_STRING" + + def test_exports(self): + """Test ExportList.exports""" + testList = [] + self.model.exports = testList + assert self.model.exports == testList + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_output_type.py b/test/models/test_export_output_type.py new file mode 100644 index 0000000..697eb76 --- /dev/null +++ b/test/models/test_export_output_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_output_type import ExportOutputType + + +class TestExportOutputType(unittest.TestCase): + """ExportOutputType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_request.py b/test/models/test_export_request.py new file mode 100644 index 0000000..5913312 --- /dev/null +++ b/test/models/test_export_request.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_request import ExportRequest + + +class TestExportRequest(unittest.TestCase): + """ExportRequest unit test stubs""" + + def setUp(self): + self.model = ExportRequest( + resource_type=ExportResourceType.MESSAGES, + output=freeclimb.models.export_request_output.ExportRequestOutput( + type="csv", + ), + ) + + def test_resource_type(self): + """Test ExportRequest.resource_type""" + self.model.resource_type = ExportResourceType.MESSAGES + assert self.model.resource_type == ExportResourceType.MESSAGES + self.model.resource_type = ExportResourceType.CALLS + assert self.model.resource_type == ExportResourceType.CALLS + + def test_format(self): + """Test ExportRequest.format""" + testList = [] + self.model.format = testList + assert self.model.format == testList + + def test_output(self): + """Test ExportRequest.output""" + object = freeclimb.models.export_request_output.ExportRequestOutput( + type="csv", + ) + self.model.output = object + assert self.model.output == object + + def test_query(self): + """Test ExportRequest.query""" + object = {} + self.model.query = object + assert self.model.query == object + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_request_output.py b/test/models/test_export_request_output.py new file mode 100644 index 0000000..28dc107 --- /dev/null +++ b/test/models/test_export_request_output.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_request_output import ExportRequestOutput + + +class TestExportRequestOutput(unittest.TestCase): + """ExportRequestOutput unit test stubs""" + + def setUp(self): + self.model = ExportRequestOutput( + type=ExportOutputType.CSV, + ) + + def test_type(self): + """Test ExportRequestOutput.type""" + self.model.type = ExportOutputType.CSV + assert self.model.type == ExportOutputType.CSV + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_resource_type.py b/test/models/test_export_resource_type.py new file mode 100644 index 0000000..fc6502e --- /dev/null +++ b/test/models/test_export_resource_type.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_resource_type import ExportResourceType + + +class TestExportResourceType(unittest.TestCase): + """ExportResourceType unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_result.py b/test/models/test_export_result.py new file mode 100644 index 0000000..f000ac0 --- /dev/null +++ b/test/models/test_export_result.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_result import ExportResult + + +class TestExportResult(unittest.TestCase): + """ExportResult unit test stubs""" + + def setUp(self): + self.model = ExportResult( + account_id="TS", + uri="TS", + date_created="TS", + date_updated="TS", + revision=0, + export_id="TS", + status=ExportStatus.INTAKING, + size=1, + resource_type=ExportResourceType.MESSAGES, + query={}, + format=[], + output=freeclimb.models.export_result_output.ExportResultOutput( + type="csv", + ), + ) + + def test_account_id(self): + """Test ExportResult.account_id""" + + self.model.account_id = "TEST_STRING" + assert self.model.account_id == "TEST_STRING" + + def test_uri(self): + """Test ExportResult.uri""" + + self.model.uri = "TEST_STRING" + assert self.model.uri == "TEST_STRING" + + def test_date_created(self): + """Test ExportResult.date_created""" + + self.model.date_created = "TEST_STRING" + assert self.model.date_created == "TEST_STRING" + + def test_date_updated(self): + """Test ExportResult.date_updated""" + + self.model.date_updated = "TEST_STRING" + assert self.model.date_updated == "TEST_STRING" + + def test_revision(self): + """Test ExportResult.revision""" + self.model.revision = 1 + assert self.model.revision == 1 + + def test_export_id(self): + """Test ExportResult.export_id""" + + self.model.export_id = "TEST_STRING" + assert self.model.export_id == "TEST_STRING" + + def test_status(self): + """Test ExportResult.status""" + self.model.status = ExportStatus.INTAKING + assert self.model.status == ExportStatus.INTAKING + self.model.status = ExportStatus.QUEUED + assert self.model.status == ExportStatus.QUEUED + self.model.status = ExportStatus.IN_PROGRESS + assert self.model.status == ExportStatus.IN_PROGRESS + self.model.status = ExportStatus.COMPLETED + assert self.model.status == ExportStatus.COMPLETED + self.model.status = ExportStatus.FAILED + assert self.model.status == ExportStatus.FAILED + self.model.status = ExportStatus.DELETED + assert self.model.status == ExportStatus.DELETED + + def test_size(self): + """Test ExportResult.size""" + self.model.size = 1 + assert self.model.size == 1 + + def test_resource_type(self): + """Test ExportResult.resource_type""" + self.model.resource_type = ExportResourceType.MESSAGES + assert self.model.resource_type == ExportResourceType.MESSAGES + self.model.resource_type = ExportResourceType.CALLS + assert self.model.resource_type == ExportResourceType.CALLS + + def test_query(self): + """Test ExportResult.query""" + object = {} + self.model.query = object + assert self.model.query == object + + def test_format(self): + """Test ExportResult.format""" + testList = [] + self.model.format = testList + assert self.model.format == testList + + def test_output(self): + """Test ExportResult.output""" + object = freeclimb.models.export_result_output.ExportResultOutput( + type="csv", + ) + self.model.output = object + assert self.model.output == object + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_result_output.py b/test/models/test_export_result_output.py new file mode 100644 index 0000000..fcf36e9 --- /dev/null +++ b/test/models/test_export_result_output.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_result_output import ExportResultOutput + + +class TestExportResultOutput(unittest.TestCase): + """ExportResultOutput unit test stubs""" + + def setUp(self): + self.model = ExportResultOutput( + type=ExportOutputType.CSV, + ) + + def test_type(self): + """Test ExportResultOutput.type""" + self.model.type = ExportOutputType.CSV + assert self.model.type == ExportOutputType.CSV + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_export_status.py b/test/models/test_export_status.py new file mode 100644 index 0000000..506f7b9 --- /dev/null +++ b/test/models/test_export_status.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +""" + FreeClimb API + + FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request. + + The version of the OpenAPI document: 1.0.0 + Contact: support@freeclimb.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import pydantic_core +from datetime import datetime +import freeclimb +from freeclimb import * +from freeclimb.models.export_status import ExportStatus + + +class TestExportStatus(unittest.TestCase): + """ExportStatus unit test stubs""" + + +if __name__ == "__main__": + unittest.main() diff --git a/test/models/test_log_result.py b/test/models/test_log_result.py index 65b6964..b48d815 100644 --- a/test/models/test_log_result.py +++ b/test/models/test_log_result.py @@ -67,7 +67,7 @@ def test_message(self): def test_metadata(self): """Test LogResult.metadata""" - object = None + object = {} self.model.metadata = object assert self.model.metadata == object diff --git a/test/models/test_queue_result.py b/test/models/test_queue_result.py index e951c1b..a66efb6 100644 --- a/test/models/test_queue_result.py +++ b/test/models/test_queue_result.py @@ -85,7 +85,7 @@ def test_average_queue_removal_time(self): def test_subresource_uris(self): """Test QueueResult.subresource_uris""" - object = None + object = {} self.model.subresource_uris = object assert self.model.subresource_uris == object From f9453bc11b1f8584bf57cfb28b5ed02438cdfd59 Mon Sep 17 00:00:00 2001 From: Navneet Garg Date: Tue, 23 Sep 2025 21:25:25 -0400 Subject: [PATCH 2/2] Upgrade stoplight prism cli --- yarn.lock | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6aeaf0f..c52c0a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -145,9 +145,9 @@ tslib "^2.3.1" "@stoplight/prism-http-server@^5.6.0": - version "5.12.0" - resolved "https://registry.yarnpkg.com/@stoplight/prism-http-server/-/prism-http-server-5.12.0.tgz#c1fdc86bcb7d42d3420b9b84f05f9ae8977bc953" - integrity sha512-rnACUB950kvgDGXk1MsVk1v8nAZNCRaxdrTlACoJpQA0qzF8eBszYikoDsVmx2BbGsOrCC/49+nQc+HyFFpMdQ== + version "5.12.2" + resolved "https://registry.yarnpkg.com/@stoplight/prism-http-server/-/prism-http-server-5.12.2.tgz#d8de94f6b3506b464a5c89ff049b1e0fc9822ef9" + integrity sha512-h7MpOuv/WPvf4MhQmXw3CygAZp64Ts0SOM4BdoafcgAOJZyvRAOjUNJeelGJsHYdPK0aB9NZsqsaKBtNfkYj+A== dependencies: "@stoplight/prism-core" "^5.8.0" "@stoplight/prism-http" "^5.12.0" @@ -252,11 +252,11 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "22.10.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.5.tgz#95af89a3fb74a2bb41ef9927f206e6472026e48b" - integrity sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ== + version "24.5.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.5.2.tgz#52ceb83f50fe0fcfdfbd2a9fab6db2e9e7ef6446" + integrity sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ== dependencies: - undici-types "~6.20.0" + undici-types "~7.12.0" "@types/swagger-schema-official@~2.0.22": version "2.0.25" @@ -264,9 +264,9 @@ integrity sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg== "@types/type-is@^1.6.3": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@types/type-is/-/type-is-1.6.6.tgz#0adeafa0d6879f0ce17c81228d487270e8b80d7d" - integrity sha512-fs1KHv/f9OvmTMsu4sBNaUu32oyda9Y9uK25naJG8gayxNrfqGIjPQsbLIYyfe7xFkppnPlJB+BuTldOaX9bXw== + version "1.6.7" + resolved "https://registry.yarnpkg.com/@types/type-is/-/type-is-1.6.7.tgz#4d7934d2c795749800e767cd9af7ffbd4f16cf1c" + integrity sha512-gEsh7n8824nusZ2Sidh6POxNsIdTSvIAl5gXbeFj+TUaD1CO2r4i7MQYNMfEQkChU42s2bVWAda6x6BzIhtFbQ== dependencies: "@types/node" "*" @@ -475,9 +475,9 @@ cross-fetch@^3.1.5: node-fetch "^2.7.0" debug@4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" - integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" @@ -487,9 +487,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" @@ -524,11 +524,18 @@ fast-safe-stringify@^2.0.8: integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== fast-uri@^3.0.1: - version "3.0.5" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.5.tgz#19f5f9691d0dab9b85861a7bb5d98fca961da9cd" - integrity sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q== + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== -fast-xml-parser@^4.2.0, fast-xml-parser@^4.5.0: +fast-xml-parser@^4.2.0: + version "4.5.3" + resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz#c54d6b35aa0f23dc1ea60b6c884340c006dc6efb" + integrity sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig== + dependencies: + strnum "^1.1.1" + +fast-xml-parser@^4.5.0: version "4.5.1" resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz#a7e665ff79b7919100a5202f23984b6150f9b31e" integrity sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w== @@ -587,9 +594,9 @@ format-util@^1.0.3: integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== fp-ts@^2.11.5: - version "2.16.9" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.9.tgz#99628fc5e0bb3b432c4a16d8f4455247380bae8a" - integrity sha512-+I2+FnVB+tVaxcYyQkHUq7ZdKScaBlX53A41mxQtpIccsfyv8PzdzP7fzp2AY832T4aoK6UZ5WRX/ebGd8uZuQ== + version "2.16.11" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.16.11.tgz#831a10514bf4e22adf12065732fc5a20c85d9623" + integrity sha512-LaI+KaX2NFkfn1ZGHoKCmcfv7yrZsC3b8NtWsTVQeHkq4F27vI5igUuO53sxqDEa2gNQMHFPmpojDw/1zmUK7w== fsevents@~2.3.2: version "2.3.3" @@ -783,16 +790,7 @@ jsonc-parser@~2.2.1: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc" integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w== -jsonpath-plus@^10.1.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-10.2.0.tgz#84d680544d9868579cc7c8f59bbe153a5aad54c4" - integrity sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw== - dependencies: - "@jsep-plugin/assignment" "^1.3.0" - "@jsep-plugin/regex" "^1.0.4" - jsep "^1.4.0" - -jsonpath-plus@^10.3.0: +jsonpath-plus@^10.1.0, jsonpath-plus@^10.3.0: version "10.3.0" resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz#59e22e4fa2298c68dfcd70659bb47f0cad525238" integrity sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA== @@ -1160,10 +1158,10 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strnum@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" - integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== +strnum@^1.0.5, strnum@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.1.2.tgz#57bca4fbaa6f271081715dbc9ed7cee5493e28e4" + integrity sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA== supports-color@^5.3.0: version "5.5.0" @@ -1204,10 +1202,10 @@ type-is@^1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -undici-types@~6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" - integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~7.12.0: + version "7.12.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.12.0.tgz#15c5c7475c2a3ba30659529f5cdb4674b622fafb" + integrity sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ== uri-template-lite@^22.9.0: version "22.9.0"