itd-api 0.11.0 → 0.12.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/events/index.cjs +3 -3
- package/dist/events/index.d.cts +2 -2
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +3 -3
- package/dist/index.cjs +28 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -19
- package/dist/index.d.ts +23 -19
- package/dist/index.js +26 -49
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +7 -8
- package/dist/node/index.d.ts +7 -8
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/rest/index.cjs +7 -4
- package/dist/rest/index.cjs.map +1 -1
- package/dist/rest/index.d.cts +5 -5
- package/dist/rest/index.d.ts +5 -5
- package/dist/rest/index.js +5 -5
- package/dist/rest/index.js.map +1 -1
- package/dist/shared/{events-Sc75x6rT.d.cts → events-9L0Fonak.d.cts} +2 -2
- package/dist/shared/{events-CAb9G7Sf.d.ts → events-BpLAIiMj.d.ts} +2 -2
- package/dist/shared/{events-C6tmj8aW.cjs → events-C2DJZyI0.cjs} +246 -56
- package/dist/shared/events-C2DJZyI0.cjs.map +1 -0
- package/dist/shared/{events-MWNcnfrq.js → events-D1BfefBT.js} +246 -56
- package/dist/shared/events-D1BfefBT.js.map +1 -0
- package/dist/shared/key-value-store-DYSPsqwq.cjs.map +1 -1
- package/dist/shared/key-value-store-w1Dn5Pjb.js.map +1 -1
- package/dist/shared/{multi-storage-C7-Gz6Z7.cjs → multi-storage-7Y3KCseI.cjs} +2 -2
- package/dist/shared/multi-storage-7Y3KCseI.cjs.map +1 -0
- package/dist/shared/{multi-storage-BLBrGN9Q.js → multi-storage-DiBSx64p.js} +2 -2
- package/dist/shared/multi-storage-DiBSx64p.js.map +1 -0
- package/dist/shared/{options-5tywTYId.cjs → options-D5ttspWk.cjs} +2 -2
- package/dist/shared/{options-5tywTYId.cjs.map → options-D5ttspWk.cjs.map} +1 -1
- package/dist/shared/{options-BerKicCs.js → options-DLlaETn_.js} +2 -2
- package/dist/shared/{options-BerKicCs.js.map → options-DLlaETn_.js.map} +1 -1
- package/dist/shared/{redact-DoC7lSsp.cjs → redact-BbhtA9o-.cjs} +13 -3
- package/dist/shared/redact-BbhtA9o-.cjs.map +1 -0
- package/dist/shared/{redact-C5oxIvcc.js → redact-DSfdmeY7.js} +13 -3
- package/dist/shared/redact-DSfdmeY7.js.map +1 -0
- package/dist/shared/{render-Dnc84B4M.cjs → render-CrGXcj6L.cjs} +116 -47
- package/dist/shared/render-CrGXcj6L.cjs.map +1 -0
- package/dist/shared/{render-DRh5_aRe.js → render-D3vSEbLL.js} +116 -47
- package/dist/shared/render-D3vSEbLL.js.map +1 -0
- package/dist/shared/{render-DM7AhTZW.d.cts → render-Dzw3KeN5.d.cts} +61 -29
- package/dist/shared/{render-CBroJPcV.d.ts → render-UsQ1hb2U.d.ts} +61 -29
- package/dist/shared/storage-86wiHeXD.js.map +1 -1
- package/dist/shared/storage-CIjejZDt.cjs.map +1 -1
- package/dist/shared/{url-DTgkCWv5.cjs → url-B21Bdmw_.cjs} +42 -11
- package/dist/shared/url-B21Bdmw_.cjs.map +1 -0
- package/dist/shared/{url-BOi-_mJT.d.cts → url-C9YADYNg.d.cts} +81 -27
- package/dist/shared/{url-BOi-_mJT.d.ts → url-C9YADYNg.d.ts} +81 -27
- package/dist/shared/{url-Bg61sk_Y.js → url-Dg1u29cu.js} +25 -12
- package/dist/shared/url-Dg1u29cu.js.map +1 -0
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +4 -5
- package/dist/web/index.d.ts +4 -5
- package/dist/web/index.js.map +1 -1
- package/package.json +11 -11
- package/dist/shared/events-C6tmj8aW.cjs.map +0 -1
- package/dist/shared/events-MWNcnfrq.js.map +0 -1
- package/dist/shared/multi-storage-BLBrGN9Q.js.map +0 -1
- package/dist/shared/multi-storage-C7-Gz6Z7.cjs.map +0 -1
- package/dist/shared/redact-C5oxIvcc.js.map +0 -1
- package/dist/shared/redact-DoC7lSsp.cjs.map +0 -1
- package/dist/shared/render-DRh5_aRe.js.map +0 -1
- package/dist/shared/render-Dnc84B4M.cjs.map +0 -1
- package/dist/shared/url-Bg61sk_Y.js.map +0 -1
- package/dist/shared/url-DTgkCWv5.cjs.map +0 -1
package/dist/events/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_url = require("../shared/url-
|
|
2
|
+
const require_url = require("../shared/url-B21Bdmw_.cjs");
|
|
3
3
|
const require_validate = require("../shared/validate-CFx2dISs.cjs");
|
|
4
|
-
const require_redact = require("../shared/redact-
|
|
5
|
-
const require_events = require("../shared/events-
|
|
4
|
+
const require_redact = require("../shared/redact-BbhtA9o-.cjs");
|
|
5
|
+
const require_events = require("../shared/events-C2DJZyI0.cjs");
|
|
6
6
|
exports.DEFAULT_BASE_URL = require_url.DEFAULT_BASE_URL;
|
|
7
7
|
exports.EventChannel = require_events.EventChannel;
|
|
8
8
|
exports.EventChannelStatus = require_url.EventChannelStatus;
|
package/dist/events/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-
|
|
1
|
+
import { B as ItdRateLimitError, D as ItdApiErrorKind, G as TimeoutBudget, Gt as ItdClock, H as ItdStateError, Ht as RuntimeMode, I as ItdForbiddenError, K as isItdApiError, Kt as systemClock, L as ItdNetworkError, Lt as RuntimeOptions, M as ItdErrorKind, O as ItdAuthError, R as ItdNotFoundError, Sn as Loose, St as ClientHooks, T as ItdApiError, U as ItdTimeoutError, Ut as LogLevel, V as ItdServerError, W as ItdValidationError, Wt as Logger, Y as isItdError, a as NotificationEvent, at as Listener, c as NotificationSettings, ct as AuthIdentity, dt as bearerToken, et as isItdRateLimitError, ft as tokenProvider, hn as EventChannelStatus, ht as LIBRARY_VERSION, i as formatNotificationText, j as ItdError, k as ItdConfigError, lt as AuthProvider, n as canonicalNotificationType, nt as isItdStateError, o as normalizeNotification, ot as Unsubscribe, pt as DEFAULT_BASE_URL, q as isItdAuthError, r as isKnownNotificationType, rt as isItdValidationError, s as Notification, st as ClientConnection, t as resolveNotificationUrl, ut as anonymousAuth, w as ItdAbortError, wn as NotificationType } from "../shared/url-C9YADYNg.cjs";
|
|
2
|
+
import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-9L0Fonak.cjs";
|
|
3
3
|
export { type AuthIdentity, type AuthProvider, type ClientConnection, type ClientHooks, DEFAULT_BASE_URL, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, type ItdClock, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, type Listener, LogLevel, type Logger, type Loose, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type ReconnectOptions, RuntimeMode, type RuntimeOptions, TimeoutBudget, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
|
package/dist/events/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-
|
|
1
|
+
import { B as ItdRateLimitError, D as ItdApiErrorKind, G as TimeoutBudget, Gt as ItdClock, H as ItdStateError, Ht as RuntimeMode, I as ItdForbiddenError, K as isItdApiError, Kt as systemClock, L as ItdNetworkError, Lt as RuntimeOptions, M as ItdErrorKind, O as ItdAuthError, R as ItdNotFoundError, Sn as Loose, St as ClientHooks, T as ItdApiError, U as ItdTimeoutError, Ut as LogLevel, V as ItdServerError, W as ItdValidationError, Wt as Logger, Y as isItdError, a as NotificationEvent, at as Listener, c as NotificationSettings, ct as AuthIdentity, dt as bearerToken, et as isItdRateLimitError, ft as tokenProvider, hn as EventChannelStatus, ht as LIBRARY_VERSION, i as formatNotificationText, j as ItdError, k as ItdConfigError, lt as AuthProvider, n as canonicalNotificationType, nt as isItdStateError, o as normalizeNotification, ot as Unsubscribe, pt as DEFAULT_BASE_URL, q as isItdAuthError, r as isKnownNotificationType, rt as isItdValidationError, s as Notification, st as ClientConnection, t as resolveNotificationUrl, ut as anonymousAuth, w as ItdAbortError, wn as NotificationType } from "../shared/url-C9YADYNg.js";
|
|
2
|
+
import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-BpLAIiMj.js";
|
|
3
3
|
export { type AuthIdentity, type AuthProvider, type ClientConnection, type ClientHooks, DEFAULT_BASE_URL, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, type ItdClock, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, type Listener, LogLevel, type Logger, type Loose, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type ReconnectOptions, RuntimeMode, type RuntimeOptions, TimeoutBudget, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
|
package/dist/events/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as NotificationType, _t as systemClock, a as tokenProvider, c as normalizeNotification, d as canonicalNotificationType, f as isKnownNotificationType, i as bearerToken, mt as LIBRARY_VERSION, n as formatNotificationText, r as anonymousAuth, t as resolveNotificationUrl, ut as DEFAULT_BASE_URL, y as EventChannelStatus } from "../shared/url-Dg1u29cu.js";
|
|
2
2
|
import { C as ItdValidationError, E as isItdAuthError, F as isItdStateError, I as isItdValidationError, N as isItdRateLimitError, O as isItdError, S as ItdTimeoutError, T as isItdApiError, _ as ItdNotFoundError, a as ItdAbortError, b as ItdServerError, c as ItdAuthError, d as ItdError, f as ItdErrorKind, g as ItdNetworkError, h as ItdForbiddenError, l as ItdConfigError, o as ItdApiError, s as ItdApiErrorKind, w as TimeoutBudget, x as ItdStateError, y as ItdRateLimitError } from "../shared/validate-D7_kq3g5.js";
|
|
3
|
-
import { E as LogLevel, v as RuntimeMode } from "../shared/redact-
|
|
4
|
-
import { a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, m as EventChannel, n as EventRouter, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer } from "../shared/events-
|
|
3
|
+
import { E as LogLevel, v as RuntimeMode } from "../shared/redact-DSfdmeY7.js";
|
|
4
|
+
import { a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, m as EventChannel, n as EventRouter, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer } from "../shared/events-D1BfefBT.js";
|
|
5
5
|
export { DEFAULT_BASE_URL, EventChannel, EventChannelStatus, EventComposer, EventRouter, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, LogLevel, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, RuntimeMode, TimeoutBudget, UnauthorizedStreamError, WebSocketTransport, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_url = require("./shared/url-
|
|
2
|
+
const require_url = require("./shared/url-B21Bdmw_.cjs");
|
|
3
3
|
const require_validate = require("./shared/validate-CFx2dISs.cjs");
|
|
4
|
-
const require_redact = require("./shared/redact-
|
|
5
|
-
const require_render = require("./shared/render-
|
|
6
|
-
const require_options = require("./shared/options-
|
|
7
|
-
const require_events = require("./shared/events-
|
|
4
|
+
const require_redact = require("./shared/redact-BbhtA9o-.cjs");
|
|
5
|
+
const require_render = require("./shared/render-CrGXcj6L.cjs");
|
|
6
|
+
const require_options = require("./shared/options-D5ttspWk.cjs");
|
|
7
|
+
const require_events = require("./shared/events-C2DJZyI0.cjs");
|
|
8
8
|
const require_key_value_store = require("./shared/key-value-store-DYSPsqwq.cjs");
|
|
9
9
|
const require_storage = require("./shared/storage-CIjejZDt.cjs");
|
|
10
|
-
const require_multi_storage = require("./shared/multi-storage-
|
|
10
|
+
const require_multi_storage = require("./shared/multi-storage-7Y3KCseI.cjs");
|
|
11
11
|
//#region src/notifications-api.ts
|
|
12
12
|
var ClientNotifications = class extends require_render.NotificationsResource {
|
|
13
13
|
#createEvents;
|
|
@@ -62,8 +62,8 @@ function requireString(body, key, message) {
|
|
|
62
62
|
return value;
|
|
63
63
|
}
|
|
64
64
|
const AUTH_CHECK = require_url.passthroughOperation("auth.check");
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
require_url.passthroughOperation("auth.captchaProvider");
|
|
66
|
+
require_url.passthroughOperation("auth.captchaPage");
|
|
67
67
|
const AUTH_SIGN_UP = require_url.defineBuiltInOperation("auth.signUp", (body) => requireString(body, "flowToken", "Сервер не вернул flowToken при регистрации"));
|
|
68
68
|
const AUTH_SIGN_IN = require_url.defineBuiltInOperation("auth.signIn", (body) => {
|
|
69
69
|
const accessToken = require_url.pickString(body, "accessToken");
|
|
@@ -127,17 +127,6 @@ function validateCaptchaToken(captcha, path) {
|
|
|
127
127
|
if (typeof type !== "string" || type.trim() === "") throw new require_validate.ItdConfigError(`${path}.type должен быть непустой строкой`);
|
|
128
128
|
requireCaptchaText(field, `${path}.field`);
|
|
129
129
|
}
|
|
130
|
-
/** Разбирает ответ `GET /api/v1/auth/captcha/provider` для автоматического входа. */
|
|
131
|
-
function readCaptchaProvider(body) {
|
|
132
|
-
const config = require_validate.isRecord(body) ? body : void 0;
|
|
133
|
-
const provider = config?.provider;
|
|
134
|
-
const field = config?.field;
|
|
135
|
-
if (typeof provider !== "string" || provider.trim() === "" || typeof field !== "string" || field.trim() === "") throw new require_validate.ItdConfigError("Сервер вернул неподдерживаемую конфигурацию капчи");
|
|
136
|
-
return {
|
|
137
|
-
provider,
|
|
138
|
-
field
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
130
|
/** Куда класть токен: настройка, иначе умолчание провайдера. */
|
|
142
131
|
function resolveField(type, configured) {
|
|
143
132
|
const field = configured ?? CAPTCHA_FIELDS[type];
|
|
@@ -1023,22 +1012,10 @@ var AuthManager = class {
|
|
|
1023
1012
|
}
|
|
1024
1013
|
/** Спрашивает у сервера активного провайдера и поле, в котором он ждёт токен. */
|
|
1025
1014
|
async #resolveCaptchaProvider() {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
skipAuthRefresh: true
|
|
1031
|
-
}));
|
|
1032
|
-
} catch (error) {
|
|
1033
|
-
if (require_validate.isItdApiError(error) && error.status === 404 && error.code === require_url.ItdErrorCode.NOT_FOUND) {
|
|
1034
|
-
this.#config.logger?.warn("Сервер отключил определение провайдера капчи; используется Cloudflare Turnstile");
|
|
1035
|
-
return {
|
|
1036
|
-
provider: require_url.CaptchaType.Cloudflare,
|
|
1037
|
-
field: require_url.CaptchaField.Cloudflare
|
|
1038
|
-
};
|
|
1039
|
-
}
|
|
1040
|
-
throw error;
|
|
1041
|
-
}
|
|
1015
|
+
return {
|
|
1016
|
+
provider: require_url.CaptchaType.Cloudflare,
|
|
1017
|
+
field: require_url.CaptchaField.Cloudflare
|
|
1018
|
+
};
|
|
1042
1019
|
}
|
|
1043
1020
|
async #performSignIn(credentials, revision) {
|
|
1044
1021
|
const captcha = await this.captchaBody();
|
|
@@ -1256,13 +1233,13 @@ var AuthResource = class extends require_render.BaseResource {
|
|
|
1256
1233
|
*
|
|
1257
1234
|
* Сервер может переключить провайдера или переименовать поле без выпуска новой версии SDK.
|
|
1258
1235
|
* Автоматическому входу этот вызов не нужен — клиент делает его сам.
|
|
1236
|
+
*
|
|
1237
|
+
* @deprecated Сервер отвечает `404`; метод возвращает Cloudflare Turnstile.
|
|
1259
1238
|
*/
|
|
1260
|
-
captchaProvider(
|
|
1261
|
-
return
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
skipAuthRefresh: true,
|
|
1265
|
-
...options
|
|
1239
|
+
captchaProvider(_options = {}) {
|
|
1240
|
+
return Promise.resolve({
|
|
1241
|
+
provider: require_url.CaptchaType.Cloudflare,
|
|
1242
|
+
field: CAPTCHA_FIELDS[require_url.CaptchaType.Cloudflare]
|
|
1266
1243
|
});
|
|
1267
1244
|
}
|
|
1268
1245
|
/**
|
|
@@ -1271,14 +1248,14 @@ var AuthResource = class extends require_render.BaseResource {
|
|
|
1271
1248
|
* То же, что {@link captchaProvider}, плюс `url` — готовая страница на домене итд.com,
|
|
1272
1249
|
* где ключ виджета действителен. Пригодится встроенному браузеру: открыть её и забрать
|
|
1273
1250
|
* токен, ничего не собирая самому.
|
|
1251
|
+
*
|
|
1252
|
+
* @deprecated Сервер отвечает `404`; метод возвращает Cloudflare Turnstile на домене итд.com.
|
|
1274
1253
|
*/
|
|
1275
|
-
captchaPage(options = {}) {
|
|
1276
|
-
return
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
...options
|
|
1281
|
-
});
|
|
1254
|
+
async captchaPage(options = {}) {
|
|
1255
|
+
return {
|
|
1256
|
+
...await this.captchaProvider(options),
|
|
1257
|
+
url: require_url.DEFAULT_BASE_URL
|
|
1258
|
+
};
|
|
1282
1259
|
}
|
|
1283
1260
|
/** Создаёт короткоживущую сессию QR-входа. */
|
|
1284
1261
|
async startQrLogin(options = {}) {
|
|
@@ -2695,12 +2672,14 @@ exports.ItdStateError = require_validate.ItdStateError;
|
|
|
2695
2672
|
exports.ItdTimeoutError = require_validate.ItdTimeoutError;
|
|
2696
2673
|
exports.ItdValidationError = require_validate.ItdValidationError;
|
|
2697
2674
|
exports.LIBRARY_VERSION = require_url.LIBRARY_VERSION;
|
|
2675
|
+
exports.LastSeenUnit = require_url.LastSeenUnit;
|
|
2698
2676
|
exports.LikesVisibility = require_url.LikesVisibility;
|
|
2699
2677
|
exports.LogLevel = require_redact.LogLevel;
|
|
2700
2678
|
exports.MemoryKeyValueStore = require_key_value_store.MemoryKeyValueStore;
|
|
2701
2679
|
exports.MemoryMultiTokenStorage = require_multi_storage.MemoryMultiTokenStorage;
|
|
2702
2680
|
exports.MemoryShopOrderAccessStorage = require_render.MemoryShopOrderAccessStorage;
|
|
2703
2681
|
exports.MemoryTokenStorage = require_storage.MemoryTokenStorage;
|
|
2682
|
+
exports.MessageAccess = require_url.MessageAccess;
|
|
2704
2683
|
exports.NotificationEvents = require_events.NotificationEvents;
|
|
2705
2684
|
exports.NotificationEventsClient = require_events.NotificationEventsClient;
|
|
2706
2685
|
exports.NotificationEventsTransport = require_events.NotificationEventsTransport;
|
|
@@ -2732,6 +2711,7 @@ exports.SpanType = require_url.SpanType;
|
|
|
2732
2711
|
exports.TURNSTILE_SITE_KEY = TURNSTILE_SITE_KEY;
|
|
2733
2712
|
exports.TimeoutBudget = require_validate.TimeoutBudget;
|
|
2734
2713
|
exports.UnauthorizedStreamError = require_events.UnauthorizedStreamError;
|
|
2714
|
+
exports.UsernameUnavailableReason = require_url.UsernameUnavailableReason;
|
|
2735
2715
|
exports.VIDEO_MIME_TYPES = require_render.VIDEO_MIME_TYPES;
|
|
2736
2716
|
exports.ViewReason = require_url.ViewReason;
|
|
2737
2717
|
exports.ViewSource = require_url.ViewSource;
|