Opportunity
OpportunityBase
Section titled “OpportunityBase”A funding opportunity, such as a grant or loan.
| Property | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Globally unique id for the opportunity |
| title | string | Yes | Title or name of the funding opportunity |
| status | OppStatus | Yes | Status of the opportunity |
| description | string | Yes | Description of the opportunity's purpose and scope |
| funding | OppFunding | No | Details about the funding available |
| keyDates | OppTimeline | No | Key dates for the opportunity, such as when the application opens and closes |
| acceptedApplicantTypes | array<ApplicantType> | No | The type of applicant for the opportunity |
| source | url | No | URL for the original source of the opportunity |
| customFields | record<CustomField> | No | Additional custom fields specific to this opportunity |
| createdAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was created. |
| lastModifiedAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was last modified. |
Formats
Section titled “Formats”A JSON example of this model.
{ "id": "30a12e5e-5940-4c08-921c-17a8960fcf4b", "title": "Small business grant program", "status": { "value": "open", "description": "The opportunity is currently accepting applications" }, "description": "This program provides funding to small businesses to help them grow and create jobs", "funding": { "totalAmountAvailable": { "amount": "1000000.00", "currency": "USD" }, "minAwardAmount": { "amount": "10000.00", "currency": "USD" }, "maxAwardAmount": { "amount": "50000.00", "currency": "USD" }, "minAwardCount": 5, "maxAwardCount": 20, "estimatedAwardCount": 10 }, "keyDates": { "postDate": { "name": "Opportunity posted date", "eventType": "singleDate", "date": "2024-01-15", "description": "Opportunity is posted publicly" }, "closeDate": { "name": "Opportunity close date", "eventType": "singleDate", "date": "2024-12-31", "time": "17:00:00", "description": "Opportunity closes for all applications" }, "otherDates": { "anticipatedAward": { "name": "Anticipated award date", "eventType": "singleDate", "date": "2025-03-15", "description": "When we expect to announce awards for this opportunity." }, "applicationPeriod": { "name": "Application period", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-01-31", "endTime": "17:00:00", "description": "Primary application period for the grant opportunity" }, "performancePeriod": { "name": "Period of Performance", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-12-31", "description": "Period of performance for the grant" }, "infoSessions": { "name": "Info sessions", "eventType": "other", "details": "Every other Tuesday", "description": "Info sessions for the opportunity" } } }, "acceptedApplicantTypes": [ { "value": "individual", "description": "An individual applicant" } ], "source": "http://example.com", "customFields": {}, "createdAt": "2019-08-24T14:15:22Z", "lastModifiedAt": "2019-08-24T14:15:22Z"}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OpportunityBase.yamltype: objectproperties: 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 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 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 - lastModifiedAtdescription: A funding opportunity$defs: RecordCustomField: type: object properties: {} unevaluatedProperties: $ref: CustomField.yamlThe TypeSpec code for this model.
@doc("A funding opportunity")@Versioning.added(CommonGrants.Versions.v0_1)model OpportunityBase { // Identity fields shared with the OppRef reference model ...OppRef;
/** Status of the opportunity */ status: OppStatus;
/** Description of the opportunity's purpose and scope */ @example("This program provides funding to small businesses to help them grow and create jobs") description: string;
/** Details about the funding available */ funding?: OppFunding;
/** Key dates for the opportunity, such as when the application opens and closes */ keyDates?: OppTimeline;
/** The type of applicant for the opportunity */ @Versioning.added(CommonGrants.Versions.v0_2) acceptedApplicantTypes?: ApplicantType[];
/** URL for the original source of the opportunity */ source?: url;
/** Additional custom fields specific to this opportunity */ customFields?: Record<CustomField>;
// Spreads the fields from the Metadata model into the Opportunity model ...SystemMetadata;}The Python code for this model.
from .opp_status import OppStatusfrom .opp_timeline import OppTimelinefrom common_grants_sdk.utils.custom_fields import ( add_custom_fields, get_custom_field_value,)
if TYPE_CHECKING: from common_grants_sdk.extensions.specs import CustomFieldSpec
V = TypeVar("V") # Unbound to support both BaseModel subclasses and primitives
# The opportunity's custom-fields container. Defaults to the protocol's untyped# representation (``dict[str, CustomField]``), so the bare ``OpportunityBase``# behaves exactly as a concrete model; plugin authors parameterize it with a typed# ``CustomFieldSet`` (``OpportunityBase[OpportunityFields]``) for concrete access.CF = te.TypeVar("CF", default="dict[str, CustomField]")
class OpportunityBase(SystemMetadata, CommonGrantsBaseModel, Generic[CF]): """Base model for a funding opportunity, generic over its custom-fields container."""
model_config = ConfigDict(populate_by_name=True)
id: UUID = Field(..., description="Globally unique id for the opportunity") title: str = Field(..., description="Title or name of the funding opportunity") status: OppStatus = Field(..., description="Status of the opportunity") description: str = Field(The TypeScript code for this model.
/** Title or name of the funding Opportunity */ title: z.string(),
/** Status of the Opportunity */ status: OppStatusSchema,
/** Description of the Opportunity's purpose and scope */ description: z.string(),
/** Details about the funding available */ funding: OppFundingSchema.nullish(),
/** Key dates for the Opportunity */ keyDates: OppTimelineSchema.nullish(),
/** The type of applicant for the opportunity */ acceptedApplicantTypes: z.array(ApplicantTypeSchema).nullish(),
/** URL for the original source of the Opportunity */ source: z.string().url().nullish(),
/** Additional custom fields specific to this Opportunity */ customFields: z.record(CustomFieldSchema).nullish(), }) .merge(SystemMetadataSchema);
// ############################################################################// Search models// ############################################################################Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.2.0 |
| OpportunityBase.yaml |
| 0.1.0 |
| OpportunityBase.yaml |
OpportunityDetails
Section titled “OpportunityDetails”A funding opportunity with additional details, like available competitions.
| Property | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Globally unique id for the opportunity |
| title | string | Yes | Title or name of the funding opportunity |
| status | OppStatus | Yes | Status of the opportunity |
| description | string | Yes | Description of the opportunity's purpose and scope |
| funding | OppFunding | No | Details about the funding available |
| keyDates | OppTimeline | No | Key dates for the opportunity, such as when the application opens and closes |
| acceptedApplicantTypes | array<ApplicantType> | No | The type of applicant for the opportunity |
| source | url | No | URL for the original source of the opportunity |
| customFields | record<CustomField> | No | Additional custom fields specific to this opportunity |
| createdAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was created. |
| lastModifiedAt | utcDateTime | Yes | The timestamp (in UTC) at which the record was last modified. |
| competitions | array<CompetitionBase> | No | The competitions associated with the opportunity |
Formats
Section titled “Formats”A JSON example of this model.
{ "competitions": [ { "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": { "field": "emails.primary" }, "phone": { "field": "phones.primary" } }, "createdAt": "2025-01-01T17:01:01", "lastModifiedAt": "2025-01-02T17:30:00" }, "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": { "field": "emails.primary" }, "phone": { "field": "phones.primary" } }, "createdAt": "2025-01-01T17:01:01", "lastModifiedAt": "2025-01-02T17:30:00" } }, "validation": { "required": [ "formA", "formB" ] } }, "createdAt": "2025-01-01T00:00:00Z", "lastModifiedAt": "2025-01-01T00:00:00Z" } ], "id": "30a12e5e-5940-4c08-921c-17a8960fcf4b", "title": "Small business grant program", "status": { "value": "open", "description": "The opportunity is currently accepting applications" }, "description": "This program provides funding to small businesses to help them grow and create jobs", "funding": { "totalAmountAvailable": { "amount": "1000000.00", "currency": "USD" }, "minAwardAmount": { "amount": "10000.00", "currency": "USD" }, "maxAwardAmount": { "amount": "50000.00", "currency": "USD" }, "minAwardCount": 5, "maxAwardCount": 20, "estimatedAwardCount": 10 }, "keyDates": { "postDate": { "name": "Opportunity posted date", "eventType": "singleDate", "date": "2024-01-15", "description": "Opportunity is posted publicly" }, "closeDate": { "name": "Opportunity close date", "eventType": "singleDate", "date": "2024-12-31", "time": "17:00:00", "description": "Opportunity closes for all applications" }, "otherDates": { "anticipatedAward": { "name": "Anticipated award date", "eventType": "singleDate", "date": "2025-03-15", "description": "When we expect to announce awards for this opportunity." }, "applicationPeriod": { "name": "Application period", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-01-31", "endTime": "17:00:00", "description": "Primary application period for the grant opportunity" }, "performancePeriod": { "name": "Period of Performance", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-12-31", "description": "Period of performance for the grant" }, "infoSessions": { "name": "Info sessions", "eventType": "other", "details": "Every other Tuesday", "description": "Info sessions for the opportunity" } } }, "acceptedApplicantTypes": [ { "value": "individual", "description": "An individual applicant" } ], "source": "http://example.com", "customFields": {}, "createdAt": "2019-08-24T14:15:22Z", "lastModifiedAt": "2019-08-24T14:15:22Z"}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OpportunityDetails.yamltype: objectproperties: competitions: type: array items: $ref: CompetitionBase.yaml description: The competitions associated with the opportunityallOf: - $ref: OpportunityBase.yamlunevaluatedProperties: not: {}description: A funding opportunity with additional details, like available competitions.The TypeSpec code for this model.
/** A funding opportunity with additional details, like available competitions. */@Versioning.added(CommonGrants.Versions.v0_2)model OpportunityDetails extends OpportunityBase { /** The competitions associated with the opportunity */ competitions?: CompetitionBase[];}Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.2.0 |
| OpportunityDetails.yaml |
OppRef
Section titled “OppRef”A reference to an opportunity, previewing the key fields a consumer needs to identify it and look it up or join it to another response. Appears wherever another record points to an opportunity, such as the opportunity an award resulted from.
| Property | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Globally unique id for the opportunity |
| title | string | Yes | Title or name of the funding opportunity |
Formats
Section titled “Formats”A JSON example of this model.
{ "id": "018f2e77-3a4b-7c1d-9e2f-abcdef123456", "title": "Health Center Capital Improvement Program"}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OppRef.yamltype: objectproperties: 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 opportunityrequired: - id - titleunevaluatedProperties: not: {}examples: - id: 018f2e77-3a4b-7c1d-9e2f-abcdef123456 title: Health Center Capital Improvement Programdescription: |- A reference to an opportunity, previewing the key fields a consumer needs to identify it and look it up or join it to another response. Appears wherever another record points to an opportunity, such as the opportunity an award resulted from.The TypeSpec code for this model.
/** A reference to an opportunity, previewing the key fields a consumer needs * to identify it and look it up or join it to another response. Appears * wherever another record points to an opportunity, such as the opportunity * an award resulted from. */@example(Examples.Opportunity.ref)@Versioning.added(CommonGrants.Versions.v0_1)model OppRef { /** Globally unique id for the opportunity */ @visibility(Lifecycle.Read) id: uuid;
/** Title or name of the funding opportunity */ @example("Small business grant program") title: string;}Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.1.0 |
| OppRef.yaml |
OppStatus
Section titled “OppStatus”The status of an opportunity, such as whether it is accepting applications.
| Property | Type | Required | Description |
|---|---|---|---|
| value | OppStatusOptions | Yes | The status of the opportunity, from a predefined set of options |
| customValue | string | No | A custom value for the status |
| description | string | No | A human-readable description of the status |
Formats
Section titled “Formats”A JSON example of this model.
{ "value": "open", "description": "The opportunity is currently accepting applications"}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OppStatus.yamltype: objectproperties: value: $ref: OppStatusOptions.yaml description: The status of the opportunity, from a predefined set of options customValue: type: string description: A custom value for the status description: type: string description: A human-readable description of the statusrequired: - valueunevaluatedProperties: not: {}examples: - value: open description: The opportunity is currently accepting applications - value: custom customValue: archived description: The opportunity is archived and shouldn't appear in search resultsdescription: The status of the opportunityThe TypeSpec code for this model.
/** The status of the opportunity */@example(Examples.OppStatus.custom)@example(Examples.OppStatus.default)@Versioning.added(CommonGrants.Versions.v0_1)model OppStatus { /** The status of the opportunity, from a predefined set of options */ value: OppStatusOptions;
/** A custom value for the status */ customValue?: string;
/** A human-readable description of the status */ description?: string;}The Python code for this model.
class OppStatus(CommonGrantsBaseModel): """Represents the status of a funding opportunity."""
value: OppStatusOptions = Field( ..., description="The status value, from a predefined set of options", ) custom_value: Optional[str] = Field( default=None, alias="customValue", description="A custom status value", ) description: Optional[str] = Field( default=None, description="A human-readable description of the status", )The TypeScript code for this model.
export const OppStatusSchema = z.object({ /** The status value */ value: OppStatusOptionsEnum,
/** A custom status value */ customValue: z.string().nullish(),
/** A human-readable description of the status */ description: z.string().nullish(),});Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.1.0 |
| OppStatus.yaml |
OppStatusOptions
Section titled “OppStatusOptions”The set of values accepted for opportunity status.
| Value | Description |
|---|---|
| forecasted | The opportunity is forecasted and not yet open for applications |
| open | The opportunity is open for applications |
| closed | The opportunity is no longer accepting applications |
| custom | A custom status |
Formats
Section titled “Formats”A JSON example of this model.
"forecasted"The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OppStatusOptions.yamltype: stringenum: - forecasted - open - closed - customdescription: |- The set of values accepted for opportunity status: - `forecasted`: The opportunity is forecasted and not yet open for applications - `open`: The opportunity is open for applications - `closed`: The opportunity is no longer accepting applications - `custom`: A custom statusThe TypeSpec code for this model.
/** The set of values accepted for opportunity status: * - `forecasted`: The opportunity is forecasted and not yet open for applications * - `open`: The opportunity is open for applications * - `closed`: The opportunity is no longer accepting applications * - `custom`: A custom status */@Versioning.added(CommonGrants.Versions.v0_1)enum OppStatusOptions { forecasted, open, closed, custom,}The Python code for this model.
class OppStatusOptions(StrEnum): """The status of the opportunity."""
FORECASTED = "forecasted" OPEN = "open" CUSTOM = "custom" CLOSED = "closed"
def __lt__(self, other): """Define the order of status transitions.""" order = { self.FORECASTED: 0, self.OPEN: 1, self.CUSTOM: 2, self.CLOSED: 3, } return order[self] < order[other]The TypeScript code for this model.
export const OppStatusOptionsEnum = z.enum(["forecasted", "open", "closed", "custom"]);Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.1.0 |
| OppStatusOptions.yaml |
OppFunding
Section titled “OppFunding”Details about the funding available for an opportunity.
| Property | Type | Required | Description |
|---|---|---|---|
| details | string | No | Details about the funding available for this opportunity that don't fit other fields |
| totalAmountAvailable | Money | No | Total amount of funding available for this opportunity |
| minAwardAmount | Money | No | Minimum amount of funding granted per award |
| maxAwardAmount | Money | No | Maximum amount of funding granted per award |
| minAwardCount | integer | No | Minimum number of awards granted |
| maxAwardCount | integer | No | Maximum number of awards granted |
| estimatedAwardCount | integer | No | Estimated number of awards that will be granted |
Formats
Section titled “Formats”A JSON example of this model.
{ "totalAmountAvailable": { "amount": "1000000.00", "currency": "USD" }, "minAwardAmount": { "amount": "10000.00", "currency": "USD" }, "maxAwardAmount": { "amount": "50000.00", "currency": "USD" }, "minAwardCount": 5, "maxAwardCount": 20, "estimatedAwardCount": 10}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OppFunding.yamltype: objectproperties: details: type: string description: Details about the funding available for this opportunity that don't fit other fields totalAmountAvailable: $ref: Money.yaml description: Total amount of funding available for this opportunity minAwardAmount: $ref: Money.yaml description: Minimum amount of funding granted per award maxAwardAmount: $ref: Money.yaml description: Maximum amount of funding granted per award minAwardCount: type: integer description: Minimum number of awards granted maxAwardCount: type: integer description: Maximum number of awards granted estimatedAwardCount: type: integer description: Estimated number of awards that will be grantedunevaluatedProperties: not: {}examples: - totalAmountAvailable: amount: "1000000.00" currency: USD minAwardAmount: amount: "10000.00" currency: USD maxAwardAmount: amount: "50000.00" currency: USD minAwardCount: 5 maxAwardCount: 20 estimatedAwardCount: 10 - details: This opportunity has a total funding limit of $1,000,000 but no specific award range totalAmountAvailable: amount: "1000000.00" currency: USD estimatedAwardCount: 10 - details: We'll be awarding between $10,000 and $50,000 per recipient minAwardAmount: amount: "10000.00" currency: USD maxAwardAmount: amount: "50000.00" currency: USD minAwardCount: 5 maxAwardCount: 20description: Details about the funding available for this opportunityThe TypeSpec code for this model.
/** Details about the funding available for this opportunity */@example( Examples.Funding.awardRange, #{ title: "Award range but no total limit" })@example( Examples.Funding.onlyLimit, #{ title: "Total funding limit but no award range" })@example(Examples.Funding.allFields, #{ title: "All fields defined" })@Versioning.added(CommonGrants.Versions.v0_1)model OppFunding { /** Details about the funding available for this opportunity that don't fit other fields */ details?: string;
/** Total amount of funding available for this opportunity */ totalAmountAvailable?: Money;
/** Minimum amount of funding granted per award */ minAwardAmount?: Money;
/** Maximum amount of funding granted per award */ maxAwardAmount?: Money;
/** Minimum number of awards granted */ minAwardCount?: integer;
/** Maximum number of awards granted */ maxAwardCount?: integer;
/** Estimated number of awards that will be granted */ estimatedAwardCount?: integer;}The Python code for this model.
class OppFunding(CommonGrantsBaseModel): """Details about the funding available for an opportunity."""
details: Optional[str] = Field( default=None, description="Details about the funding available for this opportunity that don't fit other fields", ) total_amount_available: Optional[Money] = Field( default=None, alias="totalAmountAvailable", description="Total amount of funding available for this opportunity", ) min_award_amount: Optional[Money] = Field( default=None, alias="minAwardAmount", description="Minimum amount of funding granted per award", ) max_award_amount: Optional[Money] = Field( default=None, alias="maxAwardAmount", description="Maximum amount of funding granted per award", ) min_award_count: Optional[int] = Field( default=None, alias="minAwardCount", description="Minimum number of awards granted", ) max_award_count: Optional[int] = Field( default=None, alias="maxAwardCount", description="Maximum number of awards granted", ) estimated_award_count: Optional[int] = Field( default=None, alias="estimatedAwardCount", description="Estimated number of awards that will be granted", )The TypeScript code for this model.
/** Total amount of funding available */ totalAmountAvailable: MoneySchema.nullish(),
/** Minimum amount of funding granted per award */ minAwardAmount: MoneySchema.nullish(),
/** Maximum amount of funding granted per award */ maxAwardAmount: MoneySchema.nullish(),
/** Minimum number of awards granted */ minAwardCount: z.number().int().nullish(),
/** Maximum number of awards granted */ maxAwardCount: z.number().int().nullish(),
/** Estimated number of awards that will be granted */ estimatedAwardCount: z.number().int().nullish(), }) .strict();
// ############################################################################// Timeline models// ############################################################################Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.1.0 |
| OppFunding.yaml |
OppTimeline
Section titled “OppTimeline”Key dates in the opportunity’s timeline, such as when the application opens and closes.
| Property | Type | Required | Description |
|---|---|---|---|
| postDate | Event | No | The date (and time) at which the opportunity is posted |
| closeDate | Event | No | The date (and time) at which the opportunity closes |
| otherDates | record<Event> | No | An optional map of other key dates or events in the opportunity timeline Examples might include a deadline for questions, anticipated award date, etc. |
Formats
Section titled “Formats”A JSON example of this model.
{ "postDate": { "name": "Opportunity posted date", "eventType": "singleDate", "date": "2024-01-15", "description": "Opportunity is posted publicly" }, "closeDate": { "name": "Opportunity close date", "eventType": "singleDate", "date": "2024-12-31", "time": "17:00:00", "description": "Opportunity closes for all applications" }, "otherDates": { "anticipatedAward": { "name": "Anticipated award date", "eventType": "singleDate", "date": "2025-03-15", "description": "When we expect to announce awards for this opportunity." }, "applicationPeriod": { "name": "Application period", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-01-31", "endTime": "17:00:00", "description": "Primary application period for the grant opportunity" }, "performancePeriod": { "name": "Period of Performance", "eventType": "dateRange", "startDate": "2024-01-01", "endDate": "2024-12-31", "description": "Period of performance for the grant" }, "infoSessions": { "name": "Info sessions", "eventType": "other", "details": "Every other Tuesday", "description": "Info sessions for the opportunity" } }}The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: OppTimeline.yamltype: objectproperties: postDate: $ref: Event.yaml description: The date (and time) at which the opportunity is posted closeDate: $ref: Event.yaml description: The date (and time) at which the opportunity closes otherDates: $ref: "#/$defs/RecordEvent" description: |- An optional map of other key dates or events in the opportunity timeline
Examples might include a deadline for questions, anticipated award date, etc.unevaluatedProperties: not: {}examples: - postDate: name: Opportunity posted date eventType: singleDate date: 2024-01-15 description: Opportunity is posted publicly closeDate: name: Opportunity close date eventType: singleDate date: 2024-12-31 time: 17:00:00 description: Opportunity closes for all applications otherDates: anticipatedAward: name: Anticipated award date eventType: singleDate date: 2025-03-15 description: When we expect to announce awards for this opportunity. applicationPeriod: name: Application period eventType: dateRange startDate: 2024-01-01 endDate: 2024-01-31 endTime: 17:00:00 description: Primary application period for the grant opportunity performancePeriod: name: Period of Performance eventType: dateRange startDate: 2024-01-01 endDate: 2024-12-31 description: Period of performance for the grant infoSessions: name: Info sessions eventType: other details: Every other Tuesday description: Info sessions for the opportunitydescription: Key dates and events in the opportunity's timeline, such as when the opportunity is posted and closes$defs: RecordEvent: type: object properties: {} unevaluatedProperties: $ref: Event.yamlThe TypeSpec code for this model.
/** Key dates and events in the opportunity's timeline, such as when the opportunity is posted and closes */@example(Examples.Timeline.opportunity)@Versioning.added(CommonGrants.Versions.v0_1)model OppTimeline { /** The date (and time) at which the opportunity is posted */ postDate?: Event;
/** The date (and time) at which the opportunity closes */ closeDate?: Event;
/** An optional map of other key dates or events in the opportunity timeline * * Examples might include a deadline for questions, anticipated award date, etc. */ otherDates?: Record<Event>;}The Python code for this model.
class OppTimeline(CommonGrantsBaseModel): """Key dates and events in the lifecycle of an opportunity."""
post_date: Optional[Event] = Field( default=None, alias="postDate", description="The date (and time) at which the opportunity is posted", ) close_date: Optional[Event] = Field( default=None, alias="closeDate", description="The date (and time) at which the opportunity closes", ) other_dates: Optional[dict[str, Event]] = Field( default=None, alias="otherDates", description="An optional map of other key dates or events in the opportunity timeline", )The TypeScript code for this model.
/** The date (and time) at which the opportunity closes */ closeDate: EventSchema.nullish(),
/** An optional map of other key dates or events in the opportunity timeline */ otherDates: z.record(EventSchema).nullish(), }) .strict();
// ############################################################################// Base Opportunity model// ############################################################################Changelog
Section titled “Changelog”| Version | Changes | Schema |
|---|---|---|
| 0.1.0 |
| OppTimeline.yaml |