@churchapps/content-providers 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -582,16 +582,31 @@ declare class FreeShowProvider extends BaseProvider {
582
582
  readonly authTypes: AuthType[];
583
583
  readonly capabilities: ProviderCapabilities;
584
584
  private discoverer;
585
+ /** mDNS needs native code, so the host app browses `_freeshow._udp` and maps results with freeShowServicesToInstances. */
585
586
  setDiscoverer(discoverer: FreeShowDiscoverer | null): void;
586
587
  discoverInstances(): Promise<NetworkInstance[]>;
587
588
  toAuth(instance: NetworkInstance): ContentProviderAuthData;
588
589
  selectedInstance(auth?: ContentProviderAuthData | null): NetworkInstance | null;
589
- browse(path?: string | null, _auth?: ContentProviderAuthData | null): Promise<ContentItem[]>;
590
- getPlaylist(path: string, _auth?: ContentProviderAuthData | null, _resolution?: number): Promise<ContentFile[] | null>;
590
+ private requireInstance;
591
+ browse(path?: string | null, auth?: ContentProviderAuthData | null): Promise<ContentItem[]>;
592
+ private showFiles;
593
+ private load;
594
+ getPlaylist(path: string, auth?: ContentProviderAuthData | null, _resolution?: number): Promise<ContentFile[] | null>;
591
595
  getInstructions(path: string, auth?: ContentProviderAuthData | null): Promise<Instructions | null>;
592
596
  }
593
597
 
594
- declare const MOCK_FREESHOW_INSTANCE: NetworkInstance;
598
+ declare const FREESHOW_REST_PORT = 5506;
599
+ interface MdnsService {
600
+ name: string;
601
+ host?: string | null;
602
+ txt?: Record<string, string>;
603
+ }
604
+ /**
605
+ * FreeShow advertises its Remote/Stage/etc. servers (not its API) as `_freeshow._udp`, named `freeshow-<SERVER>-<instanceId>`,
606
+ * with TXT `ip` and `ips` (comma-joined). Group by machine and pick the address that answers the REST API.
607
+ */
608
+ declare function servicesToInstances(services: MdnsService[], port?: number): Promise<NetworkInstance[]>;
609
+
595
610
  declare function networkInstanceToAuth(instance: NetworkInstance): ContentProviderAuthData;
596
611
  declare function authToNetworkInstance(auth?: ContentProviderAuthData | null): NetworkInstance | null;
597
612
 
@@ -638,4 +653,4 @@ declare function getAvailableProviders(ids?: string[]): ProviderInfo[];
638
653
  */
639
654
  declare const VERSION: string;
640
655
 
