wxcli 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wxcli/__init__.py +4 -0
- wxcli/_playbook/.claude/agents/migration-advisor.md +239 -0
- wxcli/_playbook/.claude/agents/wxc-calling-builder.md +946 -0
- wxcli/_playbook/.claude/rules/cleanup.md +29 -0
- wxcli/_playbook/.claude/rules/cucm-migration.md +58 -0
- wxcli/_playbook/.claude/rules/org-health.md +14 -0
- wxcli/_playbook/.claude/settings.json +8 -0
- wxcli/_playbook/.claude/skills/audit-compliance/SKILL.md +515 -0
- wxcli/_playbook/.claude/skills/call-control/SKILL.md +747 -0
- wxcli/_playbook/.claude/skills/configure-features/SKILL.md +623 -0
- wxcli/_playbook/.claude/skills/configure-routing/SKILL.md +627 -0
- wxcli/_playbook/.claude/skills/contact-center/SKILL.md +1181 -0
- wxcli/_playbook/.claude/skills/cucm-migrate/SKILL.md +820 -0
- wxcli/_playbook/.claude/skills/customer-assist/SKILL.md +443 -0
- wxcli/_playbook/.claude/skills/device-platform/SKILL.md +407 -0
- wxcli/_playbook/.claude/skills/manage-call-settings/SKILL.md +757 -0
- wxcli/_playbook/.claude/skills/manage-devices/SKILL.md +790 -0
- wxcli/_playbook/.claude/skills/manage-identity/SKILL.md +638 -0
- wxcli/_playbook/.claude/skills/manage-licensing/SKILL.md +528 -0
- wxcli/_playbook/.claude/skills/manage-meetings/SKILL.md +708 -0
- wxcli/_playbook/.claude/skills/messaging-bots/SKILL.md +365 -0
- wxcli/_playbook/.claude/skills/messaging-spaces/SKILL.md +520 -0
- wxcli/_playbook/.claude/skills/org-health/SKILL.md +159 -0
- wxcli/_playbook/.claude/skills/provision-calling/SKILL.md +421 -0
- wxcli/_playbook/.claude/skills/query-live/SKILL.md +183 -0
- wxcli/_playbook/.claude/skills/query-live/domains/call-flow-trace.md +223 -0
- wxcli/_playbook/.claude/skills/query-live/domains/call-history.md +44 -0
- wxcli/_playbook/.claude/skills/query-live/domains/features.md +169 -0
- wxcli/_playbook/.claude/skills/query-live/domains/numbers.md +93 -0
- wxcli/_playbook/.claude/skills/query-live/domains/people-and-settings.md +146 -0
- wxcli/_playbook/.claude/skills/query-live/domains/routing.md +124 -0
- wxcli/_playbook/.claude/skills/reporting/SKILL.md +501 -0
- wxcli/_playbook/.claude/skills/reporting/references/cdr-recipes.md +1628 -0
- wxcli/_playbook/.claude/skills/reporting-cc/SKILL.md +251 -0
- wxcli/_playbook/.claude/skills/reporting-meetings/SKILL.md +290 -0
- wxcli/_playbook/.claude/skills/teardown/SKILL.md +214 -0
- wxcli/_playbook/.claude/skills/video-mesh/SKILL.md +379 -0
- wxcli/_playbook/.claude/skills/wxc-calling-debug/SKILL.md +475 -0
- wxcli/_playbook/CLAUDE.md +373 -0
- wxcli/_playbook/docs/reference/CLAUDE.md +25 -0
- wxcli/_playbook/docs/reference/admin-apps-data.md +643 -0
- wxcli/_playbook/docs/reference/admin-audit-security.md +322 -0
- wxcli/_playbook/docs/reference/admin-hybrid.md +383 -0
- wxcli/_playbook/docs/reference/admin-identity-scim.md +1007 -0
- wxcli/_playbook/docs/reference/admin-licensing.md +414 -0
- wxcli/_playbook/docs/reference/admin-org-management.md +586 -0
- wxcli/_playbook/docs/reference/admin-partner.md +357 -0
- wxcli/_playbook/docs/reference/archive/wxc-sdk-patterns.md +1229 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-advanced.md +835 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-core.md +743 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-devices-workspaces.md +1305 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-features.md +849 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-locations.md +938 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-person.md +1255 -0
- wxcli/_playbook/docs/reference/archive/wxcadm-routing.md +1262 -0
- wxcli/_playbook/docs/reference/authentication.md +965 -0
- wxcli/_playbook/docs/reference/call-control.md +1205 -0
- wxcli/_playbook/docs/reference/call-features-additional.md +2541 -0
- wxcli/_playbook/docs/reference/call-features-major.md +1320 -0
- wxcli/_playbook/docs/reference/call-routing.md +2304 -0
- wxcli/_playbook/docs/reference/contact-center-analytics.md +1049 -0
- wxcli/_playbook/docs/reference/contact-center-core.md +1614 -0
- wxcli/_playbook/docs/reference/contact-center-journey.md +457 -0
- wxcli/_playbook/docs/reference/contact-center-routing.md +1138 -0
- wxcli/_playbook/docs/reference/devices-core.md +1869 -0
- wxcli/_playbook/docs/reference/devices-dect.md +1150 -0
- wxcli/_playbook/docs/reference/devices-platform.md +467 -0
- wxcli/_playbook/docs/reference/devices-workspaces.md +1426 -0
- wxcli/_playbook/docs/reference/emergency-services.md +1122 -0
- wxcli/_playbook/docs/reference/location-calling-core.md +2037 -0
- wxcli/_playbook/docs/reference/location-calling-media.md +1334 -0
- wxcli/_playbook/docs/reference/location-recording-advanced.md +1482 -0
- wxcli/_playbook/docs/reference/meetings-content.md +473 -0
- wxcli/_playbook/docs/reference/meetings-core.md +903 -0
- wxcli/_playbook/docs/reference/meetings-infrastructure.md +899 -0
- wxcli/_playbook/docs/reference/meetings-settings.md +850 -0
- wxcli/_playbook/docs/reference/messaging-bots.md +1091 -0
- wxcli/_playbook/docs/reference/messaging-spaces.md +695 -0
- wxcli/_playbook/docs/reference/person-call-settings-behavior.md +1639 -0
- wxcli/_playbook/docs/reference/person-call-settings-handling.md +1394 -0
- wxcli/_playbook/docs/reference/person-call-settings-media.md +1898 -0
- wxcli/_playbook/docs/reference/person-call-settings-permissions.md +1329 -0
- wxcli/_playbook/docs/reference/provisioning.md +1366 -0
- wxcli/_playbook/docs/reference/reporting-analytics.md +1318 -0
- wxcli/_playbook/docs/reference/self-service-call-settings.md +1020 -0
- wxcli/_playbook/docs/reference/virtual-lines.md +1132 -0
- wxcli/_playbook/docs/reference/webhooks-events.md +1444 -0
- wxcli/_playbook/docs/reference/wxcadm-xsi-realtime.md +953 -0
- wxcli/_version.py +24 -0
- wxcli/auth.py +137 -0
- wxcli/commands/__init__.py +0 -0
- wxcli/commands/_registry.py +181 -0
- wxcli/commands/activation_email.py +103 -0
- wxcli/commands/admin_recordings.py +585 -0
- wxcli/commands/analytics.py +105 -0
- wxcli/commands/announcement_playlists.py +219 -0
- wxcli/commands/announcements.py +519 -0
- wxcli/commands/archive_users.py +36 -0
- wxcli/commands/attachment_actions.py +60 -0
- wxcli/commands/audit_events.py +83 -0
- wxcli/commands/authorizations.py +113 -0
- wxcli/commands/auto_attendant.py +642 -0
- wxcli/commands/broadworks_billing_reports.py +126 -0
- wxcli/commands/broadworks_enterprises.py +160 -0
- wxcli/commands/broadworks_subscribers.py +319 -0
- wxcli/commands/broadworks_workspaces.py +108 -0
- wxcli/commands/call_controls.py +1304 -0
- wxcli/commands/call_park.py +494 -0
- wxcli/commands/call_pickup.py +229 -0
- wxcli/commands/call_queue.py +1878 -0
- wxcli/commands/call_recording.py +707 -0
- wxcli/commands/call_routing.py +1610 -0
- wxcli/commands/call_settings_for_me_phase_5.py +212 -0
- wxcli/commands/caller_reputation.py +169 -0
- wxcli/commands/calling_service.py +305 -0
- wxcli/commands/cc_address_book.py +770 -0
- wxcli/commands/cc_agent_greetings.py +242 -0
- wxcli/commands/cc_agent_summaries.py +39 -0
- wxcli/commands/cc_agent_wellbeing.py +216 -0
- wxcli/commands/cc_agents.py +425 -0
- wxcli/commands/cc_ai_assistant.py +55 -0
- wxcli/commands/cc_ai_feature.py +294 -0
- wxcli/commands/cc_audio_files.py +149 -0
- wxcli/commands/cc_auto_csat.py +311 -0
- wxcli/commands/cc_aux_code.py +458 -0
- wxcli/commands/cc_business_hour.py +353 -0
- wxcli/commands/cc_call_monitoring.py +228 -0
- wxcli/commands/cc_callbacks.py +194 -0
- wxcli/commands/cc_campaign.py +212 -0
- wxcli/commands/cc_captures.py +39 -0
- wxcli/commands/cc_contact_list.py +169 -0
- wxcli/commands/cc_contact_number.py +295 -0
- wxcli/commands/cc_data_sources.py +235 -0
- wxcli/commands/cc_desktop_layout.py +380 -0
- wxcli/commands/cc_desktop_profile.py +322 -0
- wxcli/commands/cc_dial_number.py +511 -0
- wxcli/commands/cc_dial_plan.py +347 -0
- wxcli/commands/cc_dnc.py +101 -0
- wxcli/commands/cc_entry_point.py +545 -0
- wxcli/commands/cc_ewt.py +51 -0
- wxcli/commands/cc_flow.py +477 -0
- wxcli/commands/cc_global_vars.py +430 -0
- wxcli/commands/cc_holiday_list.py +335 -0
- wxcli/commands/cc_journey.py +1261 -0
- wxcli/commands/cc_legacy_flows.py +49 -0
- wxcli/commands/cc_multimedia_profile.py +436 -0
- wxcli/commands/cc_notification.py +51 -0
- wxcli/commands/cc_outdial_ani.py +604 -0
- wxcli/commands/cc_overrides.py +341 -0
- wxcli/commands/cc_queue.py +1083 -0
- wxcli/commands/cc_queue_stats.py +55 -0
- wxcli/commands/cc_realtime.py +51 -0
- wxcli/commands/cc_resource_collection.py +312 -0
- wxcli/commands/cc_search.py +46 -0
- wxcli/commands/cc_site.py +400 -0
- wxcli/commands/cc_skill.py +350 -0
- wxcli/commands/cc_skill_profile.py +289 -0
- wxcli/commands/cc_subscriptions.py +426 -0
- wxcli/commands/cc_summaries.py +130 -0
- wxcli/commands/cc_tasks.py +844 -0
- wxcli/commands/cc_team.py +325 -0
- wxcli/commands/cc_user_profiles.py +349 -0
- wxcli/commands/cc_users.py +701 -0
- wxcli/commands/cc_work_types.py +363 -0
- wxcli/commands/cdr.py +89 -0
- wxcli/commands/classifications.py +38 -0
- wxcli/commands/cleanup.py +1427 -0
- wxcli/commands/client_settings.py +72 -0
- wxcli/commands/conference.py +328 -0
- wxcli/commands/configure.py +72 -0
- wxcli/commands/converged_recordings.py +347 -0
- wxcli/commands/converged_recordings_export.py +310 -0
- wxcli/commands/cq_playlists.py +42 -0
- wxcli/commands/cucm.py +2794 -0
- wxcli/commands/cucm_config.py +129 -0
- wxcli/commands/customer_assist.py +373 -0
- wxcli/commands/data_sources.py +227 -0
- wxcli/commands/dect_devices.py +787 -0
- wxcli/commands/device_configurations.py +77 -0
- wxcli/commands/device_dynamic_settings.py +320 -0
- wxcli/commands/device_settings.py +1489 -0
- wxcli/commands/devices.py +280 -0
- wxcli/commands/domains.py +142 -0
- wxcli/commands/ecm.py +178 -0
- wxcli/commands/emergency_services.py +827 -0
- wxcli/commands/events.py +83 -0
- wxcli/commands/external_voicemail.py +52 -0
- wxcli/commands/groups.py +206 -0
- wxcli/commands/guest_management.py +76 -0
- wxcli/commands/hds.py +340 -0
- wxcli/commands/hot_desk.py +67 -0
- wxcli/commands/hot_desking_members.py +118 -0
- wxcli/commands/hot_desking_portal.py +124 -0
- wxcli/commands/hunt_group.py +577 -0
- wxcli/commands/hybrid_clusters.py +71 -0
- wxcli/commands/hybrid_connectors.py +67 -0
- wxcli/commands/identity_org.py +159 -0
- wxcli/commands/init_playbook.py +155 -0
- wxcli/commands/licenses.py +106 -0
- wxcli/commands/live_monitoring.py +40 -0
- wxcli/commands/location_call_handling.py +577 -0
- wxcli/commands/location_schedules.py +341 -0
- wxcli/commands/location_settings.py +1297 -0
- wxcli/commands/location_voicemail.py +494 -0
- wxcli/commands/locations.py +336 -0
- wxcli/commands/meeting_captions.py +110 -0
- wxcli/commands/meeting_chats.py +63 -0
- wxcli/commands/meeting_invitees.py +234 -0
- wxcli/commands/meeting_messages.py +28 -0
- wxcli/commands/meeting_participants.py +278 -0
- wxcli/commands/meeting_polls.py +111 -0
- wxcli/commands/meeting_preferences.py +515 -0
- wxcli/commands/meeting_qa.py +78 -0
- wxcli/commands/meeting_qualities.py +43 -0
- wxcli/commands/meeting_reports.py +101 -0
- wxcli/commands/meeting_session_types.py +105 -0
- wxcli/commands/meeting_site.py +57 -0
- wxcli/commands/meeting_slido.py +44 -0
- wxcli/commands/meeting_summaries.py +92 -0
- wxcli/commands/meeting_tracking_codes.py +233 -0
- wxcli/commands/meeting_transcripts.py +230 -0
- wxcli/commands/meetings.py +1997 -0
- wxcli/commands/memberships.py +164 -0
- wxcli/commands/messages.py +213 -0
- wxcli/commands/mode_management.py +244 -0
- wxcli/commands/my_call_settings.py +3577 -0
- wxcli/commands/numbers.py +405 -0
- wxcli/commands/operating_modes.py +410 -0
- wxcli/commands/org_contacts.py +284 -0
- wxcli/commands/org_health_cli.py +55 -0
- wxcli/commands/org_settings.py +71 -0
- wxcli/commands/organizations.py +83 -0
- wxcli/commands/paging_group.py +257 -0
- wxcli/commands/partner_admins.py +141 -0
- wxcli/commands/partner_reports.py +188 -0
- wxcli/commands/partner_tags.py +216 -0
- wxcli/commands/people.py +279 -0
- wxcli/commands/person_call_settings.py +71 -0
- wxcli/commands/pstn.py +280 -0
- wxcli/commands/recording_report.py +154 -0
- wxcli/commands/report_templates.py +38 -0
- wxcli/commands/reports.py +144 -0
- wxcli/commands/resource_group_memberships.py +160 -0
- wxcli/commands/resource_groups.py +67 -0
- wxcli/commands/roles.py +63 -0
- wxcli/commands/room_tabs.py +160 -0
- wxcli/commands/rooms.py +225 -0
- wxcli/commands/scim_bulk.py +46 -0
- wxcli/commands/scim_groups.py +246 -0
- wxcli/commands/scim_schemas.py +82 -0
- wxcli/commands/scim_users.py +283 -0
- wxcli/commands/security_audit.py +54 -0
- wxcli/commands/service_apps.py +51 -0
- wxcli/commands/single_number_reach.py +209 -0
- wxcli/commands/team_memberships.py +155 -0
- wxcli/commands/teams.py +153 -0
- wxcli/commands/ucm_profile.py +42 -0
- wxcli/commands/update.py +219 -0
- wxcli/commands/user_settings.py +5116 -0
- wxcli/commands/video_mesh.py +1090 -0
- wxcli/commands/virtual_extensions.py +502 -0
- wxcli/commands/virtual_line_settings.py +2072 -0
- wxcli/commands/webhooks.py +176 -0
- wxcli/commands/wholesale_billing_reports.py +147 -0
- wxcli/commands/wholesale_provisioning.py +523 -0
- wxcli/commands/workspace_locations.py +339 -0
- wxcli/commands/workspace_metrics.py +103 -0
- wxcli/commands/workspace_personalization.py +70 -0
- wxcli/commands/workspace_settings.py +3347 -0
- wxcli/commands/workspaces.py +279 -0
- wxcli/commands/xapi.py +114 -0
- wxcli/config.py +139 -0
- wxcli/errors.py +77 -0
- wxcli/main.py +210 -0
- wxcli/migration/CLAUDE.md +106 -0
- wxcli/migration/__init__.py +1 -0
- wxcli/migration/advisory/CLAUDE.md +196 -0
- wxcli/migration/advisory/__init__.py +46 -0
- wxcli/migration/advisory/advisor.py +107 -0
- wxcli/migration/advisory/advisory_patterns.py +2552 -0
- wxcli/migration/advisory/recommendation_rules.py +835 -0
- wxcli/migration/cucm/CLAUDE.md +74 -0
- wxcli/migration/cucm/__init__.py +5 -0
- wxcli/migration/cucm/connection.py +265 -0
- wxcli/migration/cucm/discovery.py +225 -0
- wxcli/migration/cucm/extractors/__init__.py +1 -0
- wxcli/migration/cucm/extractors/announcements.py +92 -0
- wxcli/migration/cucm/extractors/base.py +90 -0
- wxcli/migration/cucm/extractors/device_profiles.py +98 -0
- wxcli/migration/cucm/extractors/devices.py +193 -0
- wxcli/migration/cucm/extractors/e911.py +103 -0
- wxcli/migration/cucm/extractors/features.py +309 -0
- wxcli/migration/cucm/extractors/helpers.py +73 -0
- wxcli/migration/cucm/extractors/informational.py +295 -0
- wxcli/migration/cucm/extractors/locations.py +221 -0
- wxcli/migration/cucm/extractors/moh.py +100 -0
- wxcli/migration/cucm/extractors/remote_destinations.py +96 -0
- wxcli/migration/cucm/extractors/routing.py +493 -0
- wxcli/migration/cucm/extractors/shared_lines.py +146 -0
- wxcli/migration/cucm/extractors/templates.py +229 -0
- wxcli/migration/cucm/extractors/tier4.py +173 -0
- wxcli/migration/cucm/extractors/users.py +240 -0
- wxcli/migration/cucm/extractors/voicemail.py +243 -0
- wxcli/migration/cucm/extractors/workspaces.py +88 -0
- wxcli/migration/cucm/unity_connection.py +304 -0
- wxcli/migration/execute/CLAUDE.md +372 -0
- wxcli/migration/execute/__init__.py +303 -0
- wxcli/migration/execute/batch.py +277 -0
- wxcli/migration/execute/dependency.py +483 -0
- wxcli/migration/execute/engine.py +964 -0
- wxcli/migration/execute/handlers.py +2232 -0
- wxcli/migration/execute/planner.py +1939 -0
- wxcli/migration/execute/runtime.py +571 -0
- wxcli/migration/export/CLAUDE.md +49 -0
- wxcli/migration/export/__init__.py +8 -0
- wxcli/migration/export/csv_export.py +126 -0
- wxcli/migration/export/deployment_plan.py +479 -0
- wxcli/migration/export/json_export.py +60 -0
- wxcli/migration/models.py +941 -0
- wxcli/migration/phone_models.py +50 -0
- wxcli/migration/preflight/CLAUDE.md +52 -0
- wxcli/migration/preflight/__init__.py +89 -0
- wxcli/migration/preflight/checks.py +911 -0
- wxcli/migration/preflight/runner.py +293 -0
- wxcli/migration/rate_limiter.py +144 -0
- wxcli/migration/report/CLAUDE.md +245 -0
- wxcli/migration/report/__init__.py +7 -0
- wxcli/migration/report/appendix.py +2437 -0
- wxcli/migration/report/assembler.py +183 -0
- wxcli/migration/report/charts.py +263 -0
- wxcli/migration/report/executive.py +776 -0
- wxcli/migration/report/explainer.py +704 -0
- wxcli/migration/report/helpers.py +74 -0
- wxcli/migration/report/ingest.py +152 -0
- wxcli/migration/report/notice_templates.py +192 -0
- wxcli/migration/report/score.py +375 -0
- wxcli/migration/report/styles.py +1052 -0
- wxcli/migration/report/user_diff.py +1052 -0
- wxcli/migration/report/user_notice.py +425 -0
- wxcli/migration/state.py +139 -0
- wxcli/migration/store.py +860 -0
- wxcli/migration/transform/CLAUDE.md +107 -0
- wxcli/migration/transform/__init__.py +12 -0
- wxcli/migration/transform/analysis_pipeline.py +453 -0
- wxcli/migration/transform/analyzers/__init__.py +142 -0
- wxcli/migration/transform/analyzers/css_permission.py +189 -0
- wxcli/migration/transform/analyzers/css_routing.py +335 -0
- wxcli/migration/transform/analyzers/device_compatibility.py +122 -0
- wxcli/migration/transform/analyzers/dn_ambiguity.py +131 -0
- wxcli/migration/transform/analyzers/duplicate_user.py +221 -0
- wxcli/migration/transform/analyzers/extension_conflict.py +173 -0
- wxcli/migration/transform/analyzers/feature_approximation.py +227 -0
- wxcli/migration/transform/analyzers/layout_overflow.py +174 -0
- wxcli/migration/transform/analyzers/location_ambiguity.py +184 -0
- wxcli/migration/transform/analyzers/missing_data.py +300 -0
- wxcli/migration/transform/analyzers/selective_call_handling.py +394 -0
- wxcli/migration/transform/analyzers/shared_line.py +170 -0
- wxcli/migration/transform/analyzers/voicemail_compatibility.py +267 -0
- wxcli/migration/transform/analyzers/workspace_license.py +212 -0
- wxcli/migration/transform/cross_reference.py +1136 -0
- wxcli/migration/transform/cucm_pattern.py +246 -0
- wxcli/migration/transform/decisions.py +301 -0
- wxcli/migration/transform/e164.py +145 -0
- wxcli/migration/transform/engine.py +256 -0
- wxcli/migration/transform/mappers/CLAUDE.md +123 -0
- wxcli/migration/transform/mappers/__init__.py +76 -0
- wxcli/migration/transform/mappers/announcement_mapper.py +122 -0
- wxcli/migration/transform/mappers/base.py +190 -0
- wxcli/migration/transform/mappers/button_template_mapper.py +186 -0
- wxcli/migration/transform/mappers/call_forwarding_mapper.py +228 -0
- wxcli/migration/transform/mappers/call_settings_mapper.py +144 -0
- wxcli/migration/transform/mappers/css_mapper.py +868 -0
- wxcli/migration/transform/mappers/dect_mapper.py +367 -0
- wxcli/migration/transform/mappers/device_layout_mapper.py +289 -0
- wxcli/migration/transform/mappers/device_mapper.py +227 -0
- wxcli/migration/transform/mappers/device_profile_mapper.py +190 -0
- wxcli/migration/transform/mappers/device_settings_mapper.py +464 -0
- wxcli/migration/transform/mappers/e911_mapper.py +129 -0
- wxcli/migration/transform/mappers/ecbn_mapper.py +263 -0
- wxcli/migration/transform/mappers/executive_assistant_mapper.py +156 -0
- wxcli/migration/transform/mappers/feature_mapper.py +1179 -0
- wxcli/migration/transform/mappers/line_mapper.py +310 -0
- wxcli/migration/transform/mappers/location_mapper.py +235 -0
- wxcli/migration/transform/mappers/moh_mapper.py +114 -0
- wxcli/migration/transform/mappers/monitoring_mapper.py +221 -0
- wxcli/migration/transform/mappers/receptionist_mapper.py +245 -0
- wxcli/migration/transform/mappers/routing_mapper.py +821 -0
- wxcli/migration/transform/mappers/snr_mapper.py +201 -0
- wxcli/migration/transform/mappers/softkey_mapper.py +205 -0
- wxcli/migration/transform/mappers/user_mapper.py +264 -0
- wxcli/migration/transform/mappers/voicemail_group_mapper.py +286 -0
- wxcli/migration/transform/mappers/voicemail_mapper.py +514 -0
- wxcli/migration/transform/mappers/workspace_mapper.py +464 -0
- wxcli/migration/transform/normalizers.py +2008 -0
- wxcli/migration/transform/pattern_converter.py +106 -0
- wxcli/migration/transform/pipeline.py +271 -0
- wxcli/migration/transform/rules.py +255 -0
- wxcli/org_health/CLAUDE.md +63 -0
- wxcli/org_health/__init__.py +7 -0
- wxcli/org_health/analyze.py +93 -0
- wxcli/org_health/checks.py +458 -0
- wxcli/org_health/collector.py +62 -0
- wxcli/org_health/models.py +78 -0
- wxcli/org_health/report.py +300 -0
- wxcli/output.py +101 -0
- wxcli-1.2.0.dist-info/METADATA +505 -0
- wxcli-1.2.0.dist-info/RECORD +413 -0
- wxcli-1.2.0.dist-info/WHEEL +5 -0
- wxcli-1.2.0.dist-info/entry_points.txt +2 -0
- wxcli-1.2.0.dist-info/licenses/LICENSE +191 -0
- wxcli-1.2.0.dist-info/scm_file_list.json +751 -0
- wxcli-1.2.0.dist-info/scm_version.json +8 -0
- wxcli-1.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,827 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import typer
|
|
3
|
+
from wxcli.auth import get_api
|
|
4
|
+
from wxcli.errors import WebexError, handle_rest_error
|
|
5
|
+
from wxcli.output import print_table, print_json
|
|
6
|
+
from wxcli.config import get_org_id
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
app = typer.Typer(help="Manage Webex Calling emergency-services.")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@app.command("update")
|
|
13
|
+
def update(
|
|
14
|
+
enabled: bool = typer.Option(None, "--enabled/--no-enabled", help="`true` if the service is enabled."),
|
|
15
|
+
company_id: str = typer.Option(None, "--company-id", help="The RedSky company ID, which can be retrieved from the RedSk"),
|
|
16
|
+
secret: str = typer.Option(None, "--secret", help="The company secret key, which can be found in the RedSky por"),
|
|
17
|
+
external_tenant_enabled: bool = typer.Option(None, "--external-tenant-enabled/--no-external-tenant-enabled", help="`true` if the RedSky reseller customer is not under a Cisco"),
|
|
18
|
+
email: str = typer.Option(None, "--email", help="The email for the RedSky account. `email` is required if `ex"),
|
|
19
|
+
password: str = typer.Option(None, "--password", help="The password for the RedSky account. `password` is required"),
|
|
20
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
21
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
22
|
+
):
|
|
23
|
+
"""Update RedSky Service Settings."""
|
|
24
|
+
api = get_api(debug=debug)
|
|
25
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky/serviceSettings"
|
|
26
|
+
params = {}
|
|
27
|
+
org_id = get_org_id()
|
|
28
|
+
if org_id is not None:
|
|
29
|
+
params["orgId"] = org_id
|
|
30
|
+
if json_body:
|
|
31
|
+
body = json.loads(json_body)
|
|
32
|
+
else:
|
|
33
|
+
body = {}
|
|
34
|
+
if enabled is not None:
|
|
35
|
+
body["enabled"] = enabled
|
|
36
|
+
if company_id is not None:
|
|
37
|
+
body["companyId"] = company_id
|
|
38
|
+
if secret is not None:
|
|
39
|
+
body["secret"] = secret
|
|
40
|
+
if external_tenant_enabled is not None:
|
|
41
|
+
body["externalTenantEnabled"] = external_tenant_enabled
|
|
42
|
+
if email is not None:
|
|
43
|
+
body["email"] = email
|
|
44
|
+
if password is not None:
|
|
45
|
+
body["password"] = password
|
|
46
|
+
try:
|
|
47
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
48
|
+
except WebexError as e:
|
|
49
|
+
handle_rest_error(e)
|
|
50
|
+
typer.echo(f"Updated.")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@app.command("show")
|
|
55
|
+
def show(
|
|
56
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
57
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
58
|
+
):
|
|
59
|
+
"""Retrieve RedSky Account Details for an Organization."""
|
|
60
|
+
api = get_api(debug=debug)
|
|
61
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky"
|
|
62
|
+
params = {}
|
|
63
|
+
org_id = get_org_id()
|
|
64
|
+
if org_id is not None:
|
|
65
|
+
params["orgId"] = org_id
|
|
66
|
+
try:
|
|
67
|
+
result = api.session.rest_get(url, params=params)
|
|
68
|
+
except WebexError as e:
|
|
69
|
+
handle_rest_error(e)
|
|
70
|
+
if output == "json":
|
|
71
|
+
print_json(result)
|
|
72
|
+
else:
|
|
73
|
+
if isinstance(result, dict):
|
|
74
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
75
|
+
elif isinstance(result, list):
|
|
76
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
77
|
+
else:
|
|
78
|
+
print_json(result)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@app.command("create")
|
|
83
|
+
def create(
|
|
84
|
+
org_prefix: str = typer.Option(None, "--org-prefix", help="Choices: wxc, wxc-whs"),
|
|
85
|
+
email: str = typer.Option(None, "--email", help="(required) The email for the RedSky account administrator."),
|
|
86
|
+
partner_redsky_org_id: str = typer.Option(None, "--partner-redsky-org-id", help="New organization is created under this partner organization"),
|
|
87
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
88
|
+
output: str = typer.Option("id", "--output", "-o", help="Output format: id|json"),
|
|
89
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
90
|
+
):
|
|
91
|
+
"""Create an Account and Admin in RedSky\n\nExample --json-body:\n '{"email":"...","orgPrefix":"wxc","partnerRedskyOrgId":"..."}'."""
|
|
92
|
+
api = get_api(debug=debug)
|
|
93
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky"
|
|
94
|
+
params = {}
|
|
95
|
+
org_id = get_org_id()
|
|
96
|
+
if org_id is not None:
|
|
97
|
+
params["orgId"] = org_id
|
|
98
|
+
if json_body:
|
|
99
|
+
body = json.loads(json_body)
|
|
100
|
+
else:
|
|
101
|
+
body = {}
|
|
102
|
+
if org_prefix is not None:
|
|
103
|
+
body["orgPrefix"] = org_prefix
|
|
104
|
+
if email is not None:
|
|
105
|
+
body["email"] = email
|
|
106
|
+
if partner_redsky_org_id is not None:
|
|
107
|
+
body["partnerRedskyOrgId"] = partner_redsky_org_id
|
|
108
|
+
_missing = [f for f in ['email'] if f not in body or body[f] is None]
|
|
109
|
+
if _missing:
|
|
110
|
+
typer.echo("Error: Missing required fields: " + ", ".join(_missing), err=True)
|
|
111
|
+
raise typer.Exit(1)
|
|
112
|
+
try:
|
|
113
|
+
result = api.session.rest_post(url, json=body, params=params)
|
|
114
|
+
except WebexError as e:
|
|
115
|
+
handle_rest_error(e)
|
|
116
|
+
if output == "json":
|
|
117
|
+
print_json(result)
|
|
118
|
+
elif isinstance(result, dict) and "id" in result:
|
|
119
|
+
typer.echo(f"Created: {result['id']}")
|
|
120
|
+
elif not result or result == {}:
|
|
121
|
+
typer.echo("Created.")
|
|
122
|
+
else:
|
|
123
|
+
print_json(result)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@app.command("show-status-red-sky")
|
|
128
|
+
def show_status_red_sky(
|
|
129
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
130
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
131
|
+
):
|
|
132
|
+
"""Get the Organization Compliance Status for a RedSky Account."""
|
|
133
|
+
api = get_api(debug=debug)
|
|
134
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky/status"
|
|
135
|
+
params = {}
|
|
136
|
+
org_id = get_org_id()
|
|
137
|
+
if org_id is not None:
|
|
138
|
+
params["orgId"] = org_id
|
|
139
|
+
try:
|
|
140
|
+
result = api.session.rest_get(url, params=params)
|
|
141
|
+
except WebexError as e:
|
|
142
|
+
handle_rest_error(e)
|
|
143
|
+
if output == "json":
|
|
144
|
+
print_json(result)
|
|
145
|
+
else:
|
|
146
|
+
if isinstance(result, dict):
|
|
147
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
148
|
+
elif isinstance(result, list):
|
|
149
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
150
|
+
else:
|
|
151
|
+
print_json(result)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@app.command("update-status-red-sky")
|
|
156
|
+
def update_status_red_sky(
|
|
157
|
+
compliance_status: str = typer.Option(None, "--compliance-status", help="Choices: OPTED_OUT, LOCATION_SETUP, ALERTS, NETWORK_ELEMENTS, ROUTING_ENABLED"),
|
|
158
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
159
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
160
|
+
):
|
|
161
|
+
"""Update the Organization RedSky Account's Compliance Status\n\nExample --json-body:\n '{"complianceStatus":"OPTED_OUT"}'."""
|
|
162
|
+
api = get_api(debug=debug)
|
|
163
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky/status"
|
|
164
|
+
params = {}
|
|
165
|
+
org_id = get_org_id()
|
|
166
|
+
if org_id is not None:
|
|
167
|
+
params["orgId"] = org_id
|
|
168
|
+
if json_body:
|
|
169
|
+
body = json.loads(json_body)
|
|
170
|
+
else:
|
|
171
|
+
body = {}
|
|
172
|
+
if compliance_status is not None:
|
|
173
|
+
body["complianceStatus"] = compliance_status
|
|
174
|
+
try:
|
|
175
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
176
|
+
except WebexError as e:
|
|
177
|
+
handle_rest_error(e)
|
|
178
|
+
typer.echo(f"Updated.")
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@app.command("show-compliance-status")
|
|
183
|
+
def show_compliance_status(
|
|
184
|
+
start: str = typer.Option(None, "--start", help="Specifies the offset from the first result that you want to"),
|
|
185
|
+
max: str = typer.Option(None, "--max", help="Specifies the maximum number of records that you want to fet"),
|
|
186
|
+
order: str = typer.Option(None, "--order", help="Sort the list of locations in ascending or descending order."),
|
|
187
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
188
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
189
|
+
):
|
|
190
|
+
"""Get the Organization Compliance Status and the Location Status List."""
|
|
191
|
+
api = get_api(debug=debug)
|
|
192
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky/complianceStatus"
|
|
193
|
+
params = {}
|
|
194
|
+
if start is not None:
|
|
195
|
+
params["start"] = start
|
|
196
|
+
if max is not None:
|
|
197
|
+
params["max"] = max
|
|
198
|
+
if order is not None:
|
|
199
|
+
params["order"] = order
|
|
200
|
+
org_id = get_org_id()
|
|
201
|
+
if org_id is not None:
|
|
202
|
+
params["orgId"] = org_id
|
|
203
|
+
try:
|
|
204
|
+
result = api.session.rest_get(url, params=params)
|
|
205
|
+
except WebexError as e:
|
|
206
|
+
handle_rest_error(e)
|
|
207
|
+
if output == "json":
|
|
208
|
+
print_json(result)
|
|
209
|
+
else:
|
|
210
|
+
if isinstance(result, dict):
|
|
211
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
212
|
+
elif isinstance(result, list):
|
|
213
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
214
|
+
else:
|
|
215
|
+
print_json(result)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
@app.command("login-to-a")
|
|
220
|
+
def login_to_a(
|
|
221
|
+
email: str = typer.Option(None, "--email", help="Email for the RedSky account."),
|
|
222
|
+
password: str = typer.Option(None, "--password", help="Password for the RedSky account."),
|
|
223
|
+
red_sky_org_id: str = typer.Option(None, "--red-sky-org-id", help="The RedSky organization ID for the organization which can be"),
|
|
224
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body"),
|
|
225
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
226
|
+
):
|
|
227
|
+
"""Login to a RedSky Admin Account."""
|
|
228
|
+
api = get_api(debug=debug)
|
|
229
|
+
url = f"https://webexapis.com/v1/telephony/config/redSky/actions/login/invoke"
|
|
230
|
+
params = {}
|
|
231
|
+
org_id = get_org_id()
|
|
232
|
+
if org_id is not None:
|
|
233
|
+
params["orgId"] = org_id
|
|
234
|
+
if json_body:
|
|
235
|
+
body = json.loads(json_body)
|
|
236
|
+
else:
|
|
237
|
+
body = {}
|
|
238
|
+
if email is not None:
|
|
239
|
+
body["email"] = email
|
|
240
|
+
if password is not None:
|
|
241
|
+
body["password"] = password
|
|
242
|
+
if red_sky_org_id is not None:
|
|
243
|
+
body["redSkyOrgId"] = red_sky_org_id
|
|
244
|
+
try:
|
|
245
|
+
result = api.session.rest_post(url, json=body, params=params)
|
|
246
|
+
except WebexError as e:
|
|
247
|
+
handle_rest_error(e)
|
|
248
|
+
print_json(result)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@app.command("show-red-sky")
|
|
253
|
+
def show_red_sky(
|
|
254
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
255
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
256
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
257
|
+
):
|
|
258
|
+
"""Get a Location's RedSky Emergency Calling Parameters."""
|
|
259
|
+
api = get_api(debug=debug)
|
|
260
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/redSky"
|
|
261
|
+
params = {}
|
|
262
|
+
org_id = get_org_id()
|
|
263
|
+
if org_id is not None:
|
|
264
|
+
params["orgId"] = org_id
|
|
265
|
+
try:
|
|
266
|
+
result = api.session.rest_get(url, params=params)
|
|
267
|
+
except WebexError as e:
|
|
268
|
+
handle_rest_error(e)
|
|
269
|
+
if output == "json":
|
|
270
|
+
print_json(result)
|
|
271
|
+
else:
|
|
272
|
+
if isinstance(result, dict):
|
|
273
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
274
|
+
elif isinstance(result, list):
|
|
275
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
276
|
+
else:
|
|
277
|
+
print_json(result)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
@app.command("show-status-red-sky-1")
|
|
282
|
+
def show_status_red_sky_1(
|
|
283
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
284
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
285
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
286
|
+
):
|
|
287
|
+
"""Get a Location's RedSky Compliance Status."""
|
|
288
|
+
api = get_api(debug=debug)
|
|
289
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/redSky/status"
|
|
290
|
+
params = {}
|
|
291
|
+
org_id = get_org_id()
|
|
292
|
+
if org_id is not None:
|
|
293
|
+
params["orgId"] = org_id
|
|
294
|
+
try:
|
|
295
|
+
result = api.session.rest_get(url, params=params)
|
|
296
|
+
except WebexError as e:
|
|
297
|
+
handle_rest_error(e)
|
|
298
|
+
if output == "json":
|
|
299
|
+
print_json(result)
|
|
300
|
+
else:
|
|
301
|
+
if isinstance(result, dict):
|
|
302
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
303
|
+
elif isinstance(result, list):
|
|
304
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
305
|
+
else:
|
|
306
|
+
print_json(result)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
@app.command("update-status-red-sky-1")
|
|
311
|
+
def update_status_red_sky_1(
|
|
312
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
313
|
+
compliance_status: str = typer.Option(None, "--compliance-status", help="Choices: OPTED_OUT, LOCATION_SETUP, ALERTS, NETWORK_ELEMENTS, ROUTING_ENABLED"),
|
|
314
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
315
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
316
|
+
):
|
|
317
|
+
"""Update a Location's RedSky Compliance Status\n\nExample --json-body:\n '{"complianceStatus":"OPTED_OUT"}'."""
|
|
318
|
+
api = get_api(debug=debug)
|
|
319
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/redSky/status"
|
|
320
|
+
params = {}
|
|
321
|
+
org_id = get_org_id()
|
|
322
|
+
if org_id is not None:
|
|
323
|
+
params["orgId"] = org_id
|
|
324
|
+
if json_body:
|
|
325
|
+
body = json.loads(json_body)
|
|
326
|
+
else:
|
|
327
|
+
body = {}
|
|
328
|
+
if compliance_status is not None:
|
|
329
|
+
body["complianceStatus"] = compliance_status
|
|
330
|
+
try:
|
|
331
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
332
|
+
except WebexError as e:
|
|
333
|
+
handle_rest_error(e)
|
|
334
|
+
typer.echo(f"Updated.")
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
@app.command("create-building")
|
|
339
|
+
def create_building(
|
|
340
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
341
|
+
alerting_email: str = typer.Option(None, "--alerting-email", help="(required) Email that is used to create alerts in RedSky. At least one"),
|
|
342
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
343
|
+
output: str = typer.Option("id", "--output", "-o", help="Output format: id|json"),
|
|
344
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
345
|
+
):
|
|
346
|
+
"""Create a RedSky Building Address and Alert Email for a Location\n\nExample --json-body:\n '{"alertingEmail":"...","address":{"addressLine1":"...","addressLine2":"...","city":"...","stateOrProvince":"...","zipOrPostalCode":"...","country":"..."}}'."""
|
|
347
|
+
api = get_api(debug=debug)
|
|
348
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/redSky/building"
|
|
349
|
+
params = {}
|
|
350
|
+
org_id = get_org_id()
|
|
351
|
+
if org_id is not None:
|
|
352
|
+
params["orgId"] = org_id
|
|
353
|
+
if json_body:
|
|
354
|
+
body = json.loads(json_body)
|
|
355
|
+
else:
|
|
356
|
+
body = {}
|
|
357
|
+
if alerting_email is not None:
|
|
358
|
+
body["alertingEmail"] = alerting_email
|
|
359
|
+
_missing = [f for f in ['alertingEmail'] if f not in body or body[f] is None]
|
|
360
|
+
if _missing:
|
|
361
|
+
typer.echo("Error: Missing required fields: " + ", ".join(_missing), err=True)
|
|
362
|
+
raise typer.Exit(1)
|
|
363
|
+
try:
|
|
364
|
+
result = api.session.rest_post(url, json=body, params=params)
|
|
365
|
+
except WebexError as e:
|
|
366
|
+
handle_rest_error(e)
|
|
367
|
+
if output == "json":
|
|
368
|
+
print_json(result)
|
|
369
|
+
elif isinstance(result, dict) and "id" in result:
|
|
370
|
+
typer.echo(f"Created: {result['id']}")
|
|
371
|
+
elif not result or result == {}:
|
|
372
|
+
typer.echo("Created.")
|
|
373
|
+
else:
|
|
374
|
+
print_json(result)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
@app.command("update-building")
|
|
379
|
+
def update_building(
|
|
380
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
381
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
382
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
383
|
+
):
|
|
384
|
+
"""Update a RedSky Building Address for a Location\n\nExample --json-body:\n '{"address":{"addressLine1":"...","addressLine2":"...","city":"...","stateOrProvince":"...","zipOrPostalCode":"...","country":"..."}}'."""
|
|
385
|
+
api = get_api(debug=debug)
|
|
386
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/redSky/building"
|
|
387
|
+
params = {}
|
|
388
|
+
org_id = get_org_id()
|
|
389
|
+
if org_id is not None:
|
|
390
|
+
params["orgId"] = org_id
|
|
391
|
+
if json_body:
|
|
392
|
+
body = json.loads(json_body)
|
|
393
|
+
else:
|
|
394
|
+
body = {}
|
|
395
|
+
try:
|
|
396
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
397
|
+
except WebexError as e:
|
|
398
|
+
handle_rest_error(e)
|
|
399
|
+
typer.echo(f"Updated.")
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
@app.command("show-emergency-call-notification-config")
|
|
404
|
+
def show_emergency_call_notification_config(
|
|
405
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
406
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
407
|
+
):
|
|
408
|
+
"""Get an Organization Emergency Call Notification."""
|
|
409
|
+
api = get_api(debug=debug)
|
|
410
|
+
url = f"https://webexapis.com/v1/telephony/config/emergencyCallNotification"
|
|
411
|
+
params = {}
|
|
412
|
+
org_id = get_org_id()
|
|
413
|
+
if org_id is not None:
|
|
414
|
+
params["orgId"] = org_id
|
|
415
|
+
try:
|
|
416
|
+
result = api.session.rest_get(url, params=params)
|
|
417
|
+
except WebexError as e:
|
|
418
|
+
handle_rest_error(e)
|
|
419
|
+
if output == "json":
|
|
420
|
+
print_json(result)
|
|
421
|
+
else:
|
|
422
|
+
if isinstance(result, dict):
|
|
423
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
424
|
+
elif isinstance(result, list):
|
|
425
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
426
|
+
else:
|
|
427
|
+
print_json(result)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
@app.command("update-emergency-call-notification-config")
|
|
432
|
+
def update_emergency_call_notification_config(
|
|
433
|
+
emergency_call_notification_enabled: bool = typer.Option(None, "--emergency-call-notification-enabled/--no-emergency-call-notification-enabled", help="When true sends an email to the specified email address when"),
|
|
434
|
+
allow_email_notification_all_location_enabled: bool = typer.Option(None, "--allow-email-notification-all-location-enabled/--no-allow-email-notification-all-location-enabled", help="Send an emergency call notification email for all locations."),
|
|
435
|
+
email_address: str = typer.Option(None, "--email-address", help="When `emergencyCallNotificationEnabled` is true, the emergen"),
|
|
436
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
437
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
438
|
+
):
|
|
439
|
+
"""Update an Organization Emergency Call Notification."""
|
|
440
|
+
api = get_api(debug=debug)
|
|
441
|
+
url = f"https://webexapis.com/v1/telephony/config/emergencyCallNotification"
|
|
442
|
+
params = {}
|
|
443
|
+
org_id = get_org_id()
|
|
444
|
+
if org_id is not None:
|
|
445
|
+
params["orgId"] = org_id
|
|
446
|
+
if json_body:
|
|
447
|
+
body = json.loads(json_body)
|
|
448
|
+
else:
|
|
449
|
+
body = {}
|
|
450
|
+
if emergency_call_notification_enabled is not None:
|
|
451
|
+
body["emergencyCallNotificationEnabled"] = emergency_call_notification_enabled
|
|
452
|
+
if allow_email_notification_all_location_enabled is not None:
|
|
453
|
+
body["allowEmailNotificationAllLocationEnabled"] = allow_email_notification_all_location_enabled
|
|
454
|
+
if email_address is not None:
|
|
455
|
+
body["emailAddress"] = email_address
|
|
456
|
+
try:
|
|
457
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
458
|
+
except WebexError as e:
|
|
459
|
+
handle_rest_error(e)
|
|
460
|
+
typer.echo(f"Updated.")
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
@app.command("show-emergency-call-notification-locations")
|
|
465
|
+
def show_emergency_call_notification_locations(
|
|
466
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
467
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
468
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
469
|
+
):
|
|
470
|
+
"""Get a Location Emergency Call Notification."""
|
|
471
|
+
api = get_api(debug=debug)
|
|
472
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/emergencyCallNotification"
|
|
473
|
+
params = {}
|
|
474
|
+
org_id = get_org_id()
|
|
475
|
+
if org_id is not None:
|
|
476
|
+
params["orgId"] = org_id
|
|
477
|
+
try:
|
|
478
|
+
result = api.session.rest_get(url, params=params)
|
|
479
|
+
except WebexError as e:
|
|
480
|
+
handle_rest_error(e)
|
|
481
|
+
if output == "json":
|
|
482
|
+
print_json(result)
|
|
483
|
+
else:
|
|
484
|
+
if isinstance(result, dict):
|
|
485
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
486
|
+
elif isinstance(result, list):
|
|
487
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
488
|
+
else:
|
|
489
|
+
print_json(result)
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
@app.command("update-emergency-call-notification-locations")
|
|
494
|
+
def update_emergency_call_notification_locations(
|
|
495
|
+
location_id: str = typer.Argument(help="locationId"),
|
|
496
|
+
emergency_call_notification_enabled: bool = typer.Option(None, "--emergency-call-notification-enabled/--no-emergency-call-notification-enabled", help="When true sends an email to the specified email address when"),
|
|
497
|
+
email_address: str = typer.Option(None, "--email-address", help="Sends an email to this email address when a call is made fro"),
|
|
498
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
499
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
500
|
+
):
|
|
501
|
+
"""Update a Location Emergency Call Notification."""
|
|
502
|
+
api = get_api(debug=debug)
|
|
503
|
+
url = f"https://webexapis.com/v1/telephony/config/locations/{location_id}/emergencyCallNotification"
|
|
504
|
+
params = {}
|
|
505
|
+
org_id = get_org_id()
|
|
506
|
+
if org_id is not None:
|
|
507
|
+
params["orgId"] = org_id
|
|
508
|
+
if json_body:
|
|
509
|
+
body = json.loads(json_body)
|
|
510
|
+
else:
|
|
511
|
+
body = {}
|
|
512
|
+
if emergency_call_notification_enabled is not None:
|
|
513
|
+
body["emergencyCallNotificationEnabled"] = emergency_call_notification_enabled
|
|
514
|
+
if email_address is not None:
|
|
515
|
+
body["emailAddress"] = email_address
|
|
516
|
+
try:
|
|
517
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
518
|
+
except WebexError as e:
|
|
519
|
+
handle_rest_error(e)
|
|
520
|
+
typer.echo(f"Updated.")
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
@app.command("show-dependencies-emergency-callback-number")
|
|
525
|
+
def show_dependencies_emergency_callback_number(
|
|
526
|
+
hunt_group_id: str = typer.Argument(help="huntGroupId"),
|
|
527
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
528
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
529
|
+
):
|
|
530
|
+
"""Get Dependencies for a Hunt Group Emergency Callback Number."""
|
|
531
|
+
api = get_api(debug=debug)
|
|
532
|
+
url = f"https://webexapis.com/v1/telephony/config/huntGroups/{hunt_group_id}/emergencyCallbackNumber/dependencies"
|
|
533
|
+
params = {}
|
|
534
|
+
org_id = get_org_id()
|
|
535
|
+
if org_id is not None:
|
|
536
|
+
params["orgId"] = org_id
|
|
537
|
+
try:
|
|
538
|
+
result = api.session.rest_get(url, params=params)
|
|
539
|
+
except WebexError as e:
|
|
540
|
+
handle_rest_error(e)
|
|
541
|
+
if output == "json":
|
|
542
|
+
print_json(result)
|
|
543
|
+
else:
|
|
544
|
+
if isinstance(result, dict):
|
|
545
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
546
|
+
elif isinstance(result, list):
|
|
547
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
548
|
+
else:
|
|
549
|
+
print_json(result)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
@app.command("show-emergency-callback-number-people")
|
|
554
|
+
def show_emergency_callback_number_people(
|
|
555
|
+
person_id: str = typer.Argument(help="personId"),
|
|
556
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
557
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
558
|
+
):
|
|
559
|
+
"""Get a Person's Emergency Callback Number."""
|
|
560
|
+
api = get_api(debug=debug)
|
|
561
|
+
url = f"https://webexapis.com/v1/telephony/config/people/{person_id}/emergencyCallbackNumber"
|
|
562
|
+
params = {}
|
|
563
|
+
org_id = get_org_id()
|
|
564
|
+
if org_id is not None:
|
|
565
|
+
params["orgId"] = org_id
|
|
566
|
+
try:
|
|
567
|
+
result = api.session.rest_get(url, params=params)
|
|
568
|
+
except WebexError as e:
|
|
569
|
+
handle_rest_error(e)
|
|
570
|
+
if output == "json":
|
|
571
|
+
print_json(result)
|
|
572
|
+
else:
|
|
573
|
+
if isinstance(result, dict):
|
|
574
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
575
|
+
elif isinstance(result, list):
|
|
576
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
577
|
+
else:
|
|
578
|
+
print_json(result)
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
@app.command("update-emergency-callback-number-people")
|
|
583
|
+
def update_emergency_callback_number_people(
|
|
584
|
+
person_id: str = typer.Argument(help="personId"),
|
|
585
|
+
selected: str = typer.Option(None, "--selected", help="Choices: DIRECT_LINE, LOCATION_ECBN, LOCATION_MEMBER_NUMBER"),
|
|
586
|
+
location_member_id: str = typer.Option(None, "--location-member-id", help="Member ID of person/workspace/virtual line/hunt group within"),
|
|
587
|
+
elin_enabled: bool = typer.Option(None, "--elin-enabled/--no-elin-enabled", help="Indicates whether this person is allowed to use an Emergency"),
|
|
588
|
+
elin_for_webex_app_enabled: bool = typer.Option(None, "--elin-for-webex-app-enabled/--no-elin-for-webex-app-enabled", help="Indicates whether this member is allowed to use an Emergency"),
|
|
589
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
590
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
591
|
+
):
|
|
592
|
+
"""Update a Person's Emergency Callback Number\n\nExample --json-body:\n '{"selected":"DIRECT_LINE","locationMemberId":"...","elinEnabled":true,"elinForWebexAppEnabled":true}'."""
|
|
593
|
+
api = get_api(debug=debug)
|
|
594
|
+
url = f"https://webexapis.com/v1/telephony/config/people/{person_id}/emergencyCallbackNumber"
|
|
595
|
+
params = {}
|
|
596
|
+
org_id = get_org_id()
|
|
597
|
+
if org_id is not None:
|
|
598
|
+
params["orgId"] = org_id
|
|
599
|
+
if json_body:
|
|
600
|
+
body = json.loads(json_body)
|
|
601
|
+
else:
|
|
602
|
+
body = {}
|
|
603
|
+
if selected is not None:
|
|
604
|
+
body["selected"] = selected
|
|
605
|
+
if location_member_id is not None:
|
|
606
|
+
body["locationMemberId"] = location_member_id
|
|
607
|
+
if elin_enabled is not None:
|
|
608
|
+
body["elinEnabled"] = elin_enabled
|
|
609
|
+
if elin_for_webex_app_enabled is not None:
|
|
610
|
+
body["elinForWebexAppEnabled"] = elin_for_webex_app_enabled
|
|
611
|
+
try:
|
|
612
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
613
|
+
except WebexError as e:
|
|
614
|
+
handle_rest_error(e)
|
|
615
|
+
typer.echo(f"Updated.")
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
@app.command("show-dependencies-emergency-callback-number-1")
|
|
620
|
+
def show_dependencies_emergency_callback_number_1(
|
|
621
|
+
person_id: str = typer.Argument(help="personId"),
|
|
622
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
623
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
624
|
+
):
|
|
625
|
+
"""Retrieve A Person's Emergency Callback Number Dependencies."""
|
|
626
|
+
api = get_api(debug=debug)
|
|
627
|
+
url = f"https://webexapis.com/v1/telephony/config/people/{person_id}/emergencyCallbackNumber/dependencies"
|
|
628
|
+
params = {}
|
|
629
|
+
org_id = get_org_id()
|
|
630
|
+
if org_id is not None:
|
|
631
|
+
params["orgId"] = org_id
|
|
632
|
+
try:
|
|
633
|
+
result = api.session.rest_get(url, params=params)
|
|
634
|
+
except WebexError as e:
|
|
635
|
+
handle_rest_error(e)
|
|
636
|
+
if output == "json":
|
|
637
|
+
print_json(result)
|
|
638
|
+
else:
|
|
639
|
+
if isinstance(result, dict):
|
|
640
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
641
|
+
elif isinstance(result, list):
|
|
642
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
643
|
+
else:
|
|
644
|
+
print_json(result)
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
@app.command("show-emergency-callback-number-workspaces")
|
|
649
|
+
def show_emergency_callback_number_workspaces(
|
|
650
|
+
workspace_id: str = typer.Argument(help="workspaceId"),
|
|
651
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
652
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
653
|
+
):
|
|
654
|
+
"""Get a Workspace Emergency Callback Number."""
|
|
655
|
+
api = get_api(debug=debug)
|
|
656
|
+
url = f"https://webexapis.com/v1/telephony/config/workspaces/{workspace_id}/emergencyCallbackNumber"
|
|
657
|
+
params = {}
|
|
658
|
+
org_id = get_org_id()
|
|
659
|
+
if org_id is not None:
|
|
660
|
+
params["orgId"] = org_id
|
|
661
|
+
try:
|
|
662
|
+
result = api.session.rest_get(url, params=params)
|
|
663
|
+
except WebexError as e:
|
|
664
|
+
handle_rest_error(e)
|
|
665
|
+
if output == "json":
|
|
666
|
+
print_json(result)
|
|
667
|
+
else:
|
|
668
|
+
if isinstance(result, dict):
|
|
669
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
670
|
+
elif isinstance(result, list):
|
|
671
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
672
|
+
else:
|
|
673
|
+
print_json(result)
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
@app.command("update-emergency-callback-number-workspaces")
|
|
678
|
+
def update_emergency_callback_number_workspaces(
|
|
679
|
+
workspace_id: str = typer.Argument(help="workspaceId"),
|
|
680
|
+
selected: str = typer.Option(None, "--selected", help="Choices: DIRECT_LINE, LOCATION_ECBN, LOCATION_MEMBER_NUMBER"),
|
|
681
|
+
location_member_id: str = typer.Option(None, "--location-member-id", help="Member ID of person/workspace/virtual line/hunt group within"),
|
|
682
|
+
elin_enabled: bool = typer.Option(None, "--elin-enabled/--no-elin-enabled", help="Indicates whether this workspace is allowed to use an Emerge"),
|
|
683
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
684
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
685
|
+
):
|
|
686
|
+
"""Update a Workspace Emergency Callback Number\n\nExample --json-body:\n '{"selected":"DIRECT_LINE","locationMemberId":"...","elinEnabled":true}'."""
|
|
687
|
+
api = get_api(debug=debug)
|
|
688
|
+
url = f"https://webexapis.com/v1/telephony/config/workspaces/{workspace_id}/emergencyCallbackNumber"
|
|
689
|
+
params = {}
|
|
690
|
+
org_id = get_org_id()
|
|
691
|
+
if org_id is not None:
|
|
692
|
+
params["orgId"] = org_id
|
|
693
|
+
if json_body:
|
|
694
|
+
body = json.loads(json_body)
|
|
695
|
+
else:
|
|
696
|
+
body = {}
|
|
697
|
+
if selected is not None:
|
|
698
|
+
body["selected"] = selected
|
|
699
|
+
if location_member_id is not None:
|
|
700
|
+
body["locationMemberId"] = location_member_id
|
|
701
|
+
if elin_enabled is not None:
|
|
702
|
+
body["elinEnabled"] = elin_enabled
|
|
703
|
+
try:
|
|
704
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
705
|
+
except WebexError as e:
|
|
706
|
+
handle_rest_error(e)
|
|
707
|
+
typer.echo(f"Updated.")
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
@app.command("show-dependencies-emergency-callback-number-2")
|
|
712
|
+
def show_dependencies_emergency_callback_number_2(
|
|
713
|
+
workspace_id: str = typer.Argument(help="workspaceId"),
|
|
714
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
715
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
716
|
+
):
|
|
717
|
+
"""Retrieve Workspace Emergency Callback Number Dependencies."""
|
|
718
|
+
api = get_api(debug=debug)
|
|
719
|
+
url = f"https://webexapis.com/v1/telephony/config/workspaces/{workspace_id}/emergencyCallbackNumber/dependencies"
|
|
720
|
+
params = {}
|
|
721
|
+
org_id = get_org_id()
|
|
722
|
+
if org_id is not None:
|
|
723
|
+
params["orgId"] = org_id
|
|
724
|
+
try:
|
|
725
|
+
result = api.session.rest_get(url, params=params)
|
|
726
|
+
except WebexError as e:
|
|
727
|
+
handle_rest_error(e)
|
|
728
|
+
if output == "json":
|
|
729
|
+
print_json(result)
|
|
730
|
+
else:
|
|
731
|
+
if isinstance(result, dict):
|
|
732
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
733
|
+
elif isinstance(result, list):
|
|
734
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
735
|
+
else:
|
|
736
|
+
print_json(result)
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
@app.command("show-dependencies-emergency-callback-number-3")
|
|
741
|
+
def show_dependencies_emergency_callback_number_3(
|
|
742
|
+
virtual_line_id: str = typer.Argument(help="virtualLineId"),
|
|
743
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
744
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
745
|
+
):
|
|
746
|
+
"""Get Dependencies for a Virtual Line Emergency Callback Number."""
|
|
747
|
+
api = get_api(debug=debug)
|
|
748
|
+
url = f"https://webexapis.com/v1/telephony/config/virtualLines/{virtual_line_id}/emergencyCallbackNumber/dependencies"
|
|
749
|
+
params = {}
|
|
750
|
+
org_id = get_org_id()
|
|
751
|
+
if org_id is not None:
|
|
752
|
+
params["orgId"] = org_id
|
|
753
|
+
try:
|
|
754
|
+
result = api.session.rest_get(url, params=params)
|
|
755
|
+
except WebexError as e:
|
|
756
|
+
handle_rest_error(e)
|
|
757
|
+
if output == "json":
|
|
758
|
+
print_json(result)
|
|
759
|
+
else:
|
|
760
|
+
if isinstance(result, dict):
|
|
761
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
762
|
+
elif isinstance(result, list):
|
|
763
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
764
|
+
else:
|
|
765
|
+
print_json(result)
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
@app.command("show-emergency-callback-number-virtual-lines")
|
|
770
|
+
def show_emergency_callback_number_virtual_lines(
|
|
771
|
+
virtual_line_id: str = typer.Argument(help="virtualLineId"),
|
|
772
|
+
output: str = typer.Option("json", "--output", "-o", help="Output format: table|json"),
|
|
773
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
774
|
+
):
|
|
775
|
+
"""Get the Virtual Line's Emergency Callback settings."""
|
|
776
|
+
api = get_api(debug=debug)
|
|
777
|
+
url = f"https://webexapis.com/v1/telephony/config/virtualLines/{virtual_line_id}/emergencyCallbackNumber"
|
|
778
|
+
params = {}
|
|
779
|
+
org_id = get_org_id()
|
|
780
|
+
if org_id is not None:
|
|
781
|
+
params["orgId"] = org_id
|
|
782
|
+
try:
|
|
783
|
+
result = api.session.rest_get(url, params=params)
|
|
784
|
+
except WebexError as e:
|
|
785
|
+
handle_rest_error(e)
|
|
786
|
+
if output == "json":
|
|
787
|
+
print_json(result)
|
|
788
|
+
else:
|
|
789
|
+
if isinstance(result, dict):
|
|
790
|
+
print_table([result], columns=[("Key", ""), ("Value", "")], limit=0)
|
|
791
|
+
elif isinstance(result, list):
|
|
792
|
+
print_table(result, columns=[("ID", "id"), ("Name", "name")], limit=0)
|
|
793
|
+
else:
|
|
794
|
+
print_json(result)
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
@app.command("update-emergency-callback-number-virtual-lines")
|
|
799
|
+
def update_emergency_callback_number_virtual_lines(
|
|
800
|
+
virtual_line_id: str = typer.Argument(help="virtualLineId"),
|
|
801
|
+
selected: str = typer.Option(None, "--selected", help="Choices: DIRECT_LINE, LOCATION_ECBN, LOCATION_MEMBER_NUMBER"),
|
|
802
|
+
location_member_id: str = typer.Option(None, "--location-member-id", help="Member ID of person/workspace/virtual line/hunt group within"),
|
|
803
|
+
json_body: str = typer.Option(None, "--json-body", help="Full JSON body (overrides other options)"),
|
|
804
|
+
debug: bool = typer.Option(False, "--debug"),
|
|
805
|
+
):
|
|
806
|
+
"""Update a Virtual Line's Emergency Callback settings\n\nExample --json-body:\n '{"selected":"DIRECT_LINE","locationMemberId":"..."}'."""
|
|
807
|
+
api = get_api(debug=debug)
|
|
808
|
+
url = f"https://webexapis.com/v1/telephony/config/virtualLines/{virtual_line_id}/emergencyCallbackNumber"
|
|
809
|
+
params = {}
|
|
810
|
+
org_id = get_org_id()
|
|
811
|
+
if org_id is not None:
|
|
812
|
+
params["orgId"] = org_id
|
|
813
|
+
if json_body:
|
|
814
|
+
body = json.loads(json_body)
|
|
815
|
+
else:
|
|
816
|
+
body = {}
|
|
817
|
+
if selected is not None:
|
|
818
|
+
body["selected"] = selected
|
|
819
|
+
if location_member_id is not None:
|
|
820
|
+
body["locationMemberId"] = location_member_id
|
|
821
|
+
try:
|
|
822
|
+
result = api.session.rest_put(url, json=body, params=params)
|
|
823
|
+
except WebexError as e:
|
|
824
|
+
handle_rest_error(e)
|
|
825
|
+
typer.echo(f"Updated.")
|
|
826
|
+
|
|
827
|
+
|