@scalemule/news-publication 0.0.45 → 0.0.47

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.
Files changed (34) hide show
  1. package/README.md +69 -0
  2. package/dist/{chunk-OIEO2YVG.js → chunk-2XSW7JZS.js} +1 -1
  3. package/dist/chunk-66GI2IX6.js +65 -0
  4. package/dist/{chunk-2IYKWGVM.js → chunk-GOWOYMSG.js} +13 -45
  5. package/dist/{chunk-UTBV6JJX.js → chunk-JV76ZEIA.js} +12 -27
  6. package/dist/{chunk-72PKW2HM.js → chunk-UL2Q3N26.js} +1 -1
  7. package/dist/{chunk-GVLJ3HAI.js → chunk-WAC6ATNP.js} +1 -1
  8. package/dist/cookie-consent-banner.cjs +13 -78
  9. package/dist/cookie-consent-banner.js +2 -2
  10. package/dist/cookie-settings-view.cjs +11 -26
  11. package/dist/cookie-settings-view.js +2 -2
  12. package/dist/index.cjs +405 -180
  13. package/dist/index.d.cts +143 -4
  14. package/dist/index.d.ts +143 -4
  15. package/dist/index.js +318 -117
  16. package/dist/network-bar.js +2 -2
  17. package/dist/network-copyright.js +2 -2
  18. package/dist/network.js +1 -1
  19. package/dist/{snapshot-CxuyMF39.d.ts → snapshot-DmRw8G_B.d.ts} +1 -1
  20. package/dist/{snapshot-C0IGpt-B.d.cts → snapshot-Dx4Lv-lB.d.cts} +1 -1
  21. package/dist/snapshot-file.d.cts +2 -2
  22. package/dist/snapshot-file.d.ts +2 -2
  23. package/dist/sponsorship-view.cjs +75 -0
  24. package/dist/sponsorship-view.d.cts +11 -0
  25. package/dist/sponsorship-view.d.ts +11 -0
  26. package/dist/sponsorship-view.js +62 -0
  27. package/dist/sponsorships-CtnBe3S8.d.cts +137 -0
  28. package/dist/sponsorships-CtnBe3S8.d.ts +137 -0
  29. package/dist/{types-DFDCZHbS.d.cts → types-BJFCWWi0.d.cts} +1 -1
  30. package/dist/{types-DFDCZHbS.d.ts → types-BJFCWWi0.d.ts} +1 -1
  31. package/dist/verified-card.d.cts +1 -1
  32. package/dist/verified-card.d.ts +1 -1
  33. package/package.json +11 -4
  34. package/sponsorship.css +78 -0
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { a as PublicationTheme, P as PublicationInput, N as NewsPublication, F as FeatureName, H as HomepageSelection, b as NearbyUpdate, c as NewsItem, E as EditorialSection, d as NewsArticle, C as CouponOffer } from './types-DFDCZHbS.cjs';
2
- export { A as ArticleCitation, e as CardType, f as CategoryRef, g as CouponSettings, h as CoverImageMetadata, i as FEATURE_NAMES, j as FeatureFlags, k as NewsFeed, l as NewsLayoutId, m as PublicationModules, R as ReferralSettings, S as StoryDisplay, T as TagRef, V as VerifiedCard, n as VerifiedCardAction, o as VerifiedCardFact, p as VerifiedCardImage } from './types-DFDCZHbS.cjs';
1
+ import { a as PublicationTheme, P as PublicationInput, N as NewsPublication, F as FeatureName, b as NewsItem, H as HomepageSelection, c as NearbyUpdate, E as EditorialSection, d as NewsArticle, C as CouponOffer } from './types-BJFCWWi0.cjs';
2
+ export { A as ArticleCitation, e as CardType, f as CategoryRef, g as CouponSettings, h as CoverImageMetadata, i as FEATURE_NAMES, j as FeatureFlags, k as NewsFeed, l as NewsLayoutId, m as PublicationModules, R as ReferralSettings, S as StoryDisplay, T as TagRef, V as VerifiedCard, n as VerifiedCardAction, o as VerifiedCardFact, p as VerifiedCardImage } from './types-BJFCWWi0.cjs';
3
3
  export { M as MEET_ACTIVITIES, b as MeetActivity, c as MeetupInput, a as PreparedMeetup, P as PublicPlace, d as activityLabel, e as canHostMeetup, i as isAdult, p as prepareMeetup, s as screenMessage } from './meet-RWmfj3I3.cjs';
