itd-api 0.14.0 → 0.14.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 (72) hide show
  1. package/README.md +1 -0
  2. package/dist/events/index.cjs +4 -4
  3. package/dist/events/index.d.cts +2 -2
  4. package/dist/events/index.d.ts +2 -2
  5. package/dist/events/index.js +4 -4
  6. package/dist/index.cjs +38 -23
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +10 -6
  9. package/dist/index.d.ts +10 -6
  10. package/dist/index.js +31 -24
  11. package/dist/index.js.map +1 -1
  12. package/dist/node/index.cjs +5 -5
  13. package/dist/node/index.js +5 -5
  14. package/dist/rest/index.cjs +13 -5
  15. package/dist/rest/index.d.cts +3 -3
  16. package/dist/rest/index.d.ts +3 -3
  17. package/dist/rest/index.js +6 -6
  18. package/dist/shared/{cookies-Bw5HAxTB.js → cookies-BdntFeQ5.js} +4 -3
  19. package/dist/shared/cookies-BdntFeQ5.js.map +1 -0
  20. package/dist/shared/{cookies-DRYS-vZm.cjs → cookies-D68xbO4E.cjs} +4 -3
  21. package/dist/shared/cookies-D68xbO4E.cjs.map +1 -0
  22. package/dist/shared/{events-Dl27rIA0.d.cts → events-B2D1rsQf.d.cts} +1 -1
  23. package/dist/shared/{events--hwTmeN2.cjs → events-B_97nfiJ.cjs} +13 -13
  24. package/dist/shared/events-B_97nfiJ.cjs.map +1 -0
  25. package/dist/shared/{events-g5XfBnc3.d.ts → events-BcR4RzSS.d.ts} +1 -1
  26. package/dist/shared/{events-DXLOZXNe.js → events-CzYBo3XI.js} +13 -13
  27. package/dist/shared/events-CzYBo3XI.js.map +1 -0
  28. package/dist/shared/{key-value-store-BwXlaoD4.js → key-value-store-BJdmlzkM.js} +2 -2
  29. package/dist/shared/{key-value-store-BwXlaoD4.js.map → key-value-store-BJdmlzkM.js.map} +1 -1
  30. package/dist/shared/{key-value-store-CmnIjuE4.cjs → key-value-store-Bxt33ZF3.cjs} +2 -2
  31. package/dist/shared/{key-value-store-CmnIjuE4.cjs.map → key-value-store-Bxt33ZF3.cjs.map} +1 -1
  32. package/dist/shared/{multi-storage-DDQKI9yT.cjs → multi-storage-BNiP6Mbq.cjs} +5 -5
  33. package/dist/shared/{multi-storage-DDQKI9yT.cjs.map → multi-storage-BNiP6Mbq.cjs.map} +1 -1
  34. package/dist/shared/{multi-storage-BDwZ3sOJ.js → multi-storage-hYW_Whkx.js} +5 -5
  35. package/dist/shared/{multi-storage-BDwZ3sOJ.js.map → multi-storage-hYW_Whkx.js.map} +1 -1
  36. package/dist/shared/{options-RfX5uXP5.js → options-BqQVtTmm.js} +3 -3
  37. package/dist/shared/{options-RfX5uXP5.js.map → options-BqQVtTmm.js.map} +1 -1
  38. package/dist/shared/{options-BrA90TVm.cjs → options-C2WubUA6.cjs} +3 -3
  39. package/dist/shared/{options-BrA90TVm.cjs.map → options-C2WubUA6.cjs.map} +1 -1
  40. package/dist/shared/{render-C11kvqb5.d.ts → render-4Rp2sa1a.d.ts} +726 -248
  41. package/dist/shared/{render-DHeGjOzq.cjs → render-B67QcLUQ.cjs} +1715 -1242
  42. package/dist/shared/render-B67QcLUQ.cjs.map +1 -0
  43. package/dist/shared/{render-B6sj0OJ5.js → render-CXxr13yg.js} +1710 -1279
  44. package/dist/shared/render-CXxr13yg.js.map +1 -0
  45. package/dist/shared/{render-D_pGoEH3.d.cts → render-DaHR-AHp.d.cts} +726 -248
  46. package/dist/shared/{storage-Bc4lWtSj.js → storage-8oAVzQmF.js} +3 -3
  47. package/dist/shared/{storage-Bc4lWtSj.js.map → storage-8oAVzQmF.js.map} +1 -1
  48. package/dist/shared/{storage-e2xYL6ro.cjs → storage-xximVWs_.cjs} +3 -3
  49. package/dist/shared/{storage-e2xYL6ro.cjs.map → storage-xximVWs_.cjs.map} +1 -1
  50. package/dist/shared/{url-B6_um5qJ.d.cts → url-DVN-pqkV.d.cts} +102 -18
  51. package/dist/shared/{url-BPqHN_CZ.d.ts → url-Dey3grvo.d.ts} +102 -18
  52. package/dist/shared/{url-W5GQOtlk.cjs → url-HVCnoH85.cjs} +167 -93
  53. package/dist/shared/url-HVCnoH85.cjs.map +1 -0
  54. package/dist/shared/{url-CY2NxyqI.js → url-ww6B39DX.js} +168 -94
  55. package/dist/shared/url-ww6B39DX.js.map +1 -0
  56. package/dist/shared/{validate-BHKy_YMv.cjs → validate-CbM3k811.cjs} +21 -1
  57. package/dist/shared/validate-CbM3k811.cjs.map +1 -0
  58. package/dist/shared/{validate-BQzL_oJ4.js → validate-oLSGiGwQ.js} +16 -2
  59. package/dist/shared/validate-oLSGiGwQ.js.map +1 -0
  60. package/dist/web/index.cjs +3 -3
  61. package/dist/web/index.js +3 -3
  62. package/package.json +1 -1
  63. package/dist/shared/cookies-Bw5HAxTB.js.map +0 -1
  64. package/dist/shared/cookies-DRYS-vZm.cjs.map +0 -1
  65. package/dist/shared/events--hwTmeN2.cjs.map +0 -1
  66. package/dist/shared/events-DXLOZXNe.js.map +0 -1
  67. package/dist/shared/render-B6sj0OJ5.js.map +0 -1
  68. package/dist/shared/render-DHeGjOzq.cjs.map +0 -1
  69. package/dist/shared/url-CY2NxyqI.js.map +0 -1
  70. package/dist/shared/url-W5GQOtlk.cjs.map +0 -1
  71. package/dist/shared/validate-BHKy_YMv.cjs.map +0 -1
  72. package/dist/shared/validate-BQzL_oJ4.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -3,13 +3,15 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { $ as ItdServerError, $t as ItdOperationDefinition, A as AuthProvider, An as ReportReason, At as RateLimitBucketContext, B as ItdAuthError, Bt as RetryOptions, C as UserSummary, Cn as ItdErrorCode, Ct as OperationMetadata, D as Unsubscribe, Dn as MessageAccess, Dt as ErrorContextHook, E as Listener, En as Loose, Et as ClientHooks, Fn as ViewReason, Ft as RequestExtensions, G as ItdFieldErrors, Gt as RateLimitPacing, H as ItdConflictError, Ht as QueryParams, I as ItdAbortError, In as ViewSource, It as RequestOptions, J as ItdForbiddenError, Jt as Logger, K as ItdFileError, Kt as RuntimeMode, L as ItdApiError, Ln as WallAccess, Lt as ResponseContext, Mn as ServiceState, Mt as RateLimitOptions, Nn as SpanType, Nt as RawRequestOptions, O as ClientConnection, On as NotificationType, Ot as OperationRequestOptions, P as HttpClient, Pn as UsernameUnavailableReason, Pt as RequestContext, Q as ItdRateLimitError, Qt as CustomOperationId, R as ItdApiErrorInit, Rt as RetryContext, S as UserBase, Sn as InteractionType, T as Emitter, Tn as LikesVisibility, Tt as RetrySafety, U as ItdError, Ut as QueryValue, V as ItdConfigError, Vt as RuntimeOptions, W as ItdErrorKind, Wt as ServiceDefinition, X as ItdNotFoundError, Xt as systemClock, Y as ItdNetworkError, Yt as ItdClock, Z as ItdPhoneVerificationError, Zt as BuiltInOperationId, _ as PinsResult, _n as CaptchaType, _t as DEFAULT_BASE_URL, a as NotificationEvent, an as operationRetrySafety, at as isItdAuthError, b as PublicProfile, bn as FeedTab, bt as FeatureOperationId, c as NotificationSettings, cn as RateLimitBucket, ct as isItdFileError, d as AuthUser, dn as UserId, dt as isItdPhoneVerificationError, en as OPERATIONS, et as ItdStateError, f as Author, fn as UserRef, ft as isItdRateLimitError, g as Pin, gn as CaptchaField, gt as CookieJar, h as MyProfile, hn as CaptchaChoice, ht as isItdValidationError, i as formatNotificationText, in as operationMethod, it as isItdApiError, jn as ReportTargetType, jt as RateLimitBucketOverride, k as AuthIdentity, kn as QrLocationPrecision, kt as PaginationOptions, l as Actor, ln as IsoDate, lt as isItdForbiddenError, m as LastSeen, mn as AttachmentType, mt as isItdStateError, n as canonicalNotificationType, nn as isBuiltInOperationId, nt as ItdValidationError, o as normalizeNotification, on as BUCKET_LIMITS, ot as isItdConflictError, p as FollowResult, pn as AccessType, pt as isItdServerError, q as ItdFileErrorReason, qt as LogLevel, r as isKnownNotificationType, rn as operationBucket, rt as TimeoutBudget, s as Notification, sn as DEFAULT_RATE_LIMIT_BUCKET, st as isItdError, t as resolveNotificationUrl, tn as OperationId, tt as ItdTimeoutError, u as AuthState, un as Span, ut as isItdNotFoundError, v as PrivacySettings, vn as CommentSort, vt as STATUS_SERVICE, w as UsernameAvailability, wn as LastSeenUnit, wt as OperationMethod, x as SubscriptionState, xn as IncidentKind, xt as OperationAnnotations, y as Profile, yn as EventChannelStatus, yt as LIBRARY_VERSION, z as ItdApiErrorKind, zt as RetryDecisionContext } from "./shared/url-B6_um5qJ.cjs";
