@deadair/sdk 0.27.2 → 0.28.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/authentication/authentication.client.d.ts +6 -1
- package/dist/authentication/authentication.client.d.ts.map +1 -1
- package/dist/authentication/authentication.factor.client.d.ts +1 -1
- package/dist/authentication/types/authentication.types.d.ts +46 -58
- package/dist/authentication/types/authentication.types.d.ts.map +1 -1
- package/dist/authentication/types/registration.types.d.ts +49 -25
- package/dist/authentication/types/registration.types.d.ts.map +1 -1
- package/dist/deadair.sdk.d.ts +2 -0
- package/dist/deadair.sdk.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +232 -46
- package/dist/index.js.map +1 -1
- package/dist/oauth/oauth.client.d.ts +47 -0
- package/dist/oauth/oauth.client.d.ts.map +1 -0
- package/dist/oauth/types/index.d.ts +2 -0
- package/dist/oauth/types/index.d.ts.map +1 -0
- package/dist/oauth/types/oauth.types.d.ts +178 -0
- package/dist/oauth/types/oauth.types.d.ts.map +1 -0
- package/dist/settings/types/settings.types.d.ts +4 -4
- package/dist/settings/types/settings.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -269,12 +269,6 @@ function reviveAuthenticationRegistration(raw) {
|
|
|
269
269
|
return raw;
|
|
270
270
|
}
|
|
271
271
|
__name(reviveAuthenticationRegistration, "reviveAuthenticationRegistration");
|
|
272
|
-
function reviveOidcLoginStartResponse(raw) {
|
|
273
|
-
const __o0 = raw;
|
|
274
|
-
__o0["expires_at"] = __dt2(__o0["expires_at"], "OidcLoginStartResponse.expires_at");
|
|
275
|
-
return raw;
|
|
276
|
-
}
|
|
277
|
-
__name(reviveOidcLoginStartResponse, "reviveOidcLoginStartResponse");
|
|
278
272
|
function reviveFactorChallengePhoneStartResponse(raw) {
|
|
279
273
|
const __o0 = raw;
|
|
280
274
|
__o0["expiresAt"] = __dt2(__o0["expiresAt"], "FactorChallengePhoneStartResponse.expiresAt");
|
|
@@ -614,6 +608,12 @@ function reviveAuthenticatorFactorRegistrationResponse(raw) {
|
|
|
614
608
|
return raw;
|
|
615
609
|
}
|
|
616
610
|
__name(reviveAuthenticatorFactorRegistrationResponse, "reviveAuthenticatorFactorRegistrationResponse");
|
|
611
|
+
function reviveOidcFactorRegistrationResponse(raw) {
|
|
612
|
+
const __o0 = raw;
|
|
613
|
+
__o0["expiresAt"] = __dt3(__o0["expiresAt"], "OidcFactorRegistrationResponse.expiresAt");
|
|
614
|
+
return raw;
|
|
615
|
+
}
|
|
616
|
+
__name(reviveOidcFactorRegistrationResponse, "reviveOidcFactorRegistrationResponse");
|
|
617
617
|
function reviveMfaEnrollPhoneStartResponse(raw) {
|
|
618
618
|
const __o0 = raw;
|
|
619
619
|
__o0["expiresAt"] = __dt3(__o0["expiresAt"], "MfaEnrollPhoneStartResponse.expiresAt");
|
|
@@ -653,6 +653,9 @@ function reviveAuthenticationFactorRegistrationResponse(raw) {
|
|
|
653
653
|
if (__d0 === "fido") {
|
|
654
654
|
reviveFidoFactorRegistrationResponse(__v[0]);
|
|
655
655
|
}
|
|
656
|
+
if (__d0 === "oidc") {
|
|
657
|
+
reviveOidcFactorRegistrationResponse(__v[0]);
|
|
658
|
+
}
|
|
656
659
|
}
|
|
657
660
|
return __v[0];
|
|
658
661
|
}
|
|
@@ -735,7 +738,7 @@ var AuthenticationFactorsClient = class {
|
|
|
735
738
|
}
|
|
736
739
|
/**
|
|
737
740
|
* @name Remove factor
|
|
738
|
-
* @description Remove one of the caller's own factors. Answered
|
|
741
|
+
* @description Remove one of the caller's own factors. Answered for `authenticator` and `oidc`, and only after a recent strong-factor verification: the same gate enrolment sits behind once a strong factor exists, so a stolen session cannot quietly switch the second factor off. Removing the last authenticator turns the sign-in challenge off for that account. A linked identity provider that is the account's only way to sign in is refused with 409.
|
|
739
742
|
*/
|
|
740
743
|
async removeFactor(method, methodId) {
|
|
741
744
|
await this.fetch(`/auth/factors/${encodeURIComponent(method)}/${encodeURIComponent(methodId)}`, {
|
|
@@ -847,6 +850,16 @@ var AuthenticationClient = class {
|
|
|
847
850
|
});
|
|
848
851
|
return reviveAuthenticationLoginStartResponse(await parseJson(result));
|
|
849
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* @name List sign-in providers
|
|
855
|
+
* @description The identity providers the sign-in page offers beside a password, in the order the operator listed them. Empty when none is set up
|
|
856
|
+
*/
|
|
857
|
+
async listSignInProviders() {
|
|
858
|
+
const result = await this.fetch(`/auth/login/oidc/providers`, {
|
|
859
|
+
method: "GET"
|
|
860
|
+
});
|
|
861
|
+
return await parseJson(result);
|
|
862
|
+
}
|
|
850
863
|
};
|
|
851
864
|
|
|
852
865
|
// src/catalog/types/catalog.types.ts
|
|
@@ -1645,6 +1658,171 @@ var NowplayingClient = class {
|
|
|
1645
1658
|
}
|
|
1646
1659
|
};
|
|
1647
1660
|
|
|
1661
|
+
// src/oauth/types/oauth.types.ts
|
|
1662
|
+
import { DateTime as DateTime6 } from "luxon";
|
|
1663
|
+
var __dt6 = /* @__PURE__ */ __name((v, path) => {
|
|
1664
|
+
if (typeof v !== "string") {
|
|
1665
|
+
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
1666
|
+
}
|
|
1667
|
+
const d = DateTime6.fromISO(v);
|
|
1668
|
+
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
1669
|
+
return d;
|
|
1670
|
+
}, "__dt");
|
|
1671
|
+
function reviveOAuthGrant(raw) {
|
|
1672
|
+
const __o0 = raw;
|
|
1673
|
+
__o0["createdAt"] = __dt6(__o0["createdAt"], "OAuthGrant.createdAt");
|
|
1674
|
+
if (__o0["lastUsedAt"] != null) {
|
|
1675
|
+
__o0["lastUsedAt"] = __dt6(__o0["lastUsedAt"], "OAuthGrant.lastUsedAt");
|
|
1676
|
+
}
|
|
1677
|
+
return raw;
|
|
1678
|
+
}
|
|
1679
|
+
__name(reviveOAuthGrant, "reviveOAuthGrant");
|
|
1680
|
+
function reviveOAuthClientSummary(raw) {
|
|
1681
|
+
const __o0 = raw;
|
|
1682
|
+
__o0["createdAt"] = __dt6(__o0["createdAt"], "OAuthClientSummary.createdAt");
|
|
1683
|
+
if (__o0["lastUsedAt"] != null) {
|
|
1684
|
+
__o0["lastUsedAt"] = __dt6(__o0["lastUsedAt"], "OAuthClientSummary.lastUsedAt");
|
|
1685
|
+
}
|
|
1686
|
+
if (__o0["expiresAt"] != null) {
|
|
1687
|
+
__o0["expiresAt"] = __dt6(__o0["expiresAt"], "OAuthClientSummary.expiresAt");
|
|
1688
|
+
}
|
|
1689
|
+
return raw;
|
|
1690
|
+
}
|
|
1691
|
+
__name(reviveOAuthClientSummary, "reviveOAuthClientSummary");
|
|
1692
|
+
function reviveOAuthGrantList(raw) {
|
|
1693
|
+
const __o0 = raw;
|
|
1694
|
+
{
|
|
1695
|
+
const __a1 = __o0["grants"];
|
|
1696
|
+
for (let __i2 = 0; __i2 < __a1.length; __i2++) {
|
|
1697
|
+
reviveOAuthGrant(__a1[__i2]);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
return raw;
|
|
1701
|
+
}
|
|
1702
|
+
__name(reviveOAuthGrantList, "reviveOAuthGrantList");
|
|
1703
|
+
function reviveOAuthClientList(raw) {
|
|
1704
|
+
const __o0 = raw;
|
|
1705
|
+
{
|
|
1706
|
+
const __a1 = __o0["clients"];
|
|
1707
|
+
for (let __i2 = 0; __i2 < __a1.length; __i2++) {
|
|
1708
|
+
reviveOAuthClientSummary(__a1[__i2]);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
return raw;
|
|
1712
|
+
}
|
|
1713
|
+
__name(reviveOAuthClientList, "reviveOAuthClientList");
|
|
1714
|
+
function reviveOAuthClientIssued(raw) {
|
|
1715
|
+
const __o0 = raw;
|
|
1716
|
+
reviveOAuthClientSummary(__o0["client"]);
|
|
1717
|
+
return raw;
|
|
1718
|
+
}
|
|
1719
|
+
__name(reviveOAuthClientIssued, "reviveOAuthClientIssued");
|
|
1720
|
+
|
|
1721
|
+
// src/oauth/oauth.client.ts
|
|
1722
|
+
var OauthClient = class {
|
|
1723
|
+
static {
|
|
1724
|
+
__name(this, "OauthClient");
|
|
1725
|
+
}
|
|
1726
|
+
fetch;
|
|
1727
|
+
constructor(fetch2) {
|
|
1728
|
+
this.fetch = fetch2;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* @name Describe authorization request
|
|
1732
|
+
* @description Validate an app's authorization request for the consent page, and stash it for the signed-in person. A POST because it stashes: what is approved is exactly what was validated here
|
|
1733
|
+
*/
|
|
1734
|
+
async describeAuthorizationRequest(body) {
|
|
1735
|
+
const result = await this.fetch(`/auth/oauth/authorize/context`, {
|
|
1736
|
+
method: "POST",
|
|
1737
|
+
headers: {
|
|
1738
|
+
"Content-Type": "application/json"
|
|
1739
|
+
},
|
|
1740
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1741
|
+
});
|
|
1742
|
+
return await parseJson(result);
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* @name Approve authorization request
|
|
1746
|
+
* @description Let the app act as the signed-in person. Once the account has a strong second factor, this needs one verified in the last five minutes
|
|
1747
|
+
*/
|
|
1748
|
+
async approveAuthorizationRequest(body) {
|
|
1749
|
+
const result = await this.fetch(`/auth/oauth/authorize/approve`, {
|
|
1750
|
+
method: "POST",
|
|
1751
|
+
headers: {
|
|
1752
|
+
"Content-Type": "application/json"
|
|
1753
|
+
},
|
|
1754
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1755
|
+
});
|
|
1756
|
+
return await parseJson(result);
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* @name Deny authorization request
|
|
1760
|
+
* @description Turn the app away. It is told the person said no
|
|
1761
|
+
*/
|
|
1762
|
+
async denyAuthorizationRequest(body) {
|
|
1763
|
+
const result = await this.fetch(`/auth/oauth/authorize/deny`, {
|
|
1764
|
+
method: "POST",
|
|
1765
|
+
headers: {
|
|
1766
|
+
"Content-Type": "application/json"
|
|
1767
|
+
},
|
|
1768
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1769
|
+
});
|
|
1770
|
+
return await parseJson(result);
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* @name List OAuth clients
|
|
1774
|
+
* @description Every app registered with the station, by an operator or by itself
|
|
1775
|
+
*/
|
|
1776
|
+
async listOAuthClients() {
|
|
1777
|
+
const result = await this.fetch(`/auth/oauth/clients`, {
|
|
1778
|
+
method: "GET"
|
|
1779
|
+
});
|
|
1780
|
+
return reviveOAuthClientList(await parseJson(result));
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* @name Create OAuth client
|
|
1784
|
+
* @description Register an app by hand. The secret, for an app that keeps one, is in this response and nowhere else
|
|
1785
|
+
*/
|
|
1786
|
+
async createOAuthClient(body) {
|
|
1787
|
+
const result = await this.fetch(`/auth/oauth/clients`, {
|
|
1788
|
+
method: "POST",
|
|
1789
|
+
headers: {
|
|
1790
|
+
"Content-Type": "application/json"
|
|
1791
|
+
},
|
|
1792
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1793
|
+
});
|
|
1794
|
+
return reviveOAuthClientIssued(await parseJson(result));
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* @name Revoke OAuth client
|
|
1798
|
+
* @description Withdraw an app. Every person's approval of it ends, and so does every token it holds
|
|
1799
|
+
*/
|
|
1800
|
+
async revokeOAuthClient(clientId) {
|
|
1801
|
+
await this.fetch(`/auth/oauth/clients/${encodeURIComponent(clientId)}`, {
|
|
1802
|
+
method: "DELETE"
|
|
1803
|
+
});
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* @name List OAuth grants
|
|
1807
|
+
* @description The apps the signed-in person has let act as them
|
|
1808
|
+
*/
|
|
1809
|
+
async listOAuthGrants() {
|
|
1810
|
+
const result = await this.fetch(`/auth/oauth/grants`, {
|
|
1811
|
+
method: "GET"
|
|
1812
|
+
});
|
|
1813
|
+
return reviveOAuthGrantList(await parseJson(result));
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* @name Revoke OAuth grant
|
|
1817
|
+
* @description Disconnect an app. Every token it holds for this person stops working at once
|
|
1818
|
+
*/
|
|
1819
|
+
async revokeOAuthGrant(id) {
|
|
1820
|
+
await this.fetch(`/auth/oauth/grants/${encodeURIComponent(id)}`, {
|
|
1821
|
+
method: "DELETE"
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
};
|
|
1825
|
+
|
|
1648
1826
|
// src/onboarding/onboarding.client.ts
|
|
1649
1827
|
var OnboardingClient = class {
|
|
1650
1828
|
static {
|
|
@@ -2291,22 +2469,22 @@ var PlayoutClient = class {
|
|
|
2291
2469
|
};
|
|
2292
2470
|
|
|
2293
2471
|
// src/plugins/types/plugins.types.ts
|
|
2294
|
-
import { DateTime as
|
|
2295
|
-
var
|
|
2472
|
+
import { DateTime as DateTime7 } from "luxon";
|
|
2473
|
+
var __dt7 = /* @__PURE__ */ __name((v, path) => {
|
|
2296
2474
|
if (typeof v !== "string") {
|
|
2297
2475
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
2298
2476
|
}
|
|
2299
|
-
const d =
|
|
2477
|
+
const d = DateTime7.fromISO(v);
|
|
2300
2478
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2301
2479
|
return d;
|
|
2302
2480
|
}, "__dt");
|
|
2303
2481
|
function revivePluginSummary(raw) {
|
|
2304
2482
|
const __o0 = raw;
|
|
2305
2483
|
if (__o0["firstEnabledAt"] != null) {
|
|
2306
|
-
__o0["firstEnabledAt"] =
|
|
2484
|
+
__o0["firstEnabledAt"] = __dt7(__o0["firstEnabledAt"], "PluginSummary.firstEnabledAt");
|
|
2307
2485
|
}
|
|
2308
2486
|
if (__o0["nextProbeAt"] != null) {
|
|
2309
|
-
__o0["nextProbeAt"] =
|
|
2487
|
+
__o0["nextProbeAt"] = __dt7(__o0["nextProbeAt"], "PluginSummary.nextProbeAt");
|
|
2310
2488
|
}
|
|
2311
2489
|
return raw;
|
|
2312
2490
|
}
|
|
@@ -2623,19 +2801,19 @@ var PodcastsClient = class {
|
|
|
2623
2801
|
};
|
|
2624
2802
|
|
|
2625
2803
|
// src/productions/types/productions.types.ts
|
|
2626
|
-
import { DateTime as
|
|
2627
|
-
var
|
|
2804
|
+
import { DateTime as DateTime8 } from "luxon";
|
|
2805
|
+
var __dt8 = /* @__PURE__ */ __name((v, path) => {
|
|
2628
2806
|
if (typeof v !== "string") {
|
|
2629
2807
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
2630
2808
|
}
|
|
2631
|
-
const d =
|
|
2809
|
+
const d = DateTime8.fromISO(v);
|
|
2632
2810
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2633
2811
|
return d;
|
|
2634
2812
|
}, "__dt");
|
|
2635
2813
|
function reviveProductionRequest(raw) {
|
|
2636
2814
|
const __o0 = raw;
|
|
2637
2815
|
if (__o0["scheduledFor"] != null) {
|
|
2638
|
-
__o0["scheduledFor"] =
|
|
2816
|
+
__o0["scheduledFor"] = __dt8(__o0["scheduledFor"], "ProductionRequest.scheduledFor");
|
|
2639
2817
|
}
|
|
2640
2818
|
return raw;
|
|
2641
2819
|
}
|
|
@@ -2643,12 +2821,12 @@ __name(reviveProductionRequest, "reviveProductionRequest");
|
|
|
2643
2821
|
function reviveProduction(raw) {
|
|
2644
2822
|
const __o0 = raw;
|
|
2645
2823
|
if (__o0["scheduledFor"] != null) {
|
|
2646
|
-
__o0["scheduledFor"] =
|
|
2824
|
+
__o0["scheduledFor"] = __dt8(__o0["scheduledFor"], "Production.scheduledFor");
|
|
2647
2825
|
}
|
|
2648
2826
|
if (__o0["cancelledAt"] != null) {
|
|
2649
|
-
__o0["cancelledAt"] =
|
|
2827
|
+
__o0["cancelledAt"] = __dt8(__o0["cancelledAt"], "Production.cancelledAt");
|
|
2650
2828
|
}
|
|
2651
|
-
__o0["createdAt"] =
|
|
2829
|
+
__o0["createdAt"] = __dt8(__o0["createdAt"], "Production.createdAt");
|
|
2652
2830
|
return raw;
|
|
2653
2831
|
}
|
|
2654
2832
|
__name(reviveProduction, "reviveProduction");
|
|
@@ -2710,26 +2888,26 @@ var ProductionsClient = class {
|
|
|
2710
2888
|
};
|
|
2711
2889
|
|
|
2712
2890
|
// src/render/types/render.types.ts
|
|
2713
|
-
import { DateTime as
|
|
2714
|
-
var
|
|
2891
|
+
import { DateTime as DateTime9 } from "luxon";
|
|
2892
|
+
var __dt9 = /* @__PURE__ */ __name((v, path) => {
|
|
2715
2893
|
if (typeof v !== "string") {
|
|
2716
2894
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
2717
2895
|
}
|
|
2718
|
-
const d =
|
|
2896
|
+
const d = DateTime9.fromISO(v);
|
|
2719
2897
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
2720
2898
|
return d;
|
|
2721
2899
|
}, "__dt");
|
|
2722
2900
|
function revivePad(raw) {
|
|
2723
2901
|
const __o0 = raw;
|
|
2724
2902
|
if (__o0["lastUsedAt"] != null) {
|
|
2725
|
-
__o0["lastUsedAt"] =
|
|
2903
|
+
__o0["lastUsedAt"] = __dt9(__o0["lastUsedAt"], "Pad.lastUsedAt");
|
|
2726
2904
|
}
|
|
2727
2905
|
return raw;
|
|
2728
2906
|
}
|
|
2729
2907
|
__name(revivePad, "revivePad");
|
|
2730
2908
|
function reviveScriptAttempt(raw) {
|
|
2731
2909
|
const __o0 = raw;
|
|
2732
|
-
__o0["at"] =
|
|
2910
|
+
__o0["at"] = __dt9(__o0["at"], "ScriptAttempt.at");
|
|
2733
2911
|
return raw;
|
|
2734
2912
|
}
|
|
2735
2913
|
__name(reviveScriptAttempt, "reviveScriptAttempt");
|
|
@@ -3325,19 +3503,19 @@ var SettingsClient = class {
|
|
|
3325
3503
|
};
|
|
3326
3504
|
|
|
3327
3505
|
// src/station/types/logs.types.ts
|
|
3328
|
-
import { DateTime as
|
|
3329
|
-
var
|
|
3506
|
+
import { DateTime as DateTime10 } from "luxon";
|
|
3507
|
+
var __dt10 = /* @__PURE__ */ __name((v, path) => {
|
|
3330
3508
|
if (typeof v !== "string") {
|
|
3331
3509
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3332
3510
|
}
|
|
3333
|
-
const d =
|
|
3511
|
+
const d = DateTime10.fromISO(v);
|
|
3334
3512
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3335
3513
|
return d;
|
|
3336
3514
|
}, "__dt");
|
|
3337
3515
|
function reviveLogSource(raw) {
|
|
3338
3516
|
const __o0 = raw;
|
|
3339
3517
|
if (__o0["lastWriteAt"] != null) {
|
|
3340
|
-
__o0["lastWriteAt"] =
|
|
3518
|
+
__o0["lastWriteAt"] = __dt10(__o0["lastWriteAt"], "LogSource.lastWriteAt");
|
|
3341
3519
|
}
|
|
3342
3520
|
return raw;
|
|
3343
3521
|
}
|
|
@@ -3355,12 +3533,12 @@ function reviveLogSourceList(raw) {
|
|
|
3355
3533
|
__name(reviveLogSourceList, "reviveLogSourceList");
|
|
3356
3534
|
|
|
3357
3535
|
// src/station/types/station.types.ts
|
|
3358
|
-
import { DateTime as
|
|
3359
|
-
var
|
|
3536
|
+
import { DateTime as DateTime11 } from "luxon";
|
|
3537
|
+
var __dt11 = /* @__PURE__ */ __name((v, path) => {
|
|
3360
3538
|
if (typeof v !== "string") {
|
|
3361
3539
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3362
3540
|
}
|
|
3363
|
-
const d =
|
|
3541
|
+
const d = DateTime11.fromISO(v);
|
|
3364
3542
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3365
3543
|
return d;
|
|
3366
3544
|
}, "__dt");
|
|
@@ -3368,15 +3546,15 @@ var __dtf = /* @__PURE__ */ __name((v, path, fmt) => {
|
|
|
3368
3546
|
if (typeof v !== "string") {
|
|
3369
3547
|
throw new TypeError(`ContractKit: expected a string at '${path}' in format ${fmt}, received ${typeof v}.`);
|
|
3370
3548
|
}
|
|
3371
|
-
const d =
|
|
3549
|
+
const d = DateTime11.fromFormat(v, fmt);
|
|
3372
3550
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' does not match format ${fmt}.`);
|
|
3373
3551
|
return d;
|
|
3374
3552
|
}, "__dtf");
|
|
3375
3553
|
function reviveStationHeartbeat(raw) {
|
|
3376
3554
|
const __o0 = raw;
|
|
3377
|
-
__o0["startedAt"] =
|
|
3555
|
+
__o0["startedAt"] = __dt11(__o0["startedAt"], "StationHeartbeat.startedAt");
|
|
3378
3556
|
if (__o0["lastBeat"] != null) {
|
|
3379
|
-
__o0["lastBeat"] =
|
|
3557
|
+
__o0["lastBeat"] = __dt11(__o0["lastBeat"], "StationHeartbeat.lastBeat");
|
|
3380
3558
|
}
|
|
3381
3559
|
return raw;
|
|
3382
3560
|
}
|
|
@@ -3391,7 +3569,7 @@ function reviveStationRelease(raw) {
|
|
|
3391
3569
|
__name(reviveStationRelease, "reviveStationRelease");
|
|
3392
3570
|
function reviveStationCheckup(raw) {
|
|
3393
3571
|
const __o0 = raw;
|
|
3394
|
-
__o0["readAt"] =
|
|
3572
|
+
__o0["readAt"] = __dt11(__o0["readAt"], "StationCheckup.readAt");
|
|
3395
3573
|
if (__o0["heartbeats"] != null) {
|
|
3396
3574
|
{
|
|
3397
3575
|
const __a1 = __o0["heartbeats"];
|
|
@@ -3412,7 +3590,7 @@ function reviveStationReleases(raw) {
|
|
|
3412
3590
|
}
|
|
3413
3591
|
}
|
|
3414
3592
|
if (__o0["checkedAt"] != null) {
|
|
3415
|
-
__o0["checkedAt"] =
|
|
3593
|
+
__o0["checkedAt"] = __dt11(__o0["checkedAt"], "StationReleases.checkedAt");
|
|
3416
3594
|
}
|
|
3417
3595
|
{
|
|
3418
3596
|
const __a3 = __o0["available"];
|
|
@@ -3425,24 +3603,24 @@ function reviveStationReleases(raw) {
|
|
|
3425
3603
|
__name(reviveStationReleases, "reviveStationReleases");
|
|
3426
3604
|
|
|
3427
3605
|
// src/station/types/traces.types.ts
|
|
3428
|
-
import { DateTime as
|
|
3429
|
-
var
|
|
3606
|
+
import { DateTime as DateTime12 } from "luxon";
|
|
3607
|
+
var __dt12 = /* @__PURE__ */ __name((v, path) => {
|
|
3430
3608
|
if (typeof v !== "string") {
|
|
3431
3609
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3432
3610
|
}
|
|
3433
|
-
const d =
|
|
3611
|
+
const d = DateTime12.fromISO(v);
|
|
3434
3612
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3435
3613
|
return d;
|
|
3436
3614
|
}, "__dt");
|
|
3437
3615
|
function reviveTraceDecision(raw) {
|
|
3438
3616
|
const __o0 = raw;
|
|
3439
|
-
__o0["at"] =
|
|
3617
|
+
__o0["at"] = __dt12(__o0["at"], "TraceDecision.at");
|
|
3440
3618
|
return raw;
|
|
3441
3619
|
}
|
|
3442
3620
|
__name(reviveTraceDecision, "reviveTraceDecision");
|
|
3443
3621
|
function reviveTraceSpan(raw) {
|
|
3444
3622
|
const __o0 = raw;
|
|
3445
|
-
__o0["at"] =
|
|
3623
|
+
__o0["at"] = __dt12(__o0["at"], "TraceSpan.at");
|
|
3446
3624
|
return raw;
|
|
3447
3625
|
}
|
|
3448
3626
|
__name(reviveTraceSpan, "reviveTraceSpan");
|
|
@@ -3589,18 +3767,18 @@ var StationClient = class {
|
|
|
3589
3767
|
};
|
|
3590
3768
|
|
|
3591
3769
|
// src/storage/types/storage.types.ts
|
|
3592
|
-
import { DateTime as
|
|
3593
|
-
var
|
|
3770
|
+
import { DateTime as DateTime13 } from "luxon";
|
|
3771
|
+
var __dt13 = /* @__PURE__ */ __name((v, path) => {
|
|
3594
3772
|
if (typeof v !== "string") {
|
|
3595
3773
|
throw new TypeError(`ContractKit: expected an ISO 8601 string at '${path}', received ${typeof v}.`);
|
|
3596
3774
|
}
|
|
3597
|
-
const d =
|
|
3775
|
+
const d = DateTime13.fromISO(v);
|
|
3598
3776
|
if (!d.isValid) throw new TypeError(`ContractKit: '${v}' at '${path}' is not a valid ISO 8601 datetime.`);
|
|
3599
3777
|
return d;
|
|
3600
3778
|
}, "__dt");
|
|
3601
3779
|
function reviveStorageReport(raw) {
|
|
3602
3780
|
const __o0 = raw;
|
|
3603
|
-
__o0["readAt"] =
|
|
3781
|
+
__o0["readAt"] = __dt13(__o0["readAt"], "StorageReport.readAt");
|
|
3604
3782
|
return raw;
|
|
3605
3783
|
}
|
|
3606
3784
|
__name(reviveStorageReport, "reviveStorageReport");
|
|
@@ -3792,6 +3970,7 @@ var DeadairSdk = class {
|
|
|
3792
3970
|
narrations;
|
|
3793
3971
|
news;
|
|
3794
3972
|
nowplaying;
|
|
3973
|
+
oauth;
|
|
3795
3974
|
onboarding;
|
|
3796
3975
|
personas;
|
|
3797
3976
|
playlists;
|
|
@@ -3818,6 +3997,7 @@ var DeadairSdk = class {
|
|
|
3818
3997
|
this.narrations = new NarrationsClient(sdkFetch);
|
|
3819
3998
|
this.news = new NewsClient(sdkFetch);
|
|
3820
3999
|
this.nowplaying = new NowplayingClient(sdkFetch);
|
|
4000
|
+
this.oauth = new OauthClient(sdkFetch);
|
|
3821
4001
|
this.onboarding = new OnboardingClient(sdkFetch);
|
|
3822
4002
|
this.personas = new PersonasClient(sdkFetch);
|
|
3823
4003
|
this.playlists = new PlaylistsClient(sdkFetch);
|
|
@@ -3849,6 +4029,7 @@ export {
|
|
|
3849
4029
|
NarrationsClient,
|
|
3850
4030
|
NewsClient,
|
|
3851
4031
|
NowplayingClient,
|
|
4032
|
+
OauthClient,
|
|
3852
4033
|
OnboardingClient,
|
|
3853
4034
|
PersonasClient,
|
|
3854
4035
|
PlaylistsClient,
|
|
@@ -3913,8 +4094,13 @@ export {
|
|
|
3913
4094
|
reviveMfaEnrollPhoneStartResponse,
|
|
3914
4095
|
reviveMfaRequiredResponse,
|
|
3915
4096
|
reviveMfaRequiredResponseOutput,
|
|
4097
|
+
reviveOAuthClientIssued,
|
|
4098
|
+
reviveOAuthClientList,
|
|
4099
|
+
reviveOAuthClientSummary,
|
|
4100
|
+
reviveOAuthGrant,
|
|
4101
|
+
reviveOAuthGrantList,
|
|
3916
4102
|
reviveOidcAuthenticationLoginStartResponse,
|
|
3917
|
-
|
|
4103
|
+
reviveOidcFactorRegistrationResponse,
|
|
3918
4104
|
revivePad,
|
|
3919
4105
|
revivePadList,
|
|
3920
4106
|
revivePhoneFactorRegistrationResponse,
|