@techstuff-dev/foundation-api-utils 1.8.0 → 1.9.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.
|
@@ -234,38 +234,45 @@ interface ESSchedule {
|
|
|
234
234
|
_id: string;
|
|
235
235
|
_score: null;
|
|
236
236
|
_source: {
|
|
237
|
-
uuid
|
|
238
|
-
created
|
|
239
|
-
langcode
|
|
240
|
-
updated
|
|
241
|
-
monday_title
|
|
242
|
-
monday_start
|
|
243
|
-
monday_end
|
|
244
|
-
monday_video
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
237
|
+
uuid: string[];
|
|
238
|
+
created: string[];
|
|
239
|
+
langcode: string[];
|
|
240
|
+
updated: string[];
|
|
241
|
+
monday_title: string[];
|
|
242
|
+
monday_start: string[];
|
|
243
|
+
monday_end: string[];
|
|
244
|
+
monday_video: string[];
|
|
245
|
+
monday_live: string[];
|
|
246
|
+
tuesday_title: string[];
|
|
247
|
+
tuesday_start: string[];
|
|
248
|
+
tuesday_end: string[];
|
|
249
|
+
tuesday_video: string[];
|
|
250
|
+
tuesday_live: string[];
|
|
251
|
+
wednesday_title: string[];
|
|
252
|
+
wednesday_start: string[];
|
|
253
|
+
wednesday_end: string[];
|
|
254
|
+
wednesday_video: string[];
|
|
255
|
+
wednesday_live: string[];
|
|
256
|
+
thursday_title: string[];
|
|
257
|
+
thursday_start: string[];
|
|
258
|
+
thursday_end: string[];
|
|
259
|
+
thursday_video: string[];
|
|
260
|
+
thursday_live: string[];
|
|
261
|
+
friday_title: string[];
|
|
262
|
+
friday_start: string[];
|
|
263
|
+
friday_end: string[];
|
|
264
|
+
friday_video: string[];
|
|
265
|
+
friday_live: string[];
|
|
266
|
+
saturday_title: string[];
|
|
267
|
+
saturday_start: string[];
|
|
268
|
+
saturday_end: string[];
|
|
269
|
+
saturday_video: string[];
|
|
270
|
+
saturday_live: string[];
|
|
271
|
+
sunday_title: string[];
|
|
272
|
+
sunday_start: string[];
|
|
273
|
+
sunday_end: string[];
|
|
274
|
+
sunday_video: string[];
|
|
275
|
+
sunday_live: string[];
|
|
269
276
|
};
|
|
270
277
|
sort: number[];
|
|
271
278
|
}
|
|
@@ -432,3 +439,60 @@ interface Series {
|
|
|
432
439
|
nid: string;
|
|
433
440
|
season: string;
|
|
434
441
|
}
|
|
442
|
+
interface Schedule {
|
|
443
|
+
uuid: string;
|
|
444
|
+
created: string;
|
|
445
|
+
langcode: string;
|
|
446
|
+
updated: string;
|
|
447
|
+
days: {
|
|
448
|
+
monday?: {
|
|
449
|
+
title: string;
|
|
450
|
+
start: string;
|
|
451
|
+
end: string;
|
|
452
|
+
video: string;
|
|
453
|
+
live: string;
|
|
454
|
+
}[];
|
|
455
|
+
tuesday?: {
|
|
456
|
+
title: string;
|
|
457
|
+
start: string;
|
|
458
|
+
end: string;
|
|
459
|
+
video: string;
|
|
460
|
+
live: string;
|
|
461
|
+
}[];
|
|
462
|
+
wednesday?: {
|
|
463
|
+
title: string;
|
|
464
|
+
start: string;
|
|
465
|
+
end: string;
|
|
466
|
+
video: string;
|
|
467
|
+
live: string;
|
|
468
|
+
}[];
|
|
469
|
+
thursday?: {
|
|
470
|
+
title: string;
|
|
471
|
+
start: string;
|
|
472
|
+
end: string;
|
|
473
|
+
video: string;
|
|
474
|
+
live: string;
|
|
475
|
+
}[];
|
|
476
|
+
friday?: {
|
|
477
|
+
title: string;
|
|
478
|
+
start: string;
|
|
479
|
+
end: string;
|
|
480
|
+
video: string;
|
|
481
|
+
live: string;
|
|
482
|
+
}[];
|
|
483
|
+
saturday?: {
|
|
484
|
+
title: string;
|
|
485
|
+
start: string;
|
|
486
|
+
end: string;
|
|
487
|
+
video: string;
|
|
488
|
+
live: string;
|
|
489
|
+
}[];
|
|
490
|
+
sunday?: {
|
|
491
|
+
title: string;
|
|
492
|
+
start: string;
|
|
493
|
+
end: string;
|
|
494
|
+
video: string;
|
|
495
|
+
live: string;
|
|
496
|
+
}[];
|
|
497
|
+
}[];
|
|
498
|
+
}
|
|
@@ -119,104 +119,7 @@ export declare function formatSections(data: ESSection[]): {
|
|
|
119
119
|
display: string | undefined;
|
|
120
120
|
id: string | undefined;
|
|
121
121
|
}[];
|
|
122
|
-
export declare function formatSchedule(data: ESSchedule[]):
|
|
123
|
-
uuid: string | undefined;
|
|
124
|
-
created: string | undefined;
|
|
125
|
-
langcode: string | undefined;
|
|
126
|
-
updated: string | undefined;
|
|
127
|
-
days: ({
|
|
128
|
-
monday: false | {
|
|
129
|
-
end: string | undefined;
|
|
130
|
-
start: string | undefined;
|
|
131
|
-
title: string;
|
|
132
|
-
video: string | undefined;
|
|
133
|
-
}[] | undefined;
|
|
134
|
-
tuesday?: undefined;
|
|
135
|
-
wednesday?: undefined;
|
|
136
|
-
thursday?: undefined;
|
|
137
|
-
friday?: undefined;
|
|
138
|
-
saturday?: undefined;
|
|
139
|
-
sunday?: undefined;
|
|
140
|
-
} | {
|
|
141
|
-
tuesday: false | {
|
|
142
|
-
end: string | undefined;
|
|
143
|
-
start: string | undefined;
|
|
144
|
-
title: string;
|
|
145
|
-
video: string | undefined;
|
|
146
|
-
}[] | undefined;
|
|
147
|
-
monday?: undefined;
|
|
148
|
-
wednesday?: undefined;
|
|
149
|
-
thursday?: undefined;
|
|
150
|
-
friday?: undefined;
|
|
151
|
-
saturday?: undefined;
|
|
152
|
-
sunday?: undefined;
|
|
153
|
-
} | {
|
|
154
|
-
wednesday: false | {
|
|
155
|
-
end: string | undefined;
|
|
156
|
-
start: string | undefined;
|
|
157
|
-
title: string;
|
|
158
|
-
video: string | undefined;
|
|
159
|
-
}[] | undefined;
|
|
160
|
-
monday?: undefined;
|
|
161
|
-
tuesday?: undefined;
|
|
162
|
-
thursday?: undefined;
|
|
163
|
-
friday?: undefined;
|
|
164
|
-
saturday?: undefined;
|
|
165
|
-
sunday?: undefined;
|
|
166
|
-
} | {
|
|
167
|
-
thursday: false | {
|
|
168
|
-
end: string | undefined;
|
|
169
|
-
start: string | undefined;
|
|
170
|
-
title: string;
|
|
171
|
-
video: string | undefined;
|
|
172
|
-
}[] | undefined;
|
|
173
|
-
monday?: undefined;
|
|
174
|
-
tuesday?: undefined;
|
|
175
|
-
wednesday?: undefined;
|
|
176
|
-
friday?: undefined;
|
|
177
|
-
saturday?: undefined;
|
|
178
|
-
sunday?: undefined;
|
|
179
|
-
} | {
|
|
180
|
-
friday: false | {
|
|
181
|
-
end: string | undefined;
|
|
182
|
-
start: string | undefined;
|
|
183
|
-
title: string;
|
|
184
|
-
video: string | undefined;
|
|
185
|
-
}[] | undefined;
|
|
186
|
-
monday?: undefined;
|
|
187
|
-
tuesday?: undefined;
|
|
188
|
-
wednesday?: undefined;
|
|
189
|
-
thursday?: undefined;
|
|
190
|
-
saturday?: undefined;
|
|
191
|
-
sunday?: undefined;
|
|
192
|
-
} | {
|
|
193
|
-
saturday: false | {
|
|
194
|
-
end: string | undefined;
|
|
195
|
-
start: string | undefined;
|
|
196
|
-
title: string;
|
|
197
|
-
video: string | undefined;
|
|
198
|
-
}[] | undefined;
|
|
199
|
-
monday?: undefined;
|
|
200
|
-
tuesday?: undefined;
|
|
201
|
-
wednesday?: undefined;
|
|
202
|
-
thursday?: undefined;
|
|
203
|
-
friday?: undefined;
|
|
204
|
-
sunday?: undefined;
|
|
205
|
-
} | {
|
|
206
|
-
sunday: false | {
|
|
207
|
-
end: string | undefined;
|
|
208
|
-
start: string | undefined;
|
|
209
|
-
title: string;
|
|
210
|
-
video: string | undefined;
|
|
211
|
-
}[] | undefined;
|
|
212
|
-
monday?: undefined;
|
|
213
|
-
tuesday?: undefined;
|
|
214
|
-
wednesday?: undefined;
|
|
215
|
-
thursday?: undefined;
|
|
216
|
-
friday?: undefined;
|
|
217
|
-
saturday?: undefined;
|
|
218
|
-
})[];
|
|
219
|
-
}[];
|
|
122
|
+
export declare function formatSchedule(data: ESSchedule[]): Schedule[];
|
|
220
123
|
export declare function formatChallenges(data: ESChallenge[]): {
|
|
221
124
|
uuid: string | undefined;
|
|
222
125
|
title: string | undefined;
|
package/dist/index.esm.js
CHANGED
|
@@ -391,103 +391,96 @@ function formatSections(data) {
|
|
|
391
391
|
}
|
|
392
392
|
function formatSchedule(data) {
|
|
393
393
|
return data.map(function (item) {
|
|
394
|
-
var
|
|
394
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
395
395
|
return {
|
|
396
|
-
uuid: _source.uuid
|
|
397
|
-
created: _source.created
|
|
398
|
-
langcode: _source.langcode
|
|
399
|
-
updated: _source.updated
|
|
396
|
+
uuid: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.uuid) === null || _b === void 0 ? void 0 : _b[0],
|
|
397
|
+
created: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.created) === null || _d === void 0 ? void 0 : _d[0],
|
|
398
|
+
langcode: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.langcode) === null || _f === void 0 ? void 0 : _f[0],
|
|
399
|
+
updated: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.updated) === null || _h === void 0 ? void 0 : _h[0],
|
|
400
400
|
days: [
|
|
401
401
|
{
|
|
402
|
-
monday: _source.monday_title
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}),
|
|
402
|
+
monday: (_k = (_j = item === null || item === void 0 ? void 0 : item._source) === null || _j === void 0 ? void 0 : _j.monday_title) === null || _k === void 0 ? void 0 : _k.map(function (title, index) {
|
|
403
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
404
|
+
return {
|
|
405
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.monday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
406
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.monday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
407
|
+
title: title,
|
|
408
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.monday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
409
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.monday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
410
|
+
};
|
|
411
|
+
}),
|
|
413
412
|
},
|
|
414
413
|
{
|
|
415
|
-
tuesday: _source.tuesday_title
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}),
|
|
414
|
+
tuesday: (_m = (_l = item === null || item === void 0 ? void 0 : item._source) === null || _l === void 0 ? void 0 : _l.tuesday_title) === null || _m === void 0 ? void 0 : _m.map(function (title, index) {
|
|
415
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
416
|
+
return {
|
|
417
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.tuesday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
418
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.tuesday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
419
|
+
title: title,
|
|
420
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.tuesday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
421
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.tuesday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
422
|
+
};
|
|
423
|
+
}),
|
|
426
424
|
},
|
|
427
425
|
{
|
|
428
|
-
wednesday: _source.wednesday_title
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}),
|
|
426
|
+
wednesday: (_p = (_o = item === null || item === void 0 ? void 0 : item._source) === null || _o === void 0 ? void 0 : _o.wednesday_title) === null || _p === void 0 ? void 0 : _p.map(function (title, index) {
|
|
427
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
428
|
+
return {
|
|
429
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.wednesday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
430
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.wednesday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
431
|
+
title: title,
|
|
432
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.wednesday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
433
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.wednesday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
434
|
+
};
|
|
435
|
+
}),
|
|
439
436
|
},
|
|
440
437
|
{
|
|
441
|
-
thursday: _source.thursday_title
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}),
|
|
438
|
+
thursday: (_r = (_q = item === null || item === void 0 ? void 0 : item._source) === null || _q === void 0 ? void 0 : _q.thursday_title) === null || _r === void 0 ? void 0 : _r.map(function (title, index) {
|
|
439
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
440
|
+
return {
|
|
441
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.thursday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
442
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.thursday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
443
|
+
title: title,
|
|
444
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.thursday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
445
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.thursday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
446
|
+
};
|
|
447
|
+
}),
|
|
452
448
|
},
|
|
453
449
|
{
|
|
454
|
-
friday: _source.friday_title
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
}),
|
|
450
|
+
friday: (_t = (_s = item === null || item === void 0 ? void 0 : item._source) === null || _s === void 0 ? void 0 : _s.friday_title) === null || _t === void 0 ? void 0 : _t.map(function (title, index) {
|
|
451
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
452
|
+
return {
|
|
453
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.friday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
454
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.friday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
455
|
+
title: title,
|
|
456
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.friday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
457
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.friday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
458
|
+
};
|
|
459
|
+
}),
|
|
465
460
|
},
|
|
466
461
|
{
|
|
467
|
-
saturday: _source.saturday_title
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}),
|
|
462
|
+
saturday: (_v = (_u = item === null || item === void 0 ? void 0 : item._source) === null || _u === void 0 ? void 0 : _u.saturday_title) === null || _v === void 0 ? void 0 : _v.map(function (title, index) {
|
|
463
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
464
|
+
return {
|
|
465
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.saturday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
466
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.saturday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
467
|
+
title: title,
|
|
468
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.saturday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
469
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.saturday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
470
|
+
};
|
|
471
|
+
}),
|
|
478
472
|
},
|
|
479
473
|
{
|
|
480
|
-
sunday: _source.sunday_title
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}),
|
|
474
|
+
sunday: (_x = (_w = item === null || item === void 0 ? void 0 : item._source) === null || _w === void 0 ? void 0 : _w.sunday_title) === null || _x === void 0 ? void 0 : _x.map(function (title, index) {
|
|
475
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
476
|
+
return {
|
|
477
|
+
end: (_b = (_a = item === null || item === void 0 ? void 0 : item._source) === null || _a === void 0 ? void 0 : _a.sunday_end) === null || _b === void 0 ? void 0 : _b[index],
|
|
478
|
+
start: (_d = (_c = item === null || item === void 0 ? void 0 : item._source) === null || _c === void 0 ? void 0 : _c.sunday_start) === null || _d === void 0 ? void 0 : _d[index],
|
|
479
|
+
title: title,
|
|
480
|
+
video: (_f = (_e = item === null || item === void 0 ? void 0 : item._source) === null || _e === void 0 ? void 0 : _e.sunday_video) === null || _f === void 0 ? void 0 : _f[index],
|
|
481
|
+
live: (_h = (_g = item === null || item === void 0 ? void 0 : item._source) === null || _g === void 0 ? void 0 : _g.sunday_live) === null || _h === void 0 ? void 0 : _h[index],
|
|
482
|
+
};
|
|
483
|
+
}),
|
|
491
484
|
},
|
|
492
485
|
],
|
|
493
486
|
};
|