@churchapps/content-providers 0.7.3 → 0.8.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.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -202,7 +202,8 @@ var DeviceFlowHelper = class {
|
|
|
202
202
|
const response = await fetch(`${config.oauthBase}/token`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ grant_type: "urn:ietf:params:oauth:grant-type:device_code", device_code: deviceCode, client_id: config.clientId }) });
|
|
203
203
|
if (response.ok) {
|
|
204
204
|
const data = await response.json();
|
|
205
|
-
|
|
205
|
+
const auth = toAuthData(data, { scope: config.scopes.join(" ") });
|
|
206
|
+
return data.plan_type_id ? { ...auth, planTypeId: data.plan_type_id } : auth;
|
|
206
207
|
}
|
|
207
208
|
const errorData = await response.json();
|
|
208
209
|
switch (errorData.error) {
|
|
@@ -710,7 +711,7 @@ async function convertAddOnToFile(addOn) {
|
|
|
710
711
|
} else {
|
|
711
712
|
return null;
|
|
712
713
|
}
|
|
713
|
-
return { type: "file", id: addOn.id, title: addOn.name, mediaType, thumbnail: addOn.image, url, downloadUrl: url, seconds, loopVideo: video?.loopVideo || false };
|
|
714
|
+
return { type: "file", id: addOn.id, title: addOn.name ?? detail.name, mediaType, thumbnail: addOn.image ?? detail.image, url, downloadUrl: url, seconds, loopVideo: video?.loopVideo || false };
|
|
714
715
|
}
|
|
715
716
|
function buildSectionActionsMap(actionsResponse, lessonImage, feedResponse) {
|
|
716
717
|
const sectionActionsMap = /* @__PURE__ */ new Map();
|
|
@@ -1235,7 +1236,7 @@ var SECTION_TYPES = /* @__PURE__ */ new Set(["item", "section", "lessonSection",
|
|
|
1235
1236
|
var ACTION_TYPES = /* @__PURE__ */ new Set(["action", "lessonAction", "providerPresentation", "lessonAddOn", "addon", "providerFile", "file"]);
|
|
1236
1237
|
function collectFilesFromNode(node) {
|
|
1237
1238
|
const files = [];
|
|
1238
|
-
if (node.downloadUrl) {
|
|
1239
|
+
if (node.downloadUrl && (node.itemType === "file" || !node.children?.length)) {
|
|
1239
1240
|
files.push({
|
|
1240
1241
|
id: node.id,
|
|
1241
1242
|
name: node.label || "",
|
|
@@ -17838,7 +17839,7 @@ function getAvailableProviders(ids) {
|
|
|
17838
17839
|
}
|
|
17839
17840
|
|
|
17840
17841
|
// src/index.ts
|
|
17841
|
-
var VERSION = true ? "0.
|
|
17842
|
+
var VERSION = true ? "0.8.0" : "dev";
|
|
17842
17843
|
// Annotate the CommonJS export names for ESM import in node:
|
|
17843
17844
|
0 && (module.exports = {
|
|
17844
17845
|
APlayProvider,
|