Competition
CompetitionBase
Section titled “CompetitionBase”Base model for a competition.
A competition is an application process for a funding opportunity. It often has a distinct application period and set of application forms.
Property | Type | Required | Description |
---|---|---|---|
id | uuid | Yes | The competition’s unique identifier. |
opportunityId | uuid | Yes | The opportunity id for the competition. |
title | string | Yes | The title of the competition. |
description | string | No | The description of the competition. |
instructions | string | No | The instructions for the competition. |
status | CompetitionStatus | Yes | The status of the competition. |
keyDates | CompetitionTimeline | Yes | The key dates in the competition timeline. |
forms | CompetitionForms | Yes | The forms for the competition. |
customFields | Record<CustomField> | No | The custom fields for the competition. |
createdAt | utcDateTime | Yes | The competition’s creation date. |
lastModifiedAt | utcDateTime | Yes | The competition’s last modified date. |
Formats
Section titled “Formats”A JSON example of this model.
{ "id": "b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a", "opportunityId": "b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6b", "title": "Competition 1", "description": "Competition 1 description", "instructions": "Competition 1 instructions", "status": { "value": "open", "customValue": "custom", "description": "Competition is open for applications" }, "keyDates": { "openDate": { "name": "Open Date", "eventType": "singleDate", "date": "2025-01-01" }, "closeDate": { "name": "Close Date", "eventType": "singleDate", "date": "2025-01-30" }, "otherDates": { "reviewPeriod": { "name": "Application Review Period", "eventType": "dateRange", "startDate": "2025-02-01", "endDate": "2025-02-28" } } }, "forms": { "forms": { "formA": {}, "formB": {} }, "validation": { "required": ["formA"] } }, "createdAt": "2025-01-01T00:00:00Z", "lastModifiedAt": "2025-01-01T00:00:00Z"}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: CompetitionBase.yamltype: objectproperties: id: $ref: uuid.yaml description: Globally unique id for the competition opportunityId: $ref: uuid.yaml description: The opportunity id for the competition title: type: string description: The title of the competition description: type: string description: The description of the competition instructions: anyOf: - type: string - $ref: File.yaml description: The instructions for the competition status: $ref: CompetitionStatus.yaml description: The status of the competition keyDates: $ref: CompetitionTimeline.yaml description: The key dates in the competition timeline forms: $ref: CompetitionForms.yaml description: The forms for the competition customFields: $ref: "#/$defs/RecordCustomField" description: The custom fields for the competition 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 - opportunityId - title - status - keyDates - forms - createdAt - lastModifiedAtexamples: - id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a opportunityId: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6b title: Competition 1 description: Competition 1 description instructions: Competition 1 instructions status: value: open customValue: custom description: Competition is open for applications keyDates: openDate: name: Open Date eventType: singleDate date: 2025-01-01 closeDate: name: Close Date eventType: singleDate date: 2025-01-30 otherDates: reviewPeriod: name: Application Review Period eventType: dateRange startDate: 2025-02-01 endDate: 2025-02-28 forms: forms: formA: id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a name: Form A description: Form A description instructions: Form A instructions jsonSchema: $id: formA.json type: object properties: name: first: type: string last: type: string email: type: string phone: type: string uiSchema: type: VerticalLayout elements: - type: Group label: Name elements: - type: Control scope: "#/properties/name/first" - type: Control scope: "#/properties/name/last" - type: Control scope: "#/properties/email" - type: Control scope: "#/properties/phone" mappingToCommonGrants: name: firstName: field: name.first lastName: field: name.last emails: primary: field: email phones: primary: field: phone mappingFromCommonGrants: name: first: field: name.firstName last: field: name.lastName email: {} phone: {} formB: id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a name: Form A description: Form A description instructions: Form A instructions jsonSchema: $id: formA.json type: object properties: name: first: type: string last: type: string email: type: string phone: type: string uiSchema: type: VerticalLayout elements: - type: Group label: Name elements: - type: Control scope: "#/properties/name/first" - type: Control scope: "#/properties/name/last" - type: Control scope: "#/properties/email" - type: Control scope: "#/properties/phone" mappingToCommonGrants: name: firstName: field: name.first lastName: field: name.last emails: primary: field: email phones: primary: field: phone mappingFromCommonGrants: name: first: field: name.firstName last: field: name.lastName email: {} phone: {} validation: required: - formA - formB createdAt: 2025-01-01T00:00:00Z lastModifiedAt: 2025-01-01T00:00:00Zdescription: |- The base model for a competition.
A competition is an application process for a funding opportunity. It often has a distinct application period and set of application forms.$defs: RecordCustomField: type: object properties: {} unevaluatedProperties: $ref: CustomField.yaml
The TypeSpec code for this model.
/** * The base model for a competition. * * A competition is an application process for a funding opportunity. It often has a * distinct application period and set of application forms. */@example(Examples.Competition.competition)model CompetitionBase { /** Globally unique id for the competition */ id: Types.uuid;
/** The opportunity id for the competition */ opportunityId: Types.uuid;
/** The title of the competition */ title: string;
/** The description of the competition */ description?: string;
/** The instructions for the competition */ instructions?: string | Fields.File;
/** The status of the competition */ status: CompetitionStatus;
/** The key dates in the competition timeline */ keyDates: CompetitionTimeline;
/** The forms for the competition */ forms: CompetitionForms;
/** The custom fields for the competition */ customFields?: Record<Fields.CustomField>;
/** The system metadata for the competition */ ...Fields.SystemMetadata;}
CompetitionStatus
Section titled “CompetitionStatus”The status of the competition.
Property | Type | Required | Description |
---|---|---|---|
value | CompetitionStatusOptions | Yes | The status value. |
customValue | string | No | Custom status value when value is “custom”. |
description | string | No | Description of the status. |
Formats
Section titled “Formats”A JSON example of this model.
{ "value": "custom", "customValue": "canceled", "description": "Competition has been canceled"}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: CompetitionStatus.yamltype: objectproperties: value: $ref: CompetitionStatusOptions.yaml customValue: type: string description: type: stringrequired: - valueexamples: - value: open customValue: custom description: Competition is open for applicationsdescription: The status of the competition
The TypeSpec code for this model.
/** The status of the competition */@example(Examples.Competition.status)model CompetitionStatus { value: CompetitionStatusOptions; customValue?: string; description?: string;}
CompetitionStatusOptions
Section titled “CompetitionStatusOptions”Enumeration of possible competition status values.
Values
Section titled “Values”Value | Description |
---|---|
open | The competition is open for applications |
closed | The competition is closed for applications |
custom | The competition is in a custom status |
Formats
Section titled “Formats”A JSON example of this model.
"open"
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: CompetitionStatusOptions.yamltype: stringenum: - open - closed - custom
The TypeSpec code for this model.
enum CompetitionStatusOptions { /** The competition is open for applications */ open,
/** The competition is closed for applications */ closed,
/** The competition is in a custom status */ custom,}
CompetitionForms
Section titled “CompetitionForms”Set of forms that need to be completed to apply to the competition.
Property | Type | Required | Description |
---|---|---|---|
forms | Record<Form> | Yes | The forms for the competition. |
validation | Record<unknown> | Yes | The validation rules for the competition forms. |
Formats
Section titled “Formats”A JSON example of this model.
{ "forms": { "formA": {}, "formB": {} }, "validation": { "required": ["formA"] }}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: CompetitionForms.yamltype: objectproperties: forms: $ref: "#/$defs/RecordForm" description: The forms for the competition validation: $ref: "#/$defs/RecordUnknown" description: The validation rules for the competition formsrequired: - forms - validationexamples: - forms: formA: id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a name: Form A description: Form A description instructions: Form A instructions jsonSchema: $id: formA.json type: object properties: name: first: type: string last: type: string email: type: string phone: type: string uiSchema: type: VerticalLayout elements: - type: Group label: Name elements: - type: Control scope: "#/properties/name/first" - type: Control scope: "#/properties/name/last" - type: Control scope: "#/properties/email" - type: Control scope: "#/properties/phone" mappingToCommonGrants: name: firstName: field: name.first lastName: field: name.last emails: primary: field: email phones: primary: field: phone mappingFromCommonGrants: name: first: field: name.firstName last: field: name.lastName email: {} phone: {} formB: id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a name: Form A description: Form A description instructions: Form A instructions jsonSchema: $id: formA.json type: object properties: name: first: type: string last: type: string email: type: string phone: type: string uiSchema: type: VerticalLayout elements: - type: Group label: Name elements: - type: Control scope: "#/properties/name/first" - type: Control scope: "#/properties/name/last" - type: Control scope: "#/properties/email" - type: Control scope: "#/properties/phone" mappingToCommonGrants: name: firstName: field: name.first lastName: field: name.last emails: primary: field: email phones: primary: field: phone mappingFromCommonGrants: name: first: field: name.firstName last: field: name.lastName email: {} phone: {} validation: required: - formA - formBdescription: Set of forms that need to be completed to apply to the competition.$defs: RecordForm: type: object properties: {} unevaluatedProperties: $ref: Form.yaml RecordUnknown: type: object properties: {} unevaluatedProperties: {}
The TypeSpec code for this model.
/** Set of forms that need to be completed to apply to the competition. */@example(Examples.Competition.forms)model CompetitionForms { /** The forms for the competition */ forms: Record<Models.Form>;
/** The validation rules for the competition forms */ validation: Record<unknown>;}
CompetitionTimeline
Section titled “CompetitionTimeline”The key dates in the competition timeline.
Property | Type | Required | Description |
---|---|---|---|
openDate | Event | Yes | The start date of the competition. |
closeDate | Event | Yes | The end date of the competition. |
otherDates | Record<Event> | No | Additional dates in the competition timeline. |
Formats
Section titled “Formats”A JSON example of this model.
{ "openDate": { "name": "Open Date", "eventType": "singleDate", "date": "2025-01-01" }, "closeDate": { "name": "Close Date", "eventType": "singleDate", "date": "2025-01-30" }, "otherDates": { "reviewPeriod": { "name": "Application Review Period", "eventType": "dateRange", "startDate": "2025-02-01", "endDate": "2025-02-28" } }}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: CompetitionTimeline.yamltype: objectproperties: openDate: $ref: Event.yaml description: The start date of the competition closeDate: $ref: Event.yaml description: The end date of the competition otherDates: $ref: "#/$defs/RecordEvent" description: The date the competition was createdrequired: - openDate - closeDateexamples: - openDate: name: Open Date eventType: singleDate date: 2025-01-01 closeDate: name: Close Date eventType: singleDate date: 2025-01-30 otherDates: reviewPeriod: name: Application Review Period eventType: dateRange startDate: 2025-02-01 endDate: 2025-02-28$defs: RecordEvent: type: object properties: {} unevaluatedProperties: $ref: Event.yaml
The TypeSpec code for this model.
@example(Examples.Competition.keyDates)model CompetitionTimeline { /** The start date of the competition */ openDate: Fields.Event;
/** The end date of the competition */ closeDate: Fields.Event;
/** The date the competition was created */ otherDates?: Record<Fields.Event>;}