@deadair/sdk 0.36.0 → 0.37.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.js +80 -48
- package/dist/index.js.map +1 -1
- package/dist/playlists/playlists.client.d.ts +1 -1
- package/dist/playlists/playlists.client.d.ts.map +1 -1
- package/dist/playlists/types/playlists.types.d.ts +19 -2
- package/dist/playlists/types/playlists.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2503,7 +2503,7 @@ var PersonasClient = class {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
};
|
|
2505
2505
|
|
|
2506
|
-
// src/playlists/types/
|
|
2506
|
+
// src/playlists/types/playlists.types.ts
|
|
2507
2507
|
import { DateTime as DateTime9 } from "luxon";
|
|
2508
2508
|
var __dt9 = /* @__PURE__ */ __name((v, path) => {
|
|
2509
2509
|
if (typeof v !== "string") {
|
|
@@ -2513,10 +2513,40 @@ var __dt9 = /* @__PURE__ */ __name((v, path) => {
|
|
|
2513
2513
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2514
2514
|
return d;
|
|
2515
2515
|
}, "__dt");
|
|
2516
|
+
function reviveCatalogPlaylistSource(raw) {
|
|
2517
|
+
const __o0 = raw;
|
|
2518
|
+
__o0["listedAt"] = __dt9(__o0["listedAt"], "CatalogPlaylistSource.listedAt");
|
|
2519
|
+
return raw;
|
|
2520
|
+
}
|
|
2521
|
+
__name(reviveCatalogPlaylistSource, "reviveCatalogPlaylistSource");
|
|
2522
|
+
function reviveCatalogPlaylistPage(raw) {
|
|
2523
|
+
const __o0 = raw;
|
|
2524
|
+
if (__o0["sources"] != null) {
|
|
2525
|
+
{
|
|
2526
|
+
const __a1 = __o0["sources"];
|
|
2527
|
+
for (let __i2 = 0; __i2 < __a1.length; __i2++) {
|
|
2528
|
+
reviveCatalogPlaylistSource(__a1[__i2]);
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
return raw;
|
|
2533
|
+
}
|
|
2534
|
+
__name(reviveCatalogPlaylistPage, "reviveCatalogPlaylistPage");
|
|
2535
|
+
|
|
2536
|
+
// src/playlists/types/station.playlists.types.ts
|
|
2537
|
+
import { DateTime as DateTime10 } from "luxon";
|
|
2538
|
+
var __dt10 = /* @__PURE__ */ __name((v, path) => {
|
|
2539
|
+
if (typeof v !== "string") {
|
|
2540
|
+
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
2541
|
+
}
|
|
2542
|
+
const d = DateTime10.fromISO(v);
|
|
2543
|
+
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2544
|
+
return d;
|
|
2545
|
+
}, "__dt");
|
|
2516
2546
|
function reviveStationPlaylist(raw) {
|
|
2517
2547
|
const __o0 = raw;
|
|
2518
|
-
__o0["createdAt"] =
|
|
2519
|
-
__o0["updatedAt"] =
|
|
2548
|
+
__o0["createdAt"] = __dt10(__o0["createdAt"], "StationPlaylist.createdAt");
|
|
2549
|
+
__o0["updatedAt"] = __dt10(__o0["updatedAt"], "StationPlaylist.updatedAt");
|
|
2520
2550
|
return raw;
|
|
2521
2551
|
}
|
|
2522
2552
|
__name(reviveStationPlaylist, "reviveStationPlaylist");
|
|
@@ -2554,13 +2584,13 @@ var PlaylistsClient = class {
|
|
|
2554
2584
|
}
|
|
2555
2585
|
/**
|
|
2556
2586
|
* @name List importable playlists
|
|
2557
|
-
* @description
|
|
2587
|
+
* @description Every playlist the installed `catalog` plugins offer, as the library sync last read each one's list. A source with no list kept yet is asked while the request waits
|
|
2558
2588
|
*/
|
|
2559
2589
|
async listImportablePlaylists() {
|
|
2560
2590
|
const result = await this.fetch(`/playlists`, {
|
|
2561
2591
|
method: "GET"
|
|
2562
2592
|
});
|
|
2563
|
-
return await parseJson(result);
|
|
2593
|
+
return reviveCatalogPlaylistPage(await parseJson(result));
|
|
2564
2594
|
}
|
|
2565
2595
|
/**
|
|
2566
2596
|
* @name Get playlist tracks
|
|
@@ -2800,22 +2830,22 @@ var PlayoutClient = class {
|
|
|
2800
2830
|
};
|
|
2801
2831
|
|
|
2802
2832
|
// src/plugins/types/plugins.types.ts
|
|
2803
|
-
import { DateTime as
|
|
2804
|
-
var
|
|
2833
|
+
import { DateTime as DateTime11 } from "luxon";
|
|
2834
|
+
var __dt11 = /* @__PURE__ */ __name((v, path) => {
|
|
2805
2835
|
if (typeof v !== "string") {
|
|
2806
2836
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
2807
2837
|
}
|
|
2808
|
-
const d =
|
|
2838
|
+
const d = DateTime11.fromISO(v);
|
|
2809
2839
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2810
2840
|
return d;
|
|
2811
2841
|
}, "__dt");
|
|
2812
2842
|
function revivePluginSummary(raw) {
|
|
2813
2843
|
const __o0 = raw;
|
|
2814
2844
|
if (__o0["firstEnabledAt"] != null) {
|
|
2815
|
-
__o0["firstEnabledAt"] =
|
|
2845
|
+
__o0["firstEnabledAt"] = __dt11(__o0["firstEnabledAt"], "PluginSummary.firstEnabledAt");
|
|
2816
2846
|
}
|
|
2817
2847
|
if (__o0["nextProbeAt"] != null) {
|
|
2818
|
-
__o0["nextProbeAt"] =
|
|
2848
|
+
__o0["nextProbeAt"] = __dt11(__o0["nextProbeAt"], "PluginSummary.nextProbeAt");
|
|
2819
2849
|
}
|
|
2820
2850
|
return raw;
|
|
2821
2851
|
}
|
|
@@ -3132,19 +3162,19 @@ var PodcastsClient = class {
|
|
|
3132
3162
|
};
|
|
3133
3163
|
|
|
3134
3164
|
// src/productions/types/productions.types.ts
|
|
3135
|
-
import { DateTime as
|
|
3136
|
-
var
|
|
3165
|
+
import { DateTime as DateTime12 } from "luxon";
|
|
3166
|
+
var __dt12 = /* @__PURE__ */ __name((v, path) => {
|
|
3137
3167
|
if (typeof v !== "string") {
|
|
3138
3168
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3139
3169
|
}
|
|
3140
|
-
const d =
|
|
3170
|
+
const d = DateTime12.fromISO(v);
|
|
3141
3171
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3142
3172
|
return d;
|
|
3143
3173
|
}, "__dt");
|
|
3144
3174
|
function reviveProductionRequest(raw) {
|
|
3145
3175
|
const __o0 = raw;
|
|
3146
3176
|
if (__o0["scheduledFor"] != null) {
|
|
3147
|
-
__o0["scheduledFor"] =
|
|
3177
|
+
__o0["scheduledFor"] = __dt12(__o0["scheduledFor"], "ProductionRequest.scheduledFor");
|
|
3148
3178
|
}
|
|
3149
3179
|
return raw;
|
|
3150
3180
|
}
|
|
@@ -3152,12 +3182,12 @@ __name(reviveProductionRequest, "reviveProductionRequest");
|
|
|
3152
3182
|
function reviveProduction(raw) {
|
|
3153
3183
|
const __o0 = raw;
|
|
3154
3184
|
if (__o0["scheduledFor"] != null) {
|
|
3155
|
-
__o0["scheduledFor"] =
|
|
3185
|
+
__o0["scheduledFor"] = __dt12(__o0["scheduledFor"], "Production.scheduledFor");
|
|
3156
3186
|
}
|
|
3157
3187
|
if (__o0["cancelledAt"] != null) {
|
|
3158
|
-
__o0["cancelledAt"] =
|
|
3188
|
+
__o0["cancelledAt"] = __dt12(__o0["cancelledAt"], "Production.cancelledAt");
|
|
3159
3189
|
}
|
|
3160
|
-
__o0["createdAt"] =
|
|
3190
|
+
__o0["createdAt"] = __dt12(__o0["createdAt"], "Production.createdAt");
|
|
3161
3191
|
return raw;
|
|
3162
3192
|
}
|
|
3163
3193
|
__name(reviveProduction, "reviveProduction");
|
|
@@ -3219,26 +3249,26 @@ var ProductionsClient = class {
|
|
|
3219
3249
|
};
|
|
3220
3250
|
|
|
3221
3251
|
// src/render/types/render.types.ts
|
|
3222
|
-
import { DateTime as
|
|
3223
|
-
var
|
|
3252
|
+
import { DateTime as DateTime13 } from "luxon";
|
|
3253
|
+
var __dt13 = /* @__PURE__ */ __name((v, path) => {
|
|
3224
3254
|
if (typeof v !== "string") {
|
|
3225
3255
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3226
3256
|
}
|
|
3227
|
-
const d =
|
|
3257
|
+
const d = DateTime13.fromISO(v);
|
|
3228
3258
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3229
3259
|
return d;
|
|
3230
3260
|
}, "__dt");
|
|
3231
3261
|
function revivePad(raw) {
|
|
3232
3262
|
const __o0 = raw;
|
|
3233
3263
|
if (__o0["lastUsedAt"] != null) {
|
|
3234
|
-
__o0["lastUsedAt"] =
|
|
3264
|
+
__o0["lastUsedAt"] = __dt13(__o0["lastUsedAt"], "Pad.lastUsedAt");
|
|
3235
3265
|
}
|
|
3236
3266
|
return raw;
|
|
3237
3267
|
}
|
|
3238
3268
|
__name(revivePad, "revivePad");
|
|
3239
3269
|
function reviveScriptAttempt(raw) {
|
|
3240
3270
|
const __o0 = raw;
|
|
3241
|
-
__o0["at"] =
|
|
3271
|
+
__o0["at"] = __dt13(__o0["at"], "ScriptAttempt.at");
|
|
3242
3272
|
return raw;
|
|
3243
3273
|
}
|
|
3244
3274
|
__name(reviveScriptAttempt, "reviveScriptAttempt");
|
|
@@ -3719,20 +3749,20 @@ var RenderClient = class {
|
|
|
3719
3749
|
};
|
|
3720
3750
|
|
|
3721
3751
|
// src/requests/types/requests.types.ts
|
|
3722
|
-
import { DateTime as
|
|
3723
|
-
var
|
|
3752
|
+
import { DateTime as DateTime14 } from "luxon";
|
|
3753
|
+
var __dt14 = /* @__PURE__ */ __name((v, path) => {
|
|
3724
3754
|
if (typeof v !== "string") {
|
|
3725
3755
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3726
3756
|
}
|
|
3727
|
-
const d =
|
|
3757
|
+
const d = DateTime14.fromISO(v);
|
|
3728
3758
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3729
3759
|
return d;
|
|
3730
3760
|
}, "__dt");
|
|
3731
3761
|
function reviveListenerRequest(raw) {
|
|
3732
3762
|
const __o0 = raw;
|
|
3733
|
-
__o0["createdAt"] =
|
|
3763
|
+
__o0["createdAt"] = __dt14(__o0["createdAt"], "ListenerRequest.createdAt");
|
|
3734
3764
|
if (__o0["airedAt"] != null) {
|
|
3735
|
-
__o0["airedAt"] =
|
|
3765
|
+
__o0["airedAt"] = __dt14(__o0["airedAt"], "ListenerRequest.airedAt");
|
|
3736
3766
|
}
|
|
3737
3767
|
return raw;
|
|
3738
3768
|
}
|
|
@@ -3956,19 +3986,19 @@ var SettingsClient = class {
|
|
|
3956
3986
|
};
|
|
3957
3987
|
|
|
3958
3988
|
// src/station/types/logs.types.ts
|
|
3959
|
-
import { DateTime as
|
|
3960
|
-
var
|
|
3989
|
+
import { DateTime as DateTime15 } from "luxon";
|
|
3990
|
+
var __dt15 = /* @__PURE__ */ __name((v, path) => {
|
|
3961
3991
|
if (typeof v !== "string") {
|
|
3962
3992
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3963
3993
|
}
|
|
3964
|
-
const d =
|
|
3994
|
+
const d = DateTime15.fromISO(v);
|
|
3965
3995
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3966
3996
|
return d;
|
|
3967
3997
|
}, "__dt");
|
|
3968
3998
|
function reviveLogSource(raw) {
|
|
3969
3999
|
const __o0 = raw;
|
|
3970
4000
|
if (__o0["lastWriteAt"] != null) {
|
|
3971
|
-
__o0["lastWriteAt"] =
|
|
4001
|
+
__o0["lastWriteAt"] = __dt15(__o0["lastWriteAt"], "LogSource.lastWriteAt");
|
|
3972
4002
|
}
|
|
3973
4003
|
return raw;
|
|
3974
4004
|
}
|
|
@@ -3986,12 +4016,12 @@ function reviveLogSourceList(raw) {
|
|
|
3986
4016
|
__name(reviveLogSourceList, "reviveLogSourceList");
|
|
3987
4017
|
|
|
3988
4018
|
// src/station/types/station.types.ts
|
|
3989
|
-
import { DateTime as
|
|
3990
|
-
var
|
|
4019
|
+
import { DateTime as DateTime16 } from "luxon";
|
|
4020
|
+
var __dt16 = /* @__PURE__ */ __name((v, path) => {
|
|
3991
4021
|
if (typeof v !== "string") {
|
|
3992
4022
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3993
4023
|
}
|
|
3994
|
-
const d =
|
|
4024
|
+
const d = DateTime16.fromISO(v);
|
|
3995
4025
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3996
4026
|
return d;
|
|
3997
4027
|
}, "__dt");
|
|
@@ -3999,15 +4029,15 @@ var __dtf = /* @__PURE__ */ __name((v, path, fmt) => {
|
|
|
3999
4029
|
if (typeof v !== "string") {
|
|
4000
4030
|
throw new TypeError(`ContractKit: expected a string at '${path}' in format ${fmt}, received ${typeof v}.`);
|
|
4001
4031
|
}
|
|
4002
|
-
const d =
|
|
4032
|
+
const d = DateTime16.fromFormat(v, fmt);
|
|
4003
4033
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' does not match format ${fmt}.`);
|
|
4004
4034
|
return d;
|
|
4005
4035
|
}, "__dtf");
|
|
4006
4036
|
function reviveStationHeartbeat(raw) {
|
|
4007
4037
|
const __o0 = raw;
|
|
4008
|
-
__o0["startedAt"] =
|
|
4038
|
+
__o0["startedAt"] = __dt16(__o0["startedAt"], "StationHeartbeat.startedAt");
|
|
4009
4039
|
if (__o0["lastBeat"] != null) {
|
|
4010
|
-
__o0["lastBeat"] =
|
|
4040
|
+
__o0["lastBeat"] = __dt16(__o0["lastBeat"], "StationHeartbeat.lastBeat");
|
|
4011
4041
|
}
|
|
4012
4042
|
return raw;
|
|
4013
4043
|
}
|
|
@@ -4022,7 +4052,7 @@ function reviveStationRelease(raw) {
|
|
|
4022
4052
|
__name(reviveStationRelease, "reviveStationRelease");
|
|
4023
4053
|
function reviveStationCheckup(raw) {
|
|
4024
4054
|
const __o0 = raw;
|
|
4025
|
-
__o0["readAt"] =
|
|
4055
|
+
__o0["readAt"] = __dt16(__o0["readAt"], "StationCheckup.readAt");
|
|
4026
4056
|
if (__o0["heartbeats"] != null) {
|
|
4027
4057
|
{
|
|
4028
4058
|
const __a1 = __o0["heartbeats"];
|
|
@@ -4043,7 +4073,7 @@ function reviveStationReleases(raw) {
|
|
|
4043
4073
|
}
|
|
4044
4074
|
}
|
|
4045
4075
|
if (__o0["checkedAt"] != null) {
|
|
4046
|
-
__o0["checkedAt"] =
|
|
4076
|
+
__o0["checkedAt"] = __dt16(__o0["checkedAt"], "StationReleases.checkedAt");
|
|
4047
4077
|
}
|
|
4048
4078
|
{
|
|
4049
4079
|
const __a3 = __o0["available"];
|
|
@@ -4056,24 +4086,24 @@ function reviveStationReleases(raw) {
|
|
|
4056
4086
|
__name(reviveStationReleases, "reviveStationReleases");
|
|
4057
4087
|
|
|
4058
4088
|
// src/station/types/traces.types.ts
|
|
4059
|
-
import { DateTime as
|
|
4060
|
-
var
|
|
4089
|
+
import { DateTime as DateTime17 } from "luxon";
|
|
4090
|
+
var __dt17 = /* @__PURE__ */ __name((v, path) => {
|
|
4061
4091
|
if (typeof v !== "string") {
|
|
4062
4092
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
4063
4093
|
}
|
|
4064
|
-
const d =
|
|
4094
|
+
const d = DateTime17.fromISO(v);
|
|
4065
4095
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
4066
4096
|
return d;
|
|
4067
4097
|
}, "__dt");
|
|
4068
4098
|
function reviveTraceDecision(raw) {
|
|
4069
4099
|
const __o0 = raw;
|
|
4070
|
-
__o0["at"] =
|
|
4100
|
+
__o0["at"] = __dt17(__o0["at"], "TraceDecision.at");
|
|
4071
4101
|
return raw;
|
|
4072
4102
|
}
|
|
4073
4103
|
__name(reviveTraceDecision, "reviveTraceDecision");
|
|
4074
4104
|
function reviveTraceSpan(raw) {
|
|
4075
4105
|
const __o0 = raw;
|
|
4076
|
-
__o0["at"] =
|
|
4106
|
+
__o0["at"] = __dt17(__o0["at"], "TraceSpan.at");
|
|
4077
4107
|
return raw;
|
|
4078
4108
|
}
|
|
4079
4109
|
__name(reviveTraceSpan, "reviveTraceSpan");
|
|
@@ -4220,18 +4250,18 @@ var StationClient = class {
|
|
|
4220
4250
|
};
|
|
4221
4251
|
|
|
4222
4252
|
// src/storage/types/storage.types.ts
|
|
4223
|
-
import { DateTime as
|
|
4224
|
-
var
|
|
4253
|
+
import { DateTime as DateTime18 } from "luxon";
|
|
4254
|
+
var __dt18 = /* @__PURE__ */ __name((v, path) => {
|
|
4225
4255
|
if (typeof v !== "string") {
|
|
4226
4256
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
4227
4257
|
}
|
|
4228
|
-
const d =
|
|
4258
|
+
const d = DateTime18.fromISO(v);
|
|
4229
4259
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
4230
4260
|
return d;
|
|
4231
4261
|
}, "__dt");
|
|
4232
4262
|
function reviveStorageReport(raw) {
|
|
4233
4263
|
const __o0 = raw;
|
|
4234
|
-
__o0["readAt"] =
|
|
4264
|
+
__o0["readAt"] = __dt18(__o0["readAt"], "StorageReport.readAt");
|
|
4235
4265
|
return raw;
|
|
4236
4266
|
}
|
|
4237
4267
|
__name(reviveStorageReport, "reviveStorageReport");
|
|
@@ -4533,6 +4563,8 @@ export {
|
|
|
4533
4563
|
reviveAuthenticationTokenResponseOutput,
|
|
4534
4564
|
reviveAuthenticatorFactorRegistrationResponse,
|
|
4535
4565
|
reviveBaseAuthenticationLoginStartResponse,
|
|
4566
|
+
reviveCatalogPlaylistPage,
|
|
4567
|
+
reviveCatalogPlaylistSource,
|
|
4536
4568
|
reviveCodeAuthenticationLoginStartResponse,
|
|
4537
4569
|
reviveConsoleLanguage,
|
|
4538
4570
|
reviveConsoleLanguageList,
|