itd-api 0.10.1 → 0.10.2

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 +73 -4
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +60 -4
  8. package/dist/index.d.ts +60 -4
  9. package/dist/index.js +73 -5
  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-Cipe-Fm9.js → events-0I_Pixnq.js} +2 -2
  16. package/dist/shared/{events-Cipe-Fm9.js.map → events-0I_Pixnq.js.map} +1 -1
  17. package/dist/shared/{events-MtRNe_TF.cjs → events-8OLqvKwQ.cjs} +2 -2
  18. package/dist/shared/{events-MtRNe_TF.cjs.map → events-8OLqvKwQ.cjs.map} +1 -1
  19. package/dist/shared/{events-CZXU16qU.d.cts → events-Cr1Mc2Gl.d.cts} +2 -2
  20. package/dist/shared/{events-D3CSlpXR.d.ts → events-DXooQkyB.d.ts} +2 -2
  21. package/dist/shared/{render-bZwOk3CC.d.cts → render-BxPM234w.d.cts} +29 -3
  22. package/dist/shared/{render-dscKp9CC.cjs → render-CnpKoGO8.cjs} +2 -2
  23. package/dist/shared/{render-dscKp9CC.cjs.map → render-CnpKoGO8.cjs.map} +1 -1
  24. package/dist/shared/{render-Cs6AOXbD.d.ts → render-D69bOsxu.d.ts} +29 -3
  25. package/dist/shared/{render-CubTTof_.js → render-GQw5m1-o.js} +2 -2
  26. package/dist/shared/{render-CubTTof_.js.map → render-GQw5m1-o.js.map} +1 -1
  27. package/dist/shared/{url-DgTYZN_v.cjs → url-BnaioEsz.cjs} +42 -4
  28. package/dist/shared/{url-DgTYZN_v.cjs.map → url-BnaioEsz.cjs.map} +1 -1
  29. package/dist/shared/{url-CntTEAxu.js → url-D0KJ5pws.js} +37 -5
  30. package/dist/shared/{url-CntTEAxu.js.map → url-D0KJ5pws.js.map} +1 -1
  31. package/dist/shared/{url-Dum7r_FT.d.cts → url-Qv7smwHP.d.cts} +38 -5
  32. package/dist/shared/{url-Dum7r_FT.d.ts → url-Qv7smwHP.d.ts} +38 -5
  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-DgTYZN_v.cjs");
2
+ const require_url = require("../shared/url-BnaioEsz.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-MtRNe_TF.cjs");
5
+ const require_events = require("../shared/events-8OLqvKwQ.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-Dum7r_FT.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-CZXU16qU.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-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";
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-Dum7r_FT.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-D3CSlpXR.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-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";
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, f as isKnownNotificationType, ht as systemClock, i as bearerToken, n as formatNotificationText, ot as DEFAULT_BASE_URL, r as anonymousAuth, t as resolveNotificationUrl, ut as LIBRARY_VERSION, y as EventChannelStatus } from "../shared/url-CntTEAxu.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-D0KJ5pws.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-Cipe-Fm9.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";
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-DgTYZN_v.cjs");
2
+ const require_url = require("./shared/url-BnaioEsz.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-dscKp9CC.cjs");
5
+ const require_render = require("./shared/render-CnpKoGO8.cjs");
6
6
  const require_options = require("./shared/options-DjEtbVaf.cjs");
7
- const require_events = require("./shared/events-MtRNe_TF.cjs");
7
+ const require_events = require("./shared/events-8OLqvKwQ.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");
@@ -63,6 +63,7 @@ function requireString(body, key, message) {
63
63
  }
64
64
  const AUTH_CHECK = require_url.passthroughOperation("auth.check");
65
65
  const AUTH_CAPTCHA_PROVIDER = require_url.passthroughOperation("auth.captchaProvider");
66
+ const AUTH_CAPTCHA_PAGE = require_url.passthroughOperation("auth.captchaPage");
66
67
  const AUTH_SIGN_UP = require_url.defineBuiltInOperation("auth.signUp", (body) => requireString(body, "flowToken", "Сервер не вернул flowToken при регистрации"));
67
68
  const AUTH_SIGN_IN = require_url.defineBuiltInOperation("auth.signIn", (body) => {
68
69
  const accessToken = require_url.pickString(body, "accessToken");
@@ -86,6 +87,9 @@ const AUTH_REVOKE_SESSION = require_url.voidOperation("auth.revokeSession");
86
87
  const AUTH_REVOKE_OTHER_SESSIONS = require_url.voidOperation("auth.revokeOtherSessions");
87
88
  const AUTH_QR_START = require_url.passthroughOperation("auth.qrStart");
88
89
  const AUTH_QR_CLAIM = require_url.passthroughOperation("auth.qrClaim");
90
+ const AUTH_QR_SCAN = require_url.passthroughOperation("auth.qrScan");
91
+ const AUTH_QR_APPROVE = require_url.voidOperation("auth.qrApprove");
92
+ const AUTH_QR_REJECT = require_url.voidOperation("auth.qrReject");
89
93
  //#endregion
90
94
  //#region src/session/captcha.ts
91
95
  function requireCaptchaText(value, field) {
@@ -298,6 +302,7 @@ function createItdAuth(options, deps) {
298
302
  /** Пути эндпоинтов авторизации. */
299
303
  const AUTH_PATHS = {
300
304
  captchaProvider: "/api/v1/auth/captcha/provider",
305
+ captchaPage: "/api/v1/auth/captcha/page",
301
306
  signUp: "/api/v1/auth/sign-up",
302
307
  signIn: "/api/v1/auth/sign-in",
303
308
  verifyOtp: "/api/v1/auth/verify-otp",
@@ -310,7 +315,10 @@ const AUTH_PATHS = {
310
315
  sessions: "/api/v1/auth/sessions",
311
316
  qrStart: "/api/v1/auth/qr/start",
312
317
  qrClaim: "/api/v1/auth/qr/claim",
313
- qrStream: "/api/v1/auth/qr/stream"
318
+ qrStream: "/api/v1/auth/qr/stream",
319
+ qrScan: "/api/v1/auth/qr/scan",
320
+ qrApprove: "/api/v1/auth/qr/approve",
321
+ qrReject: "/api/v1/auth/qr/reject"
314
322
  };
315
323
  /**
316
324
  * Публичный ключ Cloudflare Turnstile платформы итд.com.
@@ -1236,6 +1244,21 @@ var AuthResource = class extends require_render.BaseResource {
1236
1244
  ...options
1237
1245
  });
1238
1246
  }
1247
+ /**
1248
+ * Узнаёт активного провайдера капчи вместе с адресом страницы виджета.
1249
+ *
1250
+ * То же, что {@link captchaProvider}, плюс `url` — готовая страница на домене итд.com,
1251
+ * где ключ виджета действителен. Пригодится встроенному браузеру: открыть её и забрать
1252
+ * токен, ничего не собирая самому.
1253
+ */
1254
+ captchaPage(options = {}) {
1255
+ return this.http.execute(AUTH_CAPTCHA_PAGE, {
1256
+ path: AUTH_PATHS.captchaPage,
1257
+ skipAuth: true,
1258
+ skipAuthRefresh: true,
1259
+ ...options
1260
+ });
1261
+ }
1239
1262
  /** Создаёт короткоживущую сессию QR-входа. */
1240
1263
  async startQrLogin(options = {}) {
1241
1264
  const cookies = this.#auth.createCookieFlow(false);
@@ -1314,6 +1337,51 @@ var AuthResource = class extends require_render.BaseResource {
1314
1337
  }
1315
1338
  }
1316
1339
  /**
1340
+ * Отмечает QR-код отсканированным и узнаёт, кого впускают.
1341
+ *
1342
+ * Обратная сторона QR-входа: этот и два соседних метода вызывает устройство, где сессия
1343
+ * уже есть. Показывающая сторона увидит статус `scanned`, но вход ещё не состоится —
1344
+ * его завершают {@link approveQrLogin} или {@link rejectQrLogin}.
1345
+ *
1346
+ * Сервер принимает только сессию, созданную мобильным клиентом. Обычный web access token
1347
+ * отклоняется с кодом `QR_APPROVER_NOT_ALLOWED`, даже если добавить мобильные заголовки
1348
+ * уже после выдачи токена.
1349
+ *
1350
+ * @param input секреты из отсканированного кода — см. {@link QrLoginSecrets}
1351
+ * @returns описание устройства, которое просит вход
1352
+ */
1353
+ scanQrLogin(input, options = {}) {
1354
+ return this.http.execute(AUTH_QR_SCAN, {
1355
+ path: AUTH_PATHS.qrScan,
1356
+ body: input,
1357
+ ...options
1358
+ });
1359
+ }
1360
+ /**
1361
+ * Подтверждает вход по QR-коду: показавшее код устройство получит access token.
1362
+ *
1363
+ * Осмысленно после {@link scanQrLogin} — человек должен увидеть, что подтверждает.
1364
+ * Требует мобильную сессию, как и `scanQrLogin()`.
1365
+ */
1366
+ approveQrLogin(input, options = {}) {
1367
+ return this.voidOperation(AUTH_QR_APPROVE, {
1368
+ path: AUTH_PATHS.qrApprove,
1369
+ body: input,
1370
+ ...options
1371
+ });
1372
+ }
1373
+ /**
1374
+ * Отклоняет вход по QR-коду: показавшее код устройство получит статус `rejected`.
1375
+ * Требует мобильную сессию, как и `scanQrLogin()`.
1376
+ */
1377
+ rejectQrLogin(input, options = {}) {
1378
+ return this.voidOperation(AUTH_QR_REJECT, {
1379
+ path: AUTH_PATHS.qrReject,
1380
+ body: input,
1381
+ ...options
1382
+ });
1383
+ }
1384
+ /**
1317
1385
  * Регистрирует аккаунт и запускает подтверждение по коду.
1318
1386
  *
1319
1387
  * @returns `flowToken`, который нужно передать в {@link verifyOtp}
@@ -2614,6 +2682,7 @@ exports.NotificationUpdateType = require_events.NotificationUpdateType;
2614
2682
  exports.OPERATIONS = require_url.OPERATIONS;
2615
2683
  exports.PaginationMode = require_render.PaginationMode;
2616
2684
  exports.Paginator = require_render.Paginator;
2685
+ exports.QrLocationPrecision = require_url.QrLocationPrecision;
2617
2686
  exports.QrLoginStatus = QrLoginStatus;
2618
2687
  exports.QrLoginStreamStatus = QrLoginStreamStatus;
2619
2688
  exports.RateLimitPacing = require_url.RateLimitPacing;