Skip to content

DoCurious API Reference / types / ChallengeInstance

Interface: ChallengeInstance

Defined in: types/challenge.types.ts:99

A specific offering of a challenge template with its own schedule, location, and capacity.

Remarks

Maps to the SQL challenge_instances table. A single Challenge can have many instances -- for example, a pottery class offered on different days or at different venues. Each instance independently tracks difficulty, seats, and provisions.

Example

ts
const instance: ChallengeInstance = {
  id: 'inst-001',
  createdAt: '2025-06-01T00:00:00Z',
  updatedAt: '2025-06-01T00:00:00Z',
  challengeId: 'ch-042',
  difficulty: 'beginner',
  disabilityFriendly: true,
  consentRequired: false,
  status: 'active',
  totalSeats: 12,
  city: 'Portland',
  state: 'OR',
}

Extends

Properties

affiliateUrl?

optional affiliateUrl: string

Defined in: types/challenge.types.ts:104

Affiliate tracking URL for this specific instance


apartmentNo?

optional apartmentNo: string

Defined in: types/challenge.types.ts:147


availableDates?

optional availableDates: string[]

Defined in: types/challenge.types.ts:139

Specific ISO date strings when this instance is available


challengeId

challengeId: string

Defined in: types/challenge.types.ts:101

Parent challenge template this instance belongs to


city?

optional city: string

Defined in: types/challenge.types.ts:143


consentRequired

consentRequired: boolean

Defined in: types/challenge.types.ts:128

Whether parental/guardian consent is required to participate


country?

optional country: string

Defined in: types/challenge.types.ts:146


createdAt

createdAt: string

Defined in: types/common.types.ts:154

ISO 8601 datetime when the entity was created

Inherited from

BaseEntity.createdAt


customerProvisions?

optional customerProvisions: Record<string, unknown>

Defined in: types/challenge.types.ts:120

Items the customer must bring (e.g., safety gear, supplies)


difficulty

difficulty: DifficultyLevel

Defined in: types/challenge.types.ts:115


disabilityFriendly

disabilityFriendly: boolean

Defined in: types/challenge.types.ts:126

Whether the venue and activity are accessible for participants with disabilities


duration?

optional duration: number

Defined in: types/challenge.types.ts:114

Duration in minutes


equipment?

optional equipment: string

Defined in: types/challenge.types.ts:108

Equipment description the participant needs to bring


id

id: string

Defined in: types/common.types.ts:167

Inherited from

BaseEntity.id


languages?

optional languages: string[]

Defined in: types/challenge.types.ts:124

ISO language codes this instance is offered in


lat?

optional lat: number

Defined in: types/challenge.types.ts:148


level?

optional level: number

Defined in: types/challenge.types.ts:110

Minimum skill level required (numeric)


lng?

optional lng: number

Defined in: types/challenge.types.ts:149


points?

optional points: number

Defined in: types/challenge.types.ts:112

XP points awarded for completing this instance


postalCode?

optional postalCode: string

Defined in: types/challenge.types.ts:145


schedule?

optional schedule: InstanceSchedule[]

Defined in: types/challenge.types.ts:137

Recurring schedule slots for this instance


startingAt?

optional startingAt: string

Defined in: types/challenge.types.ts:132

ISO datetime when this instance starts


state?

optional state: string

Defined in: types/challenge.types.ts:144


status

status: ChallengeInstanceStatus

Defined in: types/challenge.types.ts:133


streetAddress?

optional streetAddress: string

Defined in: types/challenge.types.ts:142


totalSeats?

optional totalSeats: number

Defined in: types/challenge.types.ts:135

Maximum number of participants allowed


updatedAt

updatedAt: string

Defined in: types/common.types.ts:156

ISO 8601 datetime when the entity was last modified

Inherited from

BaseEntity.updatedAt


vendorProvisions?

optional vendorProvisions: Record<string, unknown>

Defined in: types/challenge.types.ts:118

Items the vendor will provide (e.g., materials, tools)

DoCurious Platform Documentation