4
4
  export { b as CLASSIFIED_CATEGORIES, c as ClassifiedCategory, C as ClassifiedListing, E as EmploymentType, J as JOB_EMPLOYMENT_TYPES, d as PreparedClassified, e as PreparedJob, P as PublicDeal, f as PublicDealOffer, a as PublicJob, g as categoryLabel, h as classifiedPath, i as classifiedSearchPath, j as clipChars, k as dealDollars, l as dealGoPath, m as dealsFeedPath, n as employmentLabel, o as isClassifiedCategory, p as isEmploymentType, q as jobEmployerBody, r as jobOpeningBody, s as jobPostingBody, t as prepareClassified, u as prepareJobPost, v as publicJobPath, w as publicJobsPath } from './marketplace-29i5w4LS.cjs';
5
- export { b as PublicationRecord, P as PublicationSnapshot, S as SnapshotHooks, c as SyncSource, a as SyncedPublication, d as acceptRemoteRecord, e as acceptSnapshot, p as parseSnapshot, f as publicationFromSnapshot, g as publicationRecord, s as snapshotFromRecord, h as syncPublication } from './snapshot-C0IGpt-B.cjs';
5
+ export { b as PublicationRecord, P as PublicationSnapshot, S as SnapshotHooks, c as SyncSource, a as SyncedPublication, d as acceptRemoteRecord, e as acceptSnapshot, p as parseSnapshot, f as publicationFromSnapshot, g as publicationRecord, s as snapshotFromRecord, h as syncPublication } from './snapshot-Dx4Lv-lB.cjs';
6
6
  import { CookieCategoryDefinition, CookieConsentRecord } from '@scalemule/compliance';