7
- import { $ as ShopConsentContext, $n as BuilderInput, $r as ChatSentMessage, $t as autoSpans, A as DwellEntry, Ai as PluginApi, An as BannerDrawingTool, Ar as ChatChange, At as ReportInput, B as ViewTrackerInput, Bn as OriginalPost, Br as ChatMediaItem, Bt as post, C as fromStream, Ci as AttemptExtensions, Cn as HashtagsResource, Cr as PageState, Ct as ShopRecipient, D as UpdateProfileInput, Di as OperationExtensions, Dn as BannerDrawing, Dr as mapPage, Dt as SearchResult, E as UpdatePrivacyInput, Ei as ClientPlugin, En as UploadedFile, Er as PaginatorOptions, Et as SearchResource, F as TelemetryClock, Fn as Comment, Fr as ChatFirstMessage, Ft as UserPostsParams, G as ShopConsentsResource, Gn as PostBase, Gr as ChatPreview, Gt as parseHtml, H as SubscriptionResource, Hn as Poll, Hr as ChatMessage, Ht as PollInput, I as TelemetryOptions, In as CommentReplyTo, Ir as ChatForwardedMessages, It as CreatePostInput, J as ShopOrdersResource, Jn as PostUpdateResult, Jr as ChatReactionCount, Jt as MarkupBuilder, K as ShopDeliveryResource, Kn as PostCounters, Kr as ChatReaction, Kt as parseMarkdown, L as TelemetryResource, Ln as CommentUpdateResult, Lr as ChatHistoryPage, Lt as PostBuilder, M as PhotoOpenInput, Mn as CommentsResource, Mr as ChatDirectResult, Mt as CommentsParams, N as TelemetryBatch, Nn as RepliesParams, Nr as ChatEditedMessage, Nt as FeedParams, O as UserListParams, Oi as OperationTransformContext, On as BannerDrawingOperation, Or as ChatActionType, Ot as ReportsResource, P as TelemetryBatchOptions, Pn as Attachment, Pr as ChatFileLink, Pt as PostsResource, Q as ShopConsent, Qn as comment, Qr as ChatReply, Qt as TextMarkup, R as VideoProgressInput, Rn as Hashtag, Rr as ChatListPage, Rt as PostInput, S as VideoMimeType, Si as AttemptContext, Sn as HashtagPostsParams, Sr as Page, St as ShopProductStatus, T as VerificationResource, Ti as AttemptNext, Tn as UploadOptions, Tr as Paginator, Tt as ShopSizeChartRow, U as CreateShopOrderOptions, Un as PollOption, Ur as ChatMessageReactions, Ut as poll, V as ViewTrackerOptions, Vn as PinPostResult, Vr as ChatMediaPage, Vt as PollBuilder, W as PayShopOrderOptions, Wn as Post, Wr as ChatPresence, Wt as ParseMarkupOptions, X as ShopResource, Xn as CommentBuilder, Xr as ChatReadCursor, Xt as MarkupInput, Y as ShopProductsResource, Yn as UpdateResultBase, Yr as ChatReactionType, Yt as MarkupContent, Z as CreateShopOrderInput, Zn as CommentInput, Zr as ChatReadResult, Zt as MarkupSpan, _ as AllowedMimeType, _i as PreparedFileSource, _n as LegalDocumentBlock, _r as ChatsResource, _t as ShopPayment, a as ShopFeatureOptions, ai as ChatUpdatesPage, an as ServiceStatus, ar as CreateReportInput, at as ShopDeliveryDestination, b as ImageMimeType, bi as ResolveFileOptions, bn as LegalDocumentSummary, br as SetChatReactionsInput, bt as ShopProductColor, c as ShopOrderAccessStorage, ci as ClientFeature, cn as Announcement, cr as PaymentMethod, ct as ShopOrderAccessSession, d as statusDays, di as FeatureInstallation, dn as Clan, dr as Subscription, dt as ShopOrderDelivery, ei as ChatSummary, en as markup, er as ItdBuilder, et as ShopConsentKind, f as isMyProfile, fi as FeatureOperationDefinition, fn as Portal, fr as NotificationListParams, ft as ShopOrderItem, g as AUDIO_MIME_TYPES, gi as PreparedBufferSource, gn as LegalDocument, gr as ChatMessageContent, gt as ShopOrderSupport, h as ALLOWED_MIME_TYPES, hi as FileResolver, hn as LegalResource, hr as ChatListParams, ht as ShopOrderSummary, i as ShopFeatureApi, ii as ChatUpdateType, in as PlatformStatus, ir as CreatePostData, it as ShopDeliveryCountry, j as InteractionEntry, ji as PluginTeardown, jn as UploadedBannerDrawing, jr as ChatDeletedMessages, jt as report, k as UsersResource, ki as OperationTransformer, kn as BannerDrawingPoint, kr as ChatAttachment, kt as ReportBuilder, l as ShopOrderAccessStorageAdapterOptions, li as FeatureBucketDefinition, ln as AnnouncementButton, lr as QrLoginTarget, lt as ShopOrderAccessVerification, m as utcStampToIso, mi as ManagedClientResource, mn as VerificationStatus, mr as UpdateNotificationSettingsInput, mt as ShopOrderStatus, n as SpanRenderFormat, ni as ChatUnreadState, nn as PlatformResource, nr as CreateCommentInput, nt as ShopDeliveryCalculation, o as createShopFeature, oi as ChatUploadOptions, on as StatusDay, or as UpdatePostInput, ot as ShopDeliveryPoint, p as toDate, pi as FeatureRequestOptions, pn as Report, pr as NotificationsResource, pt as ShopOrderItemInput, q as ShopOrderRequestOptions, qn as PostStats, qr as ChatReactionCatalog, qt as AutoSpansOptions, r as renderSpans, ri as ChatUpdate, rn as PlatformVersions, rr as CreatePollInput, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, si as ChatUploadedFile, sn as StatusIncidentLine, sr as AccountLifecycleResource, st as ShopOrder, t as RenderSpansOptions, ti as ChatTextEntity, tn as PlatformClientVersion, tr as isBuilder, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, ui as FeatureContext, un as ChangelogEntry, ur as Session, ut as ShopOrderBase, v as AudioMimeType, vi as PreparedStreamSource, vn as LegalDocumentBlockType, vr as ForwardChatMessagesInput, vt as ShopProduct, w as fromUrl, wi as AttemptInterceptor, wn as FilesResource, wr as PaginationMode, wt as ShopSizeChart, x as VIDEO_MIME_TYPES, xi as RateLimitBucketState, xn as LegalDocumentVersion, xr as BaseResource, xt as ShopProductSpec, y as IMAGE_MIME_TYPES, yi as ResolveFileContext, yn as LegalDocumentScope, yr as SendChatMessageInput, yt as ShopProductCategory, z as ViewTracker, zn as LikeResult, zr as ChatMediaCategory, zt as PostUpdateInput } from "./shared/render-D_pGoEH3.cjs";
8
- import { $ as EventTransportFrame, A as EventSequentializer, B as NotificationOfType, C as EventSession, D as EventMiddlewareObject, E as EventMiddleware, F as NotificationEventContext, G as UnknownNotificationUpdate, H as NotificationUpdateOfType, I as NotificationEventFilter, J as NotificationEventsMap, K as UnreadCountUpdate, L as NotificationEventOfType, M as runEventMiddleware, N as EventContext, O as EventNext, P as NotificationContext, Q as EventTransportContext, R as NotificationEventSelector, S as EventEnqueueOptions, T as EventHandler, U as NotificationUpdateOrigin, V as NotificationUpdate, W as NotificationUpdateType, X as NotificationEventsTransport, Y as NotificationEventsOptions, Z as EventTransport, _ as WebSocketTransportOptions, a as EventMiddlewareGroup, b as EventChannelEvents, c as EventRouteSelector, d as NotificationEventsClientOptions, et as UnauthorizedStreamError, f as createNotificationEventsClient, g as WebSocketTransport, h as WebSocketOpenFailureClassifier, i as EventFilter, j as EventTypeGuard, k as EventPredicate, l as EventRouter, m as WebSocketLike, n as EventErrorBoundary, o as EventMiddlewareLike, p as WebSocketImplementationOptions, q as NotificationEvents, r as EventErrorContext, s as EventRouteTable, t as EventComposer, tt as ReconnectOptions, u as NotificationEventsClient, v as EventChannel, w as EventSyncReason, x as EventChannelOptions, y as EventChannelDeps, z as NotificationEventsUpdate } from "./shared/events-Dl27rIA0.cjs";
6
+ import { $ as ItdPhoneVerificationError, $t as systemClock, A as ClientConnection, An as MessageAccess, At as ErrorContextHook, B as ItdApiErrorInit, Bn as WallAccess, Bt as ResponseContext, C as SubscriptionState, Cn as FeedTab, Ct as FeatureOperationId, D as Emitter, Dn as LastSeenUnit, Dt as OperationMethod, E as UsernameAvailability, En as ItdErrorCode, Et as OperationMetadata, Fn as ServiceState, Ft as RateLimitOptions, G as ItdError, Gt as QueryParams, H as ItdAuthError, Ht as RetryDecisionContext, I as HttpClient, In as SpanType, It as RawRequestOptions, J as ItdFileError, Jt as RateLimitPacing, K as ItdErrorKind, Kt as QueryValue, Ln as UsernameUnavailableReason, Lt as RequestContext, M as AuthProvider, Mn as QrLocationPrecision, Mt as PaginationOptions, Nn as ReportReason, Nt as RateLimitBucketContext, O as Listener, On as LikesVisibility, Ot as RetrySafety, Pn as ReportTargetType, Pt as RateLimitBucketOverride, Q as ItdNotFoundError, Qt as ItdClock, R as ItdAbortError, Rn as ViewReason, Rt as RequestExtensions, S as PublicProfile, Sn as EventChannelStatus, St as LIBRARY_VERSION, T as UserSummary, Tn as InteractionType, U as ItdConfigError, Ut as RetryOptions, V as ItdApiErrorKind, Vt as RetryContext, W as ItdConflictError, Wt as RuntimeOptions, X as ItdForbiddenError, Xt as LogLevel, Y as ItdFileErrorReason, Yt as RuntimeMode, Z as ItdNetworkError, Zt as Logger, _ as MyProfile, _n as AttachmentType, _t as isItdStateError, a as NotificationEvent, an as isBuiltInOperationId, at as RateLimitErrorScope, b as PrivacySettings, bn as CaptchaType, bt as DEFAULT_BASE_URL, c as NotificationSettings, cn as operationRetrySafety, ct as isItdAuthError, d as AuthUser, dn as RateLimitBucket, dt as isItdFileError, en as BuiltInOperationId, et as ItdRateLimitError, f as Author, fn as IsoDate, ft as isItdForbiddenError, g as MessageAllowlistUser, gn as AccessType, gt as isItdServerError, h as MessageAllowlistMembership, hn as UserRef, ht as isItdRateLimitError, i as formatNotificationText, in as OperationId, it as ItdValidationError, j as AuthIdentity, jn as NotificationType, jt as OperationRequestOptions, k as Unsubscribe, kn as Loose, kt as ClientHooks, l as Actor, ln as BUCKET_LIMITS, lt as isItdConflictError, m as LastSeen, mn as UserId, mt as isItdPhoneVerificationError, n as canonicalNotificationType, nn as ItdOperationDefinition, nt as ItdStateError, o as normalizeNotification, on as operationBucket, ot as TimeoutBudget, p as FollowResult, pn as Span, pt as isItdNotFoundError, q as ItdFieldErrors, qt as ServiceDefinition, r as isKnownNotificationType, rn as OPERATIONS, rt as ItdTimeoutError, s as Notification, sn as operationMethod, st as isItdApiError, t as resolveNotificationUrl, tn as CustomOperationId, tt as ItdServerError, u as AuthState, un as DEFAULT_RATE_LIMIT_BUCKET, ut as isItdError, v as Pin, vn as CaptchaChoice, vt as isItdValidationError, w as UserBase, wn as IncidentKind, wt as OperationAnnotations, x as Profile, xn as CommentSort, xt as STATUS_SERVICE, y as PinsResult, yn as CaptchaField, yt as CookieJar, z as ItdApiError, zn as ViewSource, zt as RequestOptions } from "./shared/url-DVN-pqkV.cjs";
7
+ import { $ as InternationalSubscriptionCheckoutMode, $i as AttemptContext, $n as CommentReplyTo, $r as CreateReportInput, $t as ReportsResource, A as UsersResource, Ai as ChatSentMessage, An as Report, Ar as Paginator, At as ShopDeliveryDestination, B as ViewTracker, Bi as FeatureBucketDefinition, Bn as HashtagsResource, Br as messageMarkup, Bt as ShopOrderSummary, C as fromStream, Ci as ChatReaction, Cn as StatusDay, Cr as ChatsResource, Ct as ShopConsent, D as UpdatePrivacyInput, Di as ChatReadCursor, Dn as ChangelogEntry, Dr as Page, Dt as ShopDeliveryCalculation, E as MessageAllowlistParams, Ei as ChatReactionType, En as AnnouncementButton, Er as BaseResource, Et as ShopCreatedOrder, F as TelemetryBatchOptions, Fi as ChatUpdateType, Fn as LegalDocumentBlockType, Fr as message, Ft as ShopOrderBase, G as SubscriptionCheckoutReleaseInput, Gi as ManagedClientResource, Gn as BannerDrawingOperation, Gr as MarkupSpan, Gt as ShopProductColor, H as ViewTrackerOptions, Hi as FeatureInstallation, Hn as UploadOptions, Hr as MarkupBuilder, Ht as ShopPayment, I as TelemetryClock, Ii as ChatUpdatesPage, In as LegalDocumentScope, Ir as MessageMarkup, It as ShopOrderDelivery, J as SubscriptionPayOptions, Ji as PreparedFileSource, Jn as UploadedBannerDrawing, Jr as markup, Jt as ShopRecipient, K as SubscriptionCheckoutTerms, Ki as FileResolver, Kn as BannerDrawingPoint, Kr as TextMarkup, Kt as ShopProductSpec, L as TelemetryOptions, Li as ChatUploadOptions, Ln as LegalDocumentSummary, Lr as MessageMarkupBuilder, Lt as ShopOrderItem, M as InteractionEntry, Mi as ChatTextEntity, Mn as LegalResource, Mr as mapPage, Mt as ShopOrder, N as PhotoOpenInput, Ni as ChatUnreadState, Nn as LegalDocument, Nr as MessageBuilder, Nt as ShopOrderAccessSession, O as UpdateProfileInput, Oi as ChatReadResult, On as Clan, Or as PageState, Ot as ShopDeliveryCity, P as TelemetryBatch, Pi as ChatUpdate, Pn as LegalDocumentBlock, Pr as MessageInput, Pt as ShopOrderAccessVerification, Q as InternationalSubscriptionCheckout, Qi as RateLimitBucketState, Qn as Comment, Qr as CreatePostData, Qt as SearchResult, R as TelemetryResource, Ri as ChatUploadedFile, Rn as LegalDocumentVersion, Rr as MessageMarkupContent, Rt as ShopOrderItemInput, S as VideoMimeType, Si as ChatPreview, Sn as ServiceStatus, Sr as ChatListParams, St as CreateShopOrderInput, T as VerificationResource, Ti as ChatReactionCount, Tn as Announcement, Tr as SetChatReactionsInput, Tt as ShopConsentKind, U as SubscriptionBindCardOptions, Ui as FeatureOperationDefinition, Un as UploadedFile, Ur as MarkupContent, Ut as ShopProduct, V as ViewTrackerInput, Vi as FeatureContext, Vn as FilesResource, Vr as AutoSpansOptions, Vt as ShopOrderSupport, W as SubscriptionCheckoutInput, Wi as FeatureRequestOptions, Wn as BannerDrawing, Wr as MarkupInput, Wt as ShopProductCategory, X as SubscriptionResource, Xi as ResolveFileContext, Xn as RepliesParams, Xr as CreateCommentInput, Xt as ShopSizeChartRow, Y as SubscriptionPaymentInput, Yi as PreparedStreamSource, Yn as CommentsResource, Yr as ChatMessageContent, Yt as ShopSizeChart, Z as InternationalSubscriptionCapability, Zi as ResolveFileOptions, Zn as Attachment, Zr as CreatePollInput, Zt as SearchResource, _ as AllowedMimeType, _i as ChatMediaItem, _n as parseMarkdown, _r as QrLoginTarget, _t as ShopDeliveryResource, a as ShopFeatureOptions, aa as OperationTransformContext, ai as ChatActionType, an as PostsResource, ar as Poll, at as SubscriptionCheckoutState, b as ImageMimeType, bi as ChatMessageReactions, bn as PlatformVersions, br as NotificationsResource, bt as ShopProductsResource, c as ShopOrderAccessStorage, ca as PluginTeardown, ci as ChatDeletedMessages, cn as PostBuilder, cr as PostBase, ct as SubscriptionGift, d as statusDays, di as ChatFileLink, dn as post, dr as PostUpdateResult, dt as SubscriptionPaymentProvider, ea as AttemptExtensions, ei as SendChatMessageInput, en as ReportBuilder, er as CommentUpdateResult, et as InternationalSubscriptionOffer, f as isMyProfile, fi as ChatFirstMessage, fn as PollBuilder, fr as UpdateResultBase, ft as SubscriptionQuote, g as AUDIO_MIME_TYPES, gi as ChatMediaCategory, gn as parseHtml, gr as AccountLifecycleResource, gt as ShopConsentsResource, h as ALLOWED_MIME_TYPES, hi as ChatListPage, hn as ParseMarkupOptions, hr as comment, ht as PayShopOrderOptions, i as ShopFeatureApi, ia as OperationExtensions, ii as isBuilder, in as FeedParams, ir as PinPostResult, it as SubscriptionCheckoutKind, j as DwellEntry, ji as ChatSummary, jn as VerificationStatus, jr as PaginatorOptions, jt as ShopDeliveryPoint, k as UserListParams, ki as ChatReply, kn as Portal, kr as PaginationMode, kt as ShopDeliveryCountry, l as ShopOrderAccessStorageAdapterOptions, li as ChatDirectResult, ln as PostInput, lr as PostCounters, lt as SubscriptionOffer, m as utcStampToIso, mi as ChatHistoryPage, mn as poll, mr as CommentInput, mt as CreateShopOrderOptions, n as SpanRenderFormat, na as AttemptNext, ni as BuilderInput, nn as report, nr as LikeResult, nt as PaymentMethodType, o as createShopFeature, oa as OperationTransformer, oi as ChatAttachment, on as UserPostsParams, or as PollOption, ot as SubscriptionCheckoutStatus, p as toDate, pi as ChatForwardedMessages, pn as PollInput, pr as CommentBuilder, pt as SubscriptionRenewalAgreement, q as SubscriptionGiftInput, qi as PreparedBufferSource, qn as BannerDrawingTool, qr as autoSpans, qt as ShopProductStatus, r as renderSpans, ra as ClientPlugin, ri as ItdBuilder, rn as CommentsParams, rr as OriginalPost, rt as Subscription, s as MemoryShopOrderAccessStorage, sa as PluginApi, si as ChatChange, sn as CreatePostInput, sr as Post, st as SubscriptionCheckoutSubject, t as RenderSpansOptions, ta as AttemptInterceptor, ti as UpdatePostInput, tn as ReportInput, tr as Hashtag, tt as PaymentMethod, u as createShopOrderAccessStorage, ui as ChatEditedMessage, un as PostUpdateInput, ur as PostStats, ut as SubscriptionPayment, v as AudioMimeType, vi as ChatMediaPage, vn as PlatformClientVersion, vr as Session, vt as ShopOrderRequestOptions, w as fromUrl, wi as ChatReactionCatalog, wn as StatusIncidentLine, wr as ForwardChatMessagesInput, wt as ShopConsentContext, x as VIDEO_MIME_TYPES, xi as ChatPresence, xn as PlatformStatus, xr as UpdateNotificationSettingsInput, xt as ShopResource, y as IMAGE_MIME_TYPES, yi as ChatMessage, yn as PlatformResource, yr as NotificationListParams, yt as ShopOrdersResource, z as VideoProgressInput, zi as ClientFeature, zn as HashtagPostsParams, zr as MessageMarkupInput, zt as ShopOrderStatus } from "./shared/render-DaHR-AHp.cjs";
8
+ import { $ as EventTransportFrame, A as EventSequentializer, B as NotificationOfType, C as EventSession, D as EventMiddlewareObject, E as EventMiddleware, F as NotificationEventContext, G as UnknownNotificationUpdate, H as NotificationUpdateOfType, I as NotificationEventFilter, J as NotificationEventsMap, K as UnreadCountUpdate, L as NotificationEventOfType, M as runEventMiddleware, N as EventContext, O as EventNext, P as NotificationContext, Q as EventTransportContext, R as NotificationEventSelector, S as EventEnqueueOptions, T as EventHandler, U as NotificationUpdateOrigin, V as NotificationUpdate, W as NotificationUpdateType, X as NotificationEventsTransport, Y as NotificationEventsOptions, Z as EventTransport, _ as WebSocketTransportOptions, a as EventMiddlewareGroup, b as EventChannelEvents, c as EventRouteSelector, d as NotificationEventsClientOptions, et as UnauthorizedStreamError, f as createNotificationEventsClient, g as WebSocketTransport, h as WebSocketOpenFailureClassifier, i as EventFilter, j as EventTypeGuard, k as EventPredicate, l as EventRouter, m as WebSocketLike, n as EventErrorBoundary, o as EventMiddlewareLike, p as WebSocketImplementationOptions, q as NotificationEvents, r as EventErrorContext, s as EventRouteTable, t as EventComposer, tt as ReconnectOptions, u as NotificationEventsClient, v as EventChannel, w as EventSyncReason, x as EventChannelOptions, y as EventChannelDeps, z as NotificationEventsUpdate } from "./shared/events-B2D1rsQf.cjs";
9
9
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-FtS4NIC7.cjs";
10
10
  import { a as scopedTokenStorage, i as createMultiTokenStorage, n as MultiTokenStorage, r as MultiTokenStorageAdapterOptions, t as MemoryMultiTokenStorage } from "./shared/multi-storage-OGWNMK3x.cjs";
