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
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Cn as ViewReason, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as SpanType, St as OperationRequestOptions, T as ItdApiErrorKind, Tn as WallAccess, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as Loose, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ReportTargetType, bt as ErrorContextHook, c as NotificationSettings, cn as CaptchaField, ct as Listener, d as AuthUser, dn as EventChannelStatus, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as FeedTab, ft as LIBRARY_VERSION, g as PinsResult, gn as LikesVisibility, gt as OperationMetadata, h as Pin, hn as ItdErrorCode, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as CaptchaType, lt as Unsubscribe, m as MyProfile, mn as InteractionType, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as IncidentKind, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CaptchaChoice, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as CommentSort, ut as DEFAULT_BASE_URL, v as Profile, vn as NotificationType, vt as RetrySafety, w as ItdApiErrorInit, wn as ViewSource, wt as RateLimitBucketContext, x as UserSummary, xn as ServiceState, xt as Logger, y as PublicProfile, yn as ReportReason, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-Dum7r_FT.cjs";
2
- import { $ as ShopConsentContext, $n as PaginationMode, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as OperationExtensions, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginTeardown, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as PluginApi, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as Session, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationsResource, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Subscription, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as CookieJar, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as PageState, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as ClientPlugin, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformer, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as BaseResource, Xt as MarkupSpan, Y as ShopProductsResource, Yn as UpdateNotificationSettingsInput, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as Page, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as HttpClient, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as FeatureBucketDefinition, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptInterceptor, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureOperationDefinition, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as FileResolver, dt as ShopOrderItem, en as PlatformClientVersion, er as Paginator, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as PreparedBufferSource, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileOptions, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as ResolveFileContext, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as ClientFeature, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureRequestOptions, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedStreamSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as mapPage, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureContext, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedFileSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as NotificationListParams, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as RateLimitBucketState, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureInstallation, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as PaginatorOptions, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as ManagedClientResource, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as AttemptContext, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationTransformContext, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptNext, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptExtensions, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-bZwOk3CC.cjs";
3
- 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, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Cn as SpanType, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, En as WallAccess, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as ServiceState, St as OperationRequestOptions, T as ItdApiErrorKind, Tn as ViewSource, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as Loose, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ReportReason, bt as ErrorContextHook, c as NotificationSettings, cn as CaptchaField, ct as Listener, d as AuthUser, dn as EventChannelStatus, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as FeedTab, ft as LIBRARY_VERSION, g as PinsResult, gn as LikesVisibility, gt as OperationMetadata, h as Pin, hn as ItdErrorCode, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as CaptchaType, lt as Unsubscribe, m as MyProfile, mn as InteractionType, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as IncidentKind, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CaptchaChoice, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as CommentSort, ut as DEFAULT_BASE_URL, v as Profile, vn as NotificationType, vt as RetrySafety, w as ItdApiErrorInit, wn as ViewReason, wt as RateLimitBucketContext, x as UserSummary, xn as ReportTargetType, xt as Logger, y as PublicProfile, yn as QrLocationPrecision, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-Qv7smwHP.cjs";
2
+ import { $ as ShopConsentContext, $n as PageState, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as ClientPlugin, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginApi, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as OperationTransformer, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as QrLoginTarget, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationListParams, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Session, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as PluginTeardown, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as Page, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as AttemptNext, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformContext, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as UpdateNotificationSettingsInput, Xt as MarkupSpan, Y as ShopProductsResource, Yn as NotificationsResource, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as BaseResource, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as ResolveFileOptions, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as ClientFeature, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptExtensions, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureInstallation, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as ManagedClientResource, dt as ShopOrderItem, en as PlatformClientVersion, er as PaginationMode, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as FileResolver, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileContext, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as PreparedStreamSource, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as RateLimitBucketState, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kr as CookieJar, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureOperationDefinition, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedFileSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as PaginatorOptions, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureBucketDefinition, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedBufferSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as Subscription, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as mapPage, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureContext, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as Paginator, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as FeatureRequestOptions, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as HttpClient, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationExtensions, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptInterceptor, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptContext, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-BxPM234w.cjs";
3
+ 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";
4
4
  import { a as FileStreamOptions, c as LazyFile, d as UrlFileOptions, i as FileStreamContent, l as StreamFile, n as FileContext, o as FileTransferMode, r as FileInput, s as FromStreamOptions, t as FileContent, u as UrlFile } from "./shared/contracts-BoT7msmq.cjs";
5
5
  import { a as KeyValueStoreResult, c as createKeyValueStore, d as withCodec, f as withNamespace, i as KeyValueStoreKeys, l as createRecordKeyValueStore, n as KeyValueCodec, o as MemoryKeyValueStore, r as KeyValueStore, s as RecordKeyValueStoreSource, t as EnumerableKeyValueStore, u as isEnumerableKeyValueStore } from "./shared/key-value-store-COZaNHZS.cjs";
6
6
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-BQrtKon9.cjs";
@@ -36,6 +36,15 @@ interface CaptchaProvider {
36
36
  provider: CaptchaType;
37
37
  field: CaptchaField;
38
38
  }
39
+ /**
40
+ * Активный провайдер капчи вместе с адресом готовой страницы виджета.
41
+ *
42
+ * Страница собрана на домене итд.com, поэтому ключ виджета на ней действителен: её открывают
43
+ * во встроенном браузере и забирают токен оттуда.
44
+ */
45
+ interface CaptchaPage extends CaptchaProvider {
46
+ url: string;
47
+ }
39
48
  /**
40
49
  * Доказательство прохождения капчи: токен и его провайдер.
41
50
  *
@@ -468,6 +477,18 @@ interface QrLoginStreamInput {
468
477
  qrId: string;
469
478
  claimToken: string;
470
479
  }
480
+ /**
481
+ * Секреты QR-кода со стороны сканирующего устройства.
482
+ *
483
+ * Оба значения лежат во fragment {@link QrLoginStart.payload} — ссылки вида
484
+ * `https://итд.com/qr#i=<qrId>&s=<secret>`, которую и кодирует QR-код. `secret` — не то же
485
+ * самое, что `claimToken`: этот секрет предъявляет тот, кто сканирует, а `claimToken` — тот,
486
+ * кто код показывает.
487
+ */
488
+ interface QrLoginSecrets {
489
+ qrId: string;
490
+ secret: string;
491
+ }
471
492
  /** Управление временем жизни потокового запроса. */
472
493
  interface QrLoginStreamOptions {
473
494
  signal?: AbortSignal | undefined;
@@ -516,6 +537,14 @@ declare class AuthResource extends BaseResource {
516
537
  * Автоматическому входу этот вызов не нужен — клиент делает его сам.
517
538
  */
518
539
  captchaProvider(options?: RequestOptions): Promise<CaptchaProvider>;
540
+ /**
541
+ * Узнаёт активного провайдера капчи вместе с адресом страницы виджета.
542
+ *
543
+ * То же, что {@link captchaProvider}, плюс `url` — готовая страница на домене итд.com,
544
+ * где ключ виджета действителен. Пригодится встроенному браузеру: открыть её и забрать
545
+ * токен, ничего не собирая самому.
546
+ */
547
+ captchaPage(options?: RequestOptions): Promise<CaptchaPage>;
519
548
  /** Создаёт короткоживущую сессию QR-входа. */
520
549
  startQrLogin(options?: RequestOptions): Promise<QrLoginStart>;
521
550
  /**
@@ -533,6 +562,33 @@ declare class AuthResource extends BaseResource {
533
562
  * {@link claimQrLogin}, чтобы получить и сохранить access token.
534
563
  */
535
564
  streamQrLogin(input: QrLoginStreamInput, onEvent: QrLoginStreamListener, options?: QrLoginStreamOptions): Promise<void>;
565
+ /**
566
+ * Отмечает QR-код отсканированным и узнаёт, кого впускают.
567
+ *
568
+ * Обратная сторона QR-входа: этот и два соседних метода вызывает устройство, где сессия
569
+ * уже есть. Показывающая сторона увидит статус `scanned`, но вход ещё не состоится —
570
+ * его завершают {@link approveQrLogin} или {@link rejectQrLogin}.
571
+ *
572
+ * Сервер принимает только сессию, созданную мобильным клиентом. Обычный web access token
573
+ * отклоняется с кодом `QR_APPROVER_NOT_ALLOWED`, даже если добавить мобильные заголовки
574
+ * уже после выдачи токена.
575
+ *
576
+ * @param input секреты из отсканированного кода — см. {@link QrLoginSecrets}
577
+ * @returns описание устройства, которое просит вход
578
+ */
579
+ scanQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<QrLoginTarget>;
580
+ /**
581
+ * Подтверждает вход по QR-коду: показавшее код устройство получит access token.
582
+ *
583
+ * Осмысленно после {@link scanQrLogin} — человек должен увидеть, что подтверждает.
584
+ * Требует мобильную сессию, как и `scanQrLogin()`.
585
+ */
586
+ approveQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<void>;
587
+ /**
588
+ * Отклоняет вход по QR-коду: показавшее код устройство получит статус `rejected`.
589
+ * Требует мобильную сессию, как и `scanQrLogin()`.
590
+ */
591
+ rejectQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<void>;
536
592
  /**
537
593
  * Регистрирует аккаунт и запускает подтверждение по коду.
538
594
  *
@@ -1214,5 +1270,5 @@ declare class ItdAccounts {
1214
1270
  */
1215
1271
  declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1216
1272
  //#endregion
1217
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, type CaptchaProvider, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CredentialsWithCaptcha, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, 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, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, 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 NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QrLoginClaim, type QrLoginClaimInput, type QrLoginStart, QrLoginStatus, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, QrLoginStreamStatus, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1273
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CredentialsWithCaptcha, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, 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, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, 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 NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, QrLocationPrecision, type QrLoginClaim, type QrLoginClaimInput, type QrLoginSecrets, type QrLoginStart, QrLoginStatus, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, QrLoginStreamStatus, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1218
1274
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Cn as ViewReason, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as SpanType, St as OperationRequestOptions, T as ItdApiErrorKind, Tn as WallAccess, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as Loose, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ReportTargetType, bt as ErrorContextHook, c as NotificationSettings, cn as CaptchaField, ct as Listener, d as AuthUser, dn as EventChannelStatus, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as FeedTab, ft as LIBRARY_VERSION, g as PinsResult, gn as LikesVisibility, gt as OperationMetadata, h as Pin, hn as ItdErrorCode, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as CaptchaType, lt as Unsubscribe, m as MyProfile, mn as InteractionType, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as IncidentKind, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CaptchaChoice, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as CommentSort, ut as DEFAULT_BASE_URL, v as Profile, vn as NotificationType, vt as RetrySafety, w as ItdApiErrorInit, wn as ViewSource, wt as RateLimitBucketContext, x as UserSummary, xn as ServiceState, xt as Logger, y as PublicProfile, yn as ReportReason, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-Dum7r_FT.js";
2
- import { $ as ShopConsentContext, $n as PaginationMode, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as OperationExtensions, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginTeardown, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as PluginApi, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as Session, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationsResource, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Subscription, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as CookieJar, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as PageState, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as ClientPlugin, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformer, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as BaseResource, Xt as MarkupSpan, Y as ShopProductsResource, Yn as UpdateNotificationSettingsInput, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as Page, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as HttpClient, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as FeatureBucketDefinition, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptInterceptor, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureOperationDefinition, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as FileResolver, dt as ShopOrderItem, en as PlatformClientVersion, er as Paginator, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as PreparedBufferSource, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileOptions, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as ResolveFileContext, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as ClientFeature, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureRequestOptions, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedStreamSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as mapPage, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureContext, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedFileSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as NotificationListParams, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as RateLimitBucketState, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureInstallation, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as PaginatorOptions, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as ManagedClientResource, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as AttemptContext, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationTransformContext, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptNext, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptExtensions, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-Cs6AOXbD.js";
3
- 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, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Cn as SpanType, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, En as WallAccess, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as ServiceState, St as OperationRequestOptions, T as ItdApiErrorKind, Tn as ViewSource, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as Loose, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ReportReason, bt as ErrorContextHook, c as NotificationSettings, cn as CaptchaField, ct as Listener, d as AuthUser, dn as EventChannelStatus, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as FeedTab, ft as LIBRARY_VERSION, g as PinsResult, gn as LikesVisibility, gt as OperationMetadata, h as Pin, hn as ItdErrorCode, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as CaptchaType, lt as Unsubscribe, m as MyProfile, mn as InteractionType, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as IncidentKind, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CaptchaChoice, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as CommentSort, ut as DEFAULT_BASE_URL, v as Profile, vn as NotificationType, vt as RetrySafety, w as ItdApiErrorInit, wn as ViewReason, wt as RateLimitBucketContext, x as UserSummary, xn as ReportTargetType, xt as Logger, y as PublicProfile, yn as QrLocationPrecision, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-Qv7smwHP.js";
2
+ import { $ as ShopConsentContext, $n as PageState, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as ClientPlugin, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginApi, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as OperationTransformer, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as QrLoginTarget, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationListParams, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Session, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as PluginTeardown, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as Page, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as AttemptNext, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformContext, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as UpdateNotificationSettingsInput, Xt as MarkupSpan, Y as ShopProductsResource, Yn as NotificationsResource, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as BaseResource, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as ResolveFileOptions, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as ClientFeature, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptExtensions, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureInstallation, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as ManagedClientResource, dt as ShopOrderItem, en as PlatformClientVersion, er as PaginationMode, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as FileResolver, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileContext, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as PreparedStreamSource, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as RateLimitBucketState, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kr as CookieJar, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureOperationDefinition, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedFileSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as PaginatorOptions, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureBucketDefinition, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedBufferSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as Subscription, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as mapPage, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureContext, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as Paginator, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as FeatureRequestOptions, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as HttpClient, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationExtensions, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptInterceptor, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptContext, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-D69bOsxu.js";
3
+ 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";
4
4
  import { a as FileStreamOptions, c as LazyFile, d as UrlFileOptions, i as FileStreamContent, l as StreamFile, n as FileContext, o as FileTransferMode, r as FileInput, s as FromStreamOptions, t as FileContent, u as UrlFile } from "./shared/contracts-BoT7msmq.js";
5
5
  import { a as KeyValueStoreResult, c as createKeyValueStore, d as withCodec, f as withNamespace, i as KeyValueStoreKeys, l as createRecordKeyValueStore, n as KeyValueCodec, o as MemoryKeyValueStore, r as KeyValueStore, s as RecordKeyValueStoreSource, t as EnumerableKeyValueStore, u as isEnumerableKeyValueStore } from "./shared/key-value-store-COZaNHZS.js";
6
6
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-CTRGT5wF.js";
@@ -36,6 +36,15 @@ interface CaptchaProvider {
36
36
  provider: CaptchaType;
37
37
  field: CaptchaField;
38
38
  }
39
+ /**
40
+ * Активный провайдер капчи вместе с адресом готовой страницы виджета.
41
+ *
42
+ * Страница собрана на домене итд.com, поэтому ключ виджета на ней действителен: её открывают
43
+ * во встроенном браузере и забирают токен оттуда.
44
+ */
45
+ interface CaptchaPage extends CaptchaProvider {
46
+ url: string;
47
+ }
39
48
  /**
40
49
  * Доказательство прохождения капчи: токен и его провайдер.
41
50
  *
@@ -468,6 +477,18 @@ interface QrLoginStreamInput {
468
477
  qrId: string;
469
478
  claimToken: string;
470
479
  }
480
+ /**
481
+ * Секреты QR-кода со стороны сканирующего устройства.
482
+ *
483
+ * Оба значения лежат во fragment {@link QrLoginStart.payload} — ссылки вида
484
+ * `https://итд.com/qr#i=<qrId>&s=<secret>`, которую и кодирует QR-код. `secret` — не то же
485
+ * самое, что `claimToken`: этот секрет предъявляет тот, кто сканирует, а `claimToken` — тот,
486
+ * кто код показывает.
487
+ */
488
+ interface QrLoginSecrets {
489
+ qrId: string;
490
+ secret: string;
491
+ }
471
492
  /** Управление временем жизни потокового запроса. */
472
493
  interface QrLoginStreamOptions {
473
494
  signal?: AbortSignal | undefined;
@@ -516,6 +537,14 @@ declare class AuthResource extends BaseResource {
516
537
  * Автоматическому входу этот вызов не нужен — клиент делает его сам.
517
538
  */
518
539
  captchaProvider(options?: RequestOptions): Promise<CaptchaProvider>;
540
+ /**
541
+ * Узнаёт активного провайдера капчи вместе с адресом страницы виджета.
542
+ *
543
+ * То же, что {@link captchaProvider}, плюс `url` — готовая страница на домене итд.com,
544
+ * где ключ виджета действителен. Пригодится встроенному браузеру: открыть её и забрать
545
+ * токен, ничего не собирая самому.
546
+ */
547
+ captchaPage(options?: RequestOptions): Promise<CaptchaPage>;
519
548
  /** Создаёт короткоживущую сессию QR-входа. */
520
549
  startQrLogin(options?: RequestOptions): Promise<QrLoginStart>;
521
550
  /**
@@ -533,6 +562,33 @@ declare class AuthResource extends BaseResource {
533
562
  * {@link claimQrLogin}, чтобы получить и сохранить access token.
534
563
  */
535
564
  streamQrLogin(input: QrLoginStreamInput, onEvent: QrLoginStreamListener, options?: QrLoginStreamOptions): Promise<void>;
565
+ /**
566
+ * Отмечает QR-код отсканированным и узнаёт, кого впускают.
567
+ *
568
+ * Обратная сторона QR-входа: этот и два соседних метода вызывает устройство, где сессия
569
+ * уже есть. Показывающая сторона увидит статус `scanned`, но вход ещё не состоится —
570
+ * его завершают {@link approveQrLogin} или {@link rejectQrLogin}.
571
+ *
572
+ * Сервер принимает только сессию, созданную мобильным клиентом. Обычный web access token
573
+ * отклоняется с кодом `QR_APPROVER_NOT_ALLOWED`, даже если добавить мобильные заголовки
574
+ * уже после выдачи токена.
575
+ *
576
+ * @param input секреты из отсканированного кода — см. {@link QrLoginSecrets}
577
+ * @returns описание устройства, которое просит вход
578
+ */
579
+ scanQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<QrLoginTarget>;
580
+ /**
581
+ * Подтверждает вход по QR-коду: показавшее код устройство получит access token.
582
+ *
583
+ * Осмысленно после {@link scanQrLogin} — человек должен увидеть, что подтверждает.
584
+ * Требует мобильную сессию, как и `scanQrLogin()`.
585
+ */
586
+ approveQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<void>;
587
+ /**
588
+ * Отклоняет вход по QR-коду: показавшее код устройство получит статус `rejected`.
589
+ * Требует мобильную сессию, как и `scanQrLogin()`.
590
+ */
591
+ rejectQrLogin(input: QrLoginSecrets, options?: RequestOptions): Promise<void>;
536
592
  /**
537
593
  * Регистрирует аккаунт и запускает подтверждение по коду.
538
594
  *
@@ -1214,5 +1270,5 @@ declare class ItdAccounts {
1214
1270
  */
1215
1271
  declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1216
1272
  //#endregion
1217
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, type CaptchaProvider, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CredentialsWithCaptcha, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, 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, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, 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 NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QrLoginClaim, type QrLoginClaimInput, type QrLoginStart, QrLoginStatus, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, QrLoginStreamStatus, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1273
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CredentialsWithCaptcha, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, 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, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, 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 NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, QrLocationPrecision, type QrLoginClaim, type QrLoginClaimInput, type QrLoginSecrets, type QrLoginStart, QrLoginStatus, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, QrLoginStreamStatus, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1218
1274
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { A as ViewReason, B as BUCKET_LIMITS, C as ItdErrorCode, D as ReportTargetType, E as ReportReason, F as defineBuiltInOperation, G as pickArray, H as createClientRuntime, I as isBuiltInOperationId, L as operationBucket, M as WallAccess, N as ITD_CATALOG, O as ServiceState, P as OPERATIONS, R as operationMethod, S as InteractionType, T as NotificationType, U as createApiError, V as DEFAULT_RATE_LIMIT_BUCKET, X as RetrySafety, Y as pickString, _ as CaptchaType, at as orderPluginDefinitions, b as FeedTab, c as normalizeNotification, ct as STATUS_SERVICE, d as canonicalNotificationType, dt as isRecord, et as createRequestAbortScope, f as isKnownNotificationType, ft as requireOptionalBoolean, g as CaptchaField, gt as installAsyncDisposeFallback, h as CaptchaChoice, ht as systemClock, it as assertPluginRemovable, j as ViewSource, k as SpanType, lt as resolveRateLimit, m as AttachmentType, n as formatNotificationText, o as passthroughOperation, ot as DEFAULT_BASE_URL, p as AccessType, pt as RateLimitPacing, rt as RequestQueuePool, s as voidOperation, t as resolveNotificationUrl, tt as requestAbortError, ut as LIBRARY_VERSION, v as CommentSort, w as LikesVisibility, x as IncidentKind, y as EventChannelStatus, z as operationRetrySafety } from "./shared/url-CntTEAxu.js";
1
+ import { A as SpanType, B as operationRetrySafety, C as ItdErrorCode, D as ReportReason, E as QrLocationPrecision, F as OPERATIONS, H as DEFAULT_RATE_LIMIT_BUCKET, I as defineBuiltInOperation, K as pickArray, L as isBuiltInOperationId, M as ViewSource, N as WallAccess, O as ReportTargetType, P as ITD_CATALOG, R as operationBucket, S as InteractionType, T as NotificationType, U as createClientRuntime, V as BUCKET_LIMITS, W as createApiError, X as pickString, Z as RetrySafety, _ as CaptchaType, _t as installAsyncDisposeFallback, at as assertPluginRemovable, b as FeedTab, c as normalizeNotification, d as canonicalNotificationType, dt as LIBRARY_VERSION, f as isKnownNotificationType, ft as isRecord, g as CaptchaField, gt as systemClock, h as CaptchaChoice, it as RequestQueuePool, j as ViewReason, k as ServiceState, lt as STATUS_SERVICE, m as AttachmentType, mt as RateLimitPacing, n as formatNotificationText, nt as requestAbortError, o as passthroughOperation, ot as orderPluginDefinitions, p as AccessType, pt as requireOptionalBoolean, s as voidOperation, st as DEFAULT_BASE_URL, t as resolveNotificationUrl, tt as createRequestAbortScope, ut as resolveRateLimit, v as CommentSort, w as LikesVisibility, x as IncidentKind, y as EventChannelStatus, z as operationMethod } from "./shared/url-D0KJ5pws.js";
2
2
  import { A as isItdStateError, C as isItdError, D as isItdPhoneVerificationError, E as isItdNotFoundError, O as isItdRateLimitError, S as isItdConflictError, T as isItdForbiddenError, _ 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, k as isItdServerError, l as ItdFileError, m as ItdPhoneVerificationError, n as ItdApiError, o as ItdConflictError, p as ItdNotFoundError, r as ItdApiErrorKind, s as ItdError, t as ItdAbortError, u as ItdFileErrorReason, v as ItdTimeoutError, w as isItdFileError, x as isItdAuthError, y as ItdValidationError } from "./shared/errors-GI10kZxk.js";
3
3
  import { c as REFRESH_COOKIE, h as joinUrl, l as REFRESH_COOKIE_PATH, s as CookieJar, u as isSerializedCookieEntry, v as RuntimeMode, y as createDeviceId } from "./shared/redact-DJV0XM3n.js";
4
- import { A as utcStampToIso, C as AUDIO_MIME_TYPES, D as isBuilder, E as comment, F as mapPage, I as createFeatureHost, L as ExtensibleOperationCatalog, M as BaseResource, N as PaginationMode, O as createStatusFeature, P as Paginator, S as ALLOWED_MIME_TYPES, T as VIDEO_MIME_TYPES, _ as poll, a as createShopOrderAccessStorage, b as parseHtml, c as ShopOrderStatus, d as isMyProfile, f as fromStream, g as post, h as report, i as MemoryShopOrderAccessStorage, j as NotificationsResource, k as toDate, l as ShopProductCategory, m as createResources, n as renderSpans, o as statusDays, p as fromUrl, r as createShopFeature, s as ShopConsentKind, t as SpanRenderFormat, u as ShopProductStatus, v as autoSpans, w as IMAGE_MIME_TYPES, x as parseMarkdown, y as markup } from "./shared/render-CubTTof_.js";
4
+ import { A as utcStampToIso, C as AUDIO_MIME_TYPES, D as isBuilder, E as comment, F as mapPage, I as createFeatureHost, L as ExtensibleOperationCatalog, M as BaseResource, N as PaginationMode, O as createStatusFeature, P as Paginator, S as ALLOWED_MIME_TYPES, T as VIDEO_MIME_TYPES, _ as poll, a as createShopOrderAccessStorage, b as parseHtml, c as ShopOrderStatus, d as isMyProfile, f as fromStream, g as post, h as report, i as MemoryShopOrderAccessStorage, j as NotificationsResource, k as toDate, l as ShopProductCategory, m as createResources, n as renderSpans, o as statusDays, p as fromUrl, r as createShopFeature, s as ShopConsentKind, t as SpanRenderFormat, u as ShopProductStatus, v as autoSpans, w as IMAGE_MIME_TYPES, x as parseMarkdown, y as markup } from "./shared/render-GQw5m1-o.js";
5
5
  import { c as FileTransferMode } from "./shared/options-i4LrKfqx.js";
6
- import { _ as Emitter, a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, l as resolveNotificationEventsOptions, m as EventChannel, n as EventRouter, o as EVENT_OPERATIONS, p as createParser, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer, u as setNotificationEventsConnectGuard, v as reportListenerError } from "./shared/events-Cipe-Fm9.js";
6
+ import { _ as Emitter, a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, l as resolveNotificationEventsOptions, m as EventChannel, n as EventRouter, o as EVENT_OPERATIONS, p as createParser, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer, u as setNotificationEventsConnectGuard, v as reportListenerError } from "./shared/events-0I_Pixnq.js";
7
7
  import { a as isEnumerableKeyValueStore, i as createRecordKeyValueStore, o as withCodec, r as createKeyValueStore, s as withNamespace, t as MemoryKeyValueStore } from "./shared/key-value-store-Bt2PSMxY.js";
8
8
  import { n as copySession, r as createTokenStorage, t as MemoryTokenStorage } from "./shared/storage-DiDe0PZM.js";
9
9
  import { a as scopedTokenStorage, i as isRestorableSession, n as controlledTokenStorage, r as createMultiTokenStorage, t as MemoryMultiTokenStorage } from "./shared/multi-storage-C3Ngtop1.js";
@@ -62,6 +62,7 @@ function requireString(body, key, message) {
62
62
  }
63
63
  const AUTH_CHECK = passthroughOperation("auth.check");
64
64
  const AUTH_CAPTCHA_PROVIDER = passthroughOperation("auth.captchaProvider");
65
+ const AUTH_CAPTCHA_PAGE = passthroughOperation("auth.captchaPage");
65
66
  const AUTH_SIGN_UP = defineBuiltInOperation("auth.signUp", (body) => requireString(body, "flowToken", "Сервер не вернул flowToken при регистрации"));
66
67
  const AUTH_SIGN_IN = defineBuiltInOperation("auth.signIn", (body) => {
67
68
  const accessToken = pickString(body, "accessToken");
@@ -85,6 +86,9 @@ const AUTH_REVOKE_SESSION = voidOperation("auth.revokeSession");
85
86
  const AUTH_REVOKE_OTHER_SESSIONS = voidOperation("auth.revokeOtherSessions");
86
87
  const AUTH_QR_START = passthroughOperation("auth.qrStart");
87
88
  const AUTH_QR_CLAIM = passthroughOperation("auth.qrClaim");
89
+ const AUTH_QR_SCAN = passthroughOperation("auth.qrScan");
90
+ const AUTH_QR_APPROVE = voidOperation("auth.qrApprove");
91
+ const AUTH_QR_REJECT = voidOperation("auth.qrReject");
88
92
  //#endregion
89
93
  //#region src/session/captcha.ts
90
94
  function requireCaptchaText(value, field) {
@@ -297,6 +301,7 @@ function createItdAuth(options, deps) {
297
301
  /** Пути эндпоинтов авторизации. */
298
302
  const AUTH_PATHS = {
299
303
  captchaProvider: "/api/v1/auth/captcha/provider",
304
+ captchaPage: "/api/v1/auth/captcha/page",
300
305
  signUp: "/api/v1/auth/sign-up",
301
306
  signIn: "/api/v1/auth/sign-in",
302
307
  verifyOtp: "/api/v1/auth/verify-otp",
@@ -309,7 +314,10 @@ const AUTH_PATHS = {
309
314
  sessions: "/api/v1/auth/sessions",
310
315
  qrStart: "/api/v1/auth/qr/start",
311
316
  qrClaim: "/api/v1/auth/qr/claim",
312
- qrStream: "/api/v1/auth/qr/stream"
317
+ qrStream: "/api/v1/auth/qr/stream",
318
+ qrScan: "/api/v1/auth/qr/scan",
319
+ qrApprove: "/api/v1/auth/qr/approve",
320
+ qrReject: "/api/v1/auth/qr/reject"
313
321
  };
314
322
  /**
315
323
  * Публичный ключ Cloudflare Turnstile платформы итд.com.
@@ -1235,6 +1243,21 @@ var AuthResource = class extends BaseResource {
1235
1243
  ...options
1236
1244
  });
1237
1245
  }
1246
+ /**
1247
+ * Узнаёт активного провайдера капчи вместе с адресом страницы виджета.
1248
+ *
1249
+ * То же, что {@link captchaProvider}, плюс `url` — готовая страница на домене итд.com,
1250
+ * где ключ виджета действителен. Пригодится встроенному браузеру: открыть её и забрать
1251
+ * токен, ничего не собирая самому.
1252
+ */
1253
+ captchaPage(options = {}) {
1254
+ return this.http.execute(AUTH_CAPTCHA_PAGE, {
1255
+ path: AUTH_PATHS.captchaPage,
1256
+ skipAuth: true,
1257
+ skipAuthRefresh: true,
1258
+ ...options
1259
+ });
1260
+ }
1238
1261
  /** Создаёт короткоживущую сессию QR-входа. */
1239
1262
  async startQrLogin(options = {}) {
1240
1263
  const cookies = this.#auth.createCookieFlow(false);
@@ -1313,6 +1336,51 @@ var AuthResource = class extends BaseResource {
1313
1336
  }
1314
1337
  }
1315
1338
  /**
1339
+ * Отмечает QR-код отсканированным и узнаёт, кого впускают.
1340
+ *
1341
+ * Обратная сторона QR-входа: этот и два соседних метода вызывает устройство, где сессия
1342
+ * уже есть. Показывающая сторона увидит статус `scanned`, но вход ещё не состоится —
1343
+ * его завершают {@link approveQrLogin} или {@link rejectQrLogin}.
1344
+ *
1345
+ * Сервер принимает только сессию, созданную мобильным клиентом. Обычный web access token
1346
+ * отклоняется с кодом `QR_APPROVER_NOT_ALLOWED`, даже если добавить мобильные заголовки
1347
+ * уже после выдачи токена.
1348
+ *
1349
+ * @param input секреты из отсканированного кода — см. {@link QrLoginSecrets}
1350
+ * @returns описание устройства, которое просит вход
1351
+ */
1352
+ scanQrLogin(input, options = {}) {
1353
+ return this.http.execute(AUTH_QR_SCAN, {
1354
+ path: AUTH_PATHS.qrScan,
1355
+ body: input,
1356
+ ...options
1357
+ });
1358
+ }
1359
+ /**
1360
+ * Подтверждает вход по QR-коду: показавшее код устройство получит access token.
1361
+ *
1362
+ * Осмысленно после {@link scanQrLogin} — человек должен увидеть, что подтверждает.
1363
+ * Требует мобильную сессию, как и `scanQrLogin()`.
1364
+ */
1365
+ approveQrLogin(input, options = {}) {
1366
+ return this.voidOperation(AUTH_QR_APPROVE, {
1367
+ path: AUTH_PATHS.qrApprove,
1368
+ body: input,
1369
+ ...options
1370
+ });
1371
+ }
1372
+ /**
1373
+ * Отклоняет вход по QR-коду: показавшее код устройство получит статус `rejected`.
1374
+ * Требует мобильную сессию, как и `scanQrLogin()`.
1375
+ */
1376
+ rejectQrLogin(input, options = {}) {
1377
+ return this.voidOperation(AUTH_QR_REJECT, {
1378
+ path: AUTH_PATHS.qrReject,
1379
+ body: input,
1380
+ ...options
1381
+ });
1382
+ }
1383
+ /**
1316
1384
  * Регистрирует аккаунт и запускает подтверждение по коду.
1317
1385
  *
1318
1386
  * @returns `flowToken`, который нужно передать в {@link verifyOtp}
@@ -2555,6 +2623,6 @@ function createAccounts(options = {}) {
2555
2623
  return new ItdAccounts(options);
2556
2624
  }
2557
2625
  //#endregion
2558
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, AttachmentType, BUCKET_LIMITS, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, CaptchaType, CommentSort, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, EventChannel, EventChannelStatus, EventComposer, EventRouter, FeedTab, FileTransferMode, IMAGE_MIME_TYPES, IncidentKind, InteractionType, ItdAbortError, ItdAccounts, ItdApiError, ItdApiErrorKind, ItdAuthError, ItdClient, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, LikesVisibility, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, OPERATIONS, PaginationMode, Paginator, QrLoginStatus, QrLoginStreamStatus, RateLimitPacing, ReportReason, ReportTargetType, RetrySafety, RuntimeMode, STATUS_SERVICE, ServiceState, ShopConsentKind, ShopOrderStatus, ShopProductCategory, ShopProductStatus, SignInStatus, SpanRenderFormat, SpanType, TURNSTILE_SITE_KEY, UnauthorizedStreamError, VIDEO_MIME_TYPES, ViewReason, ViewSource, WallAccess, WebSocketTransport, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
2626
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, AttachmentType, BUCKET_LIMITS, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, CaptchaType, CommentSort, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, EventChannel, EventChannelStatus, EventComposer, EventRouter, FeedTab, FileTransferMode, IMAGE_MIME_TYPES, IncidentKind, InteractionType, ItdAbortError, ItdAccounts, ItdApiError, ItdApiErrorKind, ItdAuthError, ItdClient, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, LikesVisibility, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, OPERATIONS, PaginationMode, Paginator, QrLocationPrecision, QrLoginStatus, QrLoginStreamStatus, RateLimitPacing, ReportReason, ReportTargetType, RetrySafety, RuntimeMode, STATUS_SERVICE, ServiceState, ShopConsentKind, ShopOrderStatus, ShopProductCategory, ShopProductStatus, SignInStatus, SpanRenderFormat, SpanType, TURNSTILE_SITE_KEY, UnauthorizedStreamError, VIDEO_MIME_TYPES, ViewReason, ViewSource, WallAccess, WebSocketTransport, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
2559
2627
 
2560
2628
  //# sourceMappingURL=index.js.map