"""
Predefined SelectionSets for Application and related entities.
"""
from ace.core.graphql import SelectionSet
from ace.centralize.graphql.selections.policy import (
PolicySelections,
CoverageSelections,
ParticipantSelections,
PaymentAgreementSelections,
)
[docs]
class ApplicationSelections:
"""Reusable selection sets for Application fields."""
MINIMAL = SelectionSet(
"applicationId",
"applicationNumber",
nested={
"policy": SelectionSet(
"policyId",
"policyGUID",
"policyNumber",
nested={
"coverages": CoverageSelections.MINIMAL
}
)
}
)
STANDARD = SelectionSet(
"applicationId",
"applicationNumber",
"referenceNumber",
"applicationTypeId",
"submissionTypeId",
"isDelivered",
"deliveryMethodId",
"interviewTypeId",
"isReplacement",
"isCalculatedInProduction",
"terminationDate",
"effectiveDate",
"terminationReasonId",
"submittedDate",
"signedDate",
"statusId",
nested={
"policy": SelectionSet(
"productId",
"policyNumber",
"jurisdictionId",
"effectiveDate",
"terminationDate",
"annualPremium",
"modalPremium",
"feeAmount",
nested={
"premiumPaymentAgreement": PaymentAgreementSelections.STANDARD,
"coverages": CoverageSelections.STANDARD
}
),
"participants": SelectionSet("id")
}
)
FULL = SelectionSet(
"applicationId",
"applicationNumber",
"applicationTypeId",
"creationDateTimeUTC",
"creationUserId",
"deletionDateTimeUTC",
"deletionUserId",
"deliveryMethodId",
"dynamic",
"effectiveDate",
"interviewTypeId",
"isCalculatedInProduction",
"isDelivered",
"isReplacement",
"lastUpdateDateTimeUTC",
"lastUpdateUserId",
"referenceNumber",
"signedDate",
"statusId",
"submissionTypeId",
"submittedDate",
"terminationDate",
"terminationReasonId",
nested={
"policy": PolicySelections.FULL
}
)