@backgold/template-kit 0.0.0-stage → 0.1.1
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-RJAVFRC6.js +67 -0
- package/dist/constants-BAIo_Q5U.d-lQbj1e1-.d.ts +48 -0
- package/dist/content-api-Cox1-wz5.d.ts +1096 -0
- package/dist/contract/content-api-examples.d.ts +72 -0
- package/dist/contract/content-api-examples.js +926 -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 +253 -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 +61 -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 +80 -0
- package/src/components/sections/About/index.astro +60 -0
- package/src/components/sections/About/left.astro +57 -0
- package/src/components/sections/About/letter.astro +111 -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 +126 -0
- package/src/components/sections/ContentPost/player.astro +254 -0
- package/src/components/sections/ContentPost/prose.astro +80 -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 +176 -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 +99 -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/Lookup.astro +43 -0
- package/src/components/sections/VoterTools/dates.astro +153 -0
- package/src/components/sections/VoterTools/index.astro +231 -0
- package/src/components/sections/VoterTools/polling.astro +144 -0
- package/src/components/sections/VoterTools/voter-tools.ts +71 -0
- package/src/components/sections/index.ts +373 -0
- package/src/components/sections/modules/Headed.astro +39 -0
- package/src/components/sections/modules/ModuleFrame.astro +181 -0
- package/src/components/store/CollectionPage.astro +40 -0
- package/src/components/store/ProductCard.astro +32 -0
- package/src/components/store/ProductGrid.astro +16 -0
- package/src/components/store/ProductPage.astro +146 -0
- package/src/components/store/StorePage.astro +137 -0
- package/src/components/store/StoreScript.astro +572 -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 +63 -0
- package/src/layouts/Site.astro +387 -0
- package/src/lib/academy.ts +146 -0
- package/src/lib/brand.ts +534 -0
- package/src/lib/chrome.ts +121 -0
- package/src/lib/donate-frame.ts +104 -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 +55 -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 +105 -0
- package/src/lib/shifts.ts +187 -0
- package/src/lib/store.ts +521 -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 +435 -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/styles/entries.css +784 -0
- package/src/styles/site.css +1910 -0
- package/src/styles/store.css +634 -0
- package/src/template.ts +182 -0
|
@@ -0,0 +1,1096 @@
|
|
|
1
|
+
import { B as BackgoldSurfacePath, P as ProductAvailability, C as ContentAccessLevel, a as BylineRoleLabel, L as LiveStreamStatus, b as SiteMenuKey, S as SiteNavItemType, c as SiteNavShowsOn, d as ProductShipTo, e as StoreAttributeKind, I as ItemQuestionScope, f as SiteSectionKind, g as SiteSectionRole, h as ShiftPublicState, i as ShiftPublicSubjectKind, j as SiteMode, k as SitemapUrlKind, l as ContentFieldKind } from './constants-BAIo_Q5U.d-lQbj1e1-.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
|
+
/** One of a listing's photos, as the public photo route serves it. */
|
|
702
|
+
interface ProductPhoto {
|
|
703
|
+
url: string;
|
|
704
|
+
}
|
|
705
|
+
/** A tag on a listing: the term's taxonomy, slug and label. */
|
|
706
|
+
type ProductTerm = EntryTerm;
|
|
707
|
+
/**
|
|
708
|
+
* A node of a listing's department path (root first). `category_page` is
|
|
709
|
+
* false when the department's storefront page is switched off: GET /products
|
|
710
|
+
* does not list it and `?department=<its slug>` answers no listings, so a site
|
|
711
|
+
* names it without linking it.
|
|
712
|
+
*/
|
|
713
|
+
interface ProductDepartmentTerm extends EntryTerm {
|
|
714
|
+
category_page: boolean;
|
|
715
|
+
}
|
|
716
|
+
/** A collection a listing is in, as its page is addressed. */
|
|
717
|
+
interface ProductCollectionRef {
|
|
718
|
+
slug: string;
|
|
719
|
+
title: string;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* One sellable unit of a listing (ruling 2: every unit is an item with its
|
|
723
|
+
* own SKU, UPC and stock). `availability` is the word, never a count. The
|
|
724
|
+
* price is the one built; the island's live read wins when it differs.
|
|
725
|
+
*/
|
|
726
|
+
interface ProductItem {
|
|
727
|
+
id: string;
|
|
728
|
+
name: string;
|
|
729
|
+
sku: string | null;
|
|
730
|
+
/** The GTIN the structured data carries. */
|
|
731
|
+
upc: string | null;
|
|
732
|
+
price_cents: number;
|
|
733
|
+
compare_at_cents: number | null;
|
|
734
|
+
availability: ProductAvailability;
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* One listing as GET /products lists it and as a collection's grid carries
|
|
738
|
+
* it. `url` is the listing's page on the site (`/store/<slug>`), the one the
|
|
739
|
+
* site builds; `buy_url` is the page on BackGold where the cart and checkout
|
|
740
|
+
* live, for a site that builds no island.
|
|
741
|
+
*/
|
|
742
|
+
interface ProductSummary {
|
|
743
|
+
id: string;
|
|
744
|
+
slug: string;
|
|
745
|
+
name: string;
|
|
746
|
+
/** The grid copy, plain text; null when the listing has none. */
|
|
747
|
+
short_description: string | null;
|
|
748
|
+
url: string;
|
|
749
|
+
buy_url: string;
|
|
750
|
+
photos: ProductPhoto[];
|
|
751
|
+
/** The least and greatest item prices; equal for a single-item listing. */
|
|
752
|
+
price_from_cents: number;
|
|
753
|
+
price_to_cents: number;
|
|
754
|
+
/** The best word across the listing's items: in_stock if any item is, else low, preorder, out. */
|
|
755
|
+
availability: ProductAvailability;
|
|
756
|
+
/** The department path, root first; empty for an unclassified listing. */
|
|
757
|
+
department: ProductDepartmentTerm[];
|
|
758
|
+
tags: ProductTerm[];
|
|
759
|
+
collections: ProductCollectionRef[];
|
|
760
|
+
/** `service` for an offering with nothing to ship; null otherwise. */
|
|
761
|
+
offering_kind: string | null;
|
|
762
|
+
/** True when buying the listing ships something (a physical item that is not a service). */
|
|
763
|
+
ships: boolean;
|
|
764
|
+
/**
|
|
765
|
+
* True when buying the listing is a political contribution: its compliance
|
|
766
|
+
* treatment is full_price (the whole price) or above_cost (the markup over
|
|
767
|
+
* cost). False for commercial and for a listing with no treatment chosen.
|
|
768
|
+
* A site says so before the buyer adds it to the cart, and the shop page
|
|
769
|
+
* when any listing on it does.
|
|
770
|
+
*/
|
|
771
|
+
counts_as_contribution: boolean;
|
|
772
|
+
updated_at: string;
|
|
773
|
+
}
|
|
774
|
+
/** One attribute the listing's department asks for, with the listing's value. */
|
|
775
|
+
interface ProductAttribute {
|
|
776
|
+
key: string;
|
|
777
|
+
label: string;
|
|
778
|
+
kind: StoreAttributeKind;
|
|
779
|
+
value: string | string[] | boolean | null;
|
|
780
|
+
}
|
|
781
|
+
/** The listing's SEO fields; each falls back to the listing's own name, short copy and first photo. */
|
|
782
|
+
interface ProductSeo {
|
|
783
|
+
title: string;
|
|
784
|
+
description: string | null;
|
|
785
|
+
image_url: string | null;
|
|
786
|
+
}
|
|
787
|
+
/** GET /products/:slug — the listing for its own page. */
|
|
788
|
+
interface ProductDetail extends ProductSummary {
|
|
789
|
+
/** The long copy as sanitized HTML; empty when the listing has none. */
|
|
790
|
+
description_html: string;
|
|
791
|
+
/** The listing's manufacturer (an archived one still names it); null when it has none. */
|
|
792
|
+
manufacturer: {
|
|
793
|
+
name: string;
|
|
794
|
+
} | null;
|
|
795
|
+
/**
|
|
796
|
+
* Where the order goes: `buyer` (ships to the buyer, or nothing to ship),
|
|
797
|
+
* `store` (picked up at the store), `third_party` (ships to a licensed
|
|
798
|
+
* dealer the buyer names at checkout). One value, never a choice.
|
|
799
|
+
*/
|
|
800
|
+
ship_to: ProductShipTo;
|
|
801
|
+
items: ProductItem[];
|
|
802
|
+
attributes: ProductAttribute[];
|
|
803
|
+
seo: ProductSeo;
|
|
804
|
+
/** A schema.org Product (with its offers), ready to serialize into the page. */
|
|
805
|
+
structured_data: Record<string, unknown>;
|
|
806
|
+
/** Other listings from the same collections, at most eight. */
|
|
807
|
+
related: ProductSummary[];
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* A department node with its published-listing count, for the storefront's
|
|
811
|
+
* rail. Only departments whose storefront page is on are listed; `parent_id`
|
|
812
|
+
* names the nearest listed ancestor (null for none), so a node under a
|
|
813
|
+
* department whose page is off hangs from the department above that one.
|
|
814
|
+
*/
|
|
815
|
+
interface ProductDepartment {
|
|
816
|
+
id: string;
|
|
817
|
+
slug: string;
|
|
818
|
+
label: string;
|
|
819
|
+
parent_id: string | null;
|
|
820
|
+
position: number;
|
|
821
|
+
/** Published listings in this node and its descendants. */
|
|
822
|
+
count: number;
|
|
823
|
+
}
|
|
824
|
+
/** One value a facet offers, with the listings in scope that have it. */
|
|
825
|
+
interface ProductFacetValue {
|
|
826
|
+
/** The value as `?attr=<key>:<value>` names it: a choice's text, a number's decimal form, `true` or `false`. */
|
|
827
|
+
value: string;
|
|
828
|
+
/** Published listings in the page's scope with this value that match every other key's `?attr=` filter. */
|
|
829
|
+
count: number;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* One filterable attribute on the department's path, for the storefront's
|
|
833
|
+
* filter panel. Its values are counted under every OTHER key's `?attr=`
|
|
834
|
+
* filter and never its own, so a chosen value's siblings keep their counts.
|
|
835
|
+
* Values run by count, most first, then by text; at most
|
|
836
|
+
* PRODUCT_FACET_VALUES_MAX of them.
|
|
837
|
+
*/
|
|
838
|
+
interface ProductFacet {
|
|
839
|
+
key: string;
|
|
840
|
+
label: string;
|
|
841
|
+
kind: StoreAttributeKind;
|
|
842
|
+
values: ProductFacetValue[];
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* GET /products — the published listings, newest first, one page at a time,
|
|
846
|
+
* with the department tree and the published collections the storefront's
|
|
847
|
+
* rail and bands draw from. `?department=<slug>` narrows to a node and its
|
|
848
|
+
* descendants; `?collection=<slug>` to a collection's members in its order;
|
|
849
|
+
* `?attr=<key>:<value>` (repeatable) to listings with that filterable
|
|
850
|
+
* attribute value — every key named must match, and a key named more than
|
|
851
|
+
* once matches any of its values (`attr=color:red&attr=color:blue&attr=size:m`
|
|
852
|
+
* is red or blue, and size m).
|
|
853
|
+
*
|
|
854
|
+
* `facets` answers a department page: with `?department=` naming a
|
|
855
|
+
* department whose storefront page is on, one facet per filterable attribute
|
|
856
|
+
* definition on its path, root first and each node's by position (a node
|
|
857
|
+
* below redefining a key wins, and may turn its filtering off). A facet's
|
|
858
|
+
* counts cover the department and every node under it, the collection when
|
|
859
|
+
* `?collection=` names one, and every other key's `?attr=` filter; a facet
|
|
860
|
+
* with no values is left out. Every page of a cursor carries the same
|
|
861
|
+
* facets: they are the scope's, not the page's. Empty without
|
|
862
|
+
* `?department=`.
|
|
863
|
+
*/
|
|
864
|
+
interface ProductsResponse {
|
|
865
|
+
products: ProductSummary[];
|
|
866
|
+
departments: ProductDepartment[];
|
|
867
|
+
collections: CollectionSummary[];
|
|
868
|
+
facets: ProductFacet[];
|
|
869
|
+
next_cursor: string | null;
|
|
870
|
+
}
|
|
871
|
+
/** An attribute key as `?attr=` names it: a department attribute definition's key. */
|
|
872
|
+
declare const PRODUCT_ATTR_KEY_PATTERN: RegExp;
|
|
873
|
+
/** The longest value one `?attr=` may name. */
|
|
874
|
+
declare const PRODUCT_ATTR_VALUE_MAX = 200;
|
|
875
|
+
/** The most `?attr=` parameters one GET /products takes. */
|
|
876
|
+
declare const PRODUCT_ATTR_FILTERS_MAX = 20;
|
|
877
|
+
interface ProductResponse {
|
|
878
|
+
product: ProductDetail;
|
|
879
|
+
areas: Areas;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* One checkout question an item asks (products.questions_json), in the form
|
|
883
|
+
* vocabulary the island renders with: the field's label, type and choices,
|
|
884
|
+
* and whether it is asked once per order or once per unit in the line.
|
|
885
|
+
*/
|
|
886
|
+
interface ProductQuestion {
|
|
887
|
+
label: string;
|
|
888
|
+
type: string;
|
|
889
|
+
required: boolean;
|
|
890
|
+
options: string[] | null;
|
|
891
|
+
placeholder: string | null;
|
|
892
|
+
help: string | null;
|
|
893
|
+
/** A `note` question's text, plain (the island escapes it and splits it into paragraphs); null for every other type. */
|
|
894
|
+
body: string | null;
|
|
895
|
+
/** True when a choice question (select, radio, checkboxes) takes a write-in; false otherwise. */
|
|
896
|
+
allow_other: boolean;
|
|
897
|
+
scope: ItemQuestionScope;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* One listing's live read: each item's price, compare-at price and
|
|
901
|
+
* availability now, and the questions its line asks.
|
|
902
|
+
*/
|
|
903
|
+
interface ProductLive {
|
|
904
|
+
id: string;
|
|
905
|
+
items: Array<{
|
|
906
|
+
id: string;
|
|
907
|
+
price_cents: number;
|
|
908
|
+
compare_at_cents: number | null;
|
|
909
|
+
availability: ProductAvailability;
|
|
910
|
+
}>;
|
|
911
|
+
questions: ProductQuestion[];
|
|
912
|
+
}
|
|
913
|
+
/** GET /products/live?ids= — live price, availability and questions for the named listings; an id the site cannot read is omitted. Never versioned. */
|
|
914
|
+
interface ProductsLiveResponse {
|
|
915
|
+
products: ProductLive[];
|
|
916
|
+
}
|
|
917
|
+
/** One collection as GET /collections lists it and as a product's band carries it. */
|
|
918
|
+
interface CollectionSummary {
|
|
919
|
+
id: string;
|
|
920
|
+
slug: string;
|
|
921
|
+
title: string;
|
|
922
|
+
/** The intro line, plain text; null when the entry has none. */
|
|
923
|
+
intro: string | null;
|
|
924
|
+
/** The collection's page on the site (`/collections/<slug>`). */
|
|
925
|
+
url: string;
|
|
926
|
+
cover: {
|
|
927
|
+
url: string;
|
|
928
|
+
} | null;
|
|
929
|
+
/** Published listings in the collection. */
|
|
930
|
+
count: number;
|
|
931
|
+
updated_at: string;
|
|
932
|
+
}
|
|
933
|
+
/** GET /collections/:slug — the collection for its own page: the entry's body and the ordered grid. */
|
|
934
|
+
interface CollectionDetail extends CollectionSummary {
|
|
935
|
+
body: {
|
|
936
|
+
markdown: string;
|
|
937
|
+
};
|
|
938
|
+
products: ProductSummary[];
|
|
939
|
+
}
|
|
940
|
+
interface CollectionsResponse {
|
|
941
|
+
collections: CollectionSummary[];
|
|
942
|
+
next_cursor: string | null;
|
|
943
|
+
}
|
|
944
|
+
interface CollectionResponse {
|
|
945
|
+
collection: CollectionDetail;
|
|
946
|
+
areas: Areas;
|
|
947
|
+
}
|
|
948
|
+
/** What a public shift belongs to: a public event (its slug, as GET /events/:slug reads it), else `standalone` with no slug. */
|
|
949
|
+
interface ShiftSubject {
|
|
950
|
+
kind: ShiftPublicSubjectKind;
|
|
951
|
+
slug: string | null;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* One open volunteer shift as GET /shifts lists it. Counts only: who signed
|
|
955
|
+
* up is never part of the Content API. `signup_url` is the shift's signup
|
|
956
|
+
* card on BackGold (`/volunteer/<slug>` on the site's own host, or on the
|
|
957
|
+
* organization's host for a headless site): a page links there.
|
|
958
|
+
* `signup_embed` is the same card as a frame on the api origin
|
|
959
|
+
* (`/embed/shift/<org>/<slug>`), the shape a section's `embed` carries: a
|
|
960
|
+
* template frames it on its own shift page and never rebuilds the form.
|
|
961
|
+
*/
|
|
962
|
+
interface ShiftsListRow {
|
|
963
|
+
id: string;
|
|
964
|
+
slug: string;
|
|
965
|
+
title: string;
|
|
966
|
+
starts_at: string;
|
|
967
|
+
ends_at: string;
|
|
968
|
+
/** The organization's IANA zone: show the shift's times in it. */
|
|
969
|
+
timezone: string;
|
|
970
|
+
location: string | null;
|
|
971
|
+
/** The organizer's notes, plain text; null when empty. */
|
|
972
|
+
notes: string | null;
|
|
973
|
+
/** Spots on the shift; null for no limit. */
|
|
974
|
+
capacity: number | null;
|
|
975
|
+
/** Signed up, confirmed and attended: the people holding a spot. */
|
|
976
|
+
signed_up: number;
|
|
977
|
+
waitlisted: number;
|
|
978
|
+
state: ShiftPublicState;
|
|
979
|
+
subject: ShiftSubject;
|
|
980
|
+
signup_url: string;
|
|
981
|
+
signup_embed: SectionEmbed;
|
|
982
|
+
}
|
|
983
|
+
/** GET /shifts — the organization's open public shifts, soonest first, one page at a time. */
|
|
984
|
+
interface ShiftsResponse {
|
|
985
|
+
shifts: ShiftsListRow[];
|
|
986
|
+
next_cursor: string | null;
|
|
987
|
+
}
|
|
988
|
+
/** One shift's live counts and the state they make. */
|
|
989
|
+
interface ShiftLiveCounts {
|
|
990
|
+
id: string;
|
|
991
|
+
signed_up: number;
|
|
992
|
+
waitlisted: number;
|
|
993
|
+
state: ShiftPublicState;
|
|
994
|
+
}
|
|
995
|
+
/** GET /shifts/live?ids= — live counts for the named shifts; an id the site cannot read is omitted. Never versioned. */
|
|
996
|
+
interface ShiftsLiveResponse {
|
|
997
|
+
shifts: ShiftLiveCounts[];
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* The organization's YouTube stream that is on now, else its next scheduled
|
|
1001
|
+
* one, as BackGold last read the connected channel's live address (every five
|
|
1002
|
+
* minutes). `url` is the watch page; `embed_url` plays it in a frame. Times
|
|
1003
|
+
* are ISO UTC: `scheduled_start_at` is an upcoming stream's start,
|
|
1004
|
+
* `started_at` a live stream's (when YouTube gave none, when BackGold first
|
|
1005
|
+
* saw it live). `channel_title` names the channel as it was connected.
|
|
1006
|
+
*/
|
|
1007
|
+
interface LiveStream {
|
|
1008
|
+
status: LiveStreamStatus;
|
|
1009
|
+
video_id: string;
|
|
1010
|
+
url: string;
|
|
1011
|
+
embed_url: string;
|
|
1012
|
+
title: string | null;
|
|
1013
|
+
thumbnail_url: string | null;
|
|
1014
|
+
scheduled_start_at: string | null;
|
|
1015
|
+
started_at: string | null;
|
|
1016
|
+
channel_title: string | null;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* GET /live — the stream, or null when nothing is on or scheduled. A live
|
|
1020
|
+
* stream beats an upcoming one; among live streams the latest start wins,
|
|
1021
|
+
* among upcoming ones the soonest. Never versioned: answered with
|
|
1022
|
+
* LIVE_STREAM_CACHE_CONTROL.
|
|
1023
|
+
*/
|
|
1024
|
+
interface LiveResponse {
|
|
1025
|
+
live: LiveStream | null;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* One event by its slug, for a site that draws the event's own page at
|
|
1029
|
+
* `/events/<slug>`: its list row, and what the page shows around BackGold's
|
|
1030
|
+
* RSVP and tickets. Unlisted events open from their link, and ended events
|
|
1031
|
+
* stay readable (their page outlives them).
|
|
1032
|
+
*/
|
|
1033
|
+
interface EventDetail extends EventsListRow {
|
|
1034
|
+
slug: string;
|
|
1035
|
+
/** Sanitized rich text (prose HTML) or plain paragraphs, as the operator wrote it; null when empty. */
|
|
1036
|
+
description: string | null;
|
|
1037
|
+
/** The venue's name; null when it has none. */
|
|
1038
|
+
venue: string | null;
|
|
1039
|
+
/** The street address on one line ("14 Rail Street, Fenwick, WM 80412"); null when it has none. */
|
|
1040
|
+
address: string | null;
|
|
1041
|
+
/** The cover picture's absolute address; null when it has none. */
|
|
1042
|
+
image_url: string | null;
|
|
1043
|
+
/** Directions to the venue (a maps link out), from the coordinates or the address; null when there is neither. */
|
|
1044
|
+
directions_url: string | null;
|
|
1045
|
+
/** BackGold's RSVP and tickets for the event, as a compliance section's embed. */
|
|
1046
|
+
embed: SectionEmbed;
|
|
1047
|
+
}
|
|
1048
|
+
interface EventResponse {
|
|
1049
|
+
event: EventDetail;
|
|
1050
|
+
/** The areas for a route that holds an event module. */
|
|
1051
|
+
areas: Areas;
|
|
1052
|
+
}
|
|
1053
|
+
interface TermsResponse {
|
|
1054
|
+
taxonomy: {
|
|
1055
|
+
key: string;
|
|
1056
|
+
label: string;
|
|
1057
|
+
hierarchical: boolean;
|
|
1058
|
+
};
|
|
1059
|
+
terms: Array<{
|
|
1060
|
+
id: string;
|
|
1061
|
+
slug: string;
|
|
1062
|
+
label: string;
|
|
1063
|
+
parent_id: string | null;
|
|
1064
|
+
position: number;
|
|
1065
|
+
}>;
|
|
1066
|
+
}
|
|
1067
|
+
/** A byline's public face; the user/contact it may stand for never leaves the server. */
|
|
1068
|
+
interface Author {
|
|
1069
|
+
slug: string;
|
|
1070
|
+
display_name: string;
|
|
1071
|
+
bio: string | null;
|
|
1072
|
+
avatar_url: string | null;
|
|
1073
|
+
link_url: string | null;
|
|
1074
|
+
}
|
|
1075
|
+
interface AuthorsResponse {
|
|
1076
|
+
authors: Author[];
|
|
1077
|
+
}
|
|
1078
|
+
interface AuthorResponse {
|
|
1079
|
+
author: Author;
|
|
1080
|
+
}
|
|
1081
|
+
interface RedirectsResponse {
|
|
1082
|
+
redirects: Array<{
|
|
1083
|
+
source: string;
|
|
1084
|
+
destination: string | null;
|
|
1085
|
+
status_code: number;
|
|
1086
|
+
}>;
|
|
1087
|
+
}
|
|
1088
|
+
interface SitemapResponse {
|
|
1089
|
+
urls: Array<{
|
|
1090
|
+
url: string;
|
|
1091
|
+
kind: SitemapUrlKind;
|
|
1092
|
+
updated_at: string | null;
|
|
1093
|
+
}>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
export { type Areas as A, type EntryLock as B, type CollectionResponse as C, PRODUCT_ATTR_FILTERS_MAX as D, type EntriesResponse as E, PRODUCT_ATTR_KEY_PATTERN as F, PRODUCT_ATTR_VALUE_MAX as G, VISITOR_PROGRESS_PATH as H, VISITOR_SIGN_IN_PATH as I, type Visitor as J, 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 CollectionsResponse as d, type CourseResponse as e, type CoursesResponse as f, type EntryResponse as g, type EventResponse as h, type EventsResponse as i, type EventsLiveResponse as j, type LessonProgressResponse as k, type LiveResponse as l, type PagesResponse as m, type ProductResponse as n, type ProductsResponse as o, type ProductsLiveResponse as p, type ShiftsResponse as q, type ShiftsLiveResponse as r, type SiteResponse as s, type SitemapResponse as t, type TypesResponse as u, type VisitorExchangeResponse as v, type CourseDetail as w, type CourseLesson as x, type CourseProgress as y, type CourseSummary as z };
|