@backgold/template-kit 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +12 -2
- package/dist/chunk-KOB36GSF.js +62 -0
- package/dist/constants-DvTNj4JI.d-Batjcj3Z.d.ts +38 -0
- package/dist/content-api-CYeY0vU8.d.ts +849 -0
- package/dist/contract/content-api-examples.d.ts +58 -0
- package/dist/contract/content-api-examples.js +783 -0
- package/dist/contract/content-api.d.ts +2 -0
- package/dist/contract/content-api.js +1 -0
- package/dist/contract/site-templates.d.ts +252 -0
- package/dist/contract/site-templates.js +185 -0
- package/package.json +70 -3
- package/src/components/EntryCard.astro +35 -0
- package/src/components/EventMap.astro +118 -0
- package/src/components/EventPage.astro +194 -0
- package/src/components/FieldValue.astro +41 -0
- package/src/components/LeadingHero.astro +21 -0
- package/src/components/NotFound.astro +20 -0
- package/src/components/PageSections.astro +47 -0
- package/src/components/Prose.astro +18 -0
- package/src/components/chrome/Brand.astro +54 -0
- package/src/components/chrome/ClosingCall.astro +94 -0
- package/src/components/chrome/DonateStrip.astro +61 -0
- package/src/components/chrome/FooterColumns.astro +32 -0
- package/src/components/chrome/FooterContact.astro +28 -0
- package/src/components/chrome/MenuList.astro +45 -0
- package/src/components/chrome/ModeToggle.astro +125 -0
- package/src/components/chrome/SignedInNotice.astro +53 -0
- package/src/components/chrome/SignupBand.astro +12 -0
- package/src/components/chrome/TakeoverBanner.astro +56 -0
- package/src/components/chrome/VisitorAccount.astro +82 -0
- package/src/components/entries/AuthorBox.astro +47 -0
- package/src/components/entries/EntryFields.astro +29 -0
- package/src/components/entries/EntryHeader.astro +77 -0
- package/src/components/entries/ListFrame.astro +126 -0
- package/src/components/entries/ListSearch.astro +24 -0
- package/src/components/entries/Share.astro +24 -0
- package/src/components/entries/course/classroom.astro +26 -0
- package/src/components/entries/course/lesson.astro +18 -0
- package/src/components/entries/course/section.ts +20 -0
- package/src/components/entries/course/syllabus.astro +15 -0
- package/src/components/entries/index.ts +77 -0
- package/src/components/entries/newsletter/issue.astro +41 -0
- package/src/components/entries/newsletter/list.astro +26 -0
- package/src/components/entries/podcast/episode.astro +42 -0
- package/src/components/entries/podcast/list.astro +36 -0
- package/src/components/entries/post/article.astro +31 -0
- package/src/components/entries/post/list.astro +85 -0
- package/src/components/entries/props.ts +61 -0
- package/src/components/entries/video/cards.astro +39 -0
- package/src/components/entries/video/grid.astro +15 -0
- package/src/components/entries/video/watch.astro +41 -0
- package/src/components/live/LivePage.astro +215 -0
- package/src/components/live/LocalTime.astro +29 -0
- package/src/components/sections/About/books.astro +188 -0
- package/src/components/sections/About/credentials.ts +90 -0
- package/src/components/sections/About/index.astro +57 -0
- package/src/components/sections/About/left.astro +54 -0
- package/src/components/sections/About/letter.astro +108 -0
- package/src/components/sections/About/portrait.astro +308 -0
- package/src/components/sections/Advocacy/compact.astro +14 -0
- package/src/components/sections/Advocacy/index.astro +14 -0
- package/src/components/sections/Band.astro +39 -0
- package/src/components/sections/Blog/feature.astro +176 -0
- package/src/components/sections/Blog/index.astro +37 -0
- package/src/components/sections/Blog/latest.ts +80 -0
- package/src/components/sections/Blog/list.astro +186 -0
- package/src/components/sections/Booking/index.astro +139 -0
- package/src/components/sections/Booking/list.astro +144 -0
- package/src/components/sections/Booking/types.ts +60 -0
- package/src/components/sections/Calendar/agenda.astro +14 -0
- package/src/components/sections/Calendar/index.astro +14 -0
- package/src/components/sections/CandidateRoster/ballot.astro +394 -0
- package/src/components/sections/CandidateRoster/candidates.ts +69 -0
- package/src/components/sections/CandidateRoster/compact.astro +115 -0
- package/src/components/sections/CandidateRoster/index.astro +57 -0
- package/src/components/sections/CaseStudies/beforeafter.astro +222 -0
- package/src/components/sections/CaseStudies/cases.ts +111 -0
- package/src/components/sections/CaseStudies/grid.astro +261 -0
- package/src/components/sections/CaseStudies/index.astro +333 -0
- package/src/components/sections/Classroom/CourseCard.astro +181 -0
- package/src/components/sections/Classroom/Courses.astro +88 -0
- package/src/components/sections/Classroom/classroom.ts +141 -0
- package/src/components/sections/Classroom/index.astro +20 -0
- package/src/components/sections/Classroom/list.astro +15 -0
- package/src/components/sections/Collection/compact.astro +7 -0
- package/src/components/sections/Collection/entries.ts +62 -0
- package/src/components/sections/Collection/feature.astro +180 -0
- package/src/components/sections/Collection/index.astro +46 -0
- package/src/components/sections/Collection/library.astro +271 -0
- package/src/components/sections/Collection/list.astro +7 -0
- package/src/components/sections/Collection/outline.astro +134 -0
- package/src/components/sections/Collection/shelves.astro +191 -0
- package/src/components/sections/Comparison/Unlisted.astro +6 -0
- package/src/components/sections/Comparison/cards.astro +171 -0
- package/src/components/sections/Comparison/index.astro +191 -0
- package/src/components/sections/Comparison/sides.ts +98 -0
- package/src/components/sections/Comparison/spectrum.astro +261 -0
- package/src/components/sections/ContentPost/banner.astro +152 -0
- package/src/components/sections/ContentPost/index.astro +35 -0
- package/src/components/sections/ContentPost/lesson.ts +119 -0
- package/src/components/sections/ContentPost/player.astro +254 -0
- package/src/components/sections/ContentPost/theater.astro +329 -0
- package/src/components/sections/Countdown/index.astro +53 -0
- package/src/components/sections/Course/Bar.astro +46 -0
- package/src/components/sections/Course/CourseHead.astro +123 -0
- package/src/components/sections/Course/Crumbs.astro +44 -0
- package/src/components/sections/Course/Icon.astro +29 -0
- package/src/components/sections/Course/Ring.astro +62 -0
- package/src/components/sections/Course/Syllabus.astro +146 -0
- package/src/components/sections/Course/course.ts +146 -0
- package/src/components/sections/Course/index.astro +143 -0
- package/src/components/sections/Course/outline.astro +39 -0
- package/src/components/sections/Cta/banner.astro +64 -0
- package/src/components/sections/Cta/card.astro +88 -0
- package/src/components/sections/Cta/index.astro +31 -0
- package/src/components/sections/Cta/photo.astro +114 -0
- package/src/components/sections/Cta/strip.astro +91 -0
- package/src/components/sections/Donate/index.astro +136 -0
- package/src/components/sections/Donate/story.astro +7 -0
- package/src/components/sections/Event/card.astro +14 -0
- package/src/components/sections/Event/index.astro +14 -0
- package/src/components/sections/EventsList/AgendaMonths.astro +105 -0
- package/src/components/sections/EventsList/CalendarLine.astro +23 -0
- package/src/components/sections/EventsList/EventRows.astro +196 -0
- package/src/components/sections/EventsList/LiveCounts.astro +75 -0
- package/src/components/sections/EventsList/TypeTabs.astro +53 -0
- package/src/components/sections/EventsList/agenda.astro +55 -0
- package/src/components/sections/EventsList/calendar.astro +392 -0
- package/src/components/sections/EventsList/cards.astro +186 -0
- package/src/components/sections/EventsList/cohorts.astro +205 -0
- package/src/components/sections/EventsList/compact.astro +163 -0
- package/src/components/sections/EventsList/events.ts +168 -0
- package/src/components/sections/EventsList/index.astro +46 -0
- package/src/components/sections/EventsList/map.astro +436 -0
- package/src/components/sections/EventsList/shifts.astro +355 -0
- package/src/components/sections/EventsList/week.astro +361 -0
- package/src/components/sections/Faq/Contact.astro +63 -0
- package/src/components/sections/Faq/Questions.astro +98 -0
- package/src/components/sections/Faq/cards.astro +74 -0
- package/src/components/sections/Faq/faq.ts +101 -0
- package/src/components/sections/Faq/index.astro +49 -0
- package/src/components/sections/Faq/topics.astro +178 -0
- package/src/components/sections/Financials/Foot.astro +38 -0
- package/src/components/sections/Financials/Head.astro +47 -0
- package/src/components/sections/Financials/donut.astro +197 -0
- package/src/components/sections/Financials/financials.ts +52 -0
- package/src/components/sections/Financials/index.astro +148 -0
- package/src/components/sections/Financials/table.astro +157 -0
- package/src/components/sections/FormBlock/index.astro +33 -0
- package/src/components/sections/FormBlock/wide.astro +7 -0
- package/src/components/sections/Hero/cover.astro +170 -0
- package/src/components/sections/Hero/donate.astro +209 -0
- package/src/components/sections/Hero/field.astro +390 -0
- package/src/components/sections/Hero/index.astro +52 -0
- package/src/components/sections/Hero/overlap.astro +151 -0
- package/src/components/sections/Hero/rotating.astro +30 -0
- package/src/components/sections/Hero/split.astro +96 -0
- package/src/components/sections/Hero/statement.astro +55 -0
- package/src/components/sections/Hero/video.astro +399 -0
- package/src/components/sections/Issues/checklist.astro +204 -0
- package/src/components/sections/Issues/drawer.astro +237 -0
- package/src/components/sections/Issues/index.astro +115 -0
- package/src/components/sections/Issues/issues.ts +37 -0
- package/src/components/sections/Issues/numbered.astro +79 -0
- package/src/components/sections/Issues/rows.astro +137 -0
- package/src/components/sections/Issues/steps.astro +81 -0
- package/src/components/sections/Issues/tabs.astro +322 -0
- package/src/components/sections/Leaderboard/index.astro +29 -0
- package/src/components/sections/Lesson/Door.astro +121 -0
- package/src/components/sections/Lesson/LessonBody.astro +416 -0
- package/src/components/sections/Lesson/Rail.astro +182 -0
- package/src/components/sections/Lesson/Tracker.astro +137 -0
- package/src/components/sections/Lesson/index.astro +27 -0
- package/src/components/sections/Lesson/lesson.ts +233 -0
- package/src/components/sections/Lesson/reading.astro +21 -0
- package/src/components/sections/Map/CoverageLine.astro +19 -0
- package/src/components/sections/Map/RegionMap.astro +109 -0
- package/src/components/sections/Map/bar.astro +160 -0
- package/src/components/sections/Map/index.astro +192 -0
- package/src/components/sections/Map/map.astro +275 -0
- package/src/components/sections/MediaKit/BioCard.astro +108 -0
- package/src/components/sections/MediaKit/Downloads.astro +88 -0
- package/src/components/sections/MediaKit/index.astro +183 -0
- package/src/components/sections/MediaKit/kit.ts +140 -0
- package/src/components/sections/MediaKit/press.astro +189 -0
- package/src/components/sections/MediaKit/speaker.astro +205 -0
- package/src/components/sections/Membership/Benefits.astro +42 -0
- package/src/components/sections/Membership/Check.astro +12 -0
- package/src/components/sections/Membership/Price.astro +61 -0
- package/src/components/sections/Membership/compare.astro +312 -0
- package/src/components/sections/Membership/index.astro +281 -0
- package/src/components/sections/Membership/offers.ts +169 -0
- package/src/components/sections/Membership/tiers.astro +217 -0
- package/src/components/sections/MovementMap/index.astro +50 -0
- package/src/components/sections/MovementTicker/index.astro +43 -0
- package/src/components/sections/Pathways/Doors.astro +147 -0
- package/src/components/sections/Pathways/Head.astro +37 -0
- package/src/components/sections/Pathways/index.astro +27 -0
- package/src/components/sections/Pathways/pathways.ts +100 -0
- package/src/components/sections/Pathways/quiz.astro +286 -0
- package/src/components/sections/Pathways/tabs.astro +271 -0
- package/src/components/sections/PdfEmbed/card.astro +99 -0
- package/src/components/sections/PdfEmbed/index.astro +26 -0
- package/src/components/sections/PdfEmbed/medium.astro +7 -0
- package/src/components/sections/PdfEmbed/tall.astro +7 -0
- package/src/components/sections/Petition/coverage.astro +14 -0
- package/src/components/sections/Petition/image.astro +14 -0
- package/src/components/sections/Petition/index.astro +14 -0
- package/src/components/sections/Petition/map.astro +14 -0
- package/src/components/sections/PlatformPlanks/anchors.ts +66 -0
- package/src/components/sections/PlatformPlanks/columns.astro +171 -0
- package/src/components/sections/PlatformPlanks/index.astro +56 -0
- package/src/components/sections/PlatformPlanks/longread.astro +250 -0
- package/src/components/sections/PollBlock/index.astro +30 -0
- package/src/components/sections/Portfolio/featured.astro +343 -0
- package/src/components/sections/Portfolio/index.astro +571 -0
- package/src/components/sections/Portfolio/strip.astro +173 -0
- package/src/components/sections/Portfolio/work.ts +100 -0
- package/src/components/sections/Progress/MatchClock.astro +166 -0
- package/src/components/sections/Progress/compact.astro +150 -0
- package/src/components/sections/Progress/index.astro +32 -0
- package/src/components/sections/Progress/match.astro +126 -0
- package/src/components/sections/Progress/ring.astro +179 -0
- package/src/components/sections/QuickDonate/DonateCard.astro +149 -0
- package/src/components/sections/QuickDonate/Picker.astro +95 -0
- package/src/components/sections/QuickDonate/band.astro +164 -0
- package/src/components/sections/QuickDonate/bar.astro +208 -0
- package/src/components/sections/QuickDonate/donate.ts +126 -0
- package/src/components/sections/QuickDonate/hero.astro +143 -0
- package/src/components/sections/QuickDonate/index.astro +73 -0
- package/src/components/sections/QuickDonate/jar.astro +225 -0
- package/src/components/sections/QuickDonate/ladder.astro +248 -0
- package/src/components/sections/QuoteStrip/carousel.astro +340 -0
- package/src/components/sections/QuoteStrip/index.astro +58 -0
- package/src/components/sections/QuoteStrip/logos.astro +226 -0
- package/src/components/sections/QuoteStrip/quotes.ts +61 -0
- package/src/components/sections/QuoteStrip/single.astro +92 -0
- package/src/components/sections/QuoteStrip/ticker.astro +319 -0
- package/src/components/sections/QuoteStrip/wall.astro +113 -0
- package/src/components/sections/Resources/band.astro +93 -0
- package/src/components/sections/Resources/featured.astro +239 -0
- package/src/components/sections/Resources/index.astro +225 -0
- package/src/components/sections/Resources/resources.ts +92 -0
- package/src/components/sections/SampleBallot/Position.astro +39 -0
- package/src/components/sections/SampleBallot/ballot.ts +92 -0
- package/src/components/sections/SampleBallot/cards.astro +299 -0
- package/src/components/sections/SampleBallot/index.astro +326 -0
- package/src/components/sections/SampleBallot/measures.astro +172 -0
- package/src/components/sections/Scorecard/grades.astro +141 -0
- package/src/components/sections/Scorecard/index.astro +294 -0
- package/src/components/sections/Scorecard/promise.astro +167 -0
- package/src/components/sections/Scorecard/votes.ts +83 -0
- package/src/components/sections/SectionHead.astro +31 -0
- package/src/components/sections/Services/Button.astro +24 -0
- package/src/components/sections/Services/Check.astro +12 -0
- package/src/components/sections/Services/Includes.astro +42 -0
- package/src/components/sections/Services/compare.astro +328 -0
- package/src/components/sections/Services/index.astro +187 -0
- package/src/components/sections/Services/list.astro +181 -0
- package/src/components/sections/Services/services.ts +80 -0
- package/src/components/sections/ShareKit/Actions.astro +71 -0
- package/src/components/sections/ShareKit/Buttons.astro +62 -0
- package/src/components/sections/ShareKit/compact.astro +123 -0
- package/src/components/sections/ShareKit/index.astro +160 -0
- package/src/components/sections/ShareKit/share.ts +60 -0
- package/src/components/sections/ShareKit/strip.astro +173 -0
- package/src/components/sections/SignupCapture/band.astro +7 -0
- package/src/components/sections/SignupCapture/index.astro +103 -0
- package/src/components/sections/SignupCapture/inline.astro +7 -0
- package/src/components/sections/SocialFeed/index.astro +34 -0
- package/src/components/sections/StatCards/feature.astro +143 -0
- package/src/components/sections/StatCards/index.astro +51 -0
- package/src/components/sections/StatCards/ribbon.astro +113 -0
- package/src/components/sections/StatCards/wall.astro +177 -0
- package/src/components/sections/Store/featured.astro +14 -0
- package/src/components/sections/Store/index.astro +14 -0
- package/src/components/sections/Stories/Status.astro +42 -0
- package/src/components/sections/Stories/StoryCards.astro +171 -0
- package/src/components/sections/Stories/cards.astro +42 -0
- package/src/components/sections/Stories/index.astro +238 -0
- package/src/components/sections/Stories/stories.ts +97 -0
- package/src/components/sections/Stories/timeline.astro +135 -0
- package/src/components/sections/TeamGrid/board.astro +280 -0
- package/src/components/sections/TeamGrid/index.astro +71 -0
- package/src/components/sections/TeamGrid/list.astro +306 -0
- package/src/components/sections/TeamGrid/people.ts +178 -0
- package/src/components/sections/VideoEmbed/index.astro +52 -0
- package/src/components/sections/VideoEmbed/landscape.astro +7 -0
- package/src/components/sections/VideoEmbed/portrait.astro +7 -0
- package/src/components/sections/VideoEmbed/square.astro +7 -0
- package/src/components/sections/VoterTools/DaysLeft.astro +33 -0
- package/src/components/sections/VoterTools/dates.astro +149 -0
- package/src/components/sections/VoterTools/index.astro +228 -0
- package/src/components/sections/VoterTools/polling.astro +141 -0
- package/src/components/sections/VoterTools/voter-tools.ts +70 -0
- package/src/components/sections/index.ts +370 -0
- package/src/components/sections/modules/Headed.astro +39 -0
- package/src/components/sections/modules/ModuleFrame.astro +179 -0
- package/src/components/volunteer/ShiftLive.astro +90 -0
- package/src/components/volunteer/detail.astro +247 -0
- package/src/components/volunteer/list.astro +298 -0
- package/src/components/volunteer/props.ts +21 -0
- package/src/env.d.ts +22 -0
- package/src/index.d.ts +10 -0
- package/src/index.js +64 -0
- package/src/layouts/Site.astro +371 -0
- package/src/lib/academy.ts +146 -0
- package/src/lib/brand.ts +534 -0
- package/src/lib/chrome.ts +119 -0
- package/src/lib/donate-frame.ts +64 -0
- package/src/lib/entries.ts +190 -0
- package/src/lib/env.ts +34 -0
- package/src/lib/event-map-draw.ts +91 -0
- package/src/lib/events.ts +476 -0
- package/src/lib/fonts.ts +116 -0
- package/src/lib/footer.ts +24 -0
- package/src/lib/format.ts +160 -0
- package/src/lib/geo.ts +131 -0
- package/src/lib/live.ts +54 -0
- package/src/lib/menu.ts +48 -0
- package/src/lib/petition-text.ts +29 -0
- package/src/lib/reading.ts +17 -0
- package/src/lib/regions.ts +215 -0
- package/src/lib/section.ts +94 -0
- package/src/lib/shifts.ts +186 -0
- package/src/lib/stream-time.ts +20 -0
- package/src/lib/stream.ts +141 -0
- package/src/lib/visitor.ts +54 -0
- package/src/routes/catch-all.astro +286 -0
- package/src/routes/form.astro +30 -0
- package/src/routes/live.astro +49 -0
- package/src/routes/not-found.astro +18 -0
- package/src/routes/preview.astro +60 -0
- package/src/routes/setup.astro +62 -0
- package/src/routes/volunteer-shift.astro +61 -0
- package/src/routes/volunteer.astro +37 -0
- package/src/styles/entries.css +784 -0
- package/src/styles/site.css +1839 -0
- package/src/template.ts +182 -0
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
import { B as BackgoldSurfacePath, C as ContentAccessLevel, a as BylineRoleLabel, L as LiveStreamStatus, b as SiteMenuKey, S as SiteNavItemType, c as SiteNavShowsOn, d as SiteSectionKind, e as SiteSectionRole, f as ShiftPublicState, g as ShiftPublicSubjectKind, h as SiteMode, i as ContentFieldKind } from './constants-DvTNj4JI.d-Batjcj3Z.js';
|
|
2
|
+
|
|
3
|
+
/** The legal line a partner site must show. `required` is always true. */
|
|
4
|
+
interface ContentApiLegal {
|
|
5
|
+
disclaimer: string | null;
|
|
6
|
+
required: true;
|
|
7
|
+
}
|
|
8
|
+
interface SiteResponse {
|
|
9
|
+
site: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string | null;
|
|
12
|
+
/** The site's host: its domain, or the organization's platform host for the org-host site. */
|
|
13
|
+
domain: string;
|
|
14
|
+
mode: SiteMode;
|
|
15
|
+
favicon_url: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The content of the site's `<meta name="facebook-domain-verification">`
|
|
18
|
+
* tag: the site's own value, else its organization's; null when neither
|
|
19
|
+
* has one (draw no tag).
|
|
20
|
+
*/
|
|
21
|
+
meta_domain_verification: string | null;
|
|
22
|
+
pack: string | null;
|
|
23
|
+
style: string | null;
|
|
24
|
+
/** The saved theme the site wears, resolved; null when it wears its palette. */
|
|
25
|
+
theme: SiteTheme | null;
|
|
26
|
+
brand: {
|
|
27
|
+
logo_url: string | null;
|
|
28
|
+
primary_color: string | null;
|
|
29
|
+
secondary_color: string | null;
|
|
30
|
+
accent_color: string | null;
|
|
31
|
+
palette_id: string | null;
|
|
32
|
+
};
|
|
33
|
+
social: Array<{
|
|
34
|
+
platform: string;
|
|
35
|
+
url: string;
|
|
36
|
+
}>;
|
|
37
|
+
seo: {
|
|
38
|
+
title: string | null;
|
|
39
|
+
description: string | null;
|
|
40
|
+
};
|
|
41
|
+
/** The site's header and footer as its operator set them up (its header and footer sections). */
|
|
42
|
+
chrome: SiteChromeResponse;
|
|
43
|
+
};
|
|
44
|
+
/** The site's areas in Areas-screen order (0458). */
|
|
45
|
+
areas: SiteArea[];
|
|
46
|
+
legal: ContentApiLegal;
|
|
47
|
+
version: number;
|
|
48
|
+
/** The organization's name, for the words a site draws around a members or tag rule ("Members of <org>"). */
|
|
49
|
+
org_name: string;
|
|
50
|
+
}
|
|
51
|
+
/** One link on the footer's bottom row (privacy, terms, bylaws). */
|
|
52
|
+
interface SiteChromeLink {
|
|
53
|
+
label: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The footer's closing call (its `closing` layout): a band over the columns
|
|
58
|
+
* with a headline, a line, an italic tagline, up to two buttons and a photo
|
|
59
|
+
* behind. Null unless the layout is `closing` and a headline was written.
|
|
60
|
+
*/
|
|
61
|
+
interface SiteChromeClosing {
|
|
62
|
+
headline: string;
|
|
63
|
+
body: string | null;
|
|
64
|
+
tagline: string | null;
|
|
65
|
+
image_url: string | null;
|
|
66
|
+
/** The buttons that have both a label and an address, in order. */
|
|
67
|
+
buttons: SiteChromeLink[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The header and footer as the operator set them up in BackGold. The menus
|
|
71
|
+
* they hold come from `/menus/primary`, `/menus/footer` and `/menus/utility`,
|
|
72
|
+
* the social links and the legal line from `/site`; this is the rest: each
|
|
73
|
+
* part's layout (one of SITE_CHROME_LAYOUTS, the stored choice when it is
|
|
74
|
+
* one, else the first) and the footer's own words.
|
|
75
|
+
*/
|
|
76
|
+
interface SiteChromeResponse {
|
|
77
|
+
header: {
|
|
78
|
+
layout: SiteHeaderLayout;
|
|
79
|
+
};
|
|
80
|
+
footer: {
|
|
81
|
+
layout: SiteFooterLayout;
|
|
82
|
+
/** The short line under the organization's name. */
|
|
83
|
+
blurb: string | null;
|
|
84
|
+
/** The postal address; newlines break lines. */
|
|
85
|
+
address: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* The phone line. The footer's contact email never leaves BackGold: the
|
|
88
|
+
* Content API answers with no email address at all.
|
|
89
|
+
*/
|
|
90
|
+
phone: string | null;
|
|
91
|
+
/** The bottom row's links, in order; every address safe to follow. */
|
|
92
|
+
legal_links: SiteChromeLink[];
|
|
93
|
+
/** The copyright line as written; null leaves it to the site ("© year name"). */
|
|
94
|
+
copyright: string | null;
|
|
95
|
+
closing: SiteChromeClosing | null;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** One of a site's areas: its name, and its key (the name in code, which never changes). */
|
|
99
|
+
interface SiteArea {
|
|
100
|
+
key: string;
|
|
101
|
+
name: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* One reusable section meant for an area of the page, entry or list it came
|
|
105
|
+
* with. `from` and `until` are UTC instants (null when unset): show the item
|
|
106
|
+
* between them, decided when the page is viewed. An item whose `until` has
|
|
107
|
+
* passed is never sent; one whose `from` is ahead is.
|
|
108
|
+
*/
|
|
109
|
+
interface AreaItem {
|
|
110
|
+
key: string;
|
|
111
|
+
label: string;
|
|
112
|
+
from: string | null;
|
|
113
|
+
until: string | null;
|
|
114
|
+
sections: Section[];
|
|
115
|
+
}
|
|
116
|
+
/** Every area of the site by its key, each an ordered list (empty when nothing shows there). */
|
|
117
|
+
type Areas = Record<string, AreaItem[]>;
|
|
118
|
+
/** GET /areas?holds= — the areas for a route of yours with no BackGold page, described by the modules it holds. */
|
|
119
|
+
interface AreasResponse {
|
|
120
|
+
areas: Areas;
|
|
121
|
+
}
|
|
122
|
+
/** A theme mode's five seed colours (`#rrggbb`; the four optional ones may be null). */
|
|
123
|
+
interface SiteThemeColors {
|
|
124
|
+
primary: string;
|
|
125
|
+
secondary: string | null;
|
|
126
|
+
accent: string | null;
|
|
127
|
+
bg: string | null;
|
|
128
|
+
backdrop: string | null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A theme mode's resolved palette tokens, every value a `#rrggbb` or
|
|
132
|
+
* `#rrggbbaa` hex: the values a baked page's CSS custom properties carry
|
|
133
|
+
* (`accent_text` is `--accent-text`).
|
|
134
|
+
*/
|
|
135
|
+
interface SiteThemeTokens {
|
|
136
|
+
bg: string;
|
|
137
|
+
surface: string;
|
|
138
|
+
surface_2: string;
|
|
139
|
+
ink: string;
|
|
140
|
+
muted: string;
|
|
141
|
+
faint: string;
|
|
142
|
+
line: string;
|
|
143
|
+
line_strong: string;
|
|
144
|
+
accent_1: string;
|
|
145
|
+
accent_2: string;
|
|
146
|
+
accent_text: string;
|
|
147
|
+
accent_ink: string;
|
|
148
|
+
accent_soft: string;
|
|
149
|
+
accent_line: string;
|
|
150
|
+
hero_1: string;
|
|
151
|
+
hero_2: string;
|
|
152
|
+
map_open: string;
|
|
153
|
+
map_open_h: string;
|
|
154
|
+
map_stroke: string;
|
|
155
|
+
}
|
|
156
|
+
/** One of a theme's two faces: what to name in CSS and the woff2 files to load. */
|
|
157
|
+
interface SiteThemeFont {
|
|
158
|
+
/** The family name as the face's @font-face rules declare it. */
|
|
159
|
+
family: string;
|
|
160
|
+
/** The full CSS font-family stack, fallbacks included. */
|
|
161
|
+
stack: string;
|
|
162
|
+
/** builtin: a BackGold face; fontsource: an imported family; system: no download. */
|
|
163
|
+
source: 'builtin' | 'fontsource' | 'system';
|
|
164
|
+
/** Absolute woff2 addresses by weight; empty for a system face. */
|
|
165
|
+
files: Array<{
|
|
166
|
+
weight: number;
|
|
167
|
+
url: string;
|
|
168
|
+
}>;
|
|
169
|
+
}
|
|
170
|
+
/** A saved theme, resolved: what a baked page of the site wears. */
|
|
171
|
+
interface SiteTheme {
|
|
172
|
+
id: string;
|
|
173
|
+
name: string;
|
|
174
|
+
heading_transform: 'none' | 'uppercase';
|
|
175
|
+
/** The heading weight actually used (snapped to one the face ships). */
|
|
176
|
+
heading_weight: number;
|
|
177
|
+
radius_px: number;
|
|
178
|
+
light: {
|
|
179
|
+
colors: SiteThemeColors;
|
|
180
|
+
tokens: SiteThemeTokens;
|
|
181
|
+
};
|
|
182
|
+
dark: {
|
|
183
|
+
colors: SiteThemeColors;
|
|
184
|
+
tokens: SiteThemeTokens;
|
|
185
|
+
};
|
|
186
|
+
fonts: {
|
|
187
|
+
heading: SiteThemeFont;
|
|
188
|
+
body: SiteThemeFont;
|
|
189
|
+
};
|
|
190
|
+
/** Absolute address of GET /site/theme.css: the @font-face rules and both modes' custom properties. */
|
|
191
|
+
css_url: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Where a menu item points, by kind; only the fields its kind uses are set.
|
|
195
|
+
* `content_list` carries `type_key`; `entry` carries `type_key` and
|
|
196
|
+
* `entry_slug`; `term` carries `taxonomy` (`category`, `tag`, …) and
|
|
197
|
+
* `term_slug`; `blog`, `donate`, `events`, `store` and `group` carry only
|
|
198
|
+
* `kind`.
|
|
199
|
+
*/
|
|
200
|
+
interface MenuTarget {
|
|
201
|
+
kind: SiteNavItemType;
|
|
202
|
+
page_id?: string;
|
|
203
|
+
slug?: string;
|
|
204
|
+
url?: string;
|
|
205
|
+
anchor?: string;
|
|
206
|
+
entry_slug?: string;
|
|
207
|
+
type_key?: string;
|
|
208
|
+
term_slug?: string;
|
|
209
|
+
taxonomy?: string;
|
|
210
|
+
}
|
|
211
|
+
/** One page a Shows on rule names: its id and its address on the site. */
|
|
212
|
+
interface MenuShowsOnPage {
|
|
213
|
+
id: string;
|
|
214
|
+
url: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Where the site's owner wants a link to show, as data for whoever draws the
|
|
218
|
+
* page to follow, bend or ignore: on every page; only on (or on every page
|
|
219
|
+
* but) the pages listed; or only on pages that take donations (each page
|
|
220
|
+
* response's `takes_donations`). A group, and a campaign's form under its
|
|
221
|
+
* dropdown, always read `every_page`.
|
|
222
|
+
*/
|
|
223
|
+
type MenuShowsOn = {
|
|
224
|
+
rule: Extract<SiteNavShowsOn, 'every_page' | 'donation_pages'>;
|
|
225
|
+
} | {
|
|
226
|
+
rule: Extract<SiteNavShowsOn, 'only_pages' | 'except_pages'>;
|
|
227
|
+
pages: MenuShowsOnPage[];
|
|
228
|
+
};
|
|
229
|
+
interface MenuItem {
|
|
230
|
+
id: string;
|
|
231
|
+
label: string;
|
|
232
|
+
kind: SiteNavItemType;
|
|
233
|
+
target: MenuTarget;
|
|
234
|
+
/**
|
|
235
|
+
* Resolved address; null for a group without a page of its own. A
|
|
236
|
+
* donate/events/store link is the site's own page of that kind when it holds
|
|
237
|
+
* one, else the home site's, else the organization's door.
|
|
238
|
+
*/
|
|
239
|
+
url: string | null;
|
|
240
|
+
external: boolean;
|
|
241
|
+
/** True on the one link the header draws as its button. */
|
|
242
|
+
header_button: boolean;
|
|
243
|
+
shows_on: MenuShowsOn;
|
|
244
|
+
children: MenuItem[];
|
|
245
|
+
}
|
|
246
|
+
interface MenuResponse {
|
|
247
|
+
menu: {
|
|
248
|
+
key: SiteMenuKey;
|
|
249
|
+
};
|
|
250
|
+
items: MenuItem[];
|
|
251
|
+
}
|
|
252
|
+
interface PageSummary {
|
|
253
|
+
id: string;
|
|
254
|
+
slug: string;
|
|
255
|
+
title: string | null;
|
|
256
|
+
url: string;
|
|
257
|
+
is_home: boolean;
|
|
258
|
+
published_at: string | null;
|
|
259
|
+
updated_at: string;
|
|
260
|
+
/** Whether the page holds a section that takes donations (a `donation_pages` link shows on it). */
|
|
261
|
+
takes_donations: boolean;
|
|
262
|
+
}
|
|
263
|
+
interface PagesResponse {
|
|
264
|
+
pages: PageSummary[];
|
|
265
|
+
}
|
|
266
|
+
interface PageResponse {
|
|
267
|
+
page: {
|
|
268
|
+
id: string;
|
|
269
|
+
slug: string;
|
|
270
|
+
title: string | null;
|
|
271
|
+
url: string;
|
|
272
|
+
is_home: boolean;
|
|
273
|
+
published_at: string | null;
|
|
274
|
+
/** Whether the page holds a section that takes donations (a `donation_pages` link shows on it). */
|
|
275
|
+
takes_donations: boolean;
|
|
276
|
+
meta: {
|
|
277
|
+
title: string | null;
|
|
278
|
+
description: string | null;
|
|
279
|
+
image_url: string | null;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
sections: Section[];
|
|
283
|
+
areas: Areas;
|
|
284
|
+
legal: ContentApiLegal;
|
|
285
|
+
}
|
|
286
|
+
/** A section's ground role (the §56 band vocabulary of packages/site). */
|
|
287
|
+
declare const SECTION_BANDS: readonly ["plain", "tint", "panel", "wash", "contrast"];
|
|
288
|
+
type SectionBand = (typeof SECTION_BANDS)[number];
|
|
289
|
+
/** A section's geometry. */
|
|
290
|
+
declare const SECTION_BLEEDS: readonly ["full", "contained"];
|
|
291
|
+
type SectionBleed = (typeof SECTION_BLEEDS)[number];
|
|
292
|
+
/**
|
|
293
|
+
* The layouts of the two site parts every site has (CONTRACT.md §2 Chrome,
|
|
294
|
+
* the A12 board's site parts), default first: the header (`SiteNav`, the
|
|
295
|
+
* site's header section) and the footer (`Footer`, its footer section). The
|
|
296
|
+
* choice is stored on the chrome block's `layout` and carried to a template
|
|
297
|
+
* as `/site`'s `chrome`; a template draws the ones its manifest lists and its
|
|
298
|
+
* own default for the rest, BackGold's hosted renderer draws `bar` and the
|
|
299
|
+
* three footers it has (`giving` is template-drawn: the columns with a donate
|
|
300
|
+
* strip across the top). The Above-the-footer area always draws above the
|
|
301
|
+
* footer, as board A1 draws it; no footer layout takes it in.
|
|
302
|
+
*/
|
|
303
|
+
declare const SITE_CHROME_LAYOUTS: {
|
|
304
|
+
readonly header: readonly ["bar", "centered"];
|
|
305
|
+
readonly footer: readonly ["columns", "closing", "compact", "giving"];
|
|
306
|
+
};
|
|
307
|
+
type SiteHeaderLayout = (typeof SITE_CHROME_LAYOUTS.header)[number];
|
|
308
|
+
type SiteFooterLayout = (typeof SITE_CHROME_LAYOUTS.footer)[number];
|
|
309
|
+
/**
|
|
310
|
+
* Where a section's link points. 'surface' is a surface BackGold serves itself
|
|
311
|
+
* (donate, join, store, events, …), and `path` is the path as authored. A bare
|
|
312
|
+
* surface path resolves per site (ProjectDocumentContext.surfaceUrls): the
|
|
313
|
+
* site's own page of that kind when it holds one, else the home site's, else
|
|
314
|
+
* the organization's door; `/join` is always the membership checkout. A deeper
|
|
315
|
+
* path (`/donate/give`, `/events/<slug>`) is on the org's platform host.
|
|
316
|
+
*/
|
|
317
|
+
interface SectionLinkTarget {
|
|
318
|
+
kind: 'page' | 'section' | 'external' | 'surface';
|
|
319
|
+
slug?: string;
|
|
320
|
+
anchor?: string;
|
|
321
|
+
/**
|
|
322
|
+
* An external target's address; on a page or surface link, the address as
|
|
323
|
+
* the author wrote it when that was absolute on the site's own host.
|
|
324
|
+
*/
|
|
325
|
+
url?: string;
|
|
326
|
+
surface?: BackgoldSurfacePath;
|
|
327
|
+
path?: string;
|
|
328
|
+
}
|
|
329
|
+
interface SectionLink {
|
|
330
|
+
label: string;
|
|
331
|
+
target: SectionLinkTarget;
|
|
332
|
+
url: string;
|
|
333
|
+
/** The button treatment the author picked for a link in a list (Issues: primary, outline, ghost). */
|
|
334
|
+
style?: string;
|
|
335
|
+
}
|
|
336
|
+
/** One authored choice of a section: an enum value as stored, a number or a switch. */
|
|
337
|
+
type SectionOption = string | number | boolean;
|
|
338
|
+
interface SectionMedia {
|
|
339
|
+
url: string;
|
|
340
|
+
alt?: string;
|
|
341
|
+
}
|
|
342
|
+
/** A data-bound section's rows: what the module lists, ids and public fields only. */
|
|
343
|
+
interface SectionData {
|
|
344
|
+
source: string;
|
|
345
|
+
items: unknown[];
|
|
346
|
+
/** A Petition section's petition (ProjectDocumentContext `petitions`); null
|
|
347
|
+
* when it names none that is public. On no other section. */
|
|
348
|
+
petition?: SectionPetition | null;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* The petition a Petition section frames, so a template can draw its words
|
|
352
|
+
* beside the sign sheet: never who signed. `text_html` is the petition's
|
|
353
|
+
* text as the sheet draws it (packages/site statementHtml: a <p> per
|
|
354
|
+
* paragraph, links in a new tab, everything typed escaped); '' when it has
|
|
355
|
+
* none. `signature_count` is the count when the page was read.
|
|
356
|
+
*/
|
|
357
|
+
interface SectionPetition {
|
|
358
|
+
slug: string;
|
|
359
|
+
title: string;
|
|
360
|
+
text_html: string;
|
|
361
|
+
addressed_to: string | null;
|
|
362
|
+
signature_count: number;
|
|
363
|
+
goal: number | null;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* How a compliance module renders on a partner site: the iframe of the module
|
|
367
|
+
* BackGold serves, and the loader script for a partner who lets BackGold
|
|
368
|
+
* build the frame — the script fills `data-backgold-*` containers present
|
|
369
|
+
* when it loads and sizes the frames it built. An iframe the partner places
|
|
370
|
+
* itself is never touched by the script; the partner's page sizes it from
|
|
371
|
+
* the frame's `givegold:resize` message ({ type, height }). A script-only
|
|
372
|
+
* module (Advocacy) has no iframe; `mount` is the container its script fills.
|
|
373
|
+
*/
|
|
374
|
+
interface SectionEmbed {
|
|
375
|
+
iframe: string | null;
|
|
376
|
+
script: string;
|
|
377
|
+
mount?: Record<string, string>;
|
|
378
|
+
}
|
|
379
|
+
interface Section {
|
|
380
|
+
/** The block's Puck id. */
|
|
381
|
+
id: string;
|
|
382
|
+
type: string;
|
|
383
|
+
band: SectionBand;
|
|
384
|
+
bleed: SectionBleed;
|
|
385
|
+
variant: string | null;
|
|
386
|
+
/**
|
|
387
|
+
* Authored words by key. An empty string is a word hidden on purpose; an
|
|
388
|
+
* absent key was never set, and the renderer chooses.
|
|
389
|
+
*/
|
|
390
|
+
copy: Record<string, string>;
|
|
391
|
+
media: Record<string, SectionMedia>;
|
|
392
|
+
links: SectionLink[];
|
|
393
|
+
/**
|
|
394
|
+
* The block's other authored choices (columns, counts, switches, its anchor
|
|
395
|
+
* id), as stored: never an id, a slug of an internal record, a url or a secret.
|
|
396
|
+
* projectDocument sets it on every section; a section built elsewhere may
|
|
397
|
+
* leave it out.
|
|
398
|
+
*/
|
|
399
|
+
options?: Record<string, SectionOption>;
|
|
400
|
+
data?: SectionData;
|
|
401
|
+
embed?: SectionEmbed;
|
|
402
|
+
/** Set when the block came from a synced site section placed on the page. */
|
|
403
|
+
section_ref?: {
|
|
404
|
+
key: string;
|
|
405
|
+
label: string;
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
interface SectionsResponse {
|
|
409
|
+
section: {
|
|
410
|
+
key: string;
|
|
411
|
+
label: string;
|
|
412
|
+
kind: SiteSectionKind | null;
|
|
413
|
+
role: SiteSectionRole | null;
|
|
414
|
+
};
|
|
415
|
+
sections: Section[];
|
|
416
|
+
}
|
|
417
|
+
interface ContentTypeField {
|
|
418
|
+
key: string;
|
|
419
|
+
label: string;
|
|
420
|
+
kind: ContentFieldKind;
|
|
421
|
+
required: boolean;
|
|
422
|
+
choices?: string[];
|
|
423
|
+
}
|
|
424
|
+
interface ContentTypeSummary {
|
|
425
|
+
key: string;
|
|
426
|
+
singular_label: string;
|
|
427
|
+
plural_label: string;
|
|
428
|
+
routable: boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Where the type's entries live on the site (`/<url_base>/<slug>`): the
|
|
431
|
+
* org's blog base for the three blog built-ins (post, podcast and video
|
|
432
|
+
* share it), the type's own address for any other routable type, null for
|
|
433
|
+
* a type with no pages.
|
|
434
|
+
*/
|
|
435
|
+
url_base: string | null;
|
|
436
|
+
built_in: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* The list the type's entries are listed in together with other types':
|
|
439
|
+
* `blog` for the three blog built-ins, which list together at their shared
|
|
440
|
+
* url_base; null for every other type, which lists alone.
|
|
441
|
+
*/
|
|
442
|
+
index: 'blog' | null;
|
|
443
|
+
fields: ContentTypeField[];
|
|
444
|
+
}
|
|
445
|
+
interface TypesResponse {
|
|
446
|
+
types: ContentTypeSummary[];
|
|
447
|
+
}
|
|
448
|
+
interface EntryTerm {
|
|
449
|
+
taxonomy: string;
|
|
450
|
+
slug: string;
|
|
451
|
+
label: string;
|
|
452
|
+
}
|
|
453
|
+
interface EntryAuthor {
|
|
454
|
+
slug: string;
|
|
455
|
+
display_name: string;
|
|
456
|
+
avatar_url: string | null;
|
|
457
|
+
link_url: string | null;
|
|
458
|
+
role: BylineRoleLabel;
|
|
459
|
+
}
|
|
460
|
+
interface Entry {
|
|
461
|
+
id: string;
|
|
462
|
+
slug: string;
|
|
463
|
+
type: string;
|
|
464
|
+
title: string;
|
|
465
|
+
summary: string | null;
|
|
466
|
+
url: string | null;
|
|
467
|
+
hero: {
|
|
468
|
+
url: string;
|
|
469
|
+
} | null;
|
|
470
|
+
media_url: string | null;
|
|
471
|
+
publish_at: string | null;
|
|
472
|
+
updated_at: string;
|
|
473
|
+
terms: EntryTerm[];
|
|
474
|
+
authors: EntryAuthor[];
|
|
475
|
+
/** Preview only: the entry's state ('draft' or 'published'). */
|
|
476
|
+
status?: string;
|
|
477
|
+
/**
|
|
478
|
+
* Only on a list read with `?include=fields`: the entry's field values by
|
|
479
|
+
* key, as its detail carries them (EntryDetail.fields; `{}` when the entry
|
|
480
|
+
* is locked for this reader), so a site builds an index of a type one page
|
|
481
|
+
* at a time instead of one detail read per entry. Absent on every other
|
|
482
|
+
* list read.
|
|
483
|
+
*/
|
|
484
|
+
fields?: Record<string, unknown>;
|
|
485
|
+
/**
|
|
486
|
+
* Who may open the entry (0552): its own rule, or the one it follows. Read
|
|
487
|
+
* through a course, a lesson with no rule of its own follows the course;
|
|
488
|
+
* read anywhere else, an entry with no rule of its own that sits in
|
|
489
|
+
* published courses opens for a reader who qualifies for one of them (and
|
|
490
|
+
* reports the rule that opened it, else the strictest), and any other is
|
|
491
|
+
* public.
|
|
492
|
+
*/
|
|
493
|
+
access: ContentAccessLevel;
|
|
494
|
+
/**
|
|
495
|
+
* True when this reader may not open the entry: the media (and on a detail
|
|
496
|
+
* the body and fields) are withheld and `lock` says why. A public entry is
|
|
497
|
+
* never locked, and neither is a preview.
|
|
498
|
+
*/
|
|
499
|
+
locked: boolean;
|
|
500
|
+
lock: EntryLock | null;
|
|
501
|
+
/** A video's running time in seconds, when the upload or the author said. */
|
|
502
|
+
duration_seconds: number | null;
|
|
503
|
+
/**
|
|
504
|
+
* The copies of an uploaded video (media-renditions.ts), each the media
|
|
505
|
+
* file's address with `?size=`: 720p for a narrow viewport, 1080p for a wide
|
|
506
|
+
* one; a size the source was too small for is null. Null when the entry's
|
|
507
|
+
* media is not an uploaded file, the copies are not ready, or the entry is
|
|
508
|
+
* locked for this reader. The original stays at `media_url`.
|
|
509
|
+
*/
|
|
510
|
+
renditions: EntryRenditions | null;
|
|
511
|
+
}
|
|
512
|
+
interface EntryRenditions {
|
|
513
|
+
'720': string | null;
|
|
514
|
+
'1080': string | null;
|
|
515
|
+
}
|
|
516
|
+
interface EntryDetail extends Entry {
|
|
517
|
+
/** Empty markdown when the entry is locked for this reader. */
|
|
518
|
+
body: {
|
|
519
|
+
markdown: string;
|
|
520
|
+
};
|
|
521
|
+
/** `{}` when the entry is locked for this reader. */
|
|
522
|
+
fields: Record<string, unknown>;
|
|
523
|
+
}
|
|
524
|
+
/** Why an entry is locked for this reader: the door the site draws. */
|
|
525
|
+
interface EntryLock {
|
|
526
|
+
reason: Exclude<ContentAccessLevel, 'public'>;
|
|
527
|
+
/** The tag's name when the reason is `tag`, else null. */
|
|
528
|
+
tag_label: string | null;
|
|
529
|
+
/** The org's name, for "Join <org> to watch" and "members of <org>". */
|
|
530
|
+
org_name: string;
|
|
531
|
+
}
|
|
532
|
+
interface EntriesResponse {
|
|
533
|
+
entries: Entry[];
|
|
534
|
+
next_cursor: string | null;
|
|
535
|
+
/** The areas of the type's list page. */
|
|
536
|
+
areas: Areas;
|
|
537
|
+
}
|
|
538
|
+
interface EntryResponse {
|
|
539
|
+
entry: EntryDetail;
|
|
540
|
+
areas: Areas;
|
|
541
|
+
}
|
|
542
|
+
/** The path on the site's own host that sends the visitor to the portal's door. */
|
|
543
|
+
declare const VISITOR_SIGN_IN_PATH = "/_backgold/sign-in";
|
|
544
|
+
/** The path on the site's own host the lesson page posts progress to. */
|
|
545
|
+
declare const VISITOR_PROGRESS_PATH = "/_backgold/progress";
|
|
546
|
+
interface Visitor {
|
|
547
|
+
first_name: string | null;
|
|
548
|
+
email: string;
|
|
549
|
+
/** An active membership of the site's org. */
|
|
550
|
+
member: boolean;
|
|
551
|
+
}
|
|
552
|
+
/** GET /visitor: who the token is; `visitor: null` without a valid token. */
|
|
553
|
+
interface VisitorResponse {
|
|
554
|
+
visitor: Visitor | null;
|
|
555
|
+
}
|
|
556
|
+
interface VisitorExchangeResponse {
|
|
557
|
+
token: string;
|
|
558
|
+
expires_at: string;
|
|
559
|
+
visitor: Visitor;
|
|
560
|
+
}
|
|
561
|
+
/** This visitor's place in a course; null for a reader with no visitor. */
|
|
562
|
+
interface CourseProgress {
|
|
563
|
+
/** Lessons this visitor finished. */
|
|
564
|
+
completed: number;
|
|
565
|
+
/** Lessons in the course. */
|
|
566
|
+
total: number;
|
|
567
|
+
/** Lessons this visitor can open (a members lesson counts for members only). "Finished" means completed === openable. */
|
|
568
|
+
openable: number;
|
|
569
|
+
/** Seconds left in the openable lessons not yet finished; null when no lesson carries a length. */
|
|
570
|
+
seconds_left: number | null;
|
|
571
|
+
/** The next unfinished lesson this visitor can open, or null. */
|
|
572
|
+
next_lesson_slug: string | null;
|
|
573
|
+
}
|
|
574
|
+
interface CourseSummary {
|
|
575
|
+
id: string;
|
|
576
|
+
slug: string;
|
|
577
|
+
title: string;
|
|
578
|
+
summary: string | null;
|
|
579
|
+
url: string;
|
|
580
|
+
hero: {
|
|
581
|
+
url: string;
|
|
582
|
+
} | null;
|
|
583
|
+
publish_at: string | null;
|
|
584
|
+
updated_at: string;
|
|
585
|
+
access: ContentAccessLevel;
|
|
586
|
+
locked: boolean;
|
|
587
|
+
lock: EntryLock | null;
|
|
588
|
+
lesson_count: number;
|
|
589
|
+
/** The lessons' lengths added up; null when none carries one. */
|
|
590
|
+
total_seconds: number | null;
|
|
591
|
+
progress: CourseProgress | null;
|
|
592
|
+
}
|
|
593
|
+
interface CourseLesson {
|
|
594
|
+
id: string;
|
|
595
|
+
slug: string;
|
|
596
|
+
title: string;
|
|
597
|
+
summary: string | null;
|
|
598
|
+
/** The lesson's address under its course: /<courses base>/<course>/<lesson>. */
|
|
599
|
+
url: string;
|
|
600
|
+
hero: {
|
|
601
|
+
url: string;
|
|
602
|
+
} | null;
|
|
603
|
+
duration_seconds: number | null;
|
|
604
|
+
position: number;
|
|
605
|
+
access: ContentAccessLevel;
|
|
606
|
+
locked: boolean;
|
|
607
|
+
lock: EntryLock | null;
|
|
608
|
+
/** This visitor finished it; false without a visitor. */
|
|
609
|
+
completed: boolean;
|
|
610
|
+
/** When this visitor finished it; null when they have not, or without a visitor. */
|
|
611
|
+
completed_at: string | null;
|
|
612
|
+
/** Where this visitor stopped, in seconds; null without a visitor or a saved place. */
|
|
613
|
+
position_seconds: number | null;
|
|
614
|
+
}
|
|
615
|
+
interface CourseDetail extends CourseSummary {
|
|
616
|
+
body: {
|
|
617
|
+
markdown: string;
|
|
618
|
+
};
|
|
619
|
+
lessons: CourseLesson[];
|
|
620
|
+
}
|
|
621
|
+
interface CoursesResponse {
|
|
622
|
+
courses: CourseSummary[];
|
|
623
|
+
next_cursor: string | null;
|
|
624
|
+
areas: Areas;
|
|
625
|
+
}
|
|
626
|
+
interface CourseResponse {
|
|
627
|
+
course: CourseDetail;
|
|
628
|
+
areas: Areas;
|
|
629
|
+
}
|
|
630
|
+
/** GET /courses/:slug/:lesson: the lesson as this reader may see it, in its course. */
|
|
631
|
+
interface LessonResponse {
|
|
632
|
+
/** The video entry: the teaser when locked (empty body, no media_url, `lock` set), else whole. */
|
|
633
|
+
lesson: EntryDetail;
|
|
634
|
+
course: CourseDetail;
|
|
635
|
+
previous: Pick<CourseLesson, 'slug' | 'title' | 'url'> | null;
|
|
636
|
+
next: Pick<CourseLesson, 'slug' | 'title' | 'url'> | null;
|
|
637
|
+
areas: Areas;
|
|
638
|
+
}
|
|
639
|
+
interface LessonProgressResponse {
|
|
640
|
+
progress: {
|
|
641
|
+
completed: boolean;
|
|
642
|
+
completed_at: string | null;
|
|
643
|
+
position_seconds: number | null;
|
|
644
|
+
};
|
|
645
|
+
course: CourseProgress;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* One upcoming event as an EventsList section's data row carries it (the
|
|
649
|
+
* block's row fields in CONTENT_API_BLOCKS), and as GET /events lists it.
|
|
650
|
+
* `url` and `tickets_url` are the event's own page on BackGold.
|
|
651
|
+
*/
|
|
652
|
+
interface EventsListRow {
|
|
653
|
+
id: string;
|
|
654
|
+
title: string;
|
|
655
|
+
starts_at: string;
|
|
656
|
+
ends_at: string | null;
|
|
657
|
+
/** The event's IANA zone; null when it has none. */
|
|
658
|
+
timezone: string | null;
|
|
659
|
+
location: string | null;
|
|
660
|
+
is_virtual: boolean;
|
|
661
|
+
/** The event's type key (`rally`, `convention`, `fundraiser`, `blank`). */
|
|
662
|
+
type: string | null;
|
|
663
|
+
registration_closed: boolean;
|
|
664
|
+
url: string | null;
|
|
665
|
+
/** True when the event has a live ticket type priced above zero and its registration is open. */
|
|
666
|
+
sells_tickets: boolean;
|
|
667
|
+
/** The event's own page when it sells tickets; null when it does not. */
|
|
668
|
+
tickets_url: string | null;
|
|
669
|
+
/** The event's pinned location, for a map; null when it has none (sections batch 3, 2026-10-14). */
|
|
670
|
+
lat: number | null;
|
|
671
|
+
lng: number | null;
|
|
672
|
+
}
|
|
673
|
+
/** An event type with at least one upcoming event (in a window: one event in it), and how many. */
|
|
674
|
+
interface EventTypeSummary {
|
|
675
|
+
key: string;
|
|
676
|
+
label: string;
|
|
677
|
+
upcoming: number;
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* GET /events — the org's upcoming public events, soonest first, one page at
|
|
681
|
+
* a time. `types` counts every upcoming event by type, whatever `?type=`
|
|
682
|
+
* narrowed the page to. With `?from=&to=` (a window of at most 42 days) the
|
|
683
|
+
* list is instead every public event starting inside the window, ended ones
|
|
684
|
+
* included, and `types` counts those.
|
|
685
|
+
*/
|
|
686
|
+
interface EventsResponse {
|
|
687
|
+
events: EventsListRow[];
|
|
688
|
+
types: EventTypeSummary[];
|
|
689
|
+
next_cursor: string | null;
|
|
690
|
+
}
|
|
691
|
+
/** One event's live counts: confirmed seats, and seats left (null without a capacity). */
|
|
692
|
+
interface EventLiveCounts {
|
|
693
|
+
id: string;
|
|
694
|
+
going: number;
|
|
695
|
+
seats_left: number | null;
|
|
696
|
+
}
|
|
697
|
+
/** GET /events/live?ids= — live counts for the named events; an id the site cannot read is omitted. Never versioned. */
|
|
698
|
+
interface EventsLiveResponse {
|
|
699
|
+
events: EventLiveCounts[];
|
|
700
|
+
}
|
|
701
|
+
/** What a public shift belongs to: a public event (its slug, as GET /events/:slug reads it), else `standalone` with no slug. */
|
|
702
|
+
interface ShiftSubject {
|
|
703
|
+
kind: ShiftPublicSubjectKind;
|
|
704
|
+
slug: string | null;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* One open volunteer shift as GET /shifts lists it. Counts only: who signed
|
|
708
|
+
* up is never part of the Content API. `signup_url` is the shift's signup
|
|
709
|
+
* card on BackGold (`/volunteer/<slug>` on the site's own host, or on the
|
|
710
|
+
* organization's host for a headless site): a page links there.
|
|
711
|
+
* `signup_embed` is the same card as a frame on the api origin
|
|
712
|
+
* (`/embed/shift/<org>/<slug>`), the shape a section's `embed` carries: a
|
|
713
|
+
* template frames it on its own shift page and never rebuilds the form.
|
|
714
|
+
*/
|
|
715
|
+
interface ShiftsListRow {
|
|
716
|
+
id: string;
|
|
717
|
+
slug: string;
|
|
718
|
+
title: string;
|
|
719
|
+
starts_at: string;
|
|
720
|
+
ends_at: string;
|
|
721
|
+
/** The organization's IANA zone: show the shift's times in it. */
|
|
722
|
+
timezone: string;
|
|
723
|
+
location: string | null;
|
|
724
|
+
/** The organizer's notes, plain text; null when empty. */
|
|
725
|
+
notes: string | null;
|
|
726
|
+
/** Spots on the shift; null for no limit. */
|
|
727
|
+
capacity: number | null;
|
|
728
|
+
/** Signed up, confirmed and attended: the people holding a spot. */
|
|
729
|
+
signed_up: number;
|
|
730
|
+
waitlisted: number;
|
|
731
|
+
state: ShiftPublicState;
|
|
732
|
+
subject: ShiftSubject;
|
|
733
|
+
signup_url: string;
|
|
734
|
+
signup_embed: SectionEmbed;
|
|
735
|
+
}
|
|
736
|
+
/** GET /shifts — the organization's open public shifts, soonest first, one page at a time. */
|
|
737
|
+
interface ShiftsResponse {
|
|
738
|
+
shifts: ShiftsListRow[];
|
|
739
|
+
next_cursor: string | null;
|
|
740
|
+
}
|
|
741
|
+
/** One shift's live counts and the state they make. */
|
|
742
|
+
interface ShiftLiveCounts {
|
|
743
|
+
id: string;
|
|
744
|
+
signed_up: number;
|
|
745
|
+
waitlisted: number;
|
|
746
|
+
state: ShiftPublicState;
|
|
747
|
+
}
|
|
748
|
+
/** GET /shifts/live?ids= — live counts for the named shifts; an id the site cannot read is omitted. Never versioned. */
|
|
749
|
+
interface ShiftsLiveResponse {
|
|
750
|
+
shifts: ShiftLiveCounts[];
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* The organization's YouTube stream that is on now, else its next scheduled
|
|
754
|
+
* one, as BackGold last read the connected channel's live address (every five
|
|
755
|
+
* minutes). `url` is the watch page; `embed_url` plays it in a frame. Times
|
|
756
|
+
* are ISO UTC: `scheduled_start_at` is an upcoming stream's start,
|
|
757
|
+
* `started_at` a live stream's (when YouTube gave none, when BackGold first
|
|
758
|
+
* saw it live). `channel_title` names the channel as it was connected.
|
|
759
|
+
*/
|
|
760
|
+
interface LiveStream {
|
|
761
|
+
status: LiveStreamStatus;
|
|
762
|
+
video_id: string;
|
|
763
|
+
url: string;
|
|
764
|
+
embed_url: string;
|
|
765
|
+
title: string | null;
|
|
766
|
+
thumbnail_url: string | null;
|
|
767
|
+
scheduled_start_at: string | null;
|
|
768
|
+
started_at: string | null;
|
|
769
|
+
channel_title: string | null;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* GET /live — the stream, or null when nothing is on or scheduled. A live
|
|
773
|
+
* stream beats an upcoming one; among live streams the latest start wins,
|
|
774
|
+
* among upcoming ones the soonest. Never versioned: answered with
|
|
775
|
+
* LIVE_STREAM_CACHE_CONTROL.
|
|
776
|
+
*/
|
|
777
|
+
interface LiveResponse {
|
|
778
|
+
live: LiveStream | null;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* One event by its slug, for a site that draws the event's own page at
|
|
782
|
+
* `/events/<slug>`: its list row, and what the page shows around BackGold's
|
|
783
|
+
* RSVP and tickets. Unlisted events open from their link, and ended events
|
|
784
|
+
* stay readable (their page outlives them).
|
|
785
|
+
*/
|
|
786
|
+
interface EventDetail extends EventsListRow {
|
|
787
|
+
slug: string;
|
|
788
|
+
/** Sanitized rich text (prose HTML) or plain paragraphs, as the operator wrote it; null when empty. */
|
|
789
|
+
description: string | null;
|
|
790
|
+
/** The venue's name; null when it has none. */
|
|
791
|
+
venue: string | null;
|
|
792
|
+
/** The street address on one line ("14 Rail Street, Fenwick, WM 80412"); null when it has none. */
|
|
793
|
+
address: string | null;
|
|
794
|
+
/** The cover picture's absolute address; null when it has none. */
|
|
795
|
+
image_url: string | null;
|
|
796
|
+
/** Directions to the venue (a maps link out), from the coordinates or the address; null when there is neither. */
|
|
797
|
+
directions_url: string | null;
|
|
798
|
+
/** BackGold's RSVP and tickets for the event, as a compliance section's embed. */
|
|
799
|
+
embed: SectionEmbed;
|
|
800
|
+
}
|
|
801
|
+
interface EventResponse {
|
|
802
|
+
event: EventDetail;
|
|
803
|
+
/** The areas for a route that holds an event module. */
|
|
804
|
+
areas: Areas;
|
|
805
|
+
}
|
|
806
|
+
interface TermsResponse {
|
|
807
|
+
taxonomy: {
|
|
808
|
+
key: string;
|
|
809
|
+
label: string;
|
|
810
|
+
hierarchical: boolean;
|
|
811
|
+
};
|
|
812
|
+
terms: Array<{
|
|
813
|
+
id: string;
|
|
814
|
+
slug: string;
|
|
815
|
+
label: string;
|
|
816
|
+
parent_id: string | null;
|
|
817
|
+
position: number;
|
|
818
|
+
}>;
|
|
819
|
+
}
|
|
820
|
+
/** A byline's public face; the user/contact it may stand for never leaves the server. */
|
|
821
|
+
interface Author {
|
|
822
|
+
slug: string;
|
|
823
|
+
display_name: string;
|
|
824
|
+
bio: string | null;
|
|
825
|
+
avatar_url: string | null;
|
|
826
|
+
link_url: string | null;
|
|
827
|
+
}
|
|
828
|
+
interface AuthorsResponse {
|
|
829
|
+
authors: Author[];
|
|
830
|
+
}
|
|
831
|
+
interface AuthorResponse {
|
|
832
|
+
author: Author;
|
|
833
|
+
}
|
|
834
|
+
interface RedirectsResponse {
|
|
835
|
+
redirects: Array<{
|
|
836
|
+
source: string;
|
|
837
|
+
destination: string | null;
|
|
838
|
+
status_code: number;
|
|
839
|
+
}>;
|
|
840
|
+
}
|
|
841
|
+
interface SitemapResponse {
|
|
842
|
+
urls: Array<{
|
|
843
|
+
url: string;
|
|
844
|
+
kind: 'page' | 'entry' | 'type_index';
|
|
845
|
+
updated_at: string | null;
|
|
846
|
+
}>;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export { type Areas as A, type CourseResponse as C, type EntriesResponse as E, type LessonResponse as L, type MenuResponse as M, type PageResponse as P, type RedirectsResponse as R, type SectionsResponse as S, type TermsResponse as T, type VisitorResponse as V, type AreasResponse as a, type AuthorResponse as b, type AuthorsResponse as c, type CoursesResponse as d, type EntryResponse as e, type EventResponse as f, type EventsResponse as g, type EventsLiveResponse as h, type LessonProgressResponse as i, type LiveResponse as j, type PagesResponse as k, type ShiftsResponse as l, type ShiftsLiveResponse as m, type SiteResponse as n, type SitemapResponse as o, type TypesResponse as p, type VisitorExchangeResponse as q, type CourseDetail as r, type CourseLesson as s, type CourseProgress as t, type CourseSummary as u, type EntryLock as v, VISITOR_PROGRESS_PATH as w, VISITOR_SIGN_IN_PATH as x, type Visitor as y };
|