ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / packages/newsletter/src/providers/substack.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / packages/newsletter/src/providers/substack.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberpackages/newsletter/src/providers/substack.ts
Original SHA-2562a069d98c97f2554bf0f324440a41d89ab2d5b14227c63785510c40f90e104df
Git blob SHA183752e43768994a4109ab4e15fdf97cd255d466
Reading-copy SHA-2562a069d98c97f2554bf0f324440a41d89ab2d5b14227c63785510c40f90e104df

Original source ↗

Recovered source transcript

import type { NewsletterProviderInterface, NewsletterSubscriber, SubscribeRequest, SubscribeResponse, SubstackConfig } from '../types' export class SubstackProvider implements NewsletterProviderInterface { private config: SubstackConfig constructor(config: SubstackConfig) { this.config = config if (!config.publicationUrl) { throw new Error('Substack publication URL is required') } } async subscribe(_data: SubscribeRequest): Promise<SubscribeResponse> { // Substack doesn't have an API - it uses an embedded iframe // This provider is mainly for configuration and generating the embed URL this.config.logger?.warn('Substack uses iframe embedding, not API calls', { tags: { type: 'newsletter' } }) return { success: false, message: 'Substack requires iframe embedding. Use getEmbedUrl() to get the iframe source.', error: 'IFRAME_ONLY' } } /** * Get the Substack embed URL for iframe integration */ getEmbedUrl(): string { const publicationDomain = this.config.publicationUrl .replace(/^https?:\/\//, '') .replace(/\/$/, '') return this.config.embedUrl || `https://${publicationDomain}/embed` } /** * Indicates this provider only works with iframe embedding */ isIframeOnly(): boolean { return true } async unsubscribe(_email: string): Promise<{ success: boolean; message: string }> { // Substack doesn't provide a public API for unsubscribing // Users must use the unsubscribe link in their emails return { success: false, message: 'Please use the unsubscribe link in your Substack emails to unsubscribe' } } async getSubscriber(_email: string): Promise<NewsletterSubscriber | null> { // Substack doesn't provide a public API for getting subscriber info this.config.logger?.warn('Substack does not provide API for getting subscriber info', { tags: { type: 'newsletter' } }) return null } }

Search equations, builds, manuscript text, and recovered sources.