- Introduced tests for case creation commands, ensuring proper handling of UUIDs and payloads. - Added tests for v5 assignment functionality, validating employee identification and group assignment. - Implemented tests for remote recovery scenarios, including handling network failures and response validation. - Created tests for hardware label generation and validation, ensuring proper URL formatting and QR code generation. - Developed extensive tests for remote control functionality, covering connection isolation, command execution, and user permissions. - Added tests for workflow timer registration, ensuring correct handling of timer states and ownership validation.
15 lines
1.3 KiB
Python
15 lines
1.3 KiB
Python
"""Allowlisted workflow interfaces, shared by builder and evaluator."""
|
|
|
|
METHODS = {'invoice', 'subscription', 'prepaid', 'internal', 'non_billable'}
|
|
FIELDS = {'customer_id', 'case_id', 'description', 'hours', 'worked_date', 'tags', 'tag_ids', 'status', 'billable', 'entity_type', 'sla_status', 'priority', 'subject', 'has_active_agreement', 'has_active_card'}
|
|
FIELDS.update({'remaining_card_hours','has_available_card','case_title'})
|
|
OPERATORS = {'eq', 'ne', 'contains', 'not_contains', 'in', 'not_in', 'gt', 'gte', 'lt', 'lte', 'exists'}
|
|
TRIGGERS = {'time.created', 'time.updated', 'case.created', 'case.updated', 'tags.changed', 'mail.received', 'sla.changed', 'customer.updated', 'task.updated', 'reminder.due', 'notification.created'}
|
|
TRIGGERS.update({'case.closed','tags.added','tags.removed','customer.created','task.created'})
|
|
ACTIONS = {'set_billing', 'add_tag', 'remove_tag', 'suggest_tag', 'notify', 'create_task', 'create_reminder', 'set_field', 'assign_user', 'assign_group', 'start_workflow'}
|
|
ACTIONS.add('send_to_review')
|
|
EXECUTABLE_ACTIONS = set(ACTIONS)
|
|
|
|
def catalog():
|
|
return {'fields': sorted(FIELDS), 'operators': sorted(OPERATORS), 'triggers': sorted(TRIGGERS), 'actions': sorted(ACTIONS), 'billing_methods': sorted(METHODS), 'executable_actions': sorted(EXECUTABLE_ACTIONS)}
|