Source code for ace.centralize.graphql.selections.scheduler

"""
Predefined SelectionSets for Scheduler entities.

Based on the Scheduler GraphQL schema output types:
    JobScheduledDetail, JobProcessedDetail, BusinessEventDetail,
    JobDetail, JobType, BusinessEventType, Status
"""

from ace.core.graphql import SelectionSet


[docs] class StatusSelections: """Reusable selection sets for Status fields.""" STANDARD = SelectionSet( "id", "name", "displayStatus", )
[docs] class JobTypeSelections: """Reusable selection sets for JobType fields.""" STANDARD = SelectionSet( "id", "guid", "name", "requestTypeId", )
[docs] class BusinessEventTypeSelections: """Reusable selection sets for BusinessEventType fields.""" STANDARD = SelectionSet( "id", "name", "displayName", "description", "priorityOrder", "routingKeyTemplate", )
[docs] class JobDetailSelections: """Reusable selection sets for JobDetail fields.""" MINIMAL = SelectionSet( "id", "guid", "name", ) STANDARD = SelectionSet( "id", "guid", "name", "description", "allowManualExecution", "recurrentSchedule", "startSchedule", "routingKeyTemplate", "payloadTemplate", nested={ "displayName": SelectionSet("default"), "jobType": JobTypeSelections.STANDARD, "status": StatusSelections.STANDARD, } )
[docs] class JobScheduledSelections: """Reusable selection sets for JobScheduledDetail fields.""" MINIMAL = SelectionSet( "id", ) STANDARD = SelectionSet( "id", "entityId", "entityTypeId", "executionDateTimeUTC", "manualTrigger", "payload", "routingKey", nested={ "job": JobDetailSelections.MINIMAL, } ) FULL = SelectionSet( "id", "entityId", "entityTypeId", "executionDateTimeUTC", "manualTrigger", "payload", "routingKey", nested={ "job": JobDetailSelections.STANDARD, } )
[docs] class JobProcessedSelections: """Reusable selection sets for JobProcessedDetail fields.""" MINIMAL = SelectionSet( "id", "statusId", ) STANDARD = SelectionSet( "id", "statusId", "entityId", "entityTypeId", "errorCode", "errorDescription", "payload", "requestGuid", "responsePayload", "scheduledDateTimeUTC", "startDateTimeUTC", "endDateTimeUTC", "executionUserId", nested={ "job": JobDetailSelections.MINIMAL, } )
[docs] class BusinessEventSelections: """Reusable selection sets for BusinessEventDetail fields.""" MINIMAL = SelectionSet( "businessEventId", ) WITH_STATUS = SelectionSet( "businessEventId", "status", ) STANDARD = SelectionSet( "id", "effectiveDate", "entityId", "entityTypeId", "eventDateTimeUTC", "executionDateTimeUTC", "routingKey", "statusId", nested={ "businessEventType": BusinessEventTypeSelections.STANDARD, } ) FULL = SelectionSet( "id", "effectiveDate", "entityId", "entityTypeId", "eventDateTimeUTC", "executionDateTimeUTC", "routingKey", "statusId", "version", nested={ "businessEventType": BusinessEventTypeSelections.STANDARD, "scheduledJobs": JobScheduledSelections.STANDARD, "processedJobs": JobProcessedSelections.STANDARD, } )
[docs] class ScheduledJobSelections: """Reusable selection sets for mutation outputs.""" MINIMAL = SelectionSet( "scheduledJobId", ) WITH_STATUS = SelectionSet( "scheduledJobId", "status", )