itd-api 0.10.2 → 0.10.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.
Files changed (33) hide show
  1. package/dist/events/index.cjs +2 -2
  2. package/dist/events/index.d.cts +2 -2
  3. package/dist/events/index.d.ts +2 -2
  4. package/dist/events/index.js +2 -2
  5. package/dist/index.cjs +19 -8
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +3 -3
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +19 -8
  10. package/dist/index.js.map +1 -1
  11. package/dist/rest/index.cjs +2 -2
  12. package/dist/rest/index.d.cts +2 -2
  13. package/dist/rest/index.d.ts +2 -2
  14. package/dist/rest/index.js +2 -2
  15. package/dist/shared/{events-8OLqvKwQ.cjs → events-BVfqWyBw.cjs} +2 -2
  16. package/dist/shared/{events-8OLqvKwQ.cjs.map → events-BVfqWyBw.cjs.map} +1 -1
  17. package/dist/shared/{events-DXooQkyB.d.ts → events-Cp7ITueA.d.ts} +2 -2
  18. package/dist/shared/{events-0I_Pixnq.js → events-Cwj7UPAa.js} +2 -2
  19. package/dist/shared/{events-0I_Pixnq.js.map → events-Cwj7UPAa.js.map} +1 -1
  20. package/dist/shared/{events-Cr1Mc2Gl.d.cts → events-D0Wtt-If.d.cts} +2 -2
  21. package/dist/shared/{render-GQw5m1-o.js → render-BT74nC1l.js} +2 -2
  22. package/dist/shared/{render-GQw5m1-o.js.map → render-BT74nC1l.js.map} +1 -1
  23. package/dist/shared/{render-BxPM234w.d.cts → render-CJO_L2CD.d.cts} +2 -2
  24. package/dist/shared/{render-CnpKoGO8.cjs → render-CYJSDypQ.cjs} +2 -2
  25. package/dist/shared/{render-CnpKoGO8.cjs.map → render-CYJSDypQ.cjs.map} +1 -1
  26. package/dist/shared/{render-D69bOsxu.d.ts → render-DRmuHoEy.d.ts} +2 -2
  27. package/dist/shared/{url-Qv7smwHP.d.cts → url-BLnX-LYt.d.cts} +2 -2
  28. package/dist/shared/{url-Qv7smwHP.d.ts → url-BLnX-LYt.d.ts} +2 -2
  29. package/dist/shared/{url-BnaioEsz.cjs → url-BnO1aWsd.cjs} +2 -2
  30. package/dist/shared/{url-BnaioEsz.cjs.map → url-BnO1aWsd.cjs.map} +1 -1
  31. package/dist/shared/{url-D0KJ5pws.js → url-DS0-lrl-.js} +2 -2
  32. package/dist/shared/{url-D0KJ5pws.js.map → url-DS0-lrl-.js.map} +1 -1
  33. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_url = require("../shared/url-BnaioEsz.cjs");
2
+ const require_url = require("../shared/url-BnO1aWsd.cjs");
3
3
  const require_errors = require("../shared/errors-BmP3TKoW.cjs");
4
4
  const require_redact = require("../shared/redact-lAmck1Z6.cjs");
5
- const require_events = require("../shared/events-8OLqvKwQ.cjs");
5
+ const require_events = require("../shared/events-BVfqWyBw.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;
@@ -1,3 +1,3 @@
1
- import { $ as isItdStateError, A as ItdErrorKind, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, D as ItdConfigError, E as ItdAuthError, F as ItdNetworkError, Ft as RuntimeOptions, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, K as isItdError, P as ItdForbiddenError, R as ItdRateLimitError, S as ItdAbortError, T as ItdApiErrorKind, U as isItdApiError, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Z as isItdRateLimitError, _n as Loose, a as NotificationEvent, at as bearerToken, c as NotificationSettings, ct as Listener, dn as EventChannelStatus, et as isItdValidationError, ft as LIBRARY_VERSION, i as formatNotificationText, it as anonymousAuth, k as ItdError, lt as Unsubscribe, n as canonicalNotificationType, nt as AuthIdentity, o as normalizeNotification, ot as tokenProvider, r as isKnownNotificationType, rt as AuthProvider, s as Notification, t as resolveNotificationUrl, tt as ClientConnection, ut as DEFAULT_BASE_URL, vn as NotificationType, xt as Logger, yt as ClientHooks, z as ItdServerError } from "../shared/url-Qv7smwHP.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-Cr1Mc2Gl.cjs";
1
+ import { $ as isItdStateError, A as ItdErrorKind, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, D as ItdConfigError, E as ItdAuthError, F as ItdNetworkError, Ft as RuntimeOptions, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, K as isItdError, P as ItdForbiddenError, R as ItdRateLimitError, S as ItdAbortError, T as ItdApiErrorKind, U as isItdApiError, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Z as isItdRateLimitError, _n as Loose, a as NotificationEvent, at as bearerToken, c as NotificationSettings, ct as Listener, dn as EventChannelStatus, et as isItdValidationError, ft as LIBRARY_VERSION, i as formatNotificationText, it as anonymousAuth, k as ItdError, lt as Unsubscribe, n as canonicalNotificationType, nt as AuthIdentity, o as normalizeNotification, ot as tokenProvider, r as isKnownNotificationType, rt as AuthProvider, s as Notification, t as resolveNotificationUrl, tt as ClientConnection, ut as DEFAULT_BASE_URL, vn as NotificationType, xt as Logger, yt as ClientHooks, z as ItdServerError } from "../shared/url-BLnX-LYt.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-D0Wtt-If.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, 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, 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 };
@@ -1,3 +1,3 @@
1
- import { $ as isItdStateError, A as ItdErrorKind, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, D as ItdConfigError, E as ItdAuthError, F as ItdNetworkError, Ft as RuntimeOptions, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, K as isItdError, P as ItdForbiddenError, R as ItdRateLimitError, S as ItdAbortError, T as ItdApiErrorKind, U as isItdApiError, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Z as isItdRateLimitError, _n as Loose, a as NotificationEvent, at as bearerToken, c as NotificationSettings, ct as Listener, dn as EventChannelStatus, et as isItdValidationError, ft as LIBRARY_VERSION, i as formatNotificationText, it as anonymousAuth, k as ItdError, lt as Unsubscribe, n as canonicalNotificationType, nt as AuthIdentity, o as normalizeNotification, ot as tokenProvider, r as isKnownNotificationType, rt as AuthProvider, s as Notification, t as resolveNotificationUrl, tt as ClientConnection, ut as DEFAULT_BASE_URL, vn as NotificationType, xt as Logger, yt as ClientHooks, z as ItdServerError } from "../shared/url-Qv7smwHP.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-DXooQkyB.js";
1
+ import { $ as isItdStateError, A as ItdErrorKind, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, D as ItdConfigError, E as ItdAuthError, F as ItdNetworkError, Ft as RuntimeOptions, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, K as isItdError, P as ItdForbiddenError, R as ItdRateLimitError, S as ItdAbortError, T as ItdApiErrorKind, U as isItdApiError, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Z as isItdRateLimitError, _n as Loose, a as NotificationEvent, at as bearerToken, c as NotificationSettings, ct as Listener, dn as EventChannelStatus, et as isItdValidationError, ft as LIBRARY_VERSION, i as formatNotificationText, it as anonymousAuth, k as ItdError, lt as Unsubscribe, n as canonicalNotificationType, nt as AuthIdentity, o as normalizeNotification, ot as tokenProvider, r as isKnownNotificationType, rt as AuthProvider, s as Notification, t as resolveNotificationUrl, tt as ClientConnection, ut as DEFAULT_BASE_URL, vn as NotificationType, xt as Logger, yt as ClientHooks, z as ItdServerError } from "../shared/url-BLnX-LYt.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-Cp7ITueA.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, 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, 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 };
@@ -1,5 +1,5 @@
1
- import { T as NotificationType, a as tokenProvider, c as normalizeNotification, d as canonicalNotificationType, dt as LIBRARY_VERSION, f as isKnownNotificationType, gt as systemClock, i as bearerToken, n as formatNotificationText, r as anonymousAuth, st as DEFAULT_BASE_URL, t as resolveNotificationUrl, y as EventChannelStatus } from "../shared/url-D0KJ5pws.js";
1
+ import { T as NotificationType, a as tokenProvider, c as normalizeNotification, d as canonicalNotificationType, dt as LIBRARY_VERSION, f as isKnownNotificationType, gt as systemClock, i as bearerToken, n as formatNotificationText, r as anonymousAuth, st as DEFAULT_BASE_URL, t as resolveNotificationUrl, y as EventChannelStatus } from "../shared/url-DS0-lrl-.js";
2
2
  import { A as isItdStateError, C as isItdError, O as isItdRateLimitError, _ as ItdStateError, a as ItdConfigError, b as isItdApiError, c as ItdErrorKind, d as ItdForbiddenError, f as ItdNetworkError, g as ItdServerError, h as ItdRateLimitError, i as ItdAuthError, j as isItdValidationError, n as ItdApiError, p as ItdNotFoundError, r as ItdApiErrorKind, s as ItdError, t as ItdAbortError, v as ItdTimeoutError, x as isItdAuthError, y as ItdValidationError } from "../shared/errors-GI10kZxk.js";
3
3
  import { v as RuntimeMode } from "../shared/redact-DJV0XM3n.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-0I_Pixnq.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-Cwj7UPAa.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, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, RuntimeMode, 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,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_url = require("./shared/url-BnaioEsz.cjs");
2
+ const require_url = require("./shared/url-BnO1aWsd.cjs");
3
3
  const require_errors = require("./shared/errors-BmP3TKoW.cjs");
4
4
  const require_redact = require("./shared/redact-lAmck1Z6.cjs");
5
- const require_render = require("./shared/render-CnpKoGO8.cjs");
5
+ const require_render = require("./shared/render-CYJSDypQ.cjs");
6
6
  const require_options = require("./shared/options-DjEtbVaf.cjs");
7
- const require_events = require("./shared/events-8OLqvKwQ.cjs");
7
+ const require_events = require("./shared/events-BVfqWyBw.cjs");
8
8
  const require_key_value_store = require("./shared/key-value-store-B5GYVEYZ.cjs");
9
9
  const require_storage = require("./shared/storage-CZJZoaz9.cjs");
10
10
  const require_multi_storage = require("./shared/multi-storage-s-fPtjoy.cjs");
@@ -1017,11 +1017,22 @@ var AuthManager = class {
1017
1017
  }
1018
1018
  /** Спрашивает у сервера активного провайдера и поле, в котором он ждёт токен. */
1019
1019
  async #resolveCaptchaProvider() {
1020
- return readCaptchaProvider(await this.#http.execute(AUTH_CAPTCHA_PROVIDER, {
1021
- path: AUTH_PATHS.captchaProvider,
1022
- skipAuth: true,
1023
- skipAuthRefresh: true
1024
- }));
1020
+ try {
1021
+ return readCaptchaProvider(await this.#http.execute(AUTH_CAPTCHA_PROVIDER, {
1022
+ path: AUTH_PATHS.captchaProvider,
1023
+ skipAuth: true,
1024
+ skipAuthRefresh: true
1025
+ }));
1026
+ } catch (error) {
1027
+ if (require_errors.isItdApiError(error) && error.status === 404 && error.code === require_url.ItdErrorCode.NOT_FOUND) {
1028
+ this.#config.logger?.warn("Сервер отключил определение провайдера капчи; используется Cloudflare Turnstile");
1029
+ return {
1030
+ provider: require_url.CaptchaType.Cloudflare,
1031
+ field: require_url.CaptchaField.Cloudflare
1032
+ };
1033
+ }
1034
+ throw error;
1035
+ }
1025
1036
  }
1026
1037
  async #performSignIn(credentials, revision) {
1027
1038
  const captcha = await this.captchaBody();