@deadair/sdk 0.31.2 → 0.31.3

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.
@@ -6,6 +6,7 @@ import { CatalogClient } from './catalog/catalog.client.js';
6
6
  import { ChartsClient } from './charts/charts.client.js';
7
7
  import { DirectorClient } from './director/director.client.js';
8
8
  import { HistoryClient } from './history/history.client.js';
9
+ import { MessagingClient } from './messaging/messaging.client.js';
9
10
  import { NarrationsClient } from './narrations/narrations.client.js';
10
11
  import { NewsClient } from './news/news.client.js';
11
12
  import { NowplayingClient } from './nowplaying/nowplaying.client.js';
@@ -18,6 +19,7 @@ import { PluginsClient } from './plugins/plugins.client.js';
18
19
  import { PodcastsClient } from './podcasts/podcasts.client.js';
19
20
  import { ProductionsClient } from './productions/productions.client.js';
20
21
  import { RenderClient } from './render/render.client.js';
22
+ import { RequestsClient } from './requests/requests.client.js';
21
23
  import { ScheduleClient } from './schedule/schedule.client.js';
22
24
  import { SettingsClient } from './settings/settings.client.js';
23
25
  import { StationClient } from './station/station.client.js';
@@ -32,6 +34,7 @@ export declare class DeadairSdk {
32
34
  readonly charts: ChartsClient;
33
35
  readonly director: DirectorClient;
34
36
  readonly history: HistoryClient;
37
+ readonly messaging: MessagingClient;
35
38
  readonly narrations: NarrationsClient;
36
39
  readonly news: NewsClient;
37
40
  readonly nowplaying: NowplayingClient;
@@ -44,6 +47,7 @@ export declare class DeadairSdk {
44
47
  readonly podcasts: PodcastsClient;
45
48
  readonly productions: ProductionsClient;
46
49
  readonly render: RenderClient;
50
+ readonly requests: RequestsClient;
47
51
  readonly schedule: ScheduleClient;
48
52
  readonly settings: SettingsClient;
49
53
  readonly station: StationClient;
@@ -1 +1 @@
1
- {"version":3,"file":"deadair.sdk.d.ts","sourceRoot":"","sources":["../src/deadair.sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,cAA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,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;gBAElB,OAAO,EAAE,UAAU;CA8BlC"}
package/dist/index.d.ts CHANGED
@@ -16,6 +16,8 @@ export * from './director/director.client.js';
16
16
  export * from './director/types/index.js';
17
17
  export * from './history/history.client.js';
18
18
  export * from './history/types/index.js';
19
+ export * from './messaging/messaging.client.js';
20
+ export * from './messaging/types/index.js';
19
21
  export * from './narrations/narrations.client.js';
20
22
  export * from './narrations/types/index.js';
21
23
  export * from './news/news.client.js';
@@ -40,6 +42,8 @@ export * from './productions/productions.client.js';
40
42
  export * from './productions/types/index.js';
41
43
  export * from './render/render.client.js';
42
44
  export * from './render/types/index.js';
45
+ export * from './requests/requests.client.js';
46
+ export * from './requests/types/index.js';
43
47
  export * from './schedule/schedule.client.js';
44
48
  export * from './schedule/types/index.js';
45
49
  export * from './sdk-options.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mDAAmD,CAAC;AAClE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AA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AA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -1554,6 +1554,80 @@ var HistoryClient = class {
1554
1554
  }
1555
1555
  };
1556
1556
 
1557
+ // src/messaging/types/messaging.types.ts
1558
+ import { DateTime as DateTime6 } from "luxon";
1559
+ var __dt6 = /* @__PURE__ */ __name((v, path) => {
1560
+ if (typeof v !== "string") {
1561
+ throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
1562
+ }
1563
+ const d = DateTime6.fromISO(v);
1564
+ if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
1565
+ return d;
1566
+ }, "__dt");
1567
+ function reviveMessagingLinkCode(raw) {
1568
+ const __o0 = raw;
1569
+ __o0["expiresAt"] = __dt6(__o0["expiresAt"], "MessagingLinkCode.expiresAt");
1570
+ return raw;
1571
+ }
1572
+ __name(reviveMessagingLinkCode, "reviveMessagingLinkCode");
1573
+ function reviveMessagingLink(raw) {
1574
+ const __o0 = raw;
1575
+ __o0["createdAt"] = __dt6(__o0["createdAt"], "MessagingLink.createdAt");
1576
+ return raw;
1577
+ }
1578
+ __name(reviveMessagingLink, "reviveMessagingLink");
1579
+ function reviveMessagingLinkList(raw) {
1580
+ const __o0 = raw;
1581
+ {
1582
+ const __a1 = __o0["links"];
1583
+ for (let __i2 = 0; __i2 < __a1.length; __i2++) {
1584
+ reviveMessagingLink(__a1[__i2]);
1585
+ }
1586
+ }
1587
+ return raw;
1588
+ }
1589
+ __name(reviveMessagingLinkList, "reviveMessagingLinkList");
1590
+
1591
+ // src/messaging/messaging.client.ts
1592
+ var MessagingClient = class {
1593
+ static {
1594
+ __name(this, "MessagingClient");
1595
+ }
1596
+ fetch;
1597
+ constructor(fetch2) {
1598
+ this.fetch = fetch2;
1599
+ }
1600
+ /**
1601
+ * @name List messaging links
1602
+ * @description The chat accounts linked to the signed-in account
1603
+ */
1604
+ async listMessagingLinks() {
1605
+ const result = await this.fetch(`/messaging/links`, {
1606
+ method: "GET"
1607
+ });
1608
+ return reviveMessagingLinkList(await parseJson(result));
1609
+ }
1610
+ /**
1611
+ * @name Create messaging link code
1612
+ * @description A new one-time code for linking a chat account. It replaces any earlier code and stops working after ten minutes
1613
+ */
1614
+ async createMessagingLinkCode() {
1615
+ const result = await this.fetch(`/messaging/links/code`, {
1616
+ method: "POST"
1617
+ });
1618
+ return reviveMessagingLinkCode(await parseJson(result));
1619
+ }
1620
+ /**
1621
+ * @name Remove messaging link
1622
+ * @description Unlink a chat account. Its operator commands are refused from the next one on
1623
+ */
1624
+ async removeMessagingLink(pluginId, platformUserId) {
1625
+ await this.fetch(`/messaging/links/${encodeURIComponent(pluginId)}/${encodeURIComponent(platformUserId)}`, {
1626
+ method: "DELETE"
1627
+ });
1628
+ }
1629
+ };
1630
+
1557
1631
  // src/narrations/narrations.client.ts
1558
1632
  var NarrationsClient = class {
1559
1633
  static {
@@ -1659,32 +1733,32 @@ var NowplayingClient = class {
1659
1733
  };
1660
1734
 
1661
1735
  // src/oauth/types/oauth.types.ts
1662
- import { DateTime as DateTime6 } from "luxon";
1663
- var __dt6 = /* @__PURE__ */ __name((v, path) => {
1736
+ import { DateTime as DateTime7 } from "luxon";
1737
+ var __dt7 = /* @__PURE__ */ __name((v, path) => {
1664
1738
  if (typeof v !== "string") {
1665
1739
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
1666
1740
  }
1667
- const d = DateTime6.fromISO(v);
1741
+ const d = DateTime7.fromISO(v);
1668
1742
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
1669
1743
  return d;
1670
1744
  }, "__dt");
1671
1745
  function reviveOAuthGrant(raw) {
1672
1746
  const __o0 = raw;
1673
- __o0["createdAt"] = __dt6(__o0["createdAt"], "OAuthGrant.createdAt");
1747
+ __o0["createdAt"] = __dt7(__o0["createdAt"], "OAuthGrant.createdAt");
1674
1748
  if (__o0["lastUsedAt"] != null) {
1675
- __o0["lastUsedAt"] = __dt6(__o0["lastUsedAt"], "OAuthGrant.lastUsedAt");
1749
+ __o0["lastUsedAt"] = __dt7(__o0["lastUsedAt"], "OAuthGrant.lastUsedAt");
1676
1750
  }
1677
1751
  return raw;
1678
1752
  }
1679
1753
  __name(reviveOAuthGrant, "reviveOAuthGrant");
1680
1754
  function reviveOAuthClientSummary(raw) {
1681
1755
  const __o0 = raw;
1682
- __o0["createdAt"] = __dt6(__o0["createdAt"], "OAuthClientSummary.createdAt");
1756
+ __o0["createdAt"] = __dt7(__o0["createdAt"], "OAuthClientSummary.createdAt");
1683
1757
  if (__o0["lastUsedAt"] != null) {
1684
- __o0["lastUsedAt"] = __dt6(__o0["lastUsedAt"], "OAuthClientSummary.lastUsedAt");
1758
+ __o0["lastUsedAt"] = __dt7(__o0["lastUsedAt"], "OAuthClientSummary.lastUsedAt");
1685
1759
  }
1686
1760
  if (__o0["expiresAt"] != null) {
1687
- __o0["expiresAt"] = __dt6(__o0["expiresAt"], "OAuthClientSummary.expiresAt");
1761
+ __o0["expiresAt"] = __dt7(__o0["expiresAt"], "OAuthClientSummary.expiresAt");
1688
1762
  }
1689
1763
  return raw;
1690
1764
  }
@@ -2469,22 +2543,22 @@ var PlayoutClient = class {
2469
2543
  };
2470
2544
 
2471
2545
  // src/plugins/types/plugins.types.ts
2472
- import { DateTime as DateTime7 } from "luxon";
2473
- var __dt7 = /* @__PURE__ */ __name((v, path) => {
2546
+ import { DateTime as DateTime8 } from "luxon";
2547
+ var __dt8 = /* @__PURE__ */ __name((v, path) => {
2474
2548
  if (typeof v !== "string") {
2475
2549
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
2476
2550
  }
2477
- const d = DateTime7.fromISO(v);
2551
+ const d = DateTime8.fromISO(v);
2478
2552
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
2479
2553
  return d;
2480
2554
  }, "__dt");
2481
2555
  function revivePluginSummary(raw) {
2482
2556
  const __o0 = raw;
2483
2557
  if (__o0["firstEnabledAt"] != null) {
2484
- __o0["firstEnabledAt"] = __dt7(__o0["firstEnabledAt"], "PluginSummary.firstEnabledAt");
2558
+ __o0["firstEnabledAt"] = __dt8(__o0["firstEnabledAt"], "PluginSummary.firstEnabledAt");
2485
2559
  }
2486
2560
  if (__o0["nextProbeAt"] != null) {
2487
- __o0["nextProbeAt"] = __dt7(__o0["nextProbeAt"], "PluginSummary.nextProbeAt");
2561
+ __o0["nextProbeAt"] = __dt8(__o0["nextProbeAt"], "PluginSummary.nextProbeAt");
2488
2562
  }
2489
2563
  return raw;
2490
2564
  }
@@ -2801,19 +2875,19 @@ var PodcastsClient = class {
2801
2875
  };
2802
2876
 
2803
2877
  // src/productions/types/productions.types.ts
2804
- import { DateTime as DateTime8 } from "luxon";
2805
- var __dt8 = /* @__PURE__ */ __name((v, path) => {
2878
+ import { DateTime as DateTime9 } from "luxon";
2879
+ var __dt9 = /* @__PURE__ */ __name((v, path) => {
2806
2880
  if (typeof v !== "string") {
2807
2881
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
2808
2882
  }
2809
- const d = DateTime8.fromISO(v);
2883
+ const d = DateTime9.fromISO(v);
2810
2884
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
2811
2885
  return d;
2812
2886
  }, "__dt");
2813
2887
  function reviveProductionRequest(raw) {
2814
2888
  const __o0 = raw;
2815
2889
  if (__o0["scheduledFor"] != null) {
2816
- __o0["scheduledFor"] = __dt8(__o0["scheduledFor"], "ProductionRequest.scheduledFor");
2890
+ __o0["scheduledFor"] = __dt9(__o0["scheduledFor"], "ProductionRequest.scheduledFor");
2817
2891
  }
2818
2892
  return raw;
2819
2893
  }
@@ -2821,12 +2895,12 @@ __name(reviveProductionRequest, "reviveProductionRequest");
2821
2895
  function reviveProduction(raw) {
2822
2896
  const __o0 = raw;
2823
2897
  if (__o0["scheduledFor"] != null) {
2824
- __o0["scheduledFor"] = __dt8(__o0["scheduledFor"], "Production.scheduledFor");
2898
+ __o0["scheduledFor"] = __dt9(__o0["scheduledFor"], "Production.scheduledFor");
2825
2899
  }
2826
2900
  if (__o0["cancelledAt"] != null) {
2827
- __o0["cancelledAt"] = __dt8(__o0["cancelledAt"], "Production.cancelledAt");
2901
+ __o0["cancelledAt"] = __dt9(__o0["cancelledAt"], "Production.cancelledAt");
2828
2902
  }
2829
- __o0["createdAt"] = __dt8(__o0["createdAt"], "Production.createdAt");
2903
+ __o0["createdAt"] = __dt9(__o0["createdAt"], "Production.createdAt");
2830
2904
  return raw;
2831
2905
  }
2832
2906
  __name(reviveProduction, "reviveProduction");
@@ -2888,26 +2962,26 @@ var ProductionsClient = class {
2888
2962
  };
2889
2963
 
2890
2964
  // src/render/types/render.types.ts
2891
- import { DateTime as DateTime9 } from "luxon";
2892
- var __dt9 = /* @__PURE__ */ __name((v, path) => {
2965
+ import { DateTime as DateTime10 } from "luxon";
2966
+ var __dt10 = /* @__PURE__ */ __name((v, path) => {
2893
2967
  if (typeof v !== "string") {
2894
2968
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
2895
2969
  }
2896
- const d = DateTime9.fromISO(v);
2970
+ const d = DateTime10.fromISO(v);
2897
2971
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
2898
2972
  return d;
2899
2973
  }, "__dt");
2900
2974
  function revivePad(raw) {
2901
2975
  const __o0 = raw;
2902
2976
  if (__o0["lastUsedAt"] != null) {
2903
- __o0["lastUsedAt"] = __dt9(__o0["lastUsedAt"], "Pad.lastUsedAt");
2977
+ __o0["lastUsedAt"] = __dt10(__o0["lastUsedAt"], "Pad.lastUsedAt");
2904
2978
  }
2905
2979
  return raw;
2906
2980
  }
2907
2981
  __name(revivePad, "revivePad");
2908
2982
  function reviveScriptAttempt(raw) {
2909
2983
  const __o0 = raw;
2910
- __o0["at"] = __dt9(__o0["at"], "ScriptAttempt.at");
2984
+ __o0["at"] = __dt10(__o0["at"], "ScriptAttempt.at");
2911
2985
  return raw;
2912
2986
  }
2913
2987
  __name(reviveScriptAttempt, "reviveScriptAttempt");
@@ -3387,6 +3461,118 @@ var RenderClient = class {
3387
3461
  }
3388
3462
  };
3389
3463
 
3464
+ // src/requests/types/requests.types.ts
3465
+ import { DateTime as DateTime11 } from "luxon";
3466
+ var __dt11 = /* @__PURE__ */ __name((v, path) => {
3467
+ if (typeof v !== "string") {
3468
+ throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
3469
+ }
3470
+ const d = DateTime11.fromISO(v);
3471
+ if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
3472
+ return d;
3473
+ }, "__dt");
3474
+ function reviveListenerRequest(raw) {
3475
+ const __o0 = raw;
3476
+ __o0["createdAt"] = __dt11(__o0["createdAt"], "ListenerRequest.createdAt");
3477
+ if (__o0["airedAt"] != null) {
3478
+ __o0["airedAt"] = __dt11(__o0["airedAt"], "ListenerRequest.airedAt");
3479
+ }
3480
+ return raw;
3481
+ }
3482
+ __name(reviveListenerRequest, "reviveListenerRequest");
3483
+ function reviveListenerRequestList(raw) {
3484
+ const __o0 = raw;
3485
+ {
3486
+ const __a1 = __o0["requests"];
3487
+ for (let __i2 = 0; __i2 < __a1.length; __i2++) {
3488
+ reviveListenerRequest(__a1[__i2]);
3489
+ }
3490
+ }
3491
+ return raw;
3492
+ }
3493
+ __name(reviveListenerRequestList, "reviveListenerRequestList");
3494
+
3495
+ // src/requests/requests.client.ts
3496
+ var RequestsClient = class {
3497
+ static {
3498
+ __name(this, "RequestsClient");
3499
+ }
3500
+ fetch;
3501
+ constructor(fetch2) {
3502
+ this.fetch = fetch2;
3503
+ }
3504
+ /**
3505
+ * @name Search requestable records
3506
+ * @description Records the station could be asked to play, matching a title or an artist
3507
+ */
3508
+ async searchRequestableRecords(query) {
3509
+ const qs = buildQueryString(query);
3510
+ const result = await this.fetch(`/requests/search${qs}`, {
3511
+ method: "GET"
3512
+ });
3513
+ return await parseJson(result);
3514
+ }
3515
+ /**
3516
+ * @name List requests
3517
+ * @description Every recent request, for the operator deciding on them
3518
+ */
3519
+ async listRequests(query) {
3520
+ const qs = buildQueryString(query);
3521
+ const result = await this.fetch(`/requests${qs}`, {
3522
+ method: "GET"
3523
+ });
3524
+ return reviveListenerRequestList(await parseJson(result));
3525
+ }
3526
+ /**
3527
+ * @name Create request
3528
+ * @description Ask the station to play a record. Answers with the request whatever became of it, so a refusal says why in `reason`
3529
+ */
3530
+ async createRequest(body) {
3531
+ const result = await this.fetch(`/requests`, {
3532
+ method: "POST",
3533
+ headers: {
3534
+ "Content-Type": "application/json"
3535
+ },
3536
+ body: JSON.stringify(body, bigIntReplacer)
3537
+ });
3538
+ return reviveListenerRequest(await parseJson(result));
3539
+ }
3540
+ /**
3541
+ * @name List my requests
3542
+ * @description The signed-in account's own recent requests
3543
+ */
3544
+ async listMyRequests() {
3545
+ const result = await this.fetch(`/requests/mine`, {
3546
+ method: "GET"
3547
+ });
3548
+ return reviveListenerRequestList(await parseJson(result));
3549
+ }
3550
+ /**
3551
+ * @name Grant request
3552
+ * @description Let a waiting request through. It goes into the running order once its audio is here
3553
+ */
3554
+ async grantRequest(id) {
3555
+ const result = await this.fetch(`/requests/${encodeURIComponent(id)}/grant`, {
3556
+ method: "POST"
3557
+ });
3558
+ return reviveListenerRequest(await parseJson(result));
3559
+ }
3560
+ /**
3561
+ * @name Decline request
3562
+ * @description Turn a request down. One already in the running order is left there; take it out of the order instead
3563
+ */
3564
+ async declineRequest(id, body) {
3565
+ const result = await this.fetch(`/requests/${encodeURIComponent(id)}/decline`, {
3566
+ method: "POST",
3567
+ headers: {
3568
+ "Content-Type": "application/json"
3569
+ },
3570
+ body: JSON.stringify(body, bigIntReplacer)
3571
+ });
3572
+ return reviveListenerRequest(await parseJson(result));
3573
+ }
3574
+ };
3575
+
3390
3576
  // src/schedule/schedule.client.ts
3391
3577
  var ScheduleClient = class {
3392
3578
  static {
@@ -3513,19 +3699,19 @@ var SettingsClient = class {
3513
3699
  };
3514
3700
 
3515
3701
  // src/station/types/logs.types.ts
3516
- import { DateTime as DateTime10 } from "luxon";
3517
- var __dt10 = /* @__PURE__ */ __name((v, path) => {
3702
+ import { DateTime as DateTime12 } from "luxon";
3703
+ var __dt12 = /* @__PURE__ */ __name((v, path) => {
3518
3704
  if (typeof v !== "string") {
3519
3705
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
3520
3706
  }
3521
- const d = DateTime10.fromISO(v);
3707
+ const d = DateTime12.fromISO(v);
3522
3708
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
3523
3709
  return d;
3524
3710
  }, "__dt");
3525
3711
  function reviveLogSource(raw) {
3526
3712
  const __o0 = raw;
3527
3713
  if (__o0["lastWriteAt"] != null) {
3528
- __o0["lastWriteAt"] = __dt10(__o0["lastWriteAt"], "LogSource.lastWriteAt");
3714
+ __o0["lastWriteAt"] = __dt12(__o0["lastWriteAt"], "LogSource.lastWriteAt");
3529
3715
  }
3530
3716
  return raw;
3531
3717
  }
@@ -3543,12 +3729,12 @@ function reviveLogSourceList(raw) {
3543
3729
  __name(reviveLogSourceList, "reviveLogSourceList");
3544
3730
 
3545
3731
  // src/station/types/station.types.ts
3546
- import { DateTime as DateTime11 } from "luxon";
3547
- var __dt11 = /* @__PURE__ */ __name((v, path) => {
3732
+ import { DateTime as DateTime13 } from "luxon";
3733
+ var __dt13 = /* @__PURE__ */ __name((v, path) => {
3548
3734
  if (typeof v !== "string") {
3549
3735
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
3550
3736
  }
3551
- const d = DateTime11.fromISO(v);
3737
+ const d = DateTime13.fromISO(v);
3552
3738
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
3553
3739
  return d;
3554
3740
  }, "__dt");
@@ -3556,15 +3742,15 @@ var __dtf = /* @__PURE__ */ __name((v, path, fmt) => {
3556
3742
  if (typeof v !== "string") {
3557
3743
  throw new TypeError(`ContractKit: expected a string at '${path}' in format ${fmt}, received ${typeof v}.`);
3558
3744
  }
3559
- const d = DateTime11.fromFormat(v, fmt);
3745
+ const d = DateTime13.fromFormat(v, fmt);
3560
3746
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' does not match format ${fmt}.`);
3561
3747
  return d;
3562
3748
  }, "__dtf");
3563
3749
  function reviveStationHeartbeat(raw) {
3564
3750
  const __o0 = raw;
3565
- __o0["startedAt"] = __dt11(__o0["startedAt"], "StationHeartbeat.startedAt");
3751
+ __o0["startedAt"] = __dt13(__o0["startedAt"], "StationHeartbeat.startedAt");
3566
3752
  if (__o0["lastBeat"] != null) {
3567
- __o0["lastBeat"] = __dt11(__o0["lastBeat"], "StationHeartbeat.lastBeat");
3753
+ __o0["lastBeat"] = __dt13(__o0["lastBeat"], "StationHeartbeat.lastBeat");
3568
3754
  }
3569
3755
  return raw;
3570
3756
  }
@@ -3579,7 +3765,7 @@ function reviveStationRelease(raw) {
3579
3765
  __name(reviveStationRelease, "reviveStationRelease");
3580
3766
  function reviveStationCheckup(raw) {
3581
3767
  const __o0 = raw;
3582
- __o0["readAt"] = __dt11(__o0["readAt"], "StationCheckup.readAt");
3768
+ __o0["readAt"] = __dt13(__o0["readAt"], "StationCheckup.readAt");
3583
3769
  if (__o0["heartbeats"] != null) {
3584
3770
  {
3585
3771
  const __a1 = __o0["heartbeats"];
@@ -3600,7 +3786,7 @@ function reviveStationReleases(raw) {
3600
3786
  }
3601
3787
  }
3602
3788
  if (__o0["checkedAt"] != null) {
3603
- __o0["checkedAt"] = __dt11(__o0["checkedAt"], "StationReleases.checkedAt");
3789
+ __o0["checkedAt"] = __dt13(__o0["checkedAt"], "StationReleases.checkedAt");
3604
3790
  }
3605
3791
  {
3606
3792
  const __a3 = __o0["available"];
@@ -3613,24 +3799,24 @@ function reviveStationReleases(raw) {
3613
3799
  __name(reviveStationReleases, "reviveStationReleases");
3614
3800
 
3615
3801
  // src/station/types/traces.types.ts
3616
- import { DateTime as DateTime12 } from "luxon";
3617
- var __dt12 = /* @__PURE__ */ __name((v, path) => {
3802
+ import { DateTime as DateTime14 } from "luxon";
3803
+ var __dt14 = /* @__PURE__ */ __name((v, path) => {
3618
3804
  if (typeof v !== "string") {
3619
3805
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
3620
3806
  }
3621
- const d = DateTime12.fromISO(v);
3807
+ const d = DateTime14.fromISO(v);
3622
3808
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
3623
3809
  return d;
3624
3810
  }, "__dt");
3625
3811
  function reviveTraceDecision(raw) {
3626
3812
  const __o0 = raw;
3627
- __o0["at"] = __dt12(__o0["at"], "TraceDecision.at");
3813
+ __o0["at"] = __dt14(__o0["at"], "TraceDecision.at");
3628
3814
  return raw;
3629
3815
  }
3630
3816
  __name(reviveTraceDecision, "reviveTraceDecision");
3631
3817
  function reviveTraceSpan(raw) {
3632
3818
  const __o0 = raw;
3633
- __o0["at"] = __dt12(__o0["at"], "TraceSpan.at");
3819
+ __o0["at"] = __dt14(__o0["at"], "TraceSpan.at");
3634
3820
  return raw;
3635
3821
  }
3636
3822
  __name(reviveTraceSpan, "reviveTraceSpan");
@@ -3777,18 +3963,18 @@ var StationClient = class {
3777
3963
  };
3778
3964
 
3779
3965
  // src/storage/types/storage.types.ts
3780
- import { DateTime as DateTime13 } from "luxon";
3781
- var __dt13 = /* @__PURE__ */ __name((v, path) => {
3966
+ import { DateTime as DateTime15 } from "luxon";
3967
+ var __dt15 = /* @__PURE__ */ __name((v, path) => {
3782
3968
  if (typeof v !== "string") {
3783
3969
  throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
3784
3970
  }
3785
- const d = DateTime13.fromISO(v);
3971
+ const d = DateTime15.fromISO(v);
3786
3972
  if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
3787
3973
  return d;
3788
3974
  }, "__dt");
3789
3975
  function reviveStorageReport(raw) {
3790
3976
  const __o0 = raw;
3791
- __o0["readAt"] = __dt13(__o0["readAt"], "StorageReport.readAt");
3977
+ __o0["readAt"] = __dt15(__o0["readAt"], "StorageReport.readAt");
3792
3978
  return raw;
3793
3979
  }
3794
3980
  __name(reviveStorageReport, "reviveStorageReport");
@@ -3977,6 +4163,7 @@ var DeadairSdk = class {
3977
4163
  charts;
3978
4164
  director;
3979
4165
  history;
4166
+ messaging;
3980
4167
  narrations;
3981
4168
  news;
3982
4169
  nowplaying;
@@ -3989,6 +4176,7 @@ var DeadairSdk = class {
3989
4176
  podcasts;
3990
4177
  productions;
3991
4178
  render;
4179
+ requests;
3992
4180
  schedule;
3993
4181
  settings;
3994
4182
  station;
@@ -4004,6 +4192,7 @@ var DeadairSdk = class {
4004
4192
  this.charts = new ChartsClient(sdkFetch);
4005
4193
  this.director = new DirectorClient(sdkFetch);
4006
4194
  this.history = new HistoryClient(sdkFetch);
4195
+ this.messaging = new MessagingClient(sdkFetch);
4007
4196
  this.narrations = new NarrationsClient(sdkFetch);
4008
4197
  this.news = new NewsClient(sdkFetch);
4009
4198
  this.nowplaying = new NowplayingClient(sdkFetch);
@@ -4016,6 +4205,7 @@ var DeadairSdk = class {
4016
4205
  this.podcasts = new PodcastsClient(sdkFetch);
4017
4206
  this.productions = new ProductionsClient(sdkFetch);
4018
4207
  this.render = new RenderClient(sdkFetch);
4208
+ this.requests = new RequestsClient(sdkFetch);
4019
4209
  this.schedule = new ScheduleClient(sdkFetch);
4020
4210
  this.settings = new SettingsClient(sdkFetch);
4021
4211
  this.station = new StationClient(sdkFetch);
@@ -4036,6 +4226,7 @@ export {
4036
4226
  DeadairSdk,
4037
4227
  DirectorClient,
4038
4228
  HistoryClient,
4229
+ MessagingClient,
4039
4230
  NarrationsClient,
4040
4231
  NewsClient,
4041
4232
  NowplayingClient,
@@ -4048,6 +4239,7 @@ export {
4048
4239
  PodcastsClient,
4049
4240
  ProductionsClient,
4050
4241
  RenderClient,
4242
+ RequestsClient,
4051
4243
  ScheduleClient,
4052
4244
  SdkError,
4053
4245
  SettingsClient,
@@ -4097,9 +4289,14 @@ export {
4097
4289
  reviveHistoryEntry,
4098
4290
  reviveHistoryPage,
4099
4291
  reviveLinkAuthenticationLoginStartResponse,
4292
+ reviveListenerRequest,
4293
+ reviveListenerRequestList,
4100
4294
  reviveLogSource,
4101
4295
  reviveLogSourceList,
4102
4296
  reviveLogin,
4297
+ reviveMessagingLink,
4298
+ reviveMessagingLinkCode,
4299
+ reviveMessagingLinkList,
4103
4300
  reviveMfaEnrollFidoStartResponse,
4104
4301
  reviveMfaEnrollPhoneStartResponse,
4105
4302
  reviveMfaRequiredResponse,