From 1ba63f5be1b90bfe0dba09b04f4ee0b1e9b72263 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:30:56 +0000 Subject: [PATCH 1/2] Bump urllib3 from 1.26.14 to 1.26.19 in /export-data-from-genesys Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.14 to 1.26.19. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/1.26.14...1.26.19) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- export-data-from-genesys/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-data-from-genesys/requirements.txt b/export-data-from-genesys/requirements.txt index 14ceed6a..7de52400 100644 --- a/export-data-from-genesys/requirements.txt +++ b/export-data-from-genesys/requirements.txt @@ -30,7 +30,7 @@ requests==2.28.1 rsa==4.9 six==1.16.0 typing-extensions==4.5.0 -urllib3==1.26.14 +urllib3==1.26.19 zipp==3.15.0 google-cloud-contact-center-insights pandas_gbq From 57767a2371736edce3840c908a832ace5a46d3fb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 11 Jul 2024 18:32:43 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../generate-call-logs.py | 8 +++-- export-data-from-genesys/genesys.py | 32 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/ccai-insights-sample-data/generate-call-logs.py b/ccai-insights-sample-data/generate-call-logs.py index 65d6bcfa..ad15a857 100644 --- a/ccai-insights-sample-data/generate-call-logs.py +++ b/ccai-insights-sample-data/generate-call-logs.py @@ -121,7 +121,9 @@ def generate_log(): }, { "start_timestamp_usec": timestamp + response_delay * 4, - "text": "Can you give me more details about the problem with your {0}?".format(device), + "text": "Can you give me more details about the problem with your {0}?".format( + device + ), "role": "AGENT", "user_id": 2, }, @@ -133,7 +135,9 @@ def generate_log(): }, { "start_timestamp_usec": timestamp + response_delay * 6, - "text": "And what is the status shown in the settings on the {0}?".format(device), + "text": "And what is the status shown in the settings on the {0}?".format( + device + ), "role": "AGENT", "user_id": 2, }, diff --git a/export-data-from-genesys/genesys.py b/export-data-from-genesys/genesys.py index 9eefa3fc..1c765fa6 100644 --- a/export-data-from-genesys/genesys.py +++ b/export-data-from-genesys/genesys.py @@ -4,22 +4,25 @@ import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException -print('-------------------------------------------------------------') -print('- Execute Bulk Action on recordings-') -print('-------------------------------------------------------------') +print("-------------------------------------------------------------") +print("- Execute Bulk Action on recordings-") +print("-------------------------------------------------------------") # Credentials for the aws bucket -CLIENT_ID = '' -CLIENT_SECRET = '' -ORG_REGION = '' +CLIENT_ID = "" +CLIENT_SECRET = "" +ORG_REGION = "" # Set environment region = PureCloudPlatformClientV2.PureCloudRegionHosts[ORG_REGION] PureCloudPlatformClientV2.configuration.host = region.get_api_host() # OAuth when using Client Credentials -api_client = PureCloudPlatformClientV2.api_client.ApiClient() \ - .get_client_credentials_token(CLIENT_ID, CLIENT_SECRET) +api_client = ( + PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token( + CLIENT_ID, CLIENT_SECRET + ) +) # Get the api @@ -36,7 +39,7 @@ query.conversation_query = { "interval": "2023-12-01T00:00:00.000Z/2024-01-07T00:00:00.000Z", "order": "asc", - "orderBy": "conversationStart" + "orderBy": "conversationStart", } print(query) try: @@ -55,7 +58,7 @@ try: get_recording_job_response = recording_api.get_recording_job(job_id) job_state = get_recording_job_response.state - if job_state != 'PENDING': + if job_state != "PENDING": break else: print("Job state PENDING...") @@ -65,9 +68,11 @@ sys.exit() -if job_state == 'READY': +if job_state == "READY": try: - execute_job_response = recording_api.put_recording_job(job_id, {"state": "PROCESSING"}) + execute_job_response = recording_api.put_recording_job( + job_id, {"state": "PROCESSING"} + ) job_state = execute_job_response.state print(f"Successfully execute recording bulk job { execute_job_response}") except ApiException as e: @@ -79,7 +84,7 @@ # Call delete_recording_job api # Can be canceled also in READY and PENDING states -if job_state == 'PROCESSING': +if job_state == "PROCESSING": try: cancel_job_response = recording_api.delete_recording_job(job_id) print(f"Successfully cancelled recording bulk job { cancel_job_response}") @@ -101,4 +106,3 @@ except ApiException as e: print(f"Exception when calling RecordingApi->get_recording_jobs: { e }") sys.exit() -