@churchapps/content-providers 0.10.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 ChurchApps
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ChurchApps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,105 +1,107 @@
1
- <img align="right" width="150" src="https://raw.githubusercontent.com/ChurchApps/B1Admin/main/public/images/logo.png">
2
-
3
- # @churchapps/content-providers
4
-
5
- > **ContentProviderHelper** is a TypeScript library for integrating with third-party content providers like Planning Center, Lessons.church, and more. It provides a unified interface for browsing media libraries, handling OAuth authentication, and retrieving content for playback in church presentation software.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @churchapps/content-providers
11
- ```
12
-
13
- ## Usage
14
-
15
- ### Browse Available Providers
16
-
17
- ```typescript
18
- import { getAllProviders, getAvailableProviders } from '@churchapps/content-providers';
19
-
20
- // Get all registered providers
21
- const providers = getAllProviders();
22
-
23
- // Get info about available providers
24
- const available = getAvailableProviders();
25
- console.log(available); // [{ id: 'planningcenter', name: 'Planning Center', ... }]
26
- ```
27
-
28
- ### Use a Specific Provider
29
-
30
- ```typescript
31
- import { getProvider } from '@churchapps/content-providers';
32
-
33
- const provider = getProvider('planningcenter');
34
-
35
- // Browse content
36
- const items = await provider.browse();
37
-
38
- // Get presentations/playlist for a service
39
- const plan = await provider.getPresentations(serviceId);
40
- ```
41
-
42
- ### Built-in Providers
43
-
44
- - **B1ChurchProvider** - B1.Church plans (merges plan items with lesson venues and external providers)
45
- - **LessonsChurchProvider** - Lessons.church curriculum and add-ons
46
- - **PlanningCenterProvider** - Planning Center Services (browse only)
47
- - **BibleProjectProvider** - Bible Project videos
48
- - **APlayProvider** - A.Play media library
49
- - **SignPresenterProvider** - Sign Presenter playlists
50
- - **DropboxProvider** - Media files from a Dropbox account
51
- - **JesusFilmProvider** - Jesus Film Project (Arclight API)
52
- - **CbnProvider** - CBN Superbook curriculum
53
- - **HighVoltageKidsProvider** - High Voltage Kids curriculum (static catalog)
54
- - **LifeChurchProvider** - Life.Church kids curriculum (static catalog)
55
-
56
- ### Create a Custom Provider
57
-
58
- ```typescript
59
- import { BaseProvider, registerProvider } from '@churchapps/content-providers';
60
-
61
- class MyProvider extends BaseProvider {
62
- // Declare id/name/logos/config/requiresAuth/authTypes/capabilities and implement browse().
63
- // Every declared authType/capability must be backed by its IProvider methods (enforced by
64
- // tests/contentProviders.test.ts):
65
- // oauth_pkce -> generateCodeVerifier / buildAuthUrl / buildAuthUrlFromChallenge / exchangeCodeForTokens
66
- // (OAuthHelper implements the standard flow; delegate to it like SignPresenterProvider)
67
- // device_flow -> initiateDeviceFlow / pollDeviceFlowToken (see DeviceFlowHelper)
68
- // form_login -> performLogin
69
- // playlist / instructions / mediaLicensing -> getPlaylist / getInstructions / checkMediaLicense
70
- // The protected apiRequest() helper performs authenticated JSON fetches against config.apiBase.
71
- }
72
-
73
- registerProvider(new MyProvider());
74
- ```
75
-
76
- ## Get Involved
77
-
78
- ### 🤝 Help Support Us
79
-
80
- The only reason this program is free is because of the generous support from users. If you want to support us to keep this free, please head over to [ChurchApps](https://churchapps.org/partner) or [sponsor us on GitHub](https://github.com/sponsors/ChurchApps/). Thank you so much!
81
-
82
- ### 🏘️ Join the Community
83
-
84
- We have a great community for end-users on [Facebook](https://www.facebook.com/churchapps.org). It's a good way to ask questions, get tips and follow new updates. Come join us!
85
-
86
- ### ⚠️ Report an Issue
87
-
88
- If you discover an issue or have a feature request, simply submit it to our [issues log](https://github.com/ChurchApps/ContentProviderHelper/issues). Don't be shy, that's how the program gets better.
89
-
90
- ### 💬 Join us on Slack
91
-
92
- If you would like to contribute in any way, head over to our [Slack Channel](https://join.slack.com/t/livechurchsolutions/shared_invite/zt-i88etpo5-ZZhYsQwQLVclW12DKtVflg) and introduce yourself. We'd love to hear from you.
93
-
94
- ### 💻 Start Coding
95
-
96
- If you'd like to contribute to the project:
97
-
98
- 1. Clone the repository
99
- 2. Install dependencies: `npm install`
100
- 3. Run the development playground: `npm run dev`
101
- 4. Build: `npm run build`
102
-
103
- ## License
104
-
105
- MIT
1
+ <img align="right" width="150" src="https://raw.githubusercontent.com/ChurchApps/B1Admin/main/public/images/logo.png">
2
+
3
+ # @churchapps/content-providers
4
+
5
+ > **ContentProviderHelper** is a TypeScript library for integrating with third-party content providers like Planning Center, Lessons.church, and more. It provides a unified interface for browsing media libraries, handling OAuth authentication, and retrieving content for playback in church presentation software.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @churchapps/content-providers
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ### Browse Available Providers
16
+
17
+ ```typescript
18
+ import { getAllProviders, getAvailableProviders } from '@churchapps/content-providers';
19
+
20
+ // Get all registered providers
21
+ const providers = getAllProviders();
22
+
23
+ // Get info about available providers
24
+ const available = getAvailableProviders();
25
+ console.log(available); // [{ id: 'planningcenter', name: 'Planning Center', ... }]
26
+ ```
27
+
28
+ ### Use a Specific Provider
29
+
30
+ ```typescript
31
+ import { getProvider } from '@churchapps/content-providers';
32
+
33
+ const provider = getProvider('planningcenter');
34
+
35
+ // Browse content
36
+ const items = await provider.browse();
37
+
38
+ // Get presentations/playlist for a service
39
+ const plan = await provider.getPresentations(serviceId);
40
+ ```
41
+
42
+ ### Built-in Providers
43
+
44
+ - **B1ChurchProvider** - B1.Church plans (merges plan items with lesson venues and external providers)
45
+ - **LessonsChurchProvider** - Lessons.church curriculum and add-ons
46
+ - **PlanningCenterProvider** - Planning Center Services (browse only)
47
+ - **BibleProjectProvider** - Bible Project videos
48
+ - **APlayProvider** - A.Play media library
49
+ - **SignPresenterProvider** - Sign Presenter playlists
50
+ - **DropboxProvider** - Media files from a Dropbox account
51
+ - **JesusFilmProvider** - Jesus Film Project (Arclight API)
52
+ - **CbnProvider** - CBN Superbook curriculum
53
+ - **HighVoltageKidsProvider** - High Voltage Kids curriculum (static catalog)
54
+ - **LifeChurchProvider** - Life.Church kids curriculum (static catalog)
55
+ - **FreeShowProvider** - FreeShow shows discovered on the local network (mocked announcements playlist)
56
+
57
+ ### Create a Custom Provider
58
+
59
+ ```typescript
60
+ import { BaseProvider, registerProvider } from '@churchapps/content-providers';
61
+
62
+ class MyProvider extends BaseProvider {
63
+ // Declare id/name/logos/config/requiresAuth/authTypes/capabilities and implement browse().
64
+ // Every declared authType/capability must be backed by its IProvider methods (enforced by
65
+ // tests/contentProviders.test.ts):
66
+ // oauth_pkce -> generateCodeVerifier / buildAuthUrl / buildAuthUrlFromChallenge / exchangeCodeForTokens
67
+ // (OAuthHelper implements the standard flow; delegate to it like SignPresenterProvider)
68
+ // device_flow -> initiateDeviceFlow / pollDeviceFlowToken (see DeviceFlowHelper)
69
+ // form_login -> performLogin
70
+ // network_discovery -> discoverInstances
71
+ // playlist / instructions / mediaLicensing -> getPlaylist / getInstructions / checkMediaLicense
72
+ // The protected apiRequest() helper performs authenticated JSON fetches against config.apiBase.
73
+ }
74
+
75
+ registerProvider(new MyProvider());
76
+ ```
77
+
78
+ ## Get Involved
79
+
80
+ ### 🤝 Help Support Us
81
+
82
+ The only reason this program is free is because of the generous support from users. If you want to support us to keep this free, please head over to [ChurchApps](https://churchapps.org/partner) or [sponsor us on GitHub](https://github.com/sponsors/ChurchApps/). Thank you so much!
83
+
84
+ ### 🏘️ Join the Community
85
+
86
+ We have a great community for end-users on [Facebook](https://www.facebook.com/churchapps.org). It's a good way to ask questions, get tips and follow new updates. Come join us!
87
+
88
+ ### ⚠️ Report an Issue
89
+
90
+ If you discover an issue or have a feature request, simply submit it to our [issues log](https://github.com/ChurchApps/ContentProviderHelper/issues). Don't be shy, that's how the program gets better.
91
+
92
+ ### 💬 Join us on Slack
93
+
94
+ If you would like to contribute in any way, head over to our [Slack Channel](https://join.slack.com/t/livechurchsolutions/shared_invite/zt-i88etpo5-ZZhYsQwQLVclW12DKtVflg) and introduce yourself. We'd love to hear from you.
95
+
96
+ ### 💻 Start Coding
97
+
98
+ If you'd like to contribute to the project:
99
+
100
+ 1. Clone the repository
101
+ 2. Install dependencies: `npm install`
102
+ 3. Run the development playground: `npm run dev`
103
+ 4. Build: `npm run build`
104
+
105
+ ## License
106
+
107
+ MIT