wxc_sdk.person_settings.permissions_out module
Outgoing permissions API and datatypes
API is used in: * person settings * location settings * workspace settings
- class wxc_sdk.person_settings.permissions_out.OutgoingPermissionCallType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumcall types for outgoing permissions
- internal_call = 'INTERNAL_CALL'
- local = 'LOCAL'
- toll_free = 'TOLL_FREE'
- toll = 'TOLL'
- national = 'NATIONAL'
- international = 'INTERNATIONAL'
- operator_assisted = 'OPERATOR_ASSISTED'
- chargeable_directory_assisted = 'CHARGEABLE_DIRECTORY_ASSISTED'
- special_services_i = 'SPECIAL_SERVICES_I'
- special_services_ii = 'SPECIAL_SERVICES_II'
- class wxc_sdk.person_settings.permissions_out.Action(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str,SafeEnumAction on a specific call type
- allow = 'ALLOW'
- block = 'BLOCK'
- auth_code = 'AUTH_CODE'
- transfer_number_1 = 'TRANSFER_NUMBER_1'
- transfer_number_2 = 'TRANSFER_NUMBER_2'
- transfer_number_3 = 'TRANSFER_NUMBER_3'
- class wxc_sdk.person_settings.permissions_out.CallTypePermission(*, action: Action, transferEnabled: bool)[source]
Bases:
ApiModelPermission for a specific call type
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- transfer_enabled: bool
Allow the person to transfer or forward a call of the specified call type.
- static default() CallTypePermission[source]
- class wxc_sdk.person_settings.permissions_out.CallingPermissions(*, internalCall: CallTypePermission | None = None, local: CallTypePermission | None = None, tollFree: CallTypePermission | None = None, toll: CallTypePermission | None = None, national: CallTypePermission | None = None, international: CallTypePermission | None = None, operatorAssisted: CallTypePermission | None = None, chargeableDirectoryAssisted: CallTypePermission | None = None, specialServicesI: CallTypePermission | None = None, specialServicesIi: CallTypePermission | None = None, premiumServicesI: CallTypePermission | None = None, premiumServicesIi: CallTypePermission | None = None, **extra_data: Any)[source]
Bases:
ApiModelCalling permissions for all call types
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- internal_call: CallTypePermission | None
- local: CallTypePermission | None
- toll_free: CallTypePermission | None
- toll: CallTypePermission | None
- national: CallTypePermission | None
- international: CallTypePermission | None
- operator_assisted: CallTypePermission | None
- chargeable_directory_assisted: CallTypePermission | None
- special_services_i: CallTypePermission | None
- special_services_ii: CallTypePermission | None
- for_call_type(call_type: OutgoingPermissionCallType) CallTypePermission | None[source]
get call type setting for a specific call type
- Parameters:
call_type (
OutgoingPermissionCallType) – call type- Returns:
permissions
- Return type:
- static allow_all() CallingPermissions[source]
most permissive permissions
- Returns:
CallingPermissionsinstance allowing all call types- Return type:
- static default() CallingPermissions[source]
default settings
- Returns:
- Return type:
- class wxc_sdk.person_settings.permissions_out.OutgoingPermissions(*, useCustomEnabled: bool | None = None, callingPermissions: CallingPermissions | None = None)[source]
Bases:
ApiModelPerson’s Outgoing Permission Settings
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- use_custom_enabled: bool | None
When true, indicates that this user uses the specified calling permissions when placing outbound calls.
- calling_permissions: CallingPermissions | None
Specifies the outbound calling permissions settings.
- class wxc_sdk.person_settings.permissions_out.AutoTransferNumbers(*, autoTransferNumber1: str | None = None, autoTransferNumber2: str | None = None, autoTransferNumber3: str | None = None)[source]
Bases:
ApiModelOutgoing permission auto transfer numbers
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- auto_transfer_number1: str | None
Calls placed meeting the criteria in an outbound rule whose action is TRANSFER_NUMBER_1 will be transferred to this number
- auto_transfer_number2: str | None
Calls placed meeting the criteria in an outbound rule whose action is TRANSFER_NUMBER_2 will be transferred to this number
- auto_transfer_number3: str | None
Calls placed meeting the criteria in an outbound rule whose action is TRANSFER_NUMBER_3 will be transferred to this number
- property configure_unset_numbers: AutoTransferNumbers
Unset numbers are returned by the API as null (None). To set a number back to unset an empty strings has to be set. This property returns an
AutoTransferNumbersinstance where the numbers are set to an empty string instead of None- Returns:
auto transfer numbers with empty strings instead of None
- Return type:
- class wxc_sdk.person_settings.permissions_out.TransferNumbersApi(*, session: RestSession, workspaces: bool = False, locations: bool = False)[source]
Bases:
PersonSettingsApiChildAPI for outgoing permission auto transfer numbers
- feature = 'outgoingPermission/autoTransferNumbers'
- read(person_id: str, org_id: str | None = None) AutoTransferNumbers[source]
Retrieve Transfer Numbers Settings for a Workspace.
When calling a specific call type, this workspace will be automatically transferred to another number. The person assigned the Auto Transfer Number can then approve the call and send it through or reject the call type. You can add up to 3 numbers.
This API requires a full or read-only administrator auth token with a scope of spark-admin:workspaces_read or a user auth token with spark:workspaces_read scope can be used to read workspace settings.
- Parameters:
person_id (str) – Unique identifier for the workspace.
org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- Returns:
auto transfer numbers
- Return type:
- configure(person_id: str, settings: AutoTransferNumbers, org_id: str | None = None)[source]
Modify Transfer Numbers Settings for a Place.
When calling a specific call type, this workspace will be automatically transferred to another number. The person assigned the Auto Transfer Number can then approve the call and send it through or reject the call type. You can add up to 3 numbers.
This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.
- Parameters:
person_id (str) – Unique identifier for the workspace.
settings (
AutoTransferNumbers) – new auto transfer numbersorg_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- base = ''
- session: RestSession
REST session
- class wxc_sdk.person_settings.permissions_out.AuthCodesApi(*, session: RestSession, workspaces: bool = False, locations: bool = False)[source]
Bases:
PersonSettingsApiChildAPI for person’s outgoing permission authorization codes
- feature = 'outgoingPermission/authorizationCodes'
- read(person_id: str, org_id: str | None = None) list[wxc_sdk.common.AuthCode][source]
Retrieve Authorization codes for a Workspace.
Authorization codes are used to bypass permissions.
This API requires a full or read-only administrator auth token with a scope of spark-admin:workspaces_read or a user auth token with spark:workspaces_read scope can be used to read workspace settings.
- Parameters:
person_id (str) – Unique identifier for the workspace.
org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- Returns:
list of authorization codes
- Return type:
list of
AuthCode
- delete_codes(person_id: str, access_codes: list[Union[str, wxc_sdk.common.AuthCode]], org_id: str | None = None)[source]
Modify Authorization codes for a workspace.
Authorization codes are used to bypass permissions.
This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.
- Parameters:
person_id (str) – Unique identifier for the workspace.
access_codes (list[str]) – authorization codes to remove
org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- create(person_id: str, code: str, description: str, org_id: str | None = None)[source]
Modify Authorization codes for a workspace.
Authorization codes are used to bypass permissions.
This API requires a full or user administrator auth token with the spark-admin:workspaces_write scope or a user auth token with spark:workspaces_write scope can be used to update workspace settings.
- Parameters:
person_id (str) – Unique identifier for the workspace.
code (str) – Indicates an authorization code.
description (str) – Indicates the description of the authorization code.
org_id (str) – Workspace is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- base = ''
- session: RestSession
REST session
- class wxc_sdk.person_settings.permissions_out.OutgoingPermissionsApi(*, session: RestSession, workspaces: bool = False, locations: bool = False)[source]
Bases:
PersonSettingsApiChildAPI for person’s outgoing permissions settings
also used for workspace and location outgoing permissions
- feature = 'outgoingPermission'
- base = ''
- transfer_numbers: TransferNumbersApi
Only available for workspaces and locations
- auth_codes: AuthCodesApi
Only available for workspaces
- read(person_id: str, org_id: str | None = None) OutgoingPermissions[source]
Retrieve a Person’s Outgoing Calling Permissions Settings
You can change the outgoing calling permissions for a person if you want them to be different from your organization’s default.
This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read.
- Parameters:
person_id (str) – Unique identifier for the person.
org_id (str) – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.
- Returns:
outgoing permission settings for specific user
- Return type:
- configure(person_id: str, settings: OutgoingPermissions, drop_call_types: set[str] | None = None, org_id: str | None = None)[source]
Configure a Person’s Outgoing Calling Permissions Settings
Turn on outgoing call settings for this person to override the calling settings from the location that are used by default.
This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their own settings.
- Parameters:
person_id (str) – Unique identifier for the person.
settings (
OutgoingPermissions) – new setting to be applieddrop_call_types (set[str]) – set of call type names to be excluded from updates. Default is the set of call_types known to be not supported for updates
org_id – Person is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.