641
- export { APlayProvider, type AuthType, B1ChurchProvider, BaseProvider, BibleProjectProvider, CbnProvider, type ContentDownload, type ContentFile, type ContentFolder, type ContentItem, type ContentProviderAuthData, type ContentProviderConfig, type CurrentPlan, type DeviceAuthorizationResponse, DeviceFlowHelper, type DeviceFlowPollResult, type DeviceFlowState, DropboxProvider, type EndpointValue, type EndpointsConfig, type FeedActionInterface, type FeedDownloadInterface, type FeedFileInterface, type FeedSectionInterface, type FeedVenueInterface, type FreeShowDiscoverer, FreeShowProvider, HighVoltageKidsProvider, type IProvider, type InstructionItem, type Instructions, JesusFilmProvider, LessonsChurchProvider, LifeChurchProvider, MOCK_FREESHOW_INSTANCE, type MediaLicenseResult, type MediaLicenseStatus, type MessageFileInterface, type NetworkInstance, OAuthHelper, type Plan, type PlanPresentation, type PlanSection, type PlanTimelineItem, PlanningCenterProvider, type ProviderCapabilities, type ProviderInfo, type ProviderLogos, SignPresenterProvider, TokenHelper, VERSION, type VenueActionInterface, type VenueActionsResponseInterface, type VenueSectionActionsInterface, authIsExpired, authToNetworkInstance, getAllProviders, getAvailableProviders, getProvider, getProviderConfig, isContentFile, isContentFolder, navigateToPath, networkInstanceToAuth, registerProvider, setProviderSecret, toAuthData };
656
+ export { APlayProvider, type AuthType, B1ChurchProvider, BaseProvider, BibleProjectProvider, CbnProvider, type ContentDownload, type ContentFile, type ContentFolder, type ContentItem, type ContentProviderAuthData, type ContentProviderConfig, type CurrentPlan, type DeviceAuthorizationResponse, DeviceFlowHelper, type DeviceFlowPollResult, type DeviceFlowState, DropboxProvider, type EndpointValue, type EndpointsConfig, FREESHOW_REST_PORT, type FeedActionInterface, type FeedDownloadInterface, type FeedFileInterface, type FeedSectionInterface, type FeedVenueInterface, type FreeShowDiscoverer, FreeShowProvider, HighVoltageKidsProvider, type IProvider, type InstructionItem, type Instructions, JesusFilmProvider, LessonsChurchProvider, LifeChurchProvider, type MdnsService, type MediaLicenseResult, type MediaLicenseStatus, type MessageFileInterface, type NetworkInstance, OAuthHelper, type Plan, type PlanPresentation, type PlanSection, type PlanTimelineItem, PlanningCenterProvider, type ProviderCapabilities, type ProviderInfo, type ProviderLogos, SignPresenterProvider, TokenHelper, VERSION, type VenueActionInterface, type VenueActionsResponseInterface, type VenueSectionActionsInterface, authIsExpired, authToNetworkInstance, servicesToInstances as freeShowServicesToInstances, getAllProviders, getAvailableProviders, getProvider, getProviderConfig, isContentFile, isContentFolder, navigateToPath, networkInstanceToAuth, registerProvider, setProviderSecret, toAuthData };
package/dist/index.d.ts CHANGED
@@ -582,16 +582,31 @@ declare class FreeShowProvider extends BaseProvider {
582
582
  readonly authTypes: AuthType[];
583
583
  readonly capabilities: ProviderCapabilities;
584
584
  private discoverer;
585
+ /** mDNS needs native code, so the host app browses `_freeshow._udp` and maps results with freeShowServicesToInstances. */
585
586
  setDiscoverer(discoverer: FreeShowDiscoverer | null): void;
586
587
  discoverInstances(): Promise<NetworkInstance[]>;
587
588
  toAuth(instance: NetworkInstance): ContentProviderAuthData;
588
589
  selectedInstance(auth?: ContentProviderAuthData | null): NetworkInstance | null;
589
- browse(path?: string | null, _auth?: ContentProviderAuthData | null): Promise<ContentItem[]>;
590
- getPlaylist(path: string, _auth?: ContentProviderAuthData | null, _resolution?: number): Promise<ContentFile[] | null>;
590
+ private requireInstance;
591
+ browse(path?: string | null, auth?: ContentProviderAuthData | null): Promise<ContentItem[]>;
592
+ private showFiles;
593
+ private load;
594
+ getPlaylist(path: string, auth?: ContentProviderAuthData | null, _resolution?: number): Promise<ContentFile[] | null>;
591
595
  getInstructions(path: string, auth?: ContentProviderAuthData | null): Promise<Instructions | null>;
592
596
  }
593
597
 
594
- declare const MOCK_FREESHOW_INSTANCE: NetworkInstance;
598
+ declare const FREESHOW_REST_PORT = 5506;
599
+ interface MdnsService {
600
+ name: string;
601
+ host?: string | null;
602
+ txt?: Record<string, string>;
603
+ }
604
+ /**
605
+ * FreeShow advertises its Remote/Stage/etc. servers (not its API) as `_freeshow._udp`, named `freeshow-<SERVER>-<instanceId>`,
606
+ * with TXT `ip` and `ips` (comma-joined). Group by machine and pick the address that answers the REST API.
607
+ */
608
+ declare function servicesToInstances(services: MdnsService[], port?: number): Promise<NetworkInstance[]>;
609
+
595
610
  declare function networkInstanceToAuth(instance: NetworkInstance): ContentProviderAuthData;
596
611
  declare function authToNetworkInstance(auth?: ContentProviderAuthData | null): NetworkInstance | null;
597
612
 
@@ -638,4 +653,4 @@ declare function getAvailableProviders(ids?: string[]): ProviderInfo[];
638
653
  */
639
654
  declare const VERSION: string;
640
655
 
641
- export { APlayProvider, type AuthType, B1ChurchProvider, BaseProvider, BibleProjectProvider, CbnProvider, type ContentDownload, type ContentFile, type ContentFolder, type ContentItem, type ContentProviderAuthData, type ContentProviderConfig, type CurrentPlan, type DeviceAuthorizationResponse, DeviceFlowHelper, type DeviceFlowPollResult, type DeviceFlowState, DropboxProvider, type EndpointValue, type EndpointsConfig, type FeedActionInterface, type FeedDownloadInterface, type FeedFileInterface, type FeedSectionInterface, type FeedVenueInterface, type FreeShowDiscoverer, FreeShowProvider, HighVoltageKidsProvider, type IProvider, type InstructionItem, type Instructions, JesusFilmProvider, LessonsChurchProvider, LifeChurchProvider, MOCK_FREESHOW_INSTANCE, type MediaLicenseResult, type MediaLicenseStatus, type MessageFileInterface, type NetworkInstance, OAuthHelper, type Plan, type PlanPresentation, type PlanSection, type PlanTimelineItem, PlanningCenterProvider, type ProviderCapabilities, type ProviderInfo, type ProviderLogos, SignPresenterProvider, TokenHelper, VERSION, type VenueActionInterface, type VenueActionsResponseInterface, type VenueSectionActionsInterface, authIsExpired, authToNetworkInstance, getAllProviders, getAvailableProviders, getProvider, getProviderConfig, isContentFile, isContentFolder, navigateToPath, networkInstanceToAuth, registerProvider, setProviderSecret, toAuthData };
656
+ export { APlayProvider, type AuthType, B1ChurchProvider, BaseProvider, BibleProjectProvider, CbnProvider, type ContentDownload, type ContentFile, type ContentFolder, type ContentItem, type ContentProviderAuthData, type ContentProviderConfig, type CurrentPlan, type DeviceAuthorizationResponse, DeviceFlowHelper, type DeviceFlowPollResult, type DeviceFlowState, DropboxProvider, type EndpointValue, type EndpointsConfig, FREESHOW_REST_PORT, type FeedActionInterface, type FeedDownloadInterface, type FeedFileInterface, type FeedSectionInterface, type FeedVenueInterface, type FreeShowDiscoverer, FreeShowProvider, HighVoltageKidsProvider, type IProvider, type InstructionItem, type Instructions, JesusFilmProvider, LessonsChurchProvider, LifeChurchProvider, type MdnsService, type MediaLicenseResult, type MediaLicenseStatus, type MessageFileInterface, type NetworkInstance, OAuthHelper, type Plan, type PlanPresentation, type PlanSection, type PlanTimelineItem, PlanningCenterProvider, type ProviderCapabilities, type ProviderInfo, type ProviderLogos, SignPresenterProvider, TokenHelper, VERSION, type VenueActionInterface, type VenueActionsResponseInterface, type VenueSectionActionsInterface, authIsExpired, authToNetworkInstance, servicesToInstances as freeShowServicesToInstances, getAllProviders, getAvailableProviders, getProvider, getProviderConfig, isContentFile, isContentFolder, navigateToPath, networkInstanceToAuth, registerProvider, setProviderSecret, toAuthData };