wxc_sdk.person_settings.permissions_out module

Outgoing permissions API and datatypes

API is used in:
  • person settings

  • location settings

  • workspace settings

  • virtual line 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, SafeEnum

call 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'
premium_services_i = 'PREMIUM_SERVICES_I'
premium_services_ii = 'PREMIUM_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, SafeEnum

Action 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: ApiModel

Permission for a specific call type

action: Action

Action on the given call_type.

transfer_enabled: bool

Allow 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: ApiModel

Calling permissions for all call types

class Config[source]

Bases: object

extra = 'allow'
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
premium_services_i: CallTypePermission | None
premium_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:

CallTypePermission

permissions_dict() dict[str, CallTypePermission][source]

Get a dictionary of all permissions. Key is the call type and the value is the permission for this call type

Returns:

dict of all permissions

static allow_all() CallingPermissions[source]

most permissive permissions

Returns:

CallingPermissions instance allowing all call types

Return type:

CallingPermissions

static default() CallingPermissions[source]

default settings

Returns:

CallingPermissions

Return type:

CallingPermissions

class wxc_sdk.person_settings.permissions_out.OutgoingPermissions(*, useCustomEnabled: bool | None = None, useCustomPermissions: bool | None = None, callingPermissions: CallingPermissions | None = None)[source]

Bases: ApiModel

Outgoing Permission Settings

use_custom_enabled: bool | None

When true, indicates that this user uses the shared control that applies to all outgoing call settings categories when placing outbound calls.

use_custom_permissions: bool | None

When true, indicates that this user uses the specified outgoing 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: ApiModel

Outgoing permission auto transfer numbers

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 AutoTransferNumbers instance where the numbers are set to an empty string instead of None

Returns:

auto transfer numbers with empty strings instead of None

Return type:

AutoTransferNumbers

class wxc_sdk.person_settings.permissions_out.DigitPattern(*, id: str | None = None, name: str | None = None, pattern: str | None = None, action: Action | None = None, transferEnabled: bool | None = None)[source]

Bases: ApiModel

id: str | None

A unique identifier for the digit pattern.

name: str | None

A unique name for the digit pattern.

pattern: str | None

The digit pattern to be matched with the input number.

action: Action | None

Action to be performed on the input number that matches with the digit pattern.

transfer_enabled: bool | None

Option to allow or disallow transfer of calls.

class wxc_sdk.person_settings.permissions_out.DigitPatterns(*, useCustomDigitPatterns: bool | None = None, digitPatterns: list[DigitPattern] | None = None)[source]

Bases: ApiModel

use_custom_digit_patterns: bool | None

When true, use custom settings for the digit patterns category of outgoing call permissions.

digit_patterns: list[DigitPattern] | None

List of digit patterns.

class wxc_sdk.person_settings.permissions_out.DigitPatternsApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]

Bases: PersonSettingsApiChild

feature = 'outgoingPermission/digitPatterns'
get_digit_patterns(entity_id: str, org_id: str | None = None) DigitPatterns[source]

Retrieve Digit Patterns

Retrieve digit patterns.

Digit patterns are used to bypass permissions.

Retrieving digit patterns requires a full or user or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

UserOutgoingPermissionDigitPatternGetListObject

details(entity_id: str, digit_pattern_id: str, org_id: str | None = None) DigitPattern[source]

Retrieve Digit Pattern Details

Retrieve the digit pattern details.

Digit patterns are used to bypass permissions.

Retrieving the digit pattern details requires a full or user or read-only administrator or location administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • digit_pattern_id (str) – Unique identifier for the digit pattern.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

UserDigitPatternObject

create(entity_id: str, pattern: DigitPattern, org_id: str | None = None) str[source]

Create Digit Patterns

Create new digit pattern.

Digit patterns are used to bypass permissions.

Creating the digit pattern requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • pattern (DigitPattern) – new digit pattern

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

str

update_category_control_settings(entity_id: str, use_custom_digit_patterns: bool | None = None, org_id: str | None = None)[source]

Modify the Digit Pattern Category Control Settings for the entity

Modifies whether this user uses the specified digit patterns when placing outbound calls or not.

Updating the digit pattern category control settings requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • use_custom_digit_patterns (bool) – When true, use custom settings for the digit patterns category of outgoing call permissions.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

None

update(entity_id: str, settings: DigitPattern, org_id: str | None = None)[source]

Modify Digit Patterns

Modify Digit Patterns

Digit patterns are used to bypass permissions.

Updating the digit pattern requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • settings (DigitPattern) – new digit pattern settings

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

None

delete(entity_id: str, digit_pattern_id: str, org_id: str | None = None)[source]

Delete a Digit Pattern

Delete Digit Pattern.

Digit patterns are used to bypass permissions.

Deleting the digit pattern requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • digit_pattern_id (str) – Unique identifier for the digit pattern.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

None

delete_all(entity_id: str, org_id: str | None = None)[source]

Delete all Digit Patterns.

Digit patterns are used to bypass permissions.

Deleting the digit patterns requires a full or user or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Unique identifier for location, person, workspace, or virtual line.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

None

base = ''
class wxc_sdk.person_settings.permissions_out.TransferNumbersApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]

Bases: PersonSettingsApiChild

API for outgoing permission auto transfer numbers

feature = 'outgoingPermission/autoTransferNumbers'
read(entity_id: str, org_id: str | None = None) AutoTransferNumbers[source]

Retrieve Transfer Numbers Settings .

When calling a specific call type, this entity 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 entity settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • org_id (str) – entity 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:

AutoTransferNumbers

configure(entity_id: str, settings: AutoTransferNumbers, org_id: str | None = None)[source]

Modify Transfer Numbers Settings for a Place.

When calling a specific call type, this entity 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 entity settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • settings (AutoTransferNumbers) – new auto transfer numbers

  • org_id (str) – entity 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 = ''
class wxc_sdk.person_settings.permissions_out.AuthCodes(*, useCustomAccessCodes: bool | None = None, accessCodes: list[AuthCode] | None = None)[source]

Bases: ApiModel

use_custom_access_codes: bool | None

When true, use custom settings for the access codes category of outgoing call permissions.

access_codes: list[AuthCode] | None

Indicates the set of activation codes and description.

class wxc_sdk.person_settings.permissions_out.AccessCodesApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]

Bases: PersonSettingsApiChild

API for outgoing permission access codes: locations, persons, workspaces, virtual lines

feature = 'outgoingPermission/accessCodes'
read(entity_id: str, org_id: str | None = None) AuthCodes[source]

Retrieve Access codes.

Access 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 entity settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • org_id (str) – ID of the organization within which the entity resides. 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:

authorization codes

Return type:

AuthCodes

modify(entity_id: str, use_custom_access_codes: bool | None = None, delete_codes: list[str | AuthCode] | None = None, org_id: str | None = None)[source]

Modify Access Codes

Access codes are used to bypass permissions.

This API requires a full or user administrator or location administrator auth token with the spark-admin:telephony_config_write scope.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • use_custom_access_codes (bool) – When true, use custom settings for the access codes category of outgoing call permissions.

  • delete_codes (list[str]) – Indicates access codes to delete.

  • org_id (str) – ID of the organization in which the entity resides. 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 the API.

Return type:

None

create(entity_id: str, code: str, description: str, org_id: str | None = None)[source]

Create new Access codes.

Access 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:
  • entity_id (str) – Unique identifier for the entity.

  • code (str) – Indicates an access code.

  • description (str) – Indicates the description of the access code.

  • org_id (str) – ID of the organization within which the entity resides. 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.

delete(entity_id: str, org_id: str | None = None)[source]

Delete Access Code

Deletes all Access codes for the given entity.

Access codes are used to bypass permissions.

This API requires a full or user administrator or location 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 entity settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • org_id (str) – ID of the organization within which the entity resides. 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 the API.

Return type:

None

base = ''
class wxc_sdk.person_settings.permissions_out.OutgoingPermissionsApi(*, session: RestSession, selector: ApiSelector = 'person')[source]

Bases: PersonSettingsApiChild

API for outgoing permissions settings

Also used for user, workspace, location, and virtual line outgoing permissions

feature = 'outgoingPermission'
transfer_numbers: TransferNumbersApi
base = ''
access_codes: AccessCodesApi
digit_patterns: DigitPatternsApi
read(entity_id: str, org_id: str | None = None) OutgoingPermissions[source]

Retrieve 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:
  • entity_id (str) – Unique identifier for the entity.

  • org_id (str) – Entity 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:

OutgoingPermissions

configure(entity_id: str, settings: OutgoingPermissions, drop_call_types: set[str] | None = None, org_id: str | None = None)[source]

Configure Outgoing Calling Permissions Settings

Turn on outgoing call settings for this entity 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:
  • entity_id (str) – Unique identifier for the entity.

  • settings (OutgoingPermissions) – new setting to be applied

  • drop_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 – Entity 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.