11
11
  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-DEbkC0cB.cjs";
12
12
  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-BGoSgLze.cjs";
13
+ /** Контекст обновления, полученного по WebSocket. */
14
+ type ChatEventContext = EventContext<ChatUpdate, ChatEvents, 'stream'>;
13
15
  /** События канала чатов. */
14
16
  interface ChatEventMap extends Pick<EventChannelEvents, 'status' | 'error' | 'parseError' | 'reconnect' | 'giveup' | 'message'> {
15
17
  /** Обновление мессенджера. */
@@ -24,7 +26,7 @@ interface ChatEventsOptions extends ReconnectOptions {
24
26
  /** Реализация WebSocket для подключения через прокси или в среде без встроенной. */
25
27
  webSocketImpl?: WebSocketLike | undefined;
26
28
  }
27
- /** Поток изменений мессенджера. Доступен как `itd.chats.events` в полном клиенте. */
29
+ /** Канал событий чатов. Доступен как `itd.chats.events` в полном клиенте. */
28
30
  export declare class ChatEvents {
29
31
  #private;
30
32
  /** @internal */
@@ -47,10 +49,12 @@ export declare class ChatEvents {
47
49
  * ```
48
50
  */
49
51
  on<K extends keyof ChatEventMap>(event: K, listener: Listener<ChatEventMap[K]>): Unsubscribe;
52
+ /** Добавляет обработчик обновлений WebSocket и возвращает функцию его удаления. */
53
+ use(middleware: EventMiddleware<ChatEventContext> | EventMiddlewareObject<ChatEventContext>): Unsubscribe;
50
54
  /**
51
55
  * Подключается к WebSocket и догружает пропущенные события.
52
56
  *
53
- * @param since номер последнего события (`eventSeq` из списка чатов или журнала)
57
+ * @param since номер последнего события. Возьмите `eventSeq` из списка чатов или события.
54
58
  */
55
59
  connect(since?: number): Promise<void>;
56
60
  /** Закрывает сокет и отменяет запланированное переподключение. */
@@ -1811,4 +1815,4 @@ export declare class ItdAccounts {
1811
1815
  * То же, что `new ItdAccounts(options)`, — для тех, кому привычнее фабрика.
1812
1816
  */
1813
1817
  export declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1814
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountChangesResource, type AccountEmailResource, type AccountEvents, type AccountFeature, type AccountInfo, type AccountLifecycleResource, type AccountPasswordResource, type AccountPhoneResource, type AccountPhoneStartInput, type AccountResource, 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 BannerDrawing, type BannerDrawingOperation, type BannerDrawingPoint, BannerDrawingTool, type BuilderInput, type BuiltInOperationId, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolveContext, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, ChatActionType, type ChatAttachment, type ChatChange, type ChatDeletedMessages, type ChatDirectResult, type ChatEditedMessage, type ChatEventMap, type ChatEventsOptions, type ChatFileLink, type ChatFirstMessage, type ChatForwardedMessages, type ChatHistoryPage, type ChatListPage, type ChatListParams, ChatMediaCategory, type ChatMediaItem, type ChatMediaPage, type ChatMessage, type ChatMessageContent, type ChatMessageReactions, type ChatPresence, type ChatPreview, type ChatReaction, type ChatReactionCatalog, type ChatReactionCount, ChatReactionType, type ChatReadCursor, type ChatReadResult, type ChatReply, type ChatSentMessage, type ChatSummary, type ChatTextEntity, type ChatUnreadState, type ChatUpdate, ChatUpdateType, type ChatUpdatesPage, type ChatUploadOptions, type ChatUploadedFile, type ChatsApi, ChatsResource, 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 ConsentDocument, type ContactActionResult, type ContactChange, type ContactChangeConfirmation, type ContactChangeSchedule, type ContactProofDelivery, 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 ForwardChatMessagesInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, 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 LastSeen, LastSeenUnit, type LazyFile, type LegalDocument, type LegalDocumentBlock, LegalDocumentBlockType, LegalDocumentScope, type LegalDocumentSummary, type LegalDocumentVersion, type LegalResource, type LikeResult, LikesVisibility, type Listener, LogLevel, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, 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, OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type OriginalPost, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PendingContactChange, type PhoneAuthResource, type PhoneConfig, type PhoneConsent, type PhoneDelivery, type PhoneFlowInput, type PhoneFlowResume, type PhoneFlowStart, type PhoneLoginInput, type PhoneLoginResult, type PhoneRegion, type PhoneReverseOptions, type PhoneReverseStatus, 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 PostBase, type PostBuilder, type PostCounters, 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, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, 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 SendChatMessageInput, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type SetChatReactionsInput, 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 ShopOrderBase, 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, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, TimeoutBudget, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UpdateResultBase, type UploadOptions, type UploadedBannerDrawing, type UploadedFile, type UrlFile, type UrlFileOptions, type UserBase, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsernameAvailability, UsernameUnavailableReason, 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, 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 };
1818
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountChangesResource, type AccountEmailResource, type AccountEvents, type AccountFeature, type AccountInfo, type AccountLifecycleResource, type AccountPasswordResource, type AccountPhoneResource, type AccountPhoneStartInput, type AccountResource, 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 BannerDrawing, type BannerDrawingOperation, type BannerDrawingPoint, BannerDrawingTool, type BuilderInput, type BuiltInOperationId, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolveContext, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, ChatActionType, type ChatAttachment, type ChatChange, type ChatDeletedMessages, type ChatDirectResult, type ChatEditedMessage, type ChatEventContext, type ChatEventMap, type ChatEventsOptions, type ChatFileLink, type ChatFirstMessage, type ChatForwardedMessages, type ChatHistoryPage, type ChatListPage, type ChatListParams, ChatMediaCategory, type ChatMediaItem, type ChatMediaPage, type ChatMessage, type ChatMessageContent, type ChatMessageReactions, type ChatPresence, type ChatPreview, type ChatReaction, type ChatReactionCatalog, type ChatReactionCount, ChatReactionType, type ChatReadCursor, type ChatReadResult, type ChatReply, type ChatSentMessage, type ChatSummary, type ChatTextEntity, type ChatUnreadState, type ChatUpdate, ChatUpdateType, type ChatUpdatesPage, type ChatUploadOptions, type ChatUploadedFile, type ChatsApi, ChatsResource, 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 ConsentDocument, type ContactActionResult, type ContactChange, type ContactChangeConfirmation, type ContactChangeSchedule, type ContactProofDelivery, 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 ForwardChatMessagesInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type InternationalSubscriptionCapability, type InternationalSubscriptionCheckout, InternationalSubscriptionCheckoutMode, type InternationalSubscriptionOffer, type IsoDate, ItdAbortError, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, 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 LastSeen, LastSeenUnit, type LazyFile, type LegalDocument, type LegalDocumentBlock, LegalDocumentBlockType, LegalDocumentScope, type LegalDocumentSummary, type LegalDocumentVersion, type LegalResource, type LikeResult, LikesVisibility, type Listener, LogLevel, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, type MessageAllowlistMembership, type MessageAllowlistParams, type MessageAllowlistUser, type MessageBuilder, type MessageInput, type MessageMarkup, type MessageMarkupBuilder, type MessageMarkupContent, type MessageMarkupInput, 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, OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type OriginalPost, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, PaymentMethodType, type PendingContactChange, type PhoneAuthResource, type PhoneConfig, type PhoneConsent, type PhoneDelivery, type PhoneFlowInput, type PhoneFlowResume, type PhoneFlowStart, type PhoneLoginInput, type PhoneLoginResult, type PhoneRegion, type PhoneReverseOptions, type PhoneReverseStatus, 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 PostBase, type PostBuilder, type PostCounters, 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, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, RateLimitErrorScope, type RateLimitOptions, RateLimitPacing, 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 SendChatMessageInput, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type SetChatReactionsInput, 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 ShopOrderBase, 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, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionBindCardOptions, type SubscriptionCheckoutInput, SubscriptionCheckoutKind, type SubscriptionCheckoutReleaseInput, type SubscriptionCheckoutState, SubscriptionCheckoutStatus, type SubscriptionCheckoutSubject, type SubscriptionCheckoutTerms, type SubscriptionGift, type SubscriptionGiftInput, type SubscriptionOffer, type SubscriptionPayOptions, type SubscriptionPayment, type SubscriptionPaymentInput, SubscriptionPaymentProvider, type SubscriptionQuote, type SubscriptionRenewalAgreement, type SubscriptionResource, type SubscriptionState, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, TimeoutBudget, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UpdateResultBase, type UploadOptions, type UploadedBannerDrawing, type UploadedFile, type UrlFile, type UrlFileOptions, type UserBase, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsernameAvailability, UsernameUnavailableReason, 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, 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, message, messageMarkup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
package/dist/index.d.ts CHANGED
@@ -3,13 +3,15 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { $ as ItdTimeoutError, $t as isBuiltInOperationId, A as AuthProvider, An as SpanType, At as RawRequestOptions, B as ItdConflictError, Bt as QueryValue, C as UserSummary, Cn as Loose, Ct as ClientHooks, D as Unsubscribe, Dn as ReportReason, Dt as RateLimitBucketContext, E as Listener, En as QrLocationPrecision, Et as PaginationOptions, F as ItdApiError, Ft as RetryContext, G as ItdFileErrorReason, Gt as Logger, H as ItdErrorKind, Ht as RateLimitPacing, I as ItdApiErrorInit, It as RetryDecisionContext, J as ItdNotFoundError, Jt as BuiltInOperationId, K as ItdForbiddenError, Kt as ItdClock, L as ItdApiErrorKind, Lt as RetryOptions, Mn as ViewReason, Mt as RequestExtensions, Nn as ViewSource, Nt as RequestOptions, O as ClientConnection, On as ReportTargetType, Ot as RateLimitBucketOverride, P as ItdAbortError, Pn as WallAccess, Pt as ResponseContext, Q as ItdStateError, Qt as OperationId, R as ItdAuthError, Rt as RuntimeOptions, S as UserBase, Sn as LikesVisibility, St as RetrySafety, T as Emitter, Tn as NotificationType, Tt as OperationRequestOptions, U as ItdFieldErrors, Ut as RuntimeMode, V as ItdError, Vt as ServiceDefinition, W as ItdFileError, Wt as LogLevel, X as ItdRateLimitError, Xt as ItdOperationDefinition, Y as ItdPhoneVerificationError, Yt as CustomOperationId, Z as ItdServerError, Zt as OPERATIONS, _ as PinsResult, _n as FeedTab, _t as FeatureOperationId, a as NotificationEvent, an as RateLimitBucket, at as isItdError, b as PublicProfile, bn as ItdErrorCode, bt as OperationMetadata, c as NotificationSettings, cn as UserId, ct as isItdNotFoundError, d as AuthUser, dn as AttachmentType, dt as isItdServerError, en as operationBucket, et as ItdValidationError, f as Author, fn as CaptchaChoice, ft as isItdStateError, g as Pin, gn as EventChannelStatus, gt as LIBRARY_VERSION, h as MyProfile, hn as CommentSort, ht as STATUS_SERVICE, i as formatNotificationText, in as DEFAULT_RATE_LIMIT_BUCKET, it as isItdConflictError, jn as UsernameUnavailableReason, jt as RequestContext, k as AuthIdentity, kn as ServiceState, kt as RateLimitOptions, l as Actor, ln as UserRef, lt as isItdPhoneVerificationError, m as LastSeen, mn as CaptchaType, mt as DEFAULT_BASE_URL, n as canonicalNotificationType, nn as operationRetrySafety, nt as isItdApiError, o as normalizeNotification, on as IsoDate, ot as isItdFileError, p as FollowResult, pn as CaptchaField, pt as isItdValidationError, q as ItdNetworkError, qt as systemClock, r as isKnownNotificationType, rn as BUCKET_LIMITS, rt as isItdAuthError, s as Notification, sn as Span, st as isItdForbiddenError, t as resolveNotificationUrl, tn as operationMethod, tt as TimeoutBudget, u as AuthState, un as AccessType, ut as isItdRateLimitError, v as PrivacySettings, vn as IncidentKind, vt as OperationAnnotations, w as UsernameAvailability, wn as MessageAccess, wt as ErrorContextHook, x as SubscriptionState, xn as LastSeenUnit, xt as OperationMethod, y as Profile, yn as InteractionType, z as ItdConfigError, zt as QueryParams } from "./shared/url-BPqHN_CZ.js";
7
- import { $ as ShopConsentContext, $n as BuilderInput, $r as ChatSentMessage, $t as autoSpans, A as DwellEntry, Ai as PluginApi, An as BannerDrawingTool, Ar as ChatChange, At as ReportInput, B as ViewTrackerInput, Bn as OriginalPost, Br as ChatMediaItem, Bt as post, C as fromStream, Ci as AttemptExtensions, Cn as HashtagsResource, Cr as PageState, Ct as ShopRecipient, D as UpdateProfileInput, Di as OperationExtensions, Dn as BannerDrawing, Dr as mapPage, Dt as SearchResult, E as UpdatePrivacyInput, Ei as ClientPlugin, En as UploadedFile, Er as PaginatorOptions, Et as SearchResource, F as TelemetryClock, Fn as Comment, Fr as ChatFirstMessage, Ft as UserPostsParams, G as ShopConsentsResource, Gn as PostBase, Gr as ChatPreview, Gt as parseHtml, H as SubscriptionResource, Hn as Poll, Hr as ChatMessage, Ht as PollInput, I as TelemetryOptions, In as CommentReplyTo, Ir as ChatForwardedMessages, It as CreatePostInput, J as ShopOrdersResource, Jn as PostUpdateResult, Jr as ChatReactionCount, Jt as MarkupBuilder, K as ShopDeliveryResource, Kn as PostCounters, Kr as ChatReaction, Kt as parseMarkdown, L as TelemetryResource, Ln as CommentUpdateResult, Lr as ChatHistoryPage, Lt as PostBuilder, M as PhotoOpenInput, Mi as HttpClient, Mn as CommentsResource, Mr as ChatDirectResult, Mt as CommentsParams, N as TelemetryBatch, Ni as CookieJar, Nn as RepliesParams, Nr as ChatEditedMessage, Nt as FeedParams, O as UserListParams, Oi as OperationTransformContext, On as BannerDrawingOperation, Or as ChatActionType, Ot as ReportsResource, P as TelemetryBatchOptions, Pn as Attachment, Pr as ChatFileLink, Pt as PostsResource, Q as ShopConsent, Qn as comment, Qr as ChatReply, Qt as TextMarkup, R as VideoProgressInput, Rn as Hashtag, Rr as ChatListPage, Rt as PostInput, S as VideoMimeType, Si as AttemptContext, Sn as HashtagPostsParams, Sr as Page, St as ShopProductStatus, T as VerificationResource, Ti as AttemptNext, Tn as UploadOptions, Tr as Paginator, Tt as ShopSizeChartRow, U as CreateShopOrderOptions, Un as PollOption, Ur as ChatMessageReactions, Ut as poll, V as ViewTrackerOptions, Vn as PinPostResult, Vr as ChatMediaPage, Vt as PollBuilder, W as PayShopOrderOptions, Wn as Post, Wr as ChatPresence, Wt as ParseMarkupOptions, X as ShopResource, Xn as CommentBuilder, Xr as ChatReadCursor, Xt as MarkupInput, Y as ShopProductsResource, Yn as UpdateResultBase, Yr as ChatReactionType, Yt as MarkupContent, Z as CreateShopOrderInput, Zn as CommentInput, Zr as ChatReadResult, Zt as MarkupSpan, _ as AllowedMimeType, _i as PreparedFileSource, _n as LegalDocumentBlock, _r as ChatsResource, _t as ShopPayment, a as ShopFeatureOptions, ai as ChatUpdatesPage, an as ServiceStatus, ar as CreateReportInput, at as ShopDeliveryDestination, b as ImageMimeType, bi as ResolveFileOptions, bn as LegalDocumentSummary, br as SetChatReactionsInput, bt as ShopProductColor, c as ShopOrderAccessStorage, ci as ClientFeature, cn as Announcement, cr as PaymentMethod, ct as ShopOrderAccessSession, d as statusDays, di as FeatureInstallation, dn as Clan, dr as Subscription, dt as ShopOrderDelivery, ei as ChatSummary, en as markup, er as ItdBuilder, et as ShopConsentKind, f as isMyProfile, fi as FeatureOperationDefinition, fn as Portal, fr as NotificationListParams, ft as ShopOrderItem, g as AUDIO_MIME_TYPES, gi as PreparedBufferSource, gn as LegalDocument, gr as ChatMessageContent, gt as ShopOrderSupport, h as ALLOWED_MIME_TYPES, hi as FileResolver, hn as LegalResource, hr as ChatListParams, ht as ShopOrderSummary, i as ShopFeatureApi, ii as ChatUpdateType, in as PlatformStatus, ir as CreatePostData, it as ShopDeliveryCountry, j as InteractionEntry, ji as PluginTeardown, jn as UploadedBannerDrawing, jr as ChatDeletedMessages, jt as report, k as UsersResource, ki as OperationTransformer, kn as BannerDrawingPoint, kr as ChatAttachment, kt as ReportBuilder, l as ShopOrderAccessStorageAdapterOptions, li as FeatureBucketDefinition, ln as AnnouncementButton, lr as QrLoginTarget, lt as ShopOrderAccessVerification, m as utcStampToIso, mi as ManagedClientResource, mn as VerificationStatus, mr as UpdateNotificationSettingsInput, mt as ShopOrderStatus, n as SpanRenderFormat, ni as ChatUnreadState, nn as PlatformResource, nr as CreateCommentInput, nt as ShopDeliveryCalculation, o as createShopFeature, oi as ChatUploadOptions, on as StatusDay, or as UpdatePostInput, ot as ShopDeliveryPoint, p as toDate, pi as FeatureRequestOptions, pn as Report, pr as NotificationsResource, pt as ShopOrderItemInput, q as ShopOrderRequestOptions, qn as PostStats, qr as ChatReactionCatalog, qt as AutoSpansOptions, r as renderSpans, ri as ChatUpdate, rn as PlatformVersions, rr as CreatePollInput, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, si as ChatUploadedFile, sn as StatusIncidentLine, sr as AccountLifecycleResource, st as ShopOrder, t as RenderSpansOptions, ti as ChatTextEntity, tn as PlatformClientVersion, tr as isBuilder, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, ui as FeatureContext, un as ChangelogEntry, ur as Session, ut as ShopOrderBase, v as AudioMimeType, vi as PreparedStreamSource, vn as LegalDocumentBlockType, vr as ForwardChatMessagesInput, vt as ShopProduct, w as fromUrl, wi as AttemptInterceptor, wn as FilesResource, wr as PaginationMode, wt as ShopSizeChart, x as VIDEO_MIME_TYPES, xi as RateLimitBucketState, xn as LegalDocumentVersion, xr as BaseResource, xt as ShopProductSpec, y as IMAGE_MIME_TYPES, yi as ResolveFileContext, yn as LegalDocumentScope, yr as SendChatMessageInput, yt as ShopProductCategory, z as ViewTracker, zn as LikeResult, zr as ChatMediaCategory, zt as PostUpdateInput } from "./shared/render-C11kvqb5.js";
8
- 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-g5XfBnc3.js";
6
+ import { $ as ItdServerError, $t as ItdOperationDefinition, A as ClientConnection, An as ReportReason, At as RateLimitBucketContext, B as ItdAuthError, Bt as RetryOptions, C as SubscriptionState, Cn as ItdErrorCode, Ct as OperationMetadata, D as Emitter, Dn as MessageAccess, Dt as ErrorContextHook, E as UsernameAvailability, En as Loose, Et as ClientHooks, Fn as ViewReason, Ft as RequestExtensions, G as ItdFieldErrors, Gt as RateLimitPacing, H as ItdConflictError, Ht as QueryParams, I as ItdAbortError, In as ViewSource, It as RequestOptions, J as ItdForbiddenError, Jt as Logger, K as ItdFileError, Kt as RuntimeMode, L as ItdApiError, Ln as WallAccess, Lt as ResponseContext, M as AuthProvider, Mn as ServiceState, Mt as RateLimitOptions, Nn as SpanType, Nt as RawRequestOptions, O as Listener, On as NotificationType, Ot as OperationRequestOptions, Pn as UsernameUnavailableReason, Pt as RequestContext, Q as ItdRateLimitError, Qt as CustomOperationId, R as ItdApiErrorInit, Rt as RetryContext, S as PublicProfile, Sn as InteractionType, T as UserSummary, Tn as LikesVisibility, Tt as RetrySafety, U as ItdError, Ut as QueryValue, V as ItdConfigError, Vt as RuntimeOptions, W as ItdErrorKind, Wt as ServiceDefinition, X as ItdNotFoundError, Xt as systemClock, Y as ItdNetworkError, Yt as ItdClock, Z as ItdPhoneVerificationError, Zt as BuiltInOperationId, _ as MyProfile, _n as CaptchaType, _t as DEFAULT_BASE_URL, a as NotificationEvent, an as operationRetrySafety, at as isItdApiError, b as PrivacySettings, bn as FeedTab, bt as FeatureOperationId, c as NotificationSettings, cn as RateLimitBucket, ct as isItdError, d as AuthUser, dn as UserId, dt as isItdNotFoundError, en as OPERATIONS, et as ItdStateError, f as Author, fn as UserRef, ft as isItdPhoneVerificationError, g as MessageAllowlistUser, gn as CaptchaField, gt as isItdValidationError, h as MessageAllowlistMembership, hn as CaptchaChoice, ht as isItdStateError, i as formatNotificationText, in as operationMethod, it as TimeoutBudget, j as AuthIdentity, jn as ReportTargetType, jt as RateLimitBucketOverride, k as Unsubscribe, kn as QrLocationPrecision, kt as PaginationOptions, l as Actor, ln as IsoDate, lt as isItdFileError, m as LastSeen, mn as AttachmentType, mt as isItdServerError, n as canonicalNotificationType, nn as isBuiltInOperationId, nt as ItdValidationError, o as normalizeNotification, on as BUCKET_LIMITS, ot as isItdAuthError, p as FollowResult, pn as AccessType, pt as isItdRateLimitError, q as ItdFileErrorReason, qt as LogLevel, r as isKnownNotificationType, rn as operationBucket, rt as RateLimitErrorScope, s as Notification, sn as DEFAULT_RATE_LIMIT_BUCKET, st as isItdConflictError, t as resolveNotificationUrl, tn as OperationId, tt as ItdTimeoutError, u as AuthState, un as Span, ut as isItdForbiddenError, v as Pin, vn as CommentSort, vt as STATUS_SERVICE, w as UserBase, wn as LastSeenUnit, wt as OperationMethod, x as Profile, xn as IncidentKind, xt as OperationAnnotations, y as PinsResult, yn as EventChannelStatus, yt as LIBRARY_VERSION, z as ItdApiErrorKind, zt as RetryDecisionContext } from "./shared/url-Dey3grvo.js";
7
+ import { $ as InternationalSubscriptionCheckoutMode, $i as AttemptContext, $n as CommentReplyTo, $r as CreateReportInput, $t as ReportsResource, A as UsersResource, Ai as ChatSentMessage, An as Report, Ar as Paginator, At as ShopDeliveryDestination, B as ViewTracker, Bi as FeatureBucketDefinition, Bn as HashtagsResource, Br as messageMarkup, Bt as ShopOrderSummary, C as fromStream, Ci as ChatReaction, Cn as StatusDay, Cr as ChatsResource, Ct as ShopConsent, D as UpdatePrivacyInput, Di as ChatReadCursor, Dn as ChangelogEntry, Dr as Page, Dt as ShopDeliveryCalculation, E as MessageAllowlistParams, Ei as ChatReactionType, En as AnnouncementButton, Er as BaseResource, Et as ShopCreatedOrder, F as TelemetryBatchOptions, Fi as ChatUpdateType, Fn as LegalDocumentBlockType, Fr as message, Ft as ShopOrderBase, G as SubscriptionCheckoutReleaseInput, Gi as ManagedClientResource, Gn as BannerDrawingOperation, Gr as MarkupSpan, Gt as ShopProductColor, H as ViewTrackerOptions, Hi as FeatureInstallation, Hn as UploadOptions, Hr as MarkupBuilder, Ht as ShopPayment, I as TelemetryClock, Ii as ChatUpdatesPage, In as LegalDocumentScope, Ir as MessageMarkup, It as ShopOrderDelivery, J as SubscriptionPayOptions, Ji as PreparedFileSource, Jn as UploadedBannerDrawing, Jr as markup, Jt as ShopRecipient, K as SubscriptionCheckoutTerms, Ki as FileResolver, Kn as BannerDrawingPoint, Kr as TextMarkup, Kt as ShopProductSpec, L as TelemetryOptions, Li as ChatUploadOptions, Ln as LegalDocumentSummary, Lr as MessageMarkupBuilder, Lt as ShopOrderItem, M as InteractionEntry, Mi as ChatTextEntity, Mn as LegalResource, Mr as mapPage, Mt as ShopOrder, N as PhotoOpenInput, Ni as ChatUnreadState, Nn as LegalDocument, Nr as MessageBuilder, Nt as ShopOrderAccessSession, O as UpdateProfileInput, Oi as ChatReadResult, On as Clan, Or as PageState, Ot as ShopDeliveryCity, P as TelemetryBatch, Pi as ChatUpdate, Pn as LegalDocumentBlock, Pr as MessageInput, Pt as ShopOrderAccessVerification, Q as InternationalSubscriptionCheckout, Qi as RateLimitBucketState, Qn as Comment, Qr as CreatePostData, Qt as SearchResult, R as TelemetryResource, Ri as ChatUploadedFile, Rn as LegalDocumentVersion, Rr as MessageMarkupContent, Rt as ShopOrderItemInput, S as VideoMimeType, Si as ChatPreview, Sn as ServiceStatus, Sr as ChatListParams, St as CreateShopOrderInput, T as VerificationResource, Ti as ChatReactionCount, Tn as Announcement, Tr as SetChatReactionsInput, Tt as ShopConsentKind, U as SubscriptionBindCardOptions, Ui as FeatureOperationDefinition, Un as UploadedFile, Ur as MarkupContent, Ut as ShopProduct, V as ViewTrackerInput, Vi as FeatureContext, Vn as FilesResource, Vr as AutoSpansOptions, Vt as ShopOrderSupport, W as SubscriptionCheckoutInput, Wi as FeatureRequestOptions, Wn as BannerDrawing, Wr as MarkupInput, Wt as ShopProductCategory, X as SubscriptionResource, Xi as ResolveFileContext, Xn as RepliesParams, Xr as CreateCommentInput, Xt as ShopSizeChartRow, Y as SubscriptionPaymentInput, Yi as PreparedStreamSource, Yn as CommentsResource, Yr as ChatMessageContent, Yt as ShopSizeChart, Z as InternationalSubscriptionCapability, Zi as ResolveFileOptions, Zn as Attachment, Zr as CreatePollInput, Zt as SearchResource, _ as AllowedMimeType, _i as ChatMediaItem, _n as parseMarkdown, _r as QrLoginTarget, _t as ShopDeliveryResource, a as ShopFeatureOptions, aa as OperationTransformContext, ai as ChatActionType, an as PostsResource, ar as Poll, at as SubscriptionCheckoutState, b as ImageMimeType, bi as ChatMessageReactions, bn as PlatformVersions, br as NotificationsResource, bt as ShopProductsResource, c as ShopOrderAccessStorage, ca as PluginTeardown, ci as ChatDeletedMessages, cn as PostBuilder, cr as PostBase, ct as SubscriptionGift, d as statusDays, di as ChatFileLink, dn as post, dr as PostUpdateResult, dt as SubscriptionPaymentProvider, ea as AttemptExtensions, ei as SendChatMessageInput, en as ReportBuilder, er as CommentUpdateResult, et as InternationalSubscriptionOffer, f as isMyProfile, fi as ChatFirstMessage, fn as PollBuilder, fr as UpdateResultBase, ft as SubscriptionQuote, g as AUDIO_MIME_TYPES, gi as ChatMediaCategory, gn as parseHtml, gr as AccountLifecycleResource, gt as ShopConsentsResource, h as ALLOWED_MIME_TYPES, hi as ChatListPage, hn as ParseMarkupOptions, hr as comment, ht as PayShopOrderOptions, i as ShopFeatureApi, ia as OperationExtensions, ii as isBuilder, in as FeedParams, ir as PinPostResult, it as SubscriptionCheckoutKind, j as DwellEntry, ji as ChatSummary, jn as VerificationStatus, jr as PaginatorOptions, jt as ShopDeliveryPoint, k as UserListParams, ki as ChatReply, kn as Portal, kr as PaginationMode, kt as ShopDeliveryCountry, l as ShopOrderAccessStorageAdapterOptions, la as HttpClient, li as ChatDirectResult, ln as PostInput, lr as PostCounters, lt as SubscriptionOffer, m as utcStampToIso, mi as ChatHistoryPage, mn as poll, mr as CommentInput, mt as CreateShopOrderOptions, n as SpanRenderFormat, na as AttemptNext, ni as BuilderInput, nn as report, nr as LikeResult, nt as PaymentMethodType, o as createShopFeature, oa as OperationTransformer, oi as ChatAttachment, on as UserPostsParams, or as PollOption, ot as SubscriptionCheckoutStatus, p as toDate, pi as ChatForwardedMessages, pn as PollInput, pr as CommentBuilder, pt as SubscriptionRenewalAgreement, q as SubscriptionGiftInput, qi as PreparedBufferSource, qn as BannerDrawingTool, qr as autoSpans, qt as ShopProductStatus, r as renderSpans, ra as ClientPlugin, ri as ItdBuilder, rn as CommentsParams, rr as OriginalPost, rt as Subscription, s as MemoryShopOrderAccessStorage, sa as PluginApi, si as ChatChange, sn as CreatePostInput, sr as Post, st as SubscriptionCheckoutSubject, t as RenderSpansOptions, ta as AttemptInterceptor, ti as UpdatePostInput, tn as ReportInput, tr as Hashtag, tt as PaymentMethod, u as createShopOrderAccessStorage, ua as CookieJar, ui as ChatEditedMessage, un as PostUpdateInput, ur as PostStats, ut as SubscriptionPayment, v as AudioMimeType, vi as ChatMediaPage, vn as PlatformClientVersion, vr as Session, vt as ShopOrderRequestOptions, w as fromUrl, wi as ChatReactionCatalog, wn as StatusIncidentLine, wr as ForwardChatMessagesInput, wt as ShopConsentContext, x as VIDEO_MIME_TYPES, xi as ChatPresence, xn as PlatformStatus, xr as UpdateNotificationSettingsInput, xt as ShopResource, y as IMAGE_MIME_TYPES, yi as ChatMessage, yn as PlatformResource, yr as NotificationListParams, yt as ShopOrdersResource, z as VideoProgressInput, zi as ClientFeature, zn as HashtagPostsParams, zr as MessageMarkupInput, zt as ShopOrderStatus } from "./shared/render-4Rp2sa1a.js";
8
+ 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-BcR4RzSS.js";
9
9
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-C_ZujAZt.js";
10
10
  import { a as scopedTokenStorage, i as createMultiTokenStorage, n as MultiTokenStorage, r as MultiTokenStorageAdapterOptions, t as MemoryMultiTokenStorage } from "./shared/multi-storage-DQiERirK.js";
11
11
  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-pxnDIsQP.js";
12
12
  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-WUQBeTAr.js";
13
+ /** Контекст обновления, полученного по WebSocket. */
14
+ type ChatEventContext = EventContext<ChatUpdate, ChatEvents, 'stream'>;
13
15
  /** События канала чатов. */
14
16
  interface ChatEventMap extends Pick<EventChannelEvents, 'status' | 'error' | 'parseError' | 'reconnect' | 'giveup' | 'message'> {
15
17
  /** Обновление мессенджера. */
@@ -24,7 +26,7 @@ interface ChatEventsOptions extends ReconnectOptions {
24
26
  /** Реализация WebSocket для подключения через прокси или в среде без встроенной. */
25
27
  webSocketImpl?: WebSocketLike | undefined;
26
28
  }
27
- /** Поток изменений мессенджера. Доступен как `itd.chats.events` в полном клиенте. */
29
+ /** Канал событий чатов. Доступен как `itd.chats.events` в полном клиенте. */
28
30
  export declare class ChatEvents {
29
31
  #private;
30
32
  /** @internal */
@@ -47,10 +49,12 @@ export declare class ChatEvents {
47
49
  * ```
48
50
  */
49
51
  on<K extends keyof ChatEventMap>(event: K, listener: Listener<ChatEventMap[K]>): Unsubscribe;
52
+ /** Добавляет обработчик обновлений WebSocket и возвращает функцию его удаления. */
53
+ use(middleware: EventMiddleware<ChatEventContext> | EventMiddlewareObject<ChatEventContext>): Unsubscribe;
50
54
  /**
51
55
  * Подключается к WebSocket и догружает пропущенные события.
52
56
  *
53
- * @param since номер последнего события (`eventSeq` из списка чатов или журнала)
57
+ * @param since номер последнего события. Возьмите `eventSeq` из списка чатов или события.
54
58
  */
55
59
  connect(since?: number): Promise<void>;
56
60
  /** Закрывает сокет и отменяет запланированное переподключение. */
@@ -1811,4 +1815,4 @@ export declare class ItdAccounts {
1811
1815
  * То же, что `new ItdAccounts(options)`, — для тех, кому привычнее фабрика.
1812
1816
  */
1813
1817
  export declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1814
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountChangesResource, type AccountEmailResource, type AccountEvents, type AccountFeature, type AccountInfo, type AccountLifecycleResource, type AccountPasswordResource, type AccountPhoneResource, type AccountPhoneStartInput, type AccountResource, 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 BannerDrawing, type BannerDrawingOperation, type BannerDrawingPoint, BannerDrawingTool, type BuilderInput, type BuiltInOperationId, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolveContext, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, ChatActionType, type ChatAttachment, type ChatChange, type ChatDeletedMessages, type ChatDirectResult, type ChatEditedMessage, type ChatEventMap, type ChatEventsOptions, type ChatFileLink, type ChatFirstMessage, type ChatForwardedMessages, type ChatHistoryPage, type ChatListPage, type ChatListParams, ChatMediaCategory, type ChatMediaItem, type ChatMediaPage, type ChatMessage, type ChatMessageContent, type ChatMessageReactions, type ChatPresence, type ChatPreview, type ChatReaction, type ChatReactionCatalog, type ChatReactionCount, ChatReactionType, type ChatReadCursor, type ChatReadResult, type ChatReply, type ChatSentMessage, type ChatSummary, type ChatTextEntity, type ChatUnreadState, type ChatUpdate, ChatUpdateType, type ChatUpdatesPage, type ChatUploadOptions, type ChatUploadedFile, type ChatsApi, ChatsResource, 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 ConsentDocument, type ContactActionResult, type ContactChange, type ContactChangeConfirmation, type ContactChangeSchedule, type ContactProofDelivery, 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 ForwardChatMessagesInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, 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 LastSeen, LastSeenUnit, type LazyFile, type LegalDocument, type LegalDocumentBlock, LegalDocumentBlockType, LegalDocumentScope, type LegalDocumentSummary, type LegalDocumentVersion, type LegalResource, type LikeResult, LikesVisibility, type Listener, LogLevel, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, 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, OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type OriginalPost, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PendingContactChange, type PhoneAuthResource, type PhoneConfig, type PhoneConsent, type PhoneDelivery, type PhoneFlowInput, type PhoneFlowResume, type PhoneFlowStart, type PhoneLoginInput, type PhoneLoginResult, type PhoneRegion, type PhoneReverseOptions, type PhoneReverseStatus, 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 PostBase, type PostBuilder, type PostCounters, 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, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, 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 SendChatMessageInput, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type SetChatReactionsInput, 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 ShopOrderBase, 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, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, TimeoutBudget, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UpdateResultBase, type UploadOptions, type UploadedBannerDrawing, type UploadedFile, type UrlFile, type UrlFileOptions, type UserBase, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsernameAvailability, UsernameUnavailableReason, 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, 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 };
1818
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountChangesResource, type AccountEmailResource, type AccountEvents, type AccountFeature, type AccountInfo, type AccountLifecycleResource, type AccountPasswordResource, type AccountPhoneResource, type AccountPhoneStartInput, type AccountResource, 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 BannerDrawing, type BannerDrawingOperation, type BannerDrawingPoint, BannerDrawingTool, type BuilderInput, type BuiltInOperationId, CaptchaChoice, CaptchaField, type CaptchaPage, type CaptchaProvider, type CaptchaSolveContext, type CaptchaSolver, type CaptchaSolverInput, type CaptchaToken, CaptchaType, type ChangelogEntry, ChatActionType, type ChatAttachment, type ChatChange, type ChatDeletedMessages, type ChatDirectResult, type ChatEditedMessage, type ChatEventContext, type ChatEventMap, type ChatEventsOptions, type ChatFileLink, type ChatFirstMessage, type ChatForwardedMessages, type ChatHistoryPage, type ChatListPage, type ChatListParams, ChatMediaCategory, type ChatMediaItem, type ChatMediaPage, type ChatMessage, type ChatMessageContent, type ChatMessageReactions, type ChatPresence, type ChatPreview, type ChatReaction, type ChatReactionCatalog, type ChatReactionCount, ChatReactionType, type ChatReadCursor, type ChatReadResult, type ChatReply, type ChatSentMessage, type ChatSummary, type ChatTextEntity, type ChatUnreadState, type ChatUpdate, ChatUpdateType, type ChatUpdatesPage, type ChatUploadOptions, type ChatUploadedFile, type ChatsApi, ChatsResource, 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 ConsentDocument, type ContactActionResult, type ContactChange, type ContactChangeConfirmation, type ContactChangeSchedule, type ContactProofDelivery, 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 ForwardChatMessagesInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type InternationalSubscriptionCapability, type InternationalSubscriptionCheckout, InternationalSubscriptionCheckoutMode, type InternationalSubscriptionOffer, type IsoDate, ItdAbortError, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, 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 LastSeen, LastSeenUnit, type LazyFile, type LegalDocument, type LegalDocumentBlock, LegalDocumentBlockType, LegalDocumentScope, type LegalDocumentSummary, type LegalDocumentVersion, type LegalResource, type LikeResult, LikesVisibility, type Listener, LogLevel, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, type MessageAllowlistMembership, type MessageAllowlistParams, type MessageAllowlistUser, type MessageBuilder, type MessageInput, type MessageMarkup, type MessageMarkupBuilder, type MessageMarkupContent, type MessageMarkupInput, 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, OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type OriginalPost, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, PaymentMethodType, type PendingContactChange, type PhoneAuthResource, type PhoneConfig, type PhoneConsent, type PhoneDelivery, type PhoneFlowInput, type PhoneFlowResume, type PhoneFlowStart, type PhoneLoginInput, type PhoneLoginResult, type PhoneRegion, type PhoneReverseOptions, type PhoneReverseStatus, 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 PostBase, type PostBuilder, type PostCounters, 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, type QrLoginStreamEvent, type QrLoginStreamInput, type QrLoginStreamListener, type QrLoginStreamOptions, type QrLoginTarget, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, RateLimitErrorScope, type RateLimitOptions, RateLimitPacing, 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 SendChatMessageInput, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type SetChatReactionsInput, 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 ShopOrderBase, 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, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionBindCardOptions, type SubscriptionCheckoutInput, SubscriptionCheckoutKind, type SubscriptionCheckoutReleaseInput, type SubscriptionCheckoutState, SubscriptionCheckoutStatus, type SubscriptionCheckoutSubject, type SubscriptionCheckoutTerms, type SubscriptionGift, type SubscriptionGiftInput, type SubscriptionOffer, type SubscriptionPayOptions, type SubscriptionPayment, type SubscriptionPaymentInput, SubscriptionPaymentProvider, type SubscriptionQuote, type SubscriptionRenewalAgreement, type SubscriptionResource, type SubscriptionState, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, TimeoutBudget, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UpdateResultBase, type UploadOptions, type UploadedBannerDrawing, type UploadedFile, type UrlFile, type UrlFileOptions, type UserBase, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsernameAvailability, UsernameUnavailableReason, 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, 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, message, messageMarkup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { A as isItdForbiddenError, C as ItdValidationError, D as isItdConflictError, E as isItdAuthError, F as isItdStateError, I as isItdValidationError, M as isItdPhoneVerificationError, N as isItdRateLimitError, O as isItdError, P as isItdServerError, S as ItdTimeoutError, T as isItdApiError, _ as ItdNotFoundError, a as ItdAbortError, b as ItdServerError, c as ItdAuthError, d as ItdError, f as ItdErrorKind, g as ItdNetworkError, h as ItdForbiddenError, i as requireOptionalBoolean, j as isItdNotFoundError, k as isItdFileError, l as ItdConfigError, m as ItdFileErrorReason, n as isRecord, o as ItdApiError, p as ItdFileError, s as ItdApiErrorKind, t as isObjectLike, u as ItdConflictError, v as ItdPhoneVerificationError, w as TimeoutBudget, x as ItdStateError, y as ItdRateLimitError } from "./shared/validate-BQzL_oJ4.js";
2
- import { A as createFeatureHost, B as VIDEO_MIME_TYPES, C as LegalDocumentBlockType, D as createStatusFeature, E as isBuilder, F as Paginator, G as ChatMediaCategory, H as toDate, I as mapPage, K as ChatReactionType, L as ALLOWED_MIME_TYPES, M as ChatsResource, N as BaseResource, O as AccountLifecycleResource, P as PaginationMode, R as AUDIO_MIME_TYPES, S as parseMarkdown, T as comment, U as utcStampToIso, V as normalizeChatUpdate, W as ChatActionType, _ as post, a as createShopOrderAccessStorage, b as markup, c as ShopOrderStatus, d as isMyProfile, f as BannerDrawingTool, g as report, h as createResources, i as MemoryShopOrderAccessStorage, j as ExtensibleOperationCatalog, k as NotificationsResource, l as ShopProductCategory, m as fromUrl, n as renderSpans, o as statusDays, p as fromStream, q as ChatUpdateType, r as createShopFeature, s as ShopConsentKind, t as SpanRenderFormat, u as ShopProductStatus, v as poll, w as LegalDocumentScope, x as parseHtml, y as autoSpans, z as IMAGE_MIME_TYPES } from "./shared/render-B6sj0OJ5.js";
3
- import { _ as Emitter, a as EVENT_OPERATIONS, c as resolveNotificationEventsOptions, d as NotificationUpdateType, f as createParser, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, l as setNotificationEventsConnectGuard, m as EventChannel, n as EventRouter, o as NotificationEvents, p as WebSocketTransport, r as NotificationEventsClient, s as NotificationEventsTransport, t as EventComposer, u as NotificationUpdateOrigin, v as reportListenerError } from "./shared/events-DXLOZXNe.js";
4
- import { $ as CommentSort, A as passthroughOperation, B as operationRetrySafety, C as RateLimitPacing, F as OPERATIONS, H as DEFAULT_RATE_LIMIT_BUCKET, I as defineBuiltInOperation, J as AccessType, L as isBuiltInOperationId, M as createRequestAbortScope, N as requestAbortError, Q as CaptchaType, R as operationBucket, S as LIBRARY_VERSION, T as pickArray, U as OperationMethod, V as BUCKET_LIMITS, W as RetrySafety, X as CaptchaChoice, Y as AttachmentType, Z as CaptchaField, _ as orderPluginDefinitions, _t as WallAccess, at as LastSeenUnit, b as STATUS_SERVICE, ct as NotificationType, d as ITD_CATALOG, dt as ReportTargetType, et as EventChannelStatus, f as createClientRuntime, ft as ServiceState, g as assertPluginRemovable, gt as ViewSource, h as RequestQueuePool, ht as ViewReason, it as ItdErrorCode, j as voidOperation, k as pickString, l as canonicalNotificationType, lt as QrLocationPrecision, mt as UsernameUnavailableReason, n as formatNotificationText, nt as IncidentKind, o as normalizeNotification, ot as LikesVisibility, p as createApiError, pt as SpanType, rt as InteractionType, st as MessageAccess, t as resolveNotificationUrl, tt as FeedTab, u as isKnownNotificationType, ut as ReportReason, v as DEFAULT_BASE_URL, w as installAsyncDisposeFallback, x as resolveRateLimit, yt as systemClock, z as operationMethod } from "./shared/url-CY2NxyqI.js";
5
- import { D as fallbackLogger, E as LogLevel, a as isSerializedCookieEntry, i as REFRESH_COOKIE_PATH, k as resolveLogger, n as CookieJar, r as REFRESH_COOKIE, s as encodePathSegment, u as joinUrl, v as RuntimeMode, y as createDeviceId } from "./shared/cookies-Bw5HAxTB.js";
6
- import { n as copySession, r as createTokenStorage, t as MemoryTokenStorage } from "./shared/storage-Bc4lWtSj.js";
7
- import { a as scopedTokenStorage, i as isRestorableSession, n as controlledTokenStorage, r as createMultiTokenStorage, t as MemoryMultiTokenStorage } from "./shared/multi-storage-BDwZ3sOJ.js";
8
- import { c as FileTransferMode } from "./shared/options-RfX5uXP5.js";
9
- import { a as isEnumerableKeyValueStore, i as createRecordKeyValueStore, o as withCodec, r as createKeyValueStore, s as withNamespace, t as MemoryKeyValueStore } from "./shared/key-value-store-BwXlaoD4.js";
1
+ import { A as isItdFileError, C as ItdValidationError, D as isItdAuthError, E as isItdApiError, F as isItdServerError, I as isItdStateError, L as isItdValidationError, M as isItdNotFoundError, N as isItdPhoneVerificationError, O as isItdConflictError, P as isItdRateLimitError, S as ItdTimeoutError, T as TimeoutBudget, _ as ItdNotFoundError, a as ItdAbortError, b as ItdServerError, c as ItdAuthError, d as ItdError, f as ItdErrorKind, g as ItdNetworkError, h as ItdForbiddenError, i as requireOptionalBoolean, j as isItdForbiddenError, k as isItdError, l as ItdConfigError, m as ItdFileErrorReason, n as isRecord, o as ItdApiError, p as ItdFileError, s as ItdApiErrorKind, t as isObjectLike, u as ItdConflictError, v as ItdPhoneVerificationError, w as RateLimitErrorScope, x as ItdStateError, y as ItdRateLimitError } from "./shared/validate-oLSGiGwQ.js";
2
+ import { $ as ChatReactionType, A as AccountLifecycleResource, B as AUDIO_MIME_TYPES, C as poll, D as LegalDocumentScope, E as LegalDocumentBlockType, F as BaseResource, G as autoSpans, H as VIDEO_MIME_TYPES, I as PaginationMode, J as normalizeChatUpdate, K as markup, L as Paginator, M as createFeatureHost, N as ExtensibleOperationCatalog, O as comment, P as ChatsResource, Q as ChatMediaCategory, R as mapPage, S as post, T as parseMarkdown, U as message, V as IMAGE_MIME_TYPES, W as messageMarkup, X as utcStampToIso, Y as toDate, Z as ChatActionType, _ as PaymentMethodType, a as createShopOrderAccessStorage, b as SubscriptionPaymentProvider, c as ShopOrderStatus, d as isMyProfile, et as ChatUpdateType, f as BannerDrawingTool, g as InternationalSubscriptionCheckoutMode, h as createResources, i as MemoryShopOrderAccessStorage, j as NotificationsResource, k as createStatusFeature, l as ShopProductCategory, m as fromUrl, n as renderSpans, o as statusDays, p as fromStream, q as isBuilder, r as createShopFeature, s as ShopConsentKind, t as SpanRenderFormat, u as ShopProductStatus, v as SubscriptionCheckoutKind, w as parseHtml, x as report, y as SubscriptionCheckoutStatus, z as ALLOWED_MIME_TYPES } from "./shared/render-CXxr13yg.js";
3
+ import { _ as Emitter, a as EVENT_OPERATIONS, c as resolveNotificationEventsOptions, d as NotificationUpdateType, f as createParser, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, l as setNotificationEventsConnectGuard, m as EventChannel, n as EventRouter, o as NotificationEvents, p as WebSocketTransport, r as NotificationEventsClient, s as NotificationEventsTransport, t as EventComposer, u as NotificationUpdateOrigin, v as reportListenerError } from "./shared/events-CzYBo3XI.js";
4
+ import { $ as CommentSort, A as passthroughOperation, B as OperationMethod, C as RateLimitPacing, F as operationBucket, G as createRequestAbortScope, I as operationMethod, J as AccessType, K as requestAbortError, L as operationRetrySafety, M as OPERATIONS, N as defineBuiltInOperation, P as isBuiltInOperationId, Q as CaptchaType, R as BUCKET_LIMITS, S as LIBRARY_VERSION, T as pickArray, V as RetrySafety, X as CaptchaChoice, Y as AttachmentType, Z as CaptchaField, _ as orderPluginDefinitions, _t as WallAccess, at as LastSeenUnit, b as STATUS_SERVICE, ct as NotificationType, d as ITD_CATALOG, dt as ReportTargetType, et as EventChannelStatus, f as createClientRuntime, ft as ServiceState, g as assertPluginRemovable, gt as ViewSource, h as RequestQueuePool, ht as ViewReason, it as ItdErrorCode, j as voidOperation, k as pickString, l as canonicalNotificationType, lt as QrLocationPrecision, mt as UsernameUnavailableReason, n as formatNotificationText, nt as IncidentKind, o as normalizeNotification, ot as LikesVisibility, p as createApiError, pt as SpanType, rt as InteractionType, st as MessageAccess, t as resolveNotificationUrl, tt as FeedTab, u as isKnownNotificationType, ut as ReportReason, v as DEFAULT_BASE_URL, w as installAsyncDisposeFallback, x as resolveRateLimit, yt as systemClock, z as DEFAULT_RATE_LIMIT_BUCKET } from "./shared/url-ww6B39DX.js";
5
+ import { D as fallbackLogger, E as LogLevel, a as isSerializedCookieEntry, i as REFRESH_COOKIE_PATH, k as resolveLogger, n as CookieJar, r as REFRESH_COOKIE, s as encodePathSegment, u as joinUrl, v as RuntimeMode, y as createDeviceId } from "./shared/cookies-BdntFeQ5.js";
6
+ import { n as copySession, r as createTokenStorage, t as MemoryTokenStorage } from "./shared/storage-8oAVzQmF.js";
7
+ import { a as scopedTokenStorage, i as isRestorableSession, n as controlledTokenStorage, r as createMultiTokenStorage, t as MemoryMultiTokenStorage } from "./shared/multi-storage-hYW_Whkx.js";
8
+ import { c as FileTransferMode } from "./shared/options-BqQVtTmm.js";
9
+ import { a as isEnumerableKeyValueStore, i as createRecordKeyValueStore, o as withCodec, r as createKeyValueStore, s as withNamespace, t as MemoryKeyValueStore } from "./shared/key-value-store-BJdmlzkM.js";
10
10
  // src/events/chats.ts
11
- /** Поток изменений мессенджера. Доступен как `itd.chats.events` в полном клиенте. */
11
+ /** Канал событий чатов. Доступен как `itd.chats.events` в полном клиенте. */
12
12
  var ChatEvents = class {
13
13
  #channel;
14
14
  #updates;
@@ -40,8 +40,11 @@ var ChatEvents = class {
40
40
  origin,
41
41
  stream: this
42
42
  }),
43
- deliver: (update) => this.#deliverLive(update)
43
+ deliver: (update) => this.#channel.emit("update", update)
44
44
  }, options);
45
+ this.#channel.use(async ({ update }, next) => {
46
+ if (this.#acceptLiveUpdate(update)) await next();
47
+ });
45
48
  }
46
49
  /** Текущее состояние соединения. */
47
50
  get status() {
@@ -59,13 +62,17 @@ var ChatEvents = class {
59
62
  on(event, listener) {
60
63
  return this.#channel.on(event, listener);
61
64
  }
65
+ /** Добавляет обработчик обновлений WebSocket и возвращает функцию его удаления. */
66
+ use(middleware) {
67
+ return this.#channel.use(middleware);
68
+ }
62
69
  /**
63
70
  * Подключается к WebSocket и догружает пропущенные события.
64
71
  *
65
- * @param since номер последнего события (`eventSeq` из списка чатов или журнала)
72
+ * @param since номер последнего события. Возьмите `eventSeq` из списка чатов или события.
66
73
  */
67
74
  async connect(since) {
68
- if (since !== void 0 && !isSequence(since)) throw new ItdConfigError("Позиция журнала чатов должна быть целым неотрицательным числом");
75
+ if (since !== void 0 && !isSequence(since)) throw new ItdConfigError("Номер события должен быть целым неотрицательным числом");
69
76
  if (!this.#channel.active && since !== void 0) this.#position = since;
70
77
  return this.#channel.connect();
71
78
  }
@@ -78,7 +85,7 @@ var ChatEvents = class {
78
85
  drain() {
79
86
  return this.#channel.drain();
80
87
  }
81
- /** Читает журнал до конца, пока движок буферизует события открытого сокета. */
88
+ /** Загружает пропущенные события, пока новые события WebSocket ждут обработки. */
82
89
  async #sync(signal) {
83
90
  while (this.#position !== void 0 && !signal.aborted) {
84
91
  const since = this.#position;
@@ -90,10 +97,10 @@ var ChatEvents = class {
90
97
  return;
91
98
  }
92
99
  const next = page.nextEventSeq;
93
- if (!isSequence(next) || next < since) throw new Error("Некорректная позиция в журнале чатов");
100
+ if (!isSequence(next) || next < since) throw new Error("Сервер вернул некорректный номер следующего события");
94
101
  for (const update of page.events) {
95
102
  if (signal.aborted) return;
96
- this.#publish(update);
103
+ if (this.#advance(update)) this.#channel.emit("update", update);
97
104
  }
98
105
  if (signal.aborted) return;
99
106
  this.#position = Math.max(this.#position ?? since, next);
@@ -102,27 +109,27 @@ var ChatEvents = class {
102
109
  if (!page.events.length || next === since) return;
103
110
  }
104
111
  }
105
- /** При разрыве последовательности восстанавливает поток с последней позиции. */
106
- #deliverLive(update) {
112
+ /** Учитывает кадр до пользовательских обработчиков и запускает догрузку при пропуске. */
113
+ #acceptLiveUpdate(update) {
107
114
  const sequence = update.eventSeq;
108
115
  if (isSequence(sequence) && this.#position !== void 0 && sequence > this.#position) {
109
116
  const count = isSequence(update.eventSeqCount) ? Math.max(1, update.eventSeqCount) : 1;
110
117
  if (sequence - this.#position !== count) {
111
118
  this.#channel.recover(/* @__PURE__ */ new Error("Пропущены события чата"));
112
- return;
119
+ return false;
113
120
  }
114
121
  }
115
- this.#publish(update);
122
+ return this.#advance(update);
116
123
  }
117
124
  /** Пропускает повторные события из REST и буфера WebSocket. */
118
- #publish(update) {
125
+ #advance(update) {
119
126
  const sequence = update.eventSeq;
120
127
  if (isSequence(sequence)) {
121
- if (this.#position !== void 0 && sequence <= this.#position) return;
128
+ if (this.#position !== void 0 && sequence <= this.#position) return false;
122
129
  this.#position = sequence;
123
130
  this.#channel.confirmRecovery();
124
131
  }
125
- this.#channel.emit("update", update);
132
+ return true;
126
133
  }
127
134
  };
128
135
  function isSequence(value) {
@@ -3405,6 +3412,6 @@ const ContactKind = Object.freeze({
3405
3412
  Email: "email",
3406
3413
  Phone: "phone"
3407
3414
  });
3408
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, AttachmentType, BUCKET_LIMITS, BannerDrawingTool, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, CaptchaType, ChatActionType, ChatEvents, ChatMediaCategory, ChatReactionType, ChatUpdateType, ChatsResource, CommentSort, ContactKind, ContactProofMethod, 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, LastSeenUnit, LegalDocumentBlockType, LegalDocumentScope, LikesVisibility, LogLevel, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, OPERATIONS, OperationMethod, PaginationMode, Paginator, PhoneDeliveryChannel, PhoneLoginStep, PhoneReverseState, PhoneVerificationMethod, QrLocationPrecision, QrLoginStatus, QrLoginStreamStatus, RateLimitPacing, RateLimitScope, ReportReason, ReportTargetType, RetrySafety, RuntimeMode, STATUS_SERVICE, ServiceState, ShopConsentKind, ShopOrderStatus, ShopProductCategory, ShopProductStatus, SignInStatus, SpanRenderFormat, SpanType, TURNSTILE_SITE_KEY, TimeoutBudget, UnauthorizedStreamError, UsernameUnavailableReason, 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 };
3415
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, AttachmentType, BUCKET_LIMITS, BannerDrawingTool, CAPTCHA_FIELDS, CaptchaChoice, CaptchaField, CaptchaType, ChatActionType, ChatEvents, ChatMediaCategory, ChatReactionType, ChatUpdateType, ChatsResource, CommentSort, ContactKind, ContactProofMethod, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, EventChannel, EventChannelStatus, EventComposer, EventRouter, FeedTab, FileTransferMode, IMAGE_MIME_TYPES, IncidentKind, InteractionType, InternationalSubscriptionCheckoutMode, ItdAbortError, ItdAccounts, ItdApiError, ItdApiErrorKind, ItdAuthError, ItdClient, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, LastSeenUnit, LegalDocumentBlockType, LegalDocumentScope, LikesVisibility, LogLevel, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, MessageAccess, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, OPERATIONS, OperationMethod, PaginationMode, Paginator, PaymentMethodType, PhoneDeliveryChannel, PhoneLoginStep, PhoneReverseState, PhoneVerificationMethod, QrLocationPrecision, QrLoginStatus, QrLoginStreamStatus, RateLimitErrorScope, RateLimitPacing, RateLimitScope, ReportReason, ReportTargetType, RetrySafety, RuntimeMode, STATUS_SERVICE, ServiceState, ShopConsentKind, ShopOrderStatus, ShopProductCategory, ShopProductStatus, SignInStatus, SpanRenderFormat, SpanType, SubscriptionCheckoutKind, SubscriptionCheckoutStatus, SubscriptionPaymentProvider, TURNSTILE_SITE_KEY, TimeoutBudget, UnauthorizedStreamError, UsernameUnavailableReason, 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, message, messageMarkup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
3409
3416
 
3410
3417
  //# sourceMappingURL=index.js.map