@confed/sanity-types 0.1.0-20250811134333

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # @confed/sanity-types
2
+
3
+ A TypeScript types package for the Confederation College Sanity CMS backend. This package provides auto-generated TypeScript definitions for all Sanity schema types, ensuring type safety across your frontend applications and API integrations.
4
+
5
+ ## Quick Start
6
+
7
+ ### Installation
8
+
9
+ ```bash
10
+ npm install @confed/sanity-types
11
+ ```
12
+
13
+ ### Basic Usage
14
+
15
+ ```typescript
16
+ import type {Program, Event, Person} from '@confed/sanity-types'
17
+
18
+ // Use types in your components or API functions
19
+ const program: Program = {
20
+ _id: 'program-123',
21
+ _type: 'program',
22
+ _createdAt: '2024-01-01T00:00:00Z',
23
+ _updatedAt: '2024-01-01T00:00:00Z',
24
+ _rev: 'rev-123',
25
+ name: 'Computer Programming',
26
+ slug: {_type: 'slug', current: 'computer-programming'},
27
+ // ... other required fields
28
+ }
29
+
30
+ // Type-safe event handling
31
+ const handleEvent = (event: Event) => {
32
+ console.log(event.title) // Full IntelliSense support
33
+ console.log(event.startDate) // Type-safe date access
34
+ }
35
+ ```
36
+
37
+ ### Advanced Usage
38
+
39
+ ```typescript
40
+ // Import multiple types
41
+ import type {
42
+ Program,
43
+ School,
44
+ Campus,
45
+ Person,
46
+ SanityImageAsset,
47
+ PtBasic
48
+ } from '@confed/sanity-types'
49
+
50
+ // Use with React components
51
+ interface ProgramCardProps {
52
+ program: Program
53
+ school?: School
54
+ }
55
+
56
+ const ProgramCard: React.FC<ProgramCardProps> = ({ program, school }) => {
57
+ return (
58
+ <div>
59
+ <h2>{program.name}</h2>
60
+ {school && <p>School: {school.name}</p>}
61
+ {program.description && (
62
+ <div>{/* Portable text content */}</div>
63
+ )}
64
+ </div>
65
+ )
66
+ }
67
+
68
+ // Use with API functions
69
+ async function fetchProgram(id: string): Promise<Program | null> {
70
+ const response = await fetch(`/api/programs/${id}`)
71
+ if (!response.ok) return null
72
+ return response.json() as Promise<Program>
73
+ }
74
+ ```
75
+
76
+ ## Available Types
77
+
78
+ ### Content Types
79
+
80
+ - **`Program`** - Academic programs with details, requirements, and metadata
81
+ - **`School`** - Academic schools/departments within the college
82
+ - **`Campus`** - Physical campus locations
83
+ - **`Area`** - Areas of study or interest
84
+ - **`Person`** - Faculty, staff, and other individuals
85
+ - **`Event`** - College events, workshops, and activities
86
+ - **`NewsArticle`** - News and announcements
87
+ - **`Webpage`** - General web pages and content
88
+ - **`Testimonial`** - Student and stakeholder testimonials
89
+ - **`Credential`** - Academic credentials and certifications
90
+ - **`ProgramIntake`** - Program intake periods and delivery methods
91
+ - **`AdmissionRequirements`** - Program admission criteria
92
+ - **`Duration`** - Program duration and time requirements
93
+ - **`ProgramFile`** - Program-related documents and files
94
+
95
+ ### Navigation & Structure
96
+
97
+ - **`Menu`** - Navigation menus (header, footer, sidebar, mobile)
98
+ - **`MenuItem`** - Individual menu items with links and sub-items
99
+ - **`Link`** - Internal and external links with metadata
100
+ - **`Redirect`** - URL redirects for content migration
101
+
102
+ ### Content Blocks & Media
103
+
104
+ - **`PtBasic`** - Portable text content with rich formatting
105
+ - **`Figure`** - Images with accessibility features
106
+ - **`AccessibleImage`** - Accessible image components
107
+ - **`Button`** - Call-to-action buttons
108
+ - **`YoutubeVideo`** - Embedded YouTube videos
109
+
110
+ ### SEO & Metadata
111
+
112
+ - **`Seo`** - Search engine optimization metadata
113
+ - **`Slug`** - URL-friendly identifiers
114
+
115
+ ### Sanity System Types
116
+
117
+ - **`SanityImageAsset`** - Image assets with metadata
118
+ - **`SanityFileAsset`** - File assets
119
+ - **`SanityImageHotspot`** - Image hotspot coordinates
120
+ - **`SanityImageCrop`** - Image cropping data
121
+ - **`SanityImageMetadata`** - Image metadata including dimensions and palette
122
+ - **`Geopoint`** - Geographic coordinates
123
+ - **`MediaTag`** - Media tagging system
124
+
125
+ ## How It Works
126
+
127
+ This package uses [Sanity TypeGen](https://www.sanity.io/docs/sanity-typegen) to automatically generate TypeScript definitions from your Sanity schema. The types are generated from:
128
+
129
+ 1. **Schema definitions** (`schema.json`) - Contains all your content type schemas
130
+ 2. **GROQ queries** - Any TypeScript/JavaScript files in the `src/` directory that contain GROQ queries
131
+
132
+ ### Complete Workflow:
133
+
134
+ 1. **Schema Changes** → You modify Sanity schemas
135
+ 2. **Local Generation** → Pre-commit hook generates types automatically
136
+ 3. **Commit** → Types and schema changes committed together
137
+ 4. **CI/CD Trigger** → GitHub Actions workflow runs on push
138
+ 5. **Verification** → Types regenerated in CI for verification
139
+ 6. **Publishing** → If types changed, version bumped and published to npm
140
+ 7. **No Circular Commits** → CI never commits back to your repository
141
+
142
+ The generated types provide:
143
+
144
+ - Full type safety for all your content types
145
+ - IntelliSense and autocomplete in your IDE
146
+ - Compile-time error checking for content structure
147
+ - Reference type safety for cross-referenced documents
148
+
149
+ ## Keeping Types Up to Date
150
+
151
+ The types in this package are automatically generated and should **never be manually edited**. This project is configured with automatic type generation on every commit, so types stay current automatically.
152
+
153
+ **Current Status:** Types are regenerated on every commit via Husky pre-commit hooks, and automatically published to npm via CI/CD when changes are detected.
154
+
155
+ **Workflow:**
156
+
157
+ 1. **Local Development:** Types generated automatically before each commit
158
+ 2. **CI/CD:** Types verified and published to npm if changes detected
159
+ 3. **No Circular Commits:** CI never commits back to your repository
160
+
161
+ To keep them current:
162
+
163
+ ### 1. Generate Types After Schema Changes
164
+
165
+ Whenever you modify your Sanity schemas, regenerate the types:
166
+
167
+ ```bash
168
+ # From the root directory
169
+ npm run gen:types
170
+ ```
171
+
172
+ This command runs:
173
+
174
+ - `npm run schema:extract` - Extracts the latest schema
175
+ - `npm run typegen` - Generates TypeScript definitions
176
+
177
+ ### 2. Automatic Generation (Recommended)
178
+
179
+ Set up automatic type generation in your development workflow:
180
+
181
+ ```bash
182
+ # Watch for schema changes and regenerate types
183
+ npm run typegen -- --watch
184
+ ```
185
+
186
+ ### 3. Pre-commit Hook (Currently Active!)
187
+
188
+ This project has Husky pre-commit hooks already configured and working. The types are automatically regenerated on every commit:
189
+
190
+ ```bash
191
+ # The hook is already set up at .husky/pre-commit
192
+ # It runs: npm run gen:types
193
+
194
+ # To verify it's working, make a schema change and commit:
195
+ git add .
196
+ git commit -m "your message"
197
+ # Types will be automatically regenerated before commit
198
+ ```
199
+
200
+ **Note:** The pre-commit hook is already active in this project, so you don't need to set it up manually.
201
+
202
+ ### 4. CI/CD Integration (Automated Publishing)
203
+
204
+ This project has automated CI/CD that handles npm publishing when types change:
205
+
206
+ ```yaml
207
+ # .github/workflows/publish-types.yml
208
+ # Automatically runs on schema changes:
209
+ # - Generates types in CI for verification
210
+ # - Bumps version and publishes to npm if types changed
211
+ # - Does NOT commit back to repository (no circular commits)
212
+ ```
213
+
214
+ **Note:** The CI workflow only handles publishing to npm. Type generation and commits are handled locally via pre-commit hooks.
215
+
216
+ ## Configuration
217
+
218
+ The type generation is configured in `sanity-typegen.json` at the project root:
219
+
220
+ ```json
221
+ {
222
+ "schema": "./schema.json",
223
+ "path": ["./src/**/*.{ts,tsx,js,jsx}"],
224
+ "generates": "./packages/sanity-types/sanity.types.ts",
225
+ "overloadClientMethods": true
226
+ }
227
+ ```
228
+
229
+ ## Troubleshooting
230
+
231
+ ### Types Not Updating
232
+
233
+ - Ensure you're running `npm run gen:types` from the project root
234
+ - Check that your schema changes are saved
235
+ - Verify the `sanity-typegen.json` configuration
236
+
237
+ ### Type Errors
238
+
239
+ - Regenerate types after schema changes
240
+ - Check that your content structure matches the schema
241
+ - Ensure all required fields are provided
242
+
243
+ ### Build Issues
244
+
245
+ - Clear your TypeScript cache
246
+ - Restart your development server
247
+ - Verify the package is properly linked in your workspace
248
+
249
+ ## Contributing
250
+
251
+ 1. **Never edit `sanity.types.ts` directly** - it's auto-generated
252
+ 2. Make schema changes in the appropriate schema files
253
+ 3. Run `npm run gen:types` to update types
254
+ 4. Commit both schema changes and generated types
255
+
256
+ ## Dependencies
257
+
258
+ - `sanity` - Sanity CMS framework
259
+ - `@sanity/typegen` - Type generation tool
260
+ - `typescript` - TypeScript compiler
261
+
262
+ ## License
263
+
264
+ This package is part of the Confederation College backend project and follows the same licensing terms.
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./sanity.types";
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@confed/sanity-types",
3
+ "version": "0.1.0-20250811134333",
4
+ "private": false,
5
+ "type": "module",
6
+ "files": [
7
+ "sanity.types.ts",
8
+ "index.d.ts"
9
+ ],
10
+ "types": "index.d.ts",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ }
14
+ }
@@ -0,0 +1,1003 @@
1
+ /**
2
+ * ---------------------------------------------------------------------------------
3
+ * This file has been generated by Sanity TypeGen.
4
+ * Command: `sanity typegen generate`
5
+ *
6
+ * Any modifications made directly to this file will be overwritten the next time
7
+ * the TypeScript definitions are generated. Please make changes to the Sanity
8
+ * schema definitions and/or GROQ queries if you need to update these types.
9
+ *
10
+ * For more information on how to use Sanity TypeGen, visit the official documentation:
11
+ * https://www.sanity.io/docs/sanity-typegen
12
+ * ---------------------------------------------------------------------------------
13
+ */
14
+
15
+ // Source: schema.json
16
+ export type MenuItem = {
17
+ _type: 'menuItem'
18
+ link: Link
19
+ subItems?: Array<
20
+ {
21
+ _key: string
22
+ } & MenuItem
23
+ >
24
+ isHighlighted?: boolean
25
+ order?: number
26
+ }
27
+
28
+ export type Link = {
29
+ _type: 'link'
30
+ label: string
31
+ internalPage?:
32
+ | {
33
+ _ref: string
34
+ _type: 'reference'
35
+ _weak?: boolean
36
+ [internalGroqTypeReferenceTo]?: 'webpage'
37
+ }
38
+ | {
39
+ _ref: string
40
+ _type: 'reference'
41
+ _weak?: boolean
42
+ [internalGroqTypeReferenceTo]?: 'program'
43
+ }
44
+ | {
45
+ _ref: string
46
+ _type: 'reference'
47
+ _weak?: boolean
48
+ [internalGroqTypeReferenceTo]?: 'campus'
49
+ }
50
+ | {
51
+ _ref: string
52
+ _type: 'reference'
53
+ _weak?: boolean
54
+ [internalGroqTypeReferenceTo]?: 'school'
55
+ }
56
+ | {
57
+ _ref: string
58
+ _type: 'reference'
59
+ _weak?: boolean
60
+ [internalGroqTypeReferenceTo]?: 'person'
61
+ }
62
+ url?: string
63
+ isExternal?: boolean
64
+ icon?: string
65
+ description?: string
66
+ }
67
+
68
+ export type PtBasic = Array<
69
+ | {
70
+ children?: Array<{
71
+ marks?: Array<string>
72
+ text?: string
73
+ _type: 'span'
74
+ _key: string
75
+ }>
76
+ style?: 'normal' | 'lead' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote'
77
+ listItem?: 'bullet' | 'number'
78
+ markDefs?: Array<{
79
+ href?: string
80
+ openInNewTab?: boolean
81
+ _type: 'link'
82
+ _key: string
83
+ }>
84
+ level?: number
85
+ _type: 'block'
86
+ _key: string
87
+ }
88
+ | {
89
+ asset?: {
90
+ _ref: string
91
+ _type: 'reference'
92
+ _weak?: boolean
93
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
94
+ }
95
+ media?: unknown
96
+ hotspot?: SanityImageHotspot
97
+ crop?: SanityImageCrop
98
+ altText: string
99
+ caption?: string
100
+ _type: 'figure'
101
+ _key: string
102
+ }
103
+ | {
104
+ variant?: 'primary' | 'outlined'
105
+ text: string
106
+ link: string
107
+ _type: 'ptButton'
108
+ _key: string
109
+ }
110
+ | {
111
+ url: string
112
+ title?: string
113
+ _type: 'ptYoutubeVideo'
114
+ _key: string
115
+ }
116
+ >
117
+
118
+ export type Figure = {
119
+ _type: 'figure'
120
+ asset?: {
121
+ _ref: string
122
+ _type: 'reference'
123
+ _weak?: boolean
124
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
125
+ }
126
+ media?: unknown
127
+ hotspot?: SanityImageHotspot
128
+ crop?: SanityImageCrop
129
+ altText: string
130
+ caption?: string
131
+ }
132
+
133
+ export type Redirect = {
134
+ _id: string
135
+ _type: 'redirect'
136
+ _createdAt: string
137
+ _updatedAt: string
138
+ _rev: string
139
+ from: string
140
+ to: {
141
+ type: 'url' | 'reference'
142
+ url?: string
143
+ reference?:
144
+ | {
145
+ _ref: string
146
+ _type: 'reference'
147
+ _weak?: boolean
148
+ [internalGroqTypeReferenceTo]?: 'webpage'
149
+ }
150
+ | {
151
+ _ref: string
152
+ _type: 'reference'
153
+ _weak?: boolean
154
+ [internalGroqTypeReferenceTo]?: 'newsArticle'
155
+ }
156
+ | {
157
+ _ref: string
158
+ _type: 'reference'
159
+ _weak?: boolean
160
+ [internalGroqTypeReferenceTo]?: 'event'
161
+ }
162
+ | {
163
+ _ref: string
164
+ _type: 'reference'
165
+ _weak?: boolean
166
+ [internalGroqTypeReferenceTo]?: 'program'
167
+ }
168
+ | {
169
+ _ref: string
170
+ _type: 'reference'
171
+ _weak?: boolean
172
+ [internalGroqTypeReferenceTo]?: 'school'
173
+ }
174
+ | {
175
+ _ref: string
176
+ _type: 'reference'
177
+ _weak?: boolean
178
+ [internalGroqTypeReferenceTo]?: 'campus'
179
+ }
180
+ | {
181
+ _ref: string
182
+ _type: 'reference'
183
+ _weak?: boolean
184
+ [internalGroqTypeReferenceTo]?: 'area'
185
+ }
186
+ }
187
+ statusCode: '300' | '301' | '302' | '303' | '304' | '305' | '307'
188
+ isActive?: boolean
189
+ description?: string
190
+ createdAt?: string
191
+ }
192
+
193
+ export type Event = {
194
+ _id: string
195
+ _type: 'event'
196
+ _createdAt: string
197
+ _updatedAt: string
198
+ _rev: string
199
+ title: string
200
+ slug: Slug
201
+ mainImage?: {
202
+ asset?: {
203
+ _ref: string
204
+ _type: 'reference'
205
+ _weak?: boolean
206
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
207
+ }
208
+ media?: unknown
209
+ hotspot?: SanityImageHotspot
210
+ crop?: SanityImageCrop
211
+ altText: string
212
+ caption?: string
213
+ _type: 'accessibleImage'
214
+ }
215
+ description?: PtBasic
216
+ startDate: string
217
+ endDate: string
218
+ location?: {
219
+ name?: string
220
+ address?: string
221
+ isVirtual?: boolean
222
+ virtualUrl?: string
223
+ }
224
+ registration?: {
225
+ isRequired?: boolean
226
+ url?: string
227
+ deadline?: string
228
+ capacity?: number
229
+ }
230
+ organizer?: string
231
+ contactEmail?: string
232
+ eventType?:
233
+ | 'conference'
234
+ | 'workshop'
235
+ | 'seminar'
236
+ | 'open-house'
237
+ | 'graduation'
238
+ | 'career-fair'
239
+ | 'information-session'
240
+ | 'social-event'
241
+ | 'academic-event'
242
+ | 'other'
243
+ price?: {
244
+ isFree?: boolean
245
+ amount?: number
246
+ currency?: 'CAD' | 'USD'
247
+ }
248
+ performers?: Array<{
249
+ name?: string
250
+ role?: string
251
+ organization?: string
252
+ _key: string
253
+ }>
254
+ accessibility?: {
255
+ wheelchairAccessible?: boolean
256
+ accessibleParking?: boolean
257
+ signLanguageInterpreter?: boolean
258
+ assistiveListeningDevices?: boolean
259
+ accessibilityNotes?: string
260
+ }
261
+ eventStatus?: 'scheduled' | 'cancelled' | 'postponed' | 'rescheduled'
262
+ maxAttendeeCapacity?: number
263
+ categories: Array<'public' | 'employee' | 'students'>
264
+ isFeatured?: boolean
265
+ isPublished?: boolean
266
+ dateCreated?: string
267
+ seo?: Seo
268
+ }
269
+
270
+ export type NewsArticle = {
271
+ _id: string
272
+ _type: 'newsArticle'
273
+ _createdAt: string
274
+ _updatedAt: string
275
+ _rev: string
276
+ title: string
277
+ slug: Slug
278
+ mainImage?: {
279
+ asset?: {
280
+ _ref: string
281
+ _type: 'reference'
282
+ _weak?: boolean
283
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
284
+ }
285
+ media?: unknown
286
+ hotspot?: SanityImageHotspot
287
+ crop?: SanityImageCrop
288
+ altText: string
289
+ caption?: string
290
+ _type: 'accessibleImage'
291
+ }
292
+ body?: PtBasic
293
+ categories: Array<'media' | 'students' | 'employee'>
294
+ dateCreated?: string
295
+ seo?: Seo
296
+ }
297
+
298
+ export type Webpage = {
299
+ _id: string
300
+ _type: 'webpage'
301
+ _createdAt: string
302
+ _updatedAt: string
303
+ _rev: string
304
+ title: string
305
+ slug: Slug
306
+ body?: PtBasic
307
+ parentPage?:
308
+ | {
309
+ _ref: string
310
+ _type: 'reference'
311
+ _weak?: boolean
312
+ [internalGroqTypeReferenceTo]?: 'webpage'
313
+ }
314
+ | {
315
+ _ref: string
316
+ _type: 'reference'
317
+ _weak?: boolean
318
+ [internalGroqTypeReferenceTo]?: 'program'
319
+ }
320
+ | {
321
+ _ref: string
322
+ _type: 'reference'
323
+ _weak?: boolean
324
+ [internalGroqTypeReferenceTo]?: 'campus'
325
+ }
326
+ | {
327
+ _ref: string
328
+ _type: 'reference'
329
+ _weak?: boolean
330
+ [internalGroqTypeReferenceTo]?: 'area'
331
+ }
332
+ pageType: 'webpage' | 'department'
333
+ isPublished?: boolean
334
+ mainImage?: {
335
+ asset?: {
336
+ _ref: string
337
+ _type: 'reference'
338
+ _weak?: boolean
339
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
340
+ }
341
+ media?: unknown
342
+ hotspot?: SanityImageHotspot
343
+ crop?: SanityImageCrop
344
+ altText: string
345
+ caption?: string
346
+ _type: 'accessibleImage'
347
+ }
348
+ seo?: Seo
349
+ }
350
+
351
+ export type ProgramFile = {
352
+ _id: string
353
+ _type: 'programFile'
354
+ _createdAt: string
355
+ _updatedAt: string
356
+ _rev: string
357
+ title: string
358
+ description?: string
359
+ file: {
360
+ asset?: {
361
+ _ref: string
362
+ _type: 'reference'
363
+ _weak?: boolean
364
+ [internalGroqTypeReferenceTo]?: 'sanity.fileAsset'
365
+ }
366
+ media?: unknown
367
+ _type: 'file'
368
+ }
369
+ fileCategory:
370
+ | 'handbook'
371
+ | 'infoSheet'
372
+ | 'application'
373
+ | 'courseOutline'
374
+ | 'studentGuide'
375
+ | 'other'
376
+ isActive?: boolean
377
+ }
378
+
379
+ export type Testimonial = {
380
+ _id: string
381
+ _type: 'testimonial'
382
+ _createdAt: string
383
+ _updatedAt: string
384
+ _rev: string
385
+ authorName: string
386
+ authorTitle?: string
387
+ programs?: Array<{
388
+ _ref: string
389
+ _type: 'reference'
390
+ _weak?: boolean
391
+ _key: string
392
+ [internalGroqTypeReferenceTo]?: 'program'
393
+ }>
394
+ quote: string
395
+ body?: PtBasic
396
+ videoUrl?: string
397
+ thumbnail?: {
398
+ asset?: {
399
+ _ref: string
400
+ _type: 'reference'
401
+ _weak?: boolean
402
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
403
+ }
404
+ media?: unknown
405
+ hotspot?: SanityImageHotspot
406
+ crop?: SanityImageCrop
407
+ altText: string
408
+ caption?: string
409
+ _type: 'accessibleImage'
410
+ }
411
+ rating?: number
412
+ datePublished?: string
413
+ slug: Slug
414
+ isEnabled?: boolean
415
+ }
416
+
417
+ export type Campus = {
418
+ _id: string
419
+ _type: 'campus'
420
+ _createdAt: string
421
+ _updatedAt: string
422
+ _rev: string
423
+ title: string
424
+ slug: Slug
425
+ code: string
426
+ isEnabled?: boolean
427
+ description?: string
428
+ image?: {
429
+ asset?: {
430
+ _ref: string
431
+ _type: 'reference'
432
+ _weak?: boolean
433
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
434
+ }
435
+ media?: unknown
436
+ hotspot?: SanityImageHotspot
437
+ crop?: SanityImageCrop
438
+ altText: string
439
+ caption?: string
440
+ _type: 'accessibleImage'
441
+ }
442
+ }
443
+
444
+ export type Area = {
445
+ _id: string
446
+ _type: 'area'
447
+ _createdAt: string
448
+ _updatedAt: string
449
+ _rev: string
450
+ title: string
451
+ slug: Slug
452
+ image?: {
453
+ asset?: {
454
+ _ref: string
455
+ _type: 'reference'
456
+ _weak?: boolean
457
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
458
+ }
459
+ media?: unknown
460
+ hotspot?: SanityImageHotspot
461
+ crop?: SanityImageCrop
462
+ altText: string
463
+ caption?: string
464
+ _type: 'accessibleImage'
465
+ }
466
+ description?: string
467
+ isEnabled?: boolean
468
+ }
469
+
470
+ export type ProgramIntake = {
471
+ _id: string
472
+ _type: 'programIntake'
473
+ _createdAt: string
474
+ _updatedAt: string
475
+ _rev: string
476
+ program: {
477
+ _ref: string
478
+ _type: 'reference'
479
+ _weak?: boolean
480
+ [internalGroqTypeReferenceTo]?: 'program'
481
+ }
482
+ programCode: string
483
+ season: 'Fall' | 'Winter' | 'Spring' | 'Summer' | 'Any Time'
484
+ duration: {
485
+ _ref: string
486
+ _type: 'reference'
487
+ _weak?: boolean
488
+ [internalGroqTypeReferenceTo]?: 'duration'
489
+ }
490
+ deliveryMethod: 'In-Person' | 'Online Live' | 'Online Self-Paced' | 'Hybrid'
491
+ studyMode: 'Full-Time' | 'Part-Time'
492
+ isAccelerated?: boolean
493
+ campusAvailability?: Array<{
494
+ _ref: string
495
+ _type: 'reference'
496
+ _weak?: boolean
497
+ _key: string
498
+ [internalGroqTypeReferenceTo]?: 'campus'
499
+ }>
500
+ isInternational?: boolean
501
+ applicationMethod?: 'OCAS Application' | 'Direct Application' | 'Contact College'
502
+ coordinators?: Array<{
503
+ _ref: string
504
+ _type: 'reference'
505
+ _weak?: boolean
506
+ _key: string
507
+ [internalGroqTypeReferenceTo]?: 'person'
508
+ }>
509
+ admissionRequirements?: {
510
+ _ref: string
511
+ _type: 'reference'
512
+ _weak?: boolean
513
+ [internalGroqTypeReferenceTo]?: 'admissionRequirements'
514
+ }
515
+ notes?: string
516
+ }
517
+
518
+ export type AdmissionRequirements = {
519
+ _id: string
520
+ _type: 'admissionRequirements'
521
+ _createdAt: string
522
+ _updatedAt: string
523
+ _rev: string
524
+ program?: {
525
+ _ref: string
526
+ _type: 'reference'
527
+ _weak?: boolean
528
+ [internalGroqTypeReferenceTo]?: 'program'
529
+ }
530
+ domesticRequirements?: PtBasic
531
+ internationalRequirements?: PtBasic
532
+ alternativePathways?: PtBasic
533
+ prerequisites?: PtBasic
534
+ isEnabled?: boolean
535
+ }
536
+
537
+ export type Duration = {
538
+ _id: string
539
+ _type: 'duration'
540
+ _createdAt: string
541
+ _updatedAt: string
542
+ _rev: string
543
+ title: string
544
+ displayValue?: string
545
+ slug: Slug
546
+ minHours: number
547
+ maxHours?: number
548
+ durationType: 'exact' | 'maximum' | 'unlimited'
549
+ unit: 'hours' | 'days' | 'weeks' | 'months' | 'semesters' | 'years'
550
+ notes?: string
551
+ isEnabled?: boolean
552
+ }
553
+
554
+ export type Program = {
555
+ _id: string
556
+ _type: 'program'
557
+ _createdAt: string
558
+ _updatedAt: string
559
+ _rev: string
560
+ name: string
561
+ slug: Slug
562
+ shortLink?: string
563
+ publicStatus: 'PLANNED' | 'ACTIVE' | 'PAUSED' | 'RETIRED'
564
+ featuredImage?: {
565
+ asset?: {
566
+ _ref: string
567
+ _type: 'reference'
568
+ _weak?: boolean
569
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
570
+ }
571
+ media?: unknown
572
+ hotspot?: SanityImageHotspot
573
+ crop?: SanityImageCrop
574
+ altText: string
575
+ caption?: string
576
+ _type: 'accessibleImage'
577
+ }
578
+ school?: {
579
+ _ref: string
580
+ _type: 'reference'
581
+ _weak?: boolean
582
+ [internalGroqTypeReferenceTo]?: 'school'
583
+ }
584
+ credential?: {
585
+ _ref: string
586
+ _type: 'reference'
587
+ _weak?: boolean
588
+ [internalGroqTypeReferenceTo]?: 'credential'
589
+ }
590
+ areasOfInterest?: Array<{
591
+ _ref: string
592
+ _type: 'reference'
593
+ _weak?: boolean
594
+ _key: string
595
+ [internalGroqTypeReferenceTo]?: 'area'
596
+ }>
597
+ relatedIntakes?: Array<{
598
+ _ref: string
599
+ _type: 'reference'
600
+ _weak?: boolean
601
+ _key: string
602
+ [internalGroqTypeReferenceTo]?: 'programIntake'
603
+ }>
604
+ mcuCode?: string
605
+ apsCode?: string
606
+ cipCode?: string
607
+ pgwpAvailable?: boolean
608
+ missionStatement?: string
609
+ textOverview?: PtBasic
610
+ textHighlight?: PtBasic
611
+ textOutcomes?: PtBasic
612
+ textCandidate?: PtBasic
613
+ experientialLearning?: PtBasic
614
+ textEmployment?: PtBasic
615
+ lightcastCareerLink?: string
616
+ programNotes?: PtBasic
617
+ coordinators?: Array<{
618
+ _ref: string
619
+ _type: 'reference'
620
+ _weak?: boolean
621
+ _key: string
622
+ [internalGroqTypeReferenceTo]?: 'person'
623
+ }>
624
+ faculty?: Array<{
625
+ _ref: string
626
+ _type: 'reference'
627
+ _weak?: boolean
628
+ _key: string
629
+ [internalGroqTypeReferenceTo]?: 'person'
630
+ }>
631
+ testimonials?: Array<{
632
+ _ref: string
633
+ _type: 'reference'
634
+ _weak?: boolean
635
+ _key: string
636
+ [internalGroqTypeReferenceTo]?: 'testimonial'
637
+ }>
638
+ relatedPrograms?: Array<{
639
+ _ref: string
640
+ _type: 'reference'
641
+ _weak?: boolean
642
+ _key: string
643
+ [internalGroqTypeReferenceTo]?: 'program'
644
+ }>
645
+ files?: Array<{
646
+ _ref: string
647
+ _type: 'reference'
648
+ _weak?: boolean
649
+ _key: string
650
+ [internalGroqTypeReferenceTo]?: 'programFile'
651
+ }>
652
+ relatedMenu?: {
653
+ _ref: string
654
+ _type: 'reference'
655
+ _weak?: boolean
656
+ [internalGroqTypeReferenceTo]?: 'menu'
657
+ }
658
+ seo?: Seo
659
+ }
660
+
661
+ export type Seo = {
662
+ _type: 'seo'
663
+ title?: string
664
+ description?: string
665
+ image?: {
666
+ asset?: {
667
+ _ref: string
668
+ _type: 'reference'
669
+ _weak?: boolean
670
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
671
+ }
672
+ media?: unknown
673
+ hotspot?: SanityImageHotspot
674
+ crop?: SanityImageCrop
675
+ _type: 'image'
676
+ }
677
+ noindex?: boolean
678
+ nofollow?: boolean
679
+ }
680
+
681
+ export type Menu = {
682
+ _id: string
683
+ _type: 'menu'
684
+ _createdAt: string
685
+ _updatedAt: string
686
+ _rev: string
687
+ title: string
688
+ slug: Slug
689
+ description?: string
690
+ menuItems?: Array<
691
+ {
692
+ _key: string
693
+ } & MenuItem
694
+ >
695
+ isActive?: boolean
696
+ menuType: 'header' | 'footer' | 'sidebar' | 'mobile' | 'other'
697
+ maxDepth?: number
698
+ }
699
+
700
+ export type Credential = {
701
+ _id: string
702
+ _type: 'credential'
703
+ _createdAt: string
704
+ _updatedAt: string
705
+ _rev: string
706
+ credentialCode: string
707
+ title: string
708
+ slug: Slug
709
+ category:
710
+ | 'certificate'
711
+ | 'diploma'
712
+ | 'advancedDiploma'
713
+ | 'degree'
714
+ | 'microCredential'
715
+ | 'recognition'
716
+ | 'externalCertification'
717
+ description?: string
718
+ isEnabled?: boolean
719
+ }
720
+
721
+ export type School = {
722
+ _id: string
723
+ _type: 'school'
724
+ _createdAt: string
725
+ _updatedAt: string
726
+ _rev: string
727
+ name: string
728
+ bannerName?: string
729
+ slug: Slug
730
+ description?: string
731
+ dean?: {
732
+ _ref: string
733
+ _type: 'reference'
734
+ _weak?: boolean
735
+ [internalGroqTypeReferenceTo]?: 'person'
736
+ }
737
+ schoolCode?: string
738
+ image?: {
739
+ asset?: {
740
+ _ref: string
741
+ _type: 'reference'
742
+ _weak?: boolean
743
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
744
+ }
745
+ media?: unknown
746
+ hotspot?: SanityImageHotspot
747
+ crop?: SanityImageCrop
748
+ altText: string
749
+ caption?: string
750
+ _type: 'accessibleImage'
751
+ }
752
+ programs?: Array<{
753
+ _ref: string
754
+ _type: 'reference'
755
+ _weak?: boolean
756
+ _key: string
757
+ [internalGroqTypeReferenceTo]?: 'program'
758
+ }>
759
+ }
760
+
761
+ export type Person = {
762
+ _id: string
763
+ _type: 'person'
764
+ _createdAt: string
765
+ _updatedAt: string
766
+ _rev: string
767
+ honorificPrefix?: string
768
+ firstName: string
769
+ lastName: string
770
+ suffixes?: Array<string>
771
+ slug: Slug
772
+ jobTitle?: string
773
+ image?: {
774
+ asset?: {
775
+ _ref: string
776
+ _type: 'reference'
777
+ _weak?: boolean
778
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
779
+ }
780
+ media?: unknown
781
+ hotspot?: SanityImageHotspot
782
+ crop?: SanityImageCrop
783
+ altText: string
784
+ caption?: string
785
+ _type: 'accessibleImage'
786
+ }
787
+ email?: string
788
+ phone?: string
789
+ socialLinks?: Array<{
790
+ platform?: string
791
+ url?: string
792
+ _key: string
793
+ }>
794
+ siteRoles?: Array<'faculty' | 'staff' | 'recruitment' | 'testimonial' | 'dean'>
795
+ affiliations?: Array<{
796
+ program?: {
797
+ _ref: string
798
+ _type: 'reference'
799
+ _weak?: boolean
800
+ [internalGroqTypeReferenceTo]?: 'program'
801
+ }
802
+ role?: 'coordinator' | 'instructor' | 'advisor' | 'faculty'
803
+ _key: string
804
+ }>
805
+ bio?: Array<{
806
+ children?: Array<{
807
+ marks?: Array<string>
808
+ text?: string
809
+ _type: 'span'
810
+ _key: string
811
+ }>
812
+ style?: 'normal' | 'h2' | 'h3' | 'h4'
813
+ listItem?: 'bullet' | 'number'
814
+ markDefs?: Array<{
815
+ href?: string
816
+ _type: 'link'
817
+ _key: string
818
+ }>
819
+ level?: number
820
+ _type: 'block'
821
+ _key: string
822
+ }>
823
+ isEnabled?: boolean
824
+ }
825
+
826
+ export type AccessibleImage = {
827
+ _type: 'accessibleImage'
828
+ asset?: {
829
+ _ref: string
830
+ _type: 'reference'
831
+ _weak?: boolean
832
+ [internalGroqTypeReferenceTo]?: 'sanity.imageAsset'
833
+ }
834
+ media?: unknown
835
+ hotspot?: SanityImageHotspot
836
+ crop?: SanityImageCrop
837
+ altText: string
838
+ caption?: string
839
+ }
840
+
841
+ export type MediaTag = {
842
+ _id: string
843
+ _type: 'media.tag'
844
+ _createdAt: string
845
+ _updatedAt: string
846
+ _rev: string
847
+ name?: Slug
848
+ }
849
+
850
+ export type SanityImagePaletteSwatch = {
851
+ _type: 'sanity.imagePaletteSwatch'
852
+ background?: string
853
+ foreground?: string
854
+ population?: number
855
+ title?: string
856
+ }
857
+
858
+ export type SanityImagePalette = {
859
+ _type: 'sanity.imagePalette'
860
+ darkMuted?: SanityImagePaletteSwatch
861
+ lightVibrant?: SanityImagePaletteSwatch
862
+ darkVibrant?: SanityImagePaletteSwatch
863
+ vibrant?: SanityImagePaletteSwatch
864
+ dominant?: SanityImagePaletteSwatch
865
+ lightMuted?: SanityImagePaletteSwatch
866
+ muted?: SanityImagePaletteSwatch
867
+ }
868
+
869
+ export type SanityImageDimensions = {
870
+ _type: 'sanity.imageDimensions'
871
+ height?: number
872
+ width?: number
873
+ aspectRatio?: number
874
+ }
875
+
876
+ export type SanityImageHotspot = {
877
+ _type: 'sanity.imageHotspot'
878
+ x?: number
879
+ y?: number
880
+ height?: number
881
+ width?: number
882
+ }
883
+
884
+ export type SanityImageCrop = {
885
+ _type: 'sanity.imageCrop'
886
+ top?: number
887
+ bottom?: number
888
+ left?: number
889
+ right?: number
890
+ }
891
+
892
+ export type SanityFileAsset = {
893
+ _id: string
894
+ _type: 'sanity.fileAsset'
895
+ _createdAt: string
896
+ _updatedAt: string
897
+ _rev: string
898
+ originalFilename?: string
899
+ label?: string
900
+ title?: string
901
+ description?: string
902
+ altText?: string
903
+ sha1hash?: string
904
+ extension?: string
905
+ mimeType?: string
906
+ size?: number
907
+ assetId?: string
908
+ uploadId?: string
909
+ path?: string
910
+ url?: string
911
+ source?: SanityAssetSourceData
912
+ }
913
+
914
+ export type SanityImageAsset = {
915
+ _id: string
916
+ _type: 'sanity.imageAsset'
917
+ _createdAt: string
918
+ _updatedAt: string
919
+ _rev: string
920
+ originalFilename?: string
921
+ label?: string
922
+ title?: string
923
+ description?: string
924
+ altText?: string
925
+ sha1hash?: string
926
+ extension?: string
927
+ mimeType?: string
928
+ size?: number
929
+ assetId?: string
930
+ uploadId?: string
931
+ path?: string
932
+ url?: string
933
+ metadata?: SanityImageMetadata
934
+ source?: SanityAssetSourceData
935
+ }
936
+
937
+ export type SanityImageMetadata = {
938
+ _type: 'sanity.imageMetadata'
939
+ location?: Geopoint
940
+ dimensions?: SanityImageDimensions
941
+ palette?: SanityImagePalette
942
+ lqip?: string
943
+ blurHash?: string
944
+ hasAlpha?: boolean
945
+ isOpaque?: boolean
946
+ }
947
+
948
+ export type Geopoint = {
949
+ _type: 'geopoint'
950
+ lat?: number
951
+ lng?: number
952
+ alt?: number
953
+ }
954
+
955
+ export type Slug = {
956
+ _type: 'slug'
957
+ current: string
958
+ source?: string
959
+ }
960
+
961
+ export type SanityAssetSourceData = {
962
+ _type: 'sanity.assetSourceData'
963
+ name?: string
964
+ id?: string
965
+ url?: string
966
+ }
967
+
968
+ export type AllSanitySchemaTypes =
969
+ | MenuItem
970
+ | Link
971
+ | PtBasic
972
+ | Figure
973
+ | Redirect
974
+ | Event
975
+ | NewsArticle
976
+ | Webpage
977
+ | ProgramFile
978
+ | Testimonial
979
+ | Campus
980
+ | Area
981
+ | ProgramIntake
982
+ | AdmissionRequirements
983
+ | Duration
984
+ | Program
985
+ | Seo
986
+ | Menu
987
+ | Credential
988
+ | School
989
+ | Person
990
+ | AccessibleImage
991
+ | MediaTag
992
+ | SanityImagePaletteSwatch
993
+ | SanityImagePalette
994
+ | SanityImageDimensions
995
+ | SanityImageHotspot
996
+ | SanityImageCrop
997
+ | SanityFileAsset
998
+ | SanityImageAsset
999
+ | SanityImageMetadata
1000
+ | Geopoint
1001
+ | Slug
1002
+ | SanityAssetSourceData
1003
+ export declare const internalGroqTypeReferenceTo: unique symbol