示例#1
0
    def list(self, ):
        """List.

        """
        request_data = {}

        errors_mapping = {}
        errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_FIELD', None)] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        query_data = {
            'api': self._api,
            'url': '/query/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'queries'
        return AsyncQueryOPSF(**query_data)
示例#2
0
    def transform_list(
        self,
        account_id,
    ):
        """Transform list.

        :param account_id: The account uuid
        """
        request_data = {
           'account_id': account_id,
        }
	
        errors_mapping = {}
        errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping[('INVALID_FIELD', None)] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields')
        errors_mapping[('NOT_FOUND', None)] = NotFound('The account can not be found')
        errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view this list')
        query_data = {
            'api': self._api,
            'url': '/hl7/transform/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'transforms'
        return AsyncQueryOPSF(**query_data)
示例#3
0
    def template_list(
        self,
        account_id,
        active=None,
        type=None,
    ):
        """Template list.
        :param account_id: uuid of the account
        :param active: Limit to active templates (optional)
        :param type: Limit to this type (optional)
        """
        request_data = {
           'active': active,
           'account_id': account_id,
           'type': type,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields')
        errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to perform this operation')
        query_data = {
            'api': self._api,
            'url': '/radreport/template/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'templates'
        return QueryOPSF(**query_data)
示例#4
0
    def list(
        self,
        account_id,
        type,
    ):
        """List.
        :param account_id: Limit to global filters and filters within the account namespaces
        :param type: The type of filter to list
        """
        request_data = {
           'account_id': account_id,
           'type': type,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        query_data = {
            'api': self._api,
            'url': '/filter/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'filters'
        return QueryOPSF(**query_data)
示例#5
0
文件: user.py 项目: dyens/sdk-python
    def namespace_list(
        self,
        account_id=None,
        plus_phr=None,
    ):
        """Namespace list.
        :param account_id: Only return the namespaces for this account (optional)
        :param plus_phr: Flag to include the PHR account as well if account_id was specified (optional)
        """
        request_data = {
           'plus_phr': plus_phr,
           'account_id': account_id,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        query_data = {
            'api': self._api,
            'url': '/user/namespace/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        return QueryOF(**query_data)
示例#6
0
    def progress_list(
        self,
        destination_id=None,
        node_id=None,
    ):
        """Progress list.
        :param destination_id: destination_id
        :param node_id: node_id

        Notes:
        (node_id OR destination_id) - The node or destination id
        """
        request_data = {
           'destination_id': destination_id,
           'node_id': node_id,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields')
        errors_mapping['NOT_FOUND'] = NotFound('The node can not be found')
        errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to do this')
        query_data = {
            'api': self._api,
            'url': '/node/progress/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'progresses'
        return QueryOPSF(**query_data)
示例#7
0
    def list(self, ):
        """List.
        """
        request_data = {}

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        query_data = {
            'api': self._api,
            'url': '/message/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'messages'
        return QueryOPSF(**query_data)
示例#8
0
文件: audit.py 项目: dyens/sdk-python
    def account(
        self,
        account_id,
        download=None,
        reverse=None,
    ):
        """Account.
        :param account_id: The id of the account
        :param download: Flag to create a zipped CSV file. A report_id will be returned and the file can be accessed via /report/status and /report/zip (optional)
        :param reverse: Flag to reverse the default sort order (optional)
        """
        request_data = {
           'reverse': reverse,
           'download': download,
           'account_id': account_id,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields')
        errors_mapping['NOT_FOUND'] = NotFound('The account was not found')
        errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to access this information')
        query_data = {
            'api': self._api,
            'url': '/audit/account',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'events'
        return QueryOPF(**query_data)
示例#9
0
    def public(
        self,
        account_id,
    ):
        """Public.
        :param account_id: The account the user is in
        """
        request_data = {
           'account_id': account_id,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FILTER'] = InvalidFilter('Invalid filter field')
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields')
        errors_mapping['NOT_FOUND'] = NotFound('The node or account can not be found')
        errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to do this')
        query_data = {
            'api': self._api,
            'url': '/node/public',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'nodes'
        return QueryOPSF(**query_data)
示例#10
0
文件: tag.py 项目: dyens/sdk-python
    def list(
        self,
        object=None,
    ):
        """List.
        :param object: object

        Notes:
        object - Object class (Study OR User_account OR Group OR Location OR Account OR Patient OR Case OR Order OR Message)
        """
        request_data = {
           'object': object,
        }
	
        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID')
        errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to')
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to')
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to')
        query_data = {
            'api': self._api,
            'url': '/tag/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'tags'
        return QueryOPSF(**query_data)
示例#11
0
    def list_count(
        self,
        account_id,
    ):
        """List count.
        :param account_id: Limit to activities in this account and the personal activities
        """
        request_data = {
            'account_id': account_id,
        }

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping['RUNNING'] = Running(
            'This call is currently runnning for the user')
        query_data = {
            'api': self._api,
            'url': '/activity/list/count',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        return QueryOF(**query_data)
示例#12
0
    def add(
        self,
        account_id,
        case_sensitive,
        lookup,
        name,
        replace,
        object=None,
    ):
        """Add.
        :param account_id: The account id
        :param case_sensitive: Flag if the dictionary lookup is case sensitive or not
        :param lookup: A JSON array of field names that will be concatenated and MD5 hashed for the dictionary lookup value
        :param name: The dictionary name
        :param replace: A JSON array of the field names that will be replaced for a successful lookup
        :param object: object

        Notes:
        object - Object this is applied against (Study OR Order OR User_account OR Case)
        """
        request_data = {
            'replace': replace,
            'name': name,
            'object': object,
            'lookup': lookup,
            'case_sensitive': case_sensitive,
            'account_id': account_id,
        }

        errors_mapping = {}
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'An invalid field name was passed. The error_subtype holds the name of the invalid field'
        )
        errors_mapping['INVALID_FLAG'] = InvalidFlag(
            'An invalid flag was passed. The error_subtype holds the name of the invalid flag'
        )
        errors_mapping['INVALID_OBJECT'] = InvalidObject(
            'An invalid object was passed')
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping['NOT_FOUND'] = NotFound('The account can not be found')
        errors_mapping['NOT_LIST'] = NotList(
            'The field is not a JSON array. The error_subtype holds the name of the field'
        )
        errors_mapping['NOT_PERMITTED'] = NotPermitted(
            'You are not permitted to do this')
        query_data = {
            'api': self._api,
            'url': '/dictionary/add',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        return QueryO(**query_data)
示例#13
0
    def deploy_list(
        self,
        customcode_id=None,
        namespace_id=None,
    ):
        """Deploy list.
        :param customcode_id: customcode_id
        :param namespace_id: namespace_id

        Notes:
        (namespace_id OR customcode_id) - uuid of either the namespace or customcode to show the deployments for
        """
        request_data = {
            'customcode_id': customcode_id,
            'namespace_id': namespace_id,
        }

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping['NOT_FOUND'] = NotFound(
            'The namespace or customcode can not be found')
        errors_mapping['NOT_PERMITTED'] = NotPermitted(
            'You are not permitted to do this')
        query_data = {
            'api': self._api,
            'url': '/customcode/deploy/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'deployments'
        return QueryOPSF(**query_data)
示例#14
0
    def list(
        self,
        account_id,
        strict_account_filter=None,
        study_extra=None,
    ):
        """List.

        :param account_id: Limit to activities in this account and the personal activities
        :param strict_account_filter: Flag to apply the account_id to personal activites as well (optional)
        :param study_extra: Flag to return extra study fields (optional)
        """
        request_data = {
            'account_id': account_id,
            'strict_account_filter': strict_account_filter,
            'study_extra': study_extra,
        }

        errors_mapping = {}
        errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_FIELD', None)] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        errors_mapping[('MISSING_FIELDS', None)] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        query_data = {
            'api': self._api,
            'url': '/activity/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'activities'
        return QueryOPSF(**query_data)
示例#15
0
    def sps_find(
        self,
        account_id,
        node_id=None,
        serial_no=None,
    ):
        """Sps find.
        :param account_id: The account uuid if sid authentication is used
        :param node_id: node_id
        :param serial_no: serial_no

        Notes:
        (sid OR node_id AND serial_no) - Either the sid or the node uuid and serial number
        """
        request_data = {
            'serial_no': serial_no,
            'node_id': node_id,
            'account_id': account_id,
        }

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping['NOT_FOUND'] = NotFound('The node can not be found')
        errors_mapping['NOT_PERMITTED'] = NotPermitted(
            'You are not permitted to view orders in this account')
        query_data = {
            'api': self._api,
            'url': '/order/sps/find',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        return QueryOF(**query_data)
示例#16
0
    def list(
        self,
        dicom_tags=None,
        namespace_id=None,
        study_id=None,
    ):
        """List.
        :param dicom_tags: A JSON list of the DICOM tags to return (optional)
        :param namespace_id: namespace_id
        :param study_id: study_id

        Notes:
        (study_id OR namespace_id) - uuid of the study or namespace to search
        """
        request_data = {
            'study_id': study_id,
            'dicom_tags': dicom_tags,
            'namespace_id': namespace_id,
        }

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['MISSING_FIELDS'] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping['NOT_PERMITTED'] = NotPermitted(
            'You are not permitted to view the DICOM data')
        query_data = {
            'api': self._api,
            'url': '/dicomdata/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'dicomdatas'
        return QueryOPF(**query_data)
示例#17
0
    def user_list(
        self,
        user_id,
    ):
        """User list.

        :param user_id: The user id
        """
        request_data = {
            'user_id': user_id,
        }

        errors_mapping = {}
        errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_FIELD', None)] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        errors_mapping[('MISSING_FIELDS', None)] = MissingFields(
            'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields'
        )
        errors_mapping[('NOT_FOUND',
                        None)] = NotFound('The user was not found.')
        query_data = {
            'api': self._api,
            'url': '/radreport/user/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'radreports'
        return AsyncQueryOPSF(**query_data)
示例#18
0
    def list(
        self,
        permissions=None,
    ):
        """List.
        :param permissions: Flag to return the users role and permissions in the accounts (optional)
        """
        request_data = {
            'permissions': permissions,
        }

        errors_mapping = {}
        errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound(
            'The filter can not be found. The error_subtype will hold the filter UUID'
        )
        errors_mapping['INVALID_CONDITION'] = InvalidCondition(
            'The condition is not support. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_FIELD'] = InvalidField(
            'The field is not valid for this object. The error_subtype will hold the filter expression this applies to'
        )
        errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField(
            'The field is not valid for this object. The error_subtype will hold the field name this applies to'
        )
        errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder(
            'The sort order for the field is invalid. The error_subtype will hold the field name this applies to'
        )
        query_data = {
            'api': self._api,
            'url': '/account/list',
            'request_data': request_data,
            'errors_mapping': errors_mapping,
            'required_sid': True,
        }
        query_data['paginated_field'] = 'accounts'
        return QueryOPSF(**query_data)