buzzcasting-storage 2.10.7 → 2.10.8
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/buzzcasting-storage.esm.js +36 -27
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ei = Object.defineProperty;
|
|
2
2
|
var Oi = (v, o, l) => o in v ? Ei(v, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : v[o] = l;
|
|
3
3
|
var P = (v, o, l) => (Oi(v, typeof o != "symbol" ? o + "" : o, l), l);
|
|
4
|
-
const xi = "2.10.
|
|
4
|
+
const xi = "2.10.7";
|
|
5
5
|
class ki {
|
|
6
6
|
constructor(o) {
|
|
7
7
|
P(this, "options");
|
|
@@ -3273,15 +3273,17 @@ class Tr {
|
|
|
3273
3273
|
* @returns IResponse
|
|
3274
3274
|
*/
|
|
3275
3275
|
P(this, "getCloud", async (o) => {
|
|
3276
|
-
const l = await this.db.table(K.CLOUD).where({ id: o.widget }).last().catch(() =>
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3276
|
+
const l = await this.db.table(K.CLOUD).where({ id: o.widget }).last().catch(() => {
|
|
3277
|
+
console.warn(
|
|
3278
|
+
"%capi%C %ccloud",
|
|
3279
|
+
x.API,
|
|
3280
|
+
x.NONE,
|
|
3281
|
+
x.CLOUD,
|
|
3282
|
+
o.slide,
|
|
3283
|
+
o.widget
|
|
3284
|
+
);
|
|
3285
|
+
});
|
|
3286
|
+
return l === void 0 ? { data: null, message: "Cloud Data error", success: !1 } : (l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l);
|
|
3285
3287
|
});
|
|
3286
3288
|
/**
|
|
3287
3289
|
* Retrieve Cloud Data
|
|
@@ -3289,15 +3291,17 @@ class Tr {
|
|
|
3289
3291
|
* @returns IResponse
|
|
3290
3292
|
*/
|
|
3291
3293
|
P(this, "getSeries", async (o) => {
|
|
3292
|
-
const l = await this.db.table(K.SERIES).where({ id: o.widget }).last().catch(() =>
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3294
|
+
const l = await this.db.table(K.SERIES).where({ id: o.widget }).last().catch(() => {
|
|
3295
|
+
console.warn(
|
|
3296
|
+
"%capi%c %cseries",
|
|
3297
|
+
x.API,
|
|
3298
|
+
x.NONE,
|
|
3299
|
+
x.SERIES,
|
|
3300
|
+
o.slide,
|
|
3301
|
+
o.widget
|
|
3302
|
+
);
|
|
3303
|
+
});
|
|
3304
|
+
return l === void 0 ? { data: null, message: "Series Data error", success: !1 } : (l.data.presentation = (o == null ? void 0 : o.presentation) || "not set", l.data.slide = (o == null ? void 0 : o.slide) || "not set", l.message = "Messages retrieved successfully", l.success = !0, l);
|
|
3301
3305
|
});
|
|
3302
3306
|
/**
|
|
3303
3307
|
* Retrieve Cloud Data
|
|
@@ -3307,14 +3311,19 @@ class Tr {
|
|
|
3307
3311
|
P(this, "getMessages", async (o) => {
|
|
3308
3312
|
const l = (j) => j.widget_id === o.widget, y = (j) => j.utc > ((o == null ? void 0 : o.since) || 0), I = (j) => (j == null ? void 0 : j.visible) !== 0;
|
|
3309
3313
|
try {
|
|
3310
|
-
const j = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(I).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() =>
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3314
|
+
const j = await this.db.table(K.TOPICS).orderBy("utc").reverse().filter(l).filter(y).filter(I).limit((o == null ? void 0 : o.limit) ?? 25).toArray().catch(() => {
|
|
3315
|
+
console.warn(
|
|
3316
|
+
"%capi%c %cmessages",
|
|
3317
|
+
x.API,
|
|
3318
|
+
x.NONE,
|
|
3319
|
+
x.MESSAGES,
|
|
3320
|
+
o.slide,
|
|
3321
|
+
o.widget
|
|
3322
|
+
);
|
|
3323
|
+
});
|
|
3324
|
+
if (j.length === 0)
|
|
3325
|
+
return { data: null, message: "No Messages error", success: !1 };
|
|
3326
|
+
const M = j[0] ? j[0].title : "No title", N = j.map(
|
|
3318
3327
|
(be) => be.message_id
|
|
3319
3328
|
), te = (await this.db.table(K.MESSAGES).where("id").anyOf(N).toArray().then((be) => be.sort((ie, xe) => xe.utc - ie.utc))).map(
|
|
3320
3329
|
(be) => be.data
|