$schema: https://json-schema.org/draft/2020-12/schema
$id: OpportunityBase.yaml
type: object
properties:
  id:
    $ref: uuid.yaml
    description: Globally unique id for the opportunity
  title:
    type: string
    examples:
      - Small business grant program
    description: Title or name of the funding opportunity
  identifiers:
    $ref: OppIds.yaml
    description: System and registry-specific identifiers for the opportunity
  status:
    $ref: OppStatus.yaml
    description: Status of the opportunity
  description:
    type: string
    examples:
      - This program provides funding to small businesses to help them grow and create jobs
    description: Description of the opportunity's purpose and scope
  funding:
    $ref: OppFunding.yaml
    description: Details about the funding available
  funders:
    $ref: OrgRefCollection.yaml
    examples:
      - primary:
          id: 018f2e77-4b5c-7d2e-9f3a-bcdef1234567
          name: Health Resources and Services Administration
          identifiers:
            otherIds:
              org:grants.gov:agency:
                registry:
                  code: org:grants.gov:agency
                id: HRSA
    description: Organization(s) offering the funding for this opportunity
  keyDates:
    $ref: OppTimeline.yaml
    description: Key dates for the opportunity, such as when the application opens and closes
  acceptedApplicantTypes:
    type: array
    items:
      $ref: ApplicantType.yaml
    description: The type of applicant for the opportunity
  source:
    type: string
    format: uri
    description: URL for the original source of the opportunity
  customFields:
    $ref: '#/$defs/RecordCustomField'
    description: Additional custom fields specific to this opportunity
  createdAt:
    type: string
    format: date-time
    description: The timestamp (in UTC) at which the record was created.
  lastModifiedAt:
    type: string
    format: date-time
    description: The timestamp (in UTC) at which the record was last modified.
required:
  - id
  - title
  - status
  - description
  - createdAt
  - lastModifiedAt
description: A funding opportunity
$defs:
  RecordCustomField:
    type: object
    properties: {}
    unevaluatedProperties:
      $ref: CustomField.yaml