7
7
  export { COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, CookieCategory, CookieCategoryDefinition, CookieConsentRecord, CookieDisclosure, CookiePreferences, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from '@scalemule/compliance';
8
8
  export { CookieConsentBanner, CookieConsentBannerProps } from './cookie-consent-banner.cjs';
@@ -15,6 +15,8 @@ import * as react from 'react';
15
15
  export { VerifiedCardComponent, VerifiedCardSection, getArticleCards, isSafeActionUrl } from './verified-card.cjs';
16
16
  export { C as CommunityMapArticleEmbed, c as communityMapEmbeds } from './community-maps-DKcYhQYN.cjs';
17
17
  export { C as ContentBlock, S as StructuredDocument, a as StructuredMedia, f as formatArtworkCaption, p as parseDocumentBlocks, r as renderArticleBlocksToHtml, s as sanitizeInlineMarkdown } from './article-blocks-DsabIDmH.cjs';
18
+ import { M as Measurement } from './sponsorships-CtnBe3S8.cjs';
19
+ export { a as Campaign, b as CampaignStatus, c as CampaignTarget, C as Creative, d as Placement, e as PlacementType, P as PublicAcknowledgment, S as SPONSORSHIP_OFFERINGS, f as SPONSORSHIP_POLICY, g as SponsorParty, p as placementAvailable, s as safeSponsorUrl } from './sponsorships-CtnBe3S8.cjs';
18
20
 
19
21
  /** Walnut Creek Times broadsheet colors. A paper overrides only what it changes. */
20
22
  declare const BROADSHEET_THEME: PublicationTheme;
@@ -32,6 +34,112 @@ declare const LAYOUT_COOKIE = "news_publication_layout";
32
34
  */
33
35
  declare function resolveLayout(publication: NewsPublication, cookieValue?: string | null): string;
34
36
 
37
+ declare const LOCAL_BRIEFING_POLICY_VERSION = "1";
38
+ type BriefingVerification = "unverified" | "community_submitted" | "officially_confirmed" | "independently_verified" | "disputed";
39
+ type BriefingSection = "important" | "around_you" | "people" | "discover" | "participate" | "following";
40
+ /** Public evidence links only. Artifact URLs and private reporter notes do not belong here. */
41
+ interface BriefingSource {
42
+ id: string;
43
+ url: string;
44
+ title: string;
45
+ publisher: string;
46
+ }
47
+ /** Explicit choices only; no inferred demographics, relationships or reading history. */
48
+ interface BriefingPreferences {
49
+ community_ids?: readonly string[];
50
+ topic_ids?: readonly string[];
51
+ entity_ids?: readonly string[];
52
+ issue_ids?: readonly string[];
53
+ }
54
+ /**
55
+ * A server-authorized projection, not a new canonical record or submission API.
56
+ * Article-backed presentation only: BaseNews records need not have an article.
57
+ * Eligibility here must never gate existing publication or community workflows.
58
+ * The producer must resolve grants, evidence rights and geographic relationships.
59
+ * Keep withdrawn/superseded revisions in the input to suppress older copies.
60
+ */
61
+ interface BriefingCandidate {
62
+ sm_application_id: string;
63
+ publication_id: string;
64
+ /** Namespaced existing development/occurrence/reporting ID, never an issue-wide ID. */
65
+ canonical_key: string;
66
+ revision: number;
67
+ article: NewsItem;
68
+ publication_status: "published" | "draft";
69
+ visibility: "public" | "private";
70
+ editorial_approval: "approved" | "pending";
71
+ lifecycle: "current" | "superseded" | "withdrawn";
72
+ /** Resolved public area IDs, including applicable containing areas. No coordinates. */
73
+ geography_ids: readonly string[];
74
+ topic_ids: readonly string[];
75
+ entity_ids: readonly string[];
76
+ issue_ids: readonly string[];
77
+ section: BriefingSection;
78
+ /** Editorial assignments, never inferred from emotional language or click rates. */
79
+ civic_importance: "routine" | "important";
80
+ practical_value: boolean;
81
+ discovery_value: boolean;
82
+ why_it_matters?: string;
83
+ /** Required editorial relevance expiry; article publication time is not event time. */
84
+ relevant_until: string;
85
+ verification: BriefingVerification;
86
+ last_verified_at: string | null;
87
+ review_due_at: string | null;
88
+ sources: readonly BriefingSource[];
89
+ }
90
+ type BriefingReason = "important_civic_information" | "selected_community" | "publication_coverage" | "practical_value" | "following_entity" | "following_issue" | "selected_topic" | "recent_reporting" | "local_discovery";
91
+ interface LocalBriefingOptions {
92
+ sm_application_id: string;
93
+ publication_id: string;
94
+ coverage_area_ids: readonly string[];
95
+ preferences?: BriefingPreferences;
96
+ personalized?: boolean;
97
+ /** Maximum, never a quota. Between 1 and 12, default 6. */
98
+ limit?: number;
99
+ now?: number;
100
+ }
101
+ interface LocalBriefingItem {
102
+ canonical_key: string;
103
+ revision: number;
104
+ article: Pick<NewsItem, "id" | "slug" | "title" | "published_at" | "author_name" | "canonical_url">;
105
+ summary: string;
106
+ section: BriefingSection;
107
+ geography_ids: string[];
108
+ why_it_matters?: string;
109
+ reasons: BriefingReason[];
110
+ relevance: {
111
+ geographic: number;
112
+ practical: number;
113
+ relationship: number;
114
+ interest: number;
115
+ temporal: number;
116
+ civic: number;
117
+ discovery: number;
118
+ };
119
+ verification: BriefingVerification;
120
+ freshness: "current" | "unknown";
121
+ last_verified_at: string | null;
122
+ review_due_at: string | null;
123
+ relevant_until: string;
124
+ sources: BriefingSource[];
125
+ }
126
+ interface LocalBriefing {
127
+ schema_version: 1;
128
+ policy_version: typeof LOCAL_BRIEFING_POLICY_VERSION;
129
+ publication_id: string;
130
+ generated_at: string;
131
+ personalized: boolean;
132
+ items: LocalBriefingItem[];
133
+ /** Consumers must keep a visible route to important coverage beyond the brief. */
134
+ remaining_important_count: number;
135
+ }
136
+ /**
137
+ * Opt-in, deterministic presentation of existing public records. This does not
138
+ * authenticate callers, fetch evidence, verify claims, persist preferences or
139
+ * publish anything. Never pass raw user submissions as authorized candidates.
140
+ */
141
+ declare function composeLocalBriefing(candidates: readonly BriefingCandidate[], options: LocalBriefingOptions): LocalBriefing;
142
+
35
143
  /**
36
144
  * Walnut Creek Times, the reference paper.
37
145
  * Other papers call `definePublication` with their own name, towns, and flags.
@@ -367,4 +475,35 @@ declare function publicationListeningCandidates<T extends ListeningArticle>(item
367
475
  */
368
476
  declare const CURATED_COMMUNITY_CARDS: Record<string, Record<string, unknown>[]>;
369
477
 
370
- export { ANALYTICS_COOKIE, ANALYTICS_VERSION, ArticleProvenance, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES, CURATED_COMMUNITY_CARDS, CouponOffer, EDITORIAL_SECTION_ORDER, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, type ListeningArticle, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, clearTheme, composeEdition, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, nearbyUpdates, newsArticleJsonLd, normalizedText, orderedSections, publicHttps, publicUrl, publicationJsonLd, publicationListeningCandidates, publicationListeningTrack, publicationMeta, readerSources, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };
478
+ /** The server enforces the same explicit consent gate as the browser. */
479
+ declare function measurementConsent(headers: Pick<Headers, "get">, sponsorship?: boolean, now?: number): boolean;
480
+
481
+ interface SponsorshipReport {
482
+ campaign_id: string;
483
+ campaign_name: string;
484
+ sponsor: string;
485
+ starts_at: string;
486
+ ends_at: string;
487
+ status: string;
488
+ generated_at: string;
489
+ editorial_independence: string;
490
+ reporting_note: string;
491
+ placements: Array<{
492
+ application_id: string;
493
+ publication_id: string;
494
+ publication: string;
495
+ publication_url: string;
496
+ placement_id: string;
497
+ placement: string;
498
+ product_path: string;
499
+ communities: string[];
500
+ delivery_status: string;
501
+ views: Measurement;
502
+ clicks: Measurement;
503
+ newsletter_deliveries: Measurement;
504
+ }>;
505
+ }
506
+ /** Shared by the newsroom print/export view and the repeatable PDF renderer. */
507
+ declare function campaignReportHtml(report: SponsorshipReport): string;
508
+
509
+ export { ANALYTICS_COOKIE, ANALYTICS_VERSION, ArticleProvenance, type Attribution, BROADSHEET_THEME, type BriefingCandidate, type BriefingPreferences, type BriefingReason, type BriefingSection, type BriefingSource, type BriefingVerification, COOKIE_CATEGORIES, CURATED_COMMUNITY_CARDS, CouponOffer, EDITORIAL_SECTION_ORDER, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, LOCAL_BRIEFING_POLICY_VERSION, type ListeningArticle, type LocalBriefing, type LocalBriefingItem, type LocalBriefingOptions, Measurement, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, type SponsorshipReport, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, campaignReportHtml, clearTheme, composeEdition, composeLocalBriefing, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, measurementConsent, nearbyUpdates, newsArticleJsonLd, normalizedText, orderedSections, publicHttps, publicUrl, publicationJsonLd, publicationListeningCandidates, publicationListeningTrack, publicationMeta, readerSources, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { a as PublicationTheme, P as PublicationInput, N as NewsPublication, F as FeatureName, H as HomepageSelection, b as NearbyUpdate, c as NewsItem, E as EditorialSection, d as NewsArticle, C as CouponOffer } from './types-DFDCZHbS.js';
2
- export { A as ArticleCitation, e as CardType, f as CategoryRef, g as CouponSettings, h as CoverImageMetadata, i as FEATURE_NAMES, j as FeatureFlags, k as NewsFeed, l as NewsLayoutId, m as PublicationModules, R as ReferralSettings, S as StoryDisplay, T as TagRef, V as VerifiedCard, n as VerifiedCardAction, o as VerifiedCardFact, p as VerifiedCardImage } from './types-DFDCZHbS.js';
1
+ import { a as PublicationTheme, P as PublicationInput, N as NewsPublication, F as FeatureName, b as NewsItem, H as HomepageSelection, c as NearbyUpdate, E as EditorialSection, d as NewsArticle, C as CouponOffer } from './types-BJFCWWi0.js';
2
+ export { A as ArticleCitation, e as CardType, f as CategoryRef, g as CouponSettings, h as CoverImageMetadata, i as FEATURE_NAMES, j as FeatureFlags, k as NewsFeed, l as NewsLayoutId, m as PublicationModules, R as ReferralSettings, S as StoryDisplay, T as TagRef, V as VerifiedCard, n as VerifiedCardAction, o as VerifiedCardFact, p as VerifiedCardImage } from './types-BJFCWWi0.js';
3
3
  export { M as MEET_ACTIVITIES, b as MeetActivity, c as MeetupInput, a as PreparedMeetup, P as PublicPlace, d as activityLabel, e as canHostMeetup, i as isAdult, p as prepareMeetup, s as screenMessage } from './meet-RWmfj3I3.js';
4
4
  export { b as CLASSIFIED_CATEGORIES, c as ClassifiedCategory, C as ClassifiedListing, E as EmploymentType, J as JOB_EMPLOYMENT_TYPES, d as PreparedClassified, e as PreparedJob, P as PublicDeal, f as PublicDealOffer, a as PublicJob, g as categoryLabel, h as classifiedPath, i as classifiedSearchPath, j as clipChars, k as dealDollars, l as dealGoPath, m as dealsFeedPath, n as employmentLabel, o as isClassifiedCategory, p as isEmploymentType, q as jobEmployerBody, r as jobOpeningBody, s as jobPostingBody, t as prepareClassified, u as prepareJobPost, v as publicJobPath, w as publicJobsPath } from './marketplace-29i5w4LS.js';
5
- export { b as PublicationRecord, P as PublicationSnapshot, S as SnapshotHooks, c as SyncSource, a as SyncedPublication, d as acceptRemoteRecord, e as acceptSnapshot, p as parseSnapshot, f as publicationFromSnapshot, g as publicationRecord, s as snapshotFromRecord, h as syncPublication } from './snapshot-CxuyMF39.js';
5
+ export { b as PublicationRecord, P as PublicationSnapshot, S as SnapshotHooks, c as SyncSource, a as SyncedPublication, d as acceptRemoteRecord, e as acceptSnapshot, p as parseSnapshot, f as publicationFromSnapshot, g as publicationRecord, s as snapshotFromRecord, h as syncPublication } from './snapshot-DmRw8G_B.js';
6
6
  import { CookieCategoryDefinition, CookieConsentRecord } from '@scalemule/compliance';
7
7
  export { COOKIE_CONSENT_BACKUP_KEY, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, COOKIE_CONSENT_MAX_AGE_SECONDS, CookieCategory, CookieCategoryDefinition, CookieConsentRecord, CookieDisclosure, CookiePreferences, DEFAULT_CONSENT_HUB_URL, DEFAULT_PREFERENCES_ACCEPTED, DEFAULT_PREFERENCES_REJECTED, EU_EEA_UK_COUNTRIES, NETWORK_CONSENT_STORAGE_KEY, acceptAllCookies, checkUrlConsentBridge, clearCookieConsent, decorateNetworkUrl, getCookieConsent, hasConsented, isCategoryAllowed, isGeoConsentRequired, queryNetworkConsentHub, rejectOptionalCookies, setCookieConsent, setNetworkConsentHub } from '@scalemule/compliance';
8
8
  export { CookieConsentBanner, CookieConsentBannerProps } from './cookie-consent-banner.js';
@@ -15,6 +15,8 @@ import * as react from 'react';
15
15
  export { VerifiedCardComponent, VerifiedCardSection, getArticleCards, isSafeActionUrl } from './verified-card.js';
16
16
  export { C as CommunityMapArticleEmbed, c as communityMapEmbeds } from './community-maps-DKcYhQYN.js';
17
17
  export { C as ContentBlock, S as StructuredDocument, a as StructuredMedia, f as formatArtworkCaption, p as parseDocumentBlocks, r as renderArticleBlocksToHtml, s as sanitizeInlineMarkdown } from './article-blocks-DsabIDmH.js';
18
+ import { M as Measurement } from './sponsorships-CtnBe3S8.js';
19
+ export { a as Campaign, b as CampaignStatus, c as CampaignTarget, C as Creative, d as Placement, e as PlacementType, P as PublicAcknowledgment, S as SPONSORSHIP_OFFERINGS, f as SPONSORSHIP_POLICY, g as SponsorParty, p as placementAvailable, s as safeSponsorUrl } from './sponsorships-CtnBe3S8.js';
18
20
 
19
21
  /** Walnut Creek Times broadsheet colors. A paper overrides only what it changes. */
20
22
  declare const BROADSHEET_THEME: PublicationTheme;
@@ -32,6 +34,112 @@ declare const LAYOUT_COOKIE = "news_publication_layout";
32
34
  */
33
35
  declare function resolveLayout(publication: NewsPublication, cookieValue?: string | null): string;
34
36
 
37
+ declare const LOCAL_BRIEFING_POLICY_VERSION = "1";
38
+ type BriefingVerification = "unverified" | "community_submitted" | "officially_confirmed" | "independently_verified" | "disputed";
39
+ type BriefingSection = "important" | "around_you" | "people" | "discover" | "participate" | "following";
40
+ /** Public evidence links only. Artifact URLs and private reporter notes do not belong here. */
41
+ interface BriefingSource {
42
+ id: string;
43
+ url: string;
44
+ title: string;
45
+ publisher: string;
46
+ }
47
+ /** Explicit choices only; no inferred demographics, relationships or reading history. */
48
+ interface BriefingPreferences {
49
+ community_ids?: readonly string[];
50
+ topic_ids?: readonly string[];
51
+ entity_ids?: readonly string[];
52
+ issue_ids?: readonly string[];
53
+ }
54
+ /**
55
+ * A server-authorized projection, not a new canonical record or submission API.
56
+ * Article-backed presentation only: BaseNews records need not have an article.
57
+ * Eligibility here must never gate existing publication or community workflows.
58
+ * The producer must resolve grants, evidence rights and geographic relationships.
59
+ * Keep withdrawn/superseded revisions in the input to suppress older copies.
60
+ */
61
+ interface BriefingCandidate {
62
+ sm_application_id: string;
63
+ publication_id: string;
64
+ /** Namespaced existing development/occurrence/reporting ID, never an issue-wide ID. */
65
+ canonical_key: string;
66
+ revision: number;
67
+ article: NewsItem;
68
+ publication_status: "published" | "draft";
69
+ visibility: "public" | "private";
70
+ editorial_approval: "approved" | "pending";
71
+ lifecycle: "current" | "superseded" | "withdrawn";
72
+ /** Resolved public area IDs, including applicable containing areas. No coordinates. */
73
+ geography_ids: readonly string[];
74
+ topic_ids: readonly string[];
75
+ entity_ids: readonly string[];
76
+ issue_ids: readonly string[];
77
+ section: BriefingSection;
78
+ /** Editorial assignments, never inferred from emotional language or click rates. */
79
+ civic_importance: "routine" | "important";
80
+ practical_value: boolean;
81
+ discovery_value: boolean;
82
+ why_it_matters?: string;
83
+ /** Required editorial relevance expiry; article publication time is not event time. */
84
+ relevant_until: string;
85
+ verification: BriefingVerification;
86
+ last_verified_at: string | null;
87
+ review_due_at: string | null;
88
+ sources: readonly BriefingSource[];
89
+ }
90
+ type BriefingReason = "important_civic_information" | "selected_community" | "publication_coverage" | "practical_value" | "following_entity" | "following_issue" | "selected_topic" | "recent_reporting" | "local_discovery";
91
+ interface LocalBriefingOptions {
92
+ sm_application_id: string;
93
+ publication_id: string;
94
+ coverage_area_ids: readonly string[];
95
+ preferences?: BriefingPreferences;
96
+ personalized?: boolean;
97
+ /** Maximum, never a quota. Between 1 and 12, default 6. */
98
+ limit?: number;
99
+ now?: number;
100
+ }
101
+ interface LocalBriefingItem {
102
+ canonical_key: string;
103
+ revision: number;
104
+ article: Pick<NewsItem, "id" | "slug" | "title" | "published_at" | "author_name" | "canonical_url">;
105
+ summary: string;
106
+ section: BriefingSection;
107
+ geography_ids: string[];
108
+ why_it_matters?: string;
109
+ reasons: BriefingReason[];
110
+ relevance: {
111
+ geographic: number;
112
+ practical: number;
113
+ relationship: number;
114
+ interest: number;
115
+ temporal: number;
116
+ civic: number;
117
+ discovery: number;
118
+ };
119
+ verification: BriefingVerification;
120
+ freshness: "current" | "unknown";
121
+ last_verified_at: string | null;
122
+ review_due_at: string | null;
123
+ relevant_until: string;
124
+ sources: BriefingSource[];
125
+ }
126
+ interface LocalBriefing {
127
+ schema_version: 1;
128
+ policy_version: typeof LOCAL_BRIEFING_POLICY_VERSION;
129
+ publication_id: string;
130
+ generated_at: string;
131
+ personalized: boolean;
132
+ items: LocalBriefingItem[];
133
+ /** Consumers must keep a visible route to important coverage beyond the brief. */
134
+ remaining_important_count: number;
135
+ }
136
+ /**
137
+ * Opt-in, deterministic presentation of existing public records. This does not
138
+ * authenticate callers, fetch evidence, verify claims, persist preferences or
139
+ * publish anything. Never pass raw user submissions as authorized candidates.
140
+ */
141
+ declare function composeLocalBriefing(candidates: readonly BriefingCandidate[], options: LocalBriefingOptions): LocalBriefing;
142
+
35
143
  /**
36
144
  * Walnut Creek Times, the reference paper.
37
145
  * Other papers call `definePublication` with their own name, towns, and flags.
@@ -367,4 +475,35 @@ declare function publicationListeningCandidates<T extends ListeningArticle>(item
367
475
  */
368
476
  declare const CURATED_COMMUNITY_CARDS: Record<string, Record<string, unknown>[]>;
369
477
 
370
- export { ANALYTICS_COOKIE, ANALYTICS_VERSION, ArticleProvenance, type Attribution, BROADSHEET_THEME, COOKIE_CATEGORIES, CURATED_COMMUNITY_CARDS, CouponOffer, EDITORIAL_SECTION_ORDER, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, type ListeningArticle, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, clearTheme, composeEdition, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, nearbyUpdates, newsArticleJsonLd, normalizedText, orderedSections, publicHttps, publicUrl, publicationJsonLd, publicationListeningCandidates, publicationListeningTrack, publicationMeta, readerSources, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };
478
+ /** The server enforces the same explicit consent gate as the browser. */
479
+ declare function measurementConsent(headers: Pick<Headers, "get">, sponsorship?: boolean, now?: number): boolean;
480
+
481
+ interface SponsorshipReport {
482
+ campaign_id: string;
483
+ campaign_name: string;
484
+ sponsor: string;
485
+ starts_at: string;
486
+ ends_at: string;
487
+ status: string;
488
+ generated_at: string;
489
+ editorial_independence: string;
490
+ reporting_note: string;
491
+ placements: Array<{
492
+ application_id: string;
493
+ publication_id: string;
494
+ publication: string;
495
+ publication_url: string;
496
+ placement_id: string;
497
+ placement: string;
498
+ product_path: string;
499
+ communities: string[];
500
+ delivery_status: string;
501
+ views: Measurement;
502
+ clicks: Measurement;
503
+ newsletter_deliveries: Measurement;
504
+ }>;
505
+ }
506
+ /** Shared by the newsroom print/export view and the repeatable PDF renderer. */
507
+ declare function campaignReportHtml(report: SponsorshipReport): string;
508
+
509
+ export { ANALYTICS_COOKIE, ANALYTICS_VERSION, ArticleProvenance, type Attribution, BROADSHEET_THEME, type BriefingCandidate, type BriefingPreferences, type BriefingReason, type BriefingSection, type BriefingSource, type BriefingVerification, COOKIE_CATEGORIES, CURATED_COMMUNITY_CARDS, CouponOffer, EDITORIAL_SECTION_ORDER, EVENTS, EditorialSection, type EffectiveTheme, FeatureName, HomepageSelection, LAYOUT_COOKIE, LOCAL_BRIEFING_POLICY_VERSION, type ListeningArticle, type LocalBriefing, type LocalBriefingItem, type LocalBriefingOptions, Measurement, NEWS_CACHE, NearbyUpdate, NewsArticle, NewsError, NewsItem, NewsPublication, PublicationInput, PublicationTheme, SESSION_IDLE_MS, type SponsorshipReport, THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, type ThemeMode, UTM_FIELDS, UUID, activeNearby, applyTheme, articleCacheKey, articleCacheOptions, articleMeta, articleUrl, attribution, briefSummary, campaignReportHtml, clearTheme, composeEdition, composeLocalBriefing, defaultRevalidateTargets, definePublication, displayHeadline, edgeCacheControl, editorialSections, featureEnabled, feedCacheKey, feedCacheOptions, filterNews, getStoredTheme, getSystemTheme, inventoryCacheOptions, llmsText, matchesStoryTag, measurementConsent, nearbyUpdates, newsArticleJsonLd, normalizedText, orderedSections, publicHttps, publicUrl, publicationJsonLd, publicationListeningCandidates, publicationListeningTrack, publicationMeta, readerSources, recordConsentToCompliance, referralCode, resolveCoupon, resolveEffectiveTheme, resolveLayout, revalidateDecision, secretsMatch, sectionDefinition, sectionId, sectionPath, setTheme, shortDeck, shortText, shouldServeLastKnown, storyDate, storyTowns, subscribeTheme, themeInitScript, townSlug, validCalendarDate, walnutCreekTimes, withLastKnown };