itd-api 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/events/index.cjs +3 -4
  2. package/dist/events/index.d.cts +3 -3
  3. package/dist/events/index.d.ts +3 -3
  4. package/dist/events/index.js +4 -4
  5. package/dist/index.cjs +283 -90
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +16 -72
  8. package/dist/index.d.ts +16 -72
  9. package/dist/index.js +284 -90
  10. package/dist/index.js.map +1 -1
  11. package/dist/node/index.cjs +3 -3
  12. package/dist/node/index.js +3 -3
  13. package/dist/rest/index.cjs +4 -5
  14. package/dist/rest/index.d.cts +3 -3
  15. package/dist/rest/index.d.ts +3 -3
  16. package/dist/rest/index.js +5 -5
  17. package/dist/shared/{events-BDdJyH2p.d.ts → events-BPxBF0gQ.d.cts} +3 -5
  18. package/dist/shared/{events-D6y0Hxyz.js → events-BzjI6pn5.js} +4 -4
  19. package/dist/shared/{events-D6y0Hxyz.js.map → events-BzjI6pn5.js.map} +1 -1
  20. package/dist/shared/{events-BqFkwwTw.cjs → events-C1FudmSe.cjs} +3 -9
  21. package/dist/shared/{events-BqFkwwTw.cjs.map → events-C1FudmSe.cjs.map} +1 -1
  22. package/dist/shared/{events-BQyH5-S0.d.cts → events-DnwfcLxS.d.ts} +3 -5
  23. package/dist/shared/{multi-storage-SoW05uzO.js → multi-storage-C3Ngtop1.js} +13 -8
  24. package/dist/shared/multi-storage-C3Ngtop1.js.map +1 -0
  25. package/dist/shared/{multi-storage-CDKLa956.cjs → multi-storage-s-fPtjoy.cjs} +13 -8
  26. package/dist/shared/multi-storage-s-fPtjoy.cjs.map +1 -0
  27. package/dist/shared/{options-DOJYtoti.cjs → options-DjEtbVaf.cjs} +2 -2
  28. package/dist/shared/{options-DOJYtoti.cjs.map → options-DjEtbVaf.cjs.map} +1 -1
  29. package/dist/shared/{options-DhgGg7Ms.js → options-i4LrKfqx.js} +2 -2
  30. package/dist/shared/{options-DhgGg7Ms.js.map → options-i4LrKfqx.js.map} +1 -1
  31. package/dist/shared/{redact-Ba5iSVYZ.js → redact-DJV0XM3n.js} +40 -15
  32. package/dist/shared/redact-DJV0XM3n.js.map +1 -0
  33. package/dist/shared/{redact-BP00URmQ.cjs → redact-lAmck1Z6.cjs} +45 -14
  34. package/dist/shared/redact-lAmck1Z6.cjs.map +1 -0
  35. package/dist/shared/{render-BU1_wex8.d.cts → render-C1F_QWYD.d.cts} +82 -19
  36. package/dist/shared/{render-sb1VJhUA.js → render-CtOpp9Pm.js} +127 -124
  37. package/dist/shared/render-CtOpp9Pm.js.map +1 -0
  38. package/dist/shared/{render-DAEeCMk9.cjs → render-Omy1drH1.cjs} +125 -128
  39. package/dist/shared/render-Omy1drH1.cjs.map +1 -0
  40. package/dist/shared/{render-CZ_-F2Tl.d.ts → render-uFW2kDxp.d.ts} +82 -19
  41. package/dist/shared/{storage-QNVxzpDB.cjs → storage-CZJZoaz9.cjs} +4 -2
  42. package/dist/shared/storage-CZJZoaz9.cjs.map +1 -0
  43. package/dist/shared/{storage-CfHKzVHf.js → storage-DiDe0PZM.js} +4 -2
  44. package/dist/shared/storage-DiDe0PZM.js.map +1 -0
  45. package/dist/shared/{url-Dsr4c5r5.js → url-3Ts6EEHQ.js} +301 -96
  46. package/dist/shared/url-3Ts6EEHQ.js.map +1 -0
  47. package/dist/shared/{url-CzHqE-Fg.cjs → url-D6wsXm1T.cjs} +301 -96
  48. package/dist/shared/url-D6wsXm1T.cjs.map +1 -0
  49. package/dist/shared/{url-CZZcyPI0.d.cts → url-DubjkRR9.d.cts} +10 -16
  50. package/dist/shared/{url-CZZcyPI0.d.ts → url-DubjkRR9.d.ts} +10 -16
  51. package/dist/web/index.cjs +1 -1
  52. package/dist/web/index.js +1 -1
  53. package/package.json +5 -5
  54. package/dist/shared/multi-storage-CDKLa956.cjs.map +0 -1
  55. package/dist/shared/multi-storage-SoW05uzO.js.map +0 -1
  56. package/dist/shared/redact-BP00URmQ.cjs.map +0 -1
  57. package/dist/shared/redact-Ba5iSVYZ.js.map +0 -1
  58. package/dist/shared/render-DAEeCMk9.cjs.map +0 -1
  59. package/dist/shared/render-sb1VJhUA.js.map +0 -1
  60. package/dist/shared/storage-CfHKzVHf.js.map +0 -1
  61. package/dist/shared/storage-QNVxzpDB.cjs.map +0 -1
  62. package/dist/shared/url-CzHqE-Fg.cjs.map +0 -1
  63. package/dist/shared/url-Dsr4c5r5.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,70 +1,10 @@
1
- import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as WallAccess, St as OperationRequestOptions, T as ItdApiErrorKind, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as ReportTargetType, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ViewReason, bt as ErrorContextHook, c as NotificationSettings, cn as EventChannelStatus, ct as Listener, d as AuthUser, dn as InteractionType, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as ItdErrorCode, ft as LIBRARY_VERSION, g as PinsResult, gn as ReportReason, gt as OperationMetadata, h as Pin, hn as NotificationType, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as FeedTab, lt as Unsubscribe, m as MyProfile, mn as Loose, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as LikesVisibility, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CommentSort, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as IncidentKind, ut as DEFAULT_BASE_URL, v as Profile, vn as ServiceState, vt as RetrySafety, w as ItdApiErrorInit, wt as RateLimitBucketContext, x as UserSummary, xn as ViewSource, xt as Logger, y as PublicProfile, yn as SpanType, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-CZZcyPI0.cjs";
2
- import { $ as ShopConsent, $n as PageState, $t as autoSpans, A as UsersResource, An as PollOption, At as ReportInput, B as ViewTracker, Bn as CreateCommentInput, Bt as post, C as VideoMimeType, Cn as Comment, Cr as ClientPlugin, Ct as ShopRecipient, D as UpdatePrivacyInput, Dn as LikeResult, Dr as PluginTeardown, Dt as SearchResult, E as VerificationResource, En as Hashtag, Er as PluginApi, Et as SearchResource, F as TelemetryBatchOptions, Fn as CommentInput, Ft as UserPostsParams, G as PayShopOrderOptions, Gn as PaymentMethod, Gt as parseHtml, H as ViewTrackerOptions, Hn as CreatePostData, Ht as PollInput, I as TelemetryClock, In as comment, It as CreatePostInput, J as ShopOrderRequestOptions, Jn as NotificationListParams, Jt as MarkupBuilder, K as ShopConsentsResource, Kn as Session, Kt as parseMarkdown, L as TelemetryOptions, Ln as BuilderInput, Lt as PostBuilder, M as InteractionEntry, Mn as PostStats, Mt as CommentsParams, N as PhotoOpenInput, Nn as PostUpdateResult, Nt as FeedParams, O as UpdateProfileInput, On as PinPostResult, Ot as ReportsResource, P as TelemetryBatch, Pn as CommentBuilder, Pt as PostsResource, Q as CreateShopOrderInput, Qn as Page, Qt as TextMarkup, R as TelemetryResource, Rn as ItdBuilder, Rt as PostInput, S as VIDEO_MIME_TYPES, Sn as Attachment, Sr as AttemptNext, St as ShopProductStatus, T as fromUrl, Tn as CommentUpdateResult, Tr as OperationTransformer, Tt as ShopSizeChartRow, U as SubscriptionResource, Un as CreateReportInput, Ut as poll, V as ViewTrackerInput, Vn as CreatePollInput, Vt as PollBuilder, W as CreateShopOrderOptions, Wn as UpdatePostInput, Wt as ParseMarkupOptions, X as ShopProductsResource, Xn as UpdateNotificationSettingsInput, Xt as MarkupInput, Y as ShopOrdersResource, Yn as NotificationsResource, Yt as MarkupContent, Z as ShopResource, Zn as BaseResource, Zt as MarkupSpan, _ as AUDIO_MIME_TYPES, _n as FilesResource, _r as ResolveFileOptions, _t as ShopPayment, a as ShopFeatureOptions, an as ServiceStatus, ar as ClientFeature, at as ShopDeliveryCountry, b as IMAGE_MIME_TYPES, bn as CommentsResource, br as AttemptExtensions, bt as ShopProductColor, c as ShopOrderAccessStorage, cn as Announcement, cr as FeatureInstallation, ct as ShopOrder, d as createShopOrderAccessStorage, dn as Clan, dr as ManagedClientResource, dt as ShopOrderDelivery, en as markup, er as PaginationMode, et as ShopConsentContext, f as statusDays, fn as Portal, fr as FileResolver, ft as ShopOrderItem, g as ALLOWED_MIME_TYPES, gn as HashtagsResource, gr as ResolveFileContext, gt as ShopOrderSupport, h as utcStampToIso, hn as HashtagPostsParams, hr as PreparedStreamSource, ht as ShopOrderSummary, i as ShopFeatureApi, in as PlatformStatus, ir as RateLimitBucketState, it as ShopDeliveryCity, j as DwellEntry, jn as Post, jt as report, k as UserListParams, kn as Poll, kt as ReportBuilder, l as ShopOrderAccessStorageAdapterOptions, ln as AnnouncementButton, lr as FeatureOperationDefinition, lt as ShopOrderAccessSession, m as toDate, mn as VerificationStatus, mr as PreparedFileSource, mt as ShopOrderStatus, n as SpanRenderFormat, nn as PlatformResource, nr as PaginatorOptions, nt as ShopCreatedOrder, o as createShopFeature, on as StatusDay, or as FeatureBucketDefinition, ot as ShopDeliveryDestination, p as isMyProfile, pn as Report, pr as PreparedBufferSource, pt as ShopOrderItemInput, q as ShopDeliveryResource, qn as Subscription, qt as AutoSpansOptions, r as renderSpans, rn as PlatformVersions, rr as mapPage, rt as ShopDeliveryCalculation, s as MemoryShopOrderAccessStorage, sn as StatusIncidentLine, sr as FeatureContext, st as ShopDeliveryPoint, t as RenderSpansOptions, tn as PlatformClientVersion, tr as Paginator, tt as ShopConsentKind, u as createMemoryShopOrderAccessStorage, un as ChangelogEntry, ur as FeatureRequestOptions, ut as ShopOrderAccessVerification, v as AllowedMimeType, vn as UploadOptions, vr as HttpClient, vt as ShopProduct, w as fromStream, wn as CommentReplyTo, wr as OperationExtensions, wt as ShopSizeChart, x as ImageMimeType, xn as RepliesParams, xr as AttemptInterceptor, xt as ShopProductSpec, y as AudioMimeType, yn as UploadedFile, yr as AttemptContext, yt as ShopProductCategory, z as VideoProgressInput, zn as isBuilder, zt as PostUpdateInput } from "./shared/render-BU1_wex8.cjs";
3
- import { $ as EventTransport, A as ReconnectOptions, B as NotificationContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventPredicate, G as NotificationEventsUpdate, H as NotificationEventFilter, I as EventSequentializer, J as NotificationUpdateOfType, K as NotificationOfType, L as EventTypeGuard, M as EventMiddleware, N as EventMiddlewareObject, O as EventSyncReason, P as EventNext, Q as UnreadCountUpdate, R as runEventMiddleware, S as EventChannel, T as EventChannelOptions, U as NotificationEventOfType, V as NotificationEventContext, W as NotificationEventSelector, X as NotificationUpdateType, Y as NotificationUpdateOrigin, Z as UnknownNotificationUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportContext, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventHandler, l as EventFilter, m as EventRouter, n as WebSocketLike, nt as UnauthorizedStreamError, o as EventComposer, p as EventRouteSelector, q as NotificationUpdate, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as EventTransportFrame, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as EventContext } from "./shared/events-BQyH5-S0.cjs";
1
+ import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as WallAccess, St as OperationRequestOptions, T as ItdApiErrorKind, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as ReportTargetType, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ViewReason, bt as ErrorContextHook, c as NotificationSettings, cn as EventChannelStatus, ct as Listener, d as AuthUser, dn as InteractionType, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as ItdErrorCode, ft as LIBRARY_VERSION, g as PinsResult, gn as ReportReason, gt as OperationMetadata, h as Pin, hn as NotificationType, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as FeedTab, lt as Unsubscribe, m as MyProfile, mn as Loose, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as LikesVisibility, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CommentSort, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as IncidentKind, ut as DEFAULT_BASE_URL, v as Profile, vn as ServiceState, vt as RetrySafety, w as ItdApiErrorInit, wt as RateLimitBucketContext, x as UserSummary, xn as ViewSource, xt as Logger, y as PublicProfile, yn as SpanType, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-DubjkRR9.cjs";
2
+ import { $ as ShopConsentContext, $n as PaginationMode, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as OperationExtensions, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginTeardown, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as PluginApi, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as Session, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationsResource, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Subscription, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as CookieJar, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as PageState, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as ClientPlugin, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformer, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as BaseResource, Xt as MarkupSpan, Y as ShopProductsResource, Yn as UpdateNotificationSettingsInput, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as Page, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as HttpClient, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as FeatureBucketDefinition, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptInterceptor, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureOperationDefinition, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as FileResolver, dt as ShopOrderItem, en as PlatformClientVersion, er as Paginator, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as PreparedBufferSource, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileOptions, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as ResolveFileContext, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as ClientFeature, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureRequestOptions, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedStreamSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as mapPage, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureContext, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedFileSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as NotificationListParams, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as RateLimitBucketState, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureInstallation, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as PaginatorOptions, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as ManagedClientResource, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as AttemptContext, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationTransformContext, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptNext, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptExtensions, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-C1F_QWYD.cjs";
3
+ import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "./shared/events-BPxBF0gQ.cjs";
4
4
  import { a as FileStreamOptions, c as LazyFile, d as UrlFileOptions, i as FileStreamContent, l as StreamFile, n as FileContext, o as FileTransferMode, r as FileInput, s as FromStreamOptions, t as FileContent, u as UrlFile } from "./shared/contracts-BoT7msmq.cjs";
5
5
  import { a as KeyValueStoreResult, c as createKeyValueStore, d as withCodec, f as withNamespace, i as KeyValueStoreKeys, l as createRecordKeyValueStore, n as KeyValueCodec, o as MemoryKeyValueStore, r as KeyValueStore, s as RecordKeyValueStoreSource, t as EnumerableKeyValueStore, u as isEnumerableKeyValueStore } from "./shared/key-value-store-COZaNHZS.cjs";
6
6
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-BQrtKon9.cjs";
7
7
  import { a as scopedTokenStorage, i as createMultiTokenStorage, n as MultiTokenStorage, r as MultiTokenStorageAdapterOptions, t as MemoryMultiTokenStorage } from "./shared/multi-storage-BEL7tcKn.cjs";
8
- //#region src/core/cookies.d.ts
9
- /**
10
- * Минимальное хранилище cookie для сред без своего.
11
- *
12
- * Refresh-токен итд.com приходит в `Set-Cookie`, а `fetch` вне браузера cookie не хранит —
13
- * без jar сессию не продлить. В браузере и React Native не используется: там cookie ведёт
14
- * сама среда.
15
- *
16
- * Реализована практическая часть RFC 6265: origin, путь, срок жизни, флаг `Secure`.
17
- * Доменные cookie для поддоменов намеренно не поддерживаются — API работает с одного хоста.
18
- */
19
- declare class CookieJar {
20
- #private;
21
- /**
22
- * Забирает `Set-Cookie` из ответа.
23
- *
24
- * Использует `Headers.getSetCookie()`, где он есть (Node 20+, undici). В остальных средах
25
- * заголовки склеены в одну строку, и её нельзя резать по запятой напрямую: запятая есть
26
- * внутри `Expires=Wed, 09 Jun 2027 …`. Разделением занимается `set-cookie-parser`.
27
- */
28
- setFromResponse(url: string, response: Response): void;
29
- /**
30
- * Кладёт cookie напрямую, минуя `Set-Cookie`.
31
- *
32
- * Нужно ровно в одном случае: пользователь передал refresh-токен строкой, а сервер читает
33
- * его только из cookie. Значение не кодируется — оно уходит в заголовок как есть.
34
- */
35
- set(url: string, name: string, value: string, path?: string): void;
36
- /** Сохраняет cookie из готовых строк `Set-Cookie`. */
37
- setFromStrings(url: string, setCookieStrings: string[]): void;
38
- /**
39
- * Собирает значение заголовка `Cookie` для запроса.
40
- *
41
- * @returns строка вида `a=1; b=2` либо `undefined`, если подходящих cookie нет
42
- */
43
- getHeader(url: string): string | undefined;
44
- /**
45
- * Значение действующей cookie.
46
- *
47
- * Нужно, чтобы забрать обновлённый refresh-токен: сервер ротирует его при каждом
48
- * продлении сессии, и сохранять надо именно новое значение.
49
- *
50
- * @param url если указан, учитываются origin, путь и флаг `Secure`
51
- */
52
- getValue(name: string, url?: string): string | undefined;
53
- /**
54
- * Есть ли действующая cookie с таким именем.
55
- *
56
- * Используется для проверки флага {@link AUTH_FLAG_COOKIE} перед запросом обновления
57
- * токена: у анонима refresh-сессии нет, и дёргать API незачем.
58
- */
59
- has(name: string, url?: string): boolean;
60
- /** Сохраняет содержимое jar для записи в {@link TokenStorage}. */
61
- serialize(): string[];
62
- /** Восстанавливает jar из результата {@link serialize}. Некорректные записи молча пропускаются. */
63
- deserialize(entries: readonly string[] | undefined): void;
64
- /** Удаляет все cookie. */
65
- clear(): void;
66
- }
67
- //#endregion
68
8
  //#region src/notifications-api.d.ts
69
9
  /** Уведомления полного клиента: REST-методы и стабильный канал событий. */
70
10
  interface NotificationsApi extends NotificationsResource {
@@ -126,7 +66,8 @@ interface SessionOptions {
126
66
  /** Где хранить сессию. По умолчанию {@link MemoryTokenStorage}. */
127
67
  storage?: TokenStorage | undefined;
128
68
  /**
129
- * Обновлять токен автоматически при ответе `401`. По умолчанию `true`.
69
+ * Обновлять токен перед истечением и восстанавливать сессию при ответе `401`.
70
+ * По умолчанию `true`.
130
71
  *
131
72
  * При `false` библиотека просто пробросит {@link ItdAuthError}, а обновлением
132
73
  * вы управляете сами через `itd.auth.refresh()`.
@@ -276,6 +217,12 @@ declare class AuthManager implements AuthProvider {
276
217
  getAuthIdentity(): Promise<AuthIdentity>;
277
218
  /** Идентификаторы аккаунта и сессии без чтения хранилища. @internal */
278
219
  getCurrentAuthIdentity(): AuthIdentity;
220
+ /** Ревизия владельца сессии для условного commit внешнего auth-flow. @internal */
221
+ revision(): number;
222
+ /** Создаёт изолированный jar для сетевого auth-flow. @internal */
223
+ createCookieFlow(inherit?: boolean): CookieJar;
224
+ /** Применяет cookies только если владелец сессии не сменился. @internal */
225
+ commitCookieFlow(cookies: CookieJar, expectedRevision: number): boolean;
279
226
  /**
280
227
  * Есть ли признак живой refresh-сессии.
281
228
  *
@@ -287,12 +234,9 @@ declare class AuthManager implements AuthProvider {
287
234
  * ответ был бы `false` даже при полностью рабочей сохранённой сессии.
288
235
  */
289
236
  hasRefreshSession(): Promise<boolean>;
290
- /**
291
- * Готовит состояние авторизации до входа запроса в очередь. Стадия `auth_preparation`.
292
- *
293
- * Загрузка хранилища, внешний источник токена и отложенный вход асинхронны, поэтому
294
- * обязаны завершиться до захвата слота очереди.
295
- */
237
+ /** Готовит внутреннюю сессию до retry исходного запроса. */
238
+ preflight(allowRefresh: boolean): Promise<void>;
239
+ /** Перед каждой попыткой перечитывает внешний источник токена. */
296
240
  prepare(): Promise<void>;
297
241
  /**
298
242
  * Заголовки уже подготовленной авторизации без чтения storage или вызова внешнего источника.
@@ -338,7 +282,7 @@ declare class AuthManager implements AuthProvider {
338
282
  */
339
283
  refresh(): Promise<string>;
340
284
  /** Сохраняет токен, полученный извне, — например после подтверждения OTP. */
341
- setAccessToken(accessToken: string): Promise<void>;
285
+ setAccessToken(accessToken: string, expectedRevision?: number, cookies?: CookieJar): Promise<boolean>;
342
286
  /** Текущая сессия целиком. Полезно, чтобы сохранить её самому. */
343
287
  getSession(): Promise<ItdSession | null>;
344
288
  /**
@@ -1090,5 +1034,5 @@ declare class ItdAccounts {
1090
1034
  */
1091
1035
  declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1092
1036
  //#endregion
1093
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, type CaptchaCredentials, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMemoryShopOrderAccessStorage, 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 };
1037
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, type CaptchaCredentials, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1094
1038
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,70 +1,10 @@
1
- import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as WallAccess, St as OperationRequestOptions, T as ItdApiErrorKind, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as ReportTargetType, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ViewReason, bt as ErrorContextHook, c as NotificationSettings, cn as EventChannelStatus, ct as Listener, d as AuthUser, dn as InteractionType, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as ItdErrorCode, ft as LIBRARY_VERSION, g as PinsResult, gn as ReportReason, gt as OperationMetadata, h as Pin, hn as NotificationType, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as FeedTab, lt as Unsubscribe, m as MyProfile, mn as Loose, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as LikesVisibility, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CommentSort, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as IncidentKind, ut as DEFAULT_BASE_URL, v as Profile, vn as ServiceState, vt as RetrySafety, w as ItdApiErrorInit, wt as RateLimitBucketContext, x as UserSummary, xn as ViewSource, xt as Logger, y as PublicProfile, yn as SpanType, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-CZZcyPI0.js";
2
- import { $ as ShopConsent, $n as PageState, $t as autoSpans, A as UsersResource, An as PollOption, At as ReportInput, B as ViewTracker, Bn as CreateCommentInput, Bt as post, C as VideoMimeType, Cn as Comment, Cr as ClientPlugin, Ct as ShopRecipient, D as UpdatePrivacyInput, Dn as LikeResult, Dr as PluginTeardown, Dt as SearchResult, E as VerificationResource, En as Hashtag, Er as PluginApi, Et as SearchResource, F as TelemetryBatchOptions, Fn as CommentInput, Ft as UserPostsParams, G as PayShopOrderOptions, Gn as PaymentMethod, Gt as parseHtml, H as ViewTrackerOptions, Hn as CreatePostData, Ht as PollInput, I as TelemetryClock, In as comment, It as CreatePostInput, J as ShopOrderRequestOptions, Jn as NotificationListParams, Jt as MarkupBuilder, K as ShopConsentsResource, Kn as Session, Kt as parseMarkdown, L as TelemetryOptions, Ln as BuilderInput, Lt as PostBuilder, M as InteractionEntry, Mn as PostStats, Mt as CommentsParams, N as PhotoOpenInput, Nn as PostUpdateResult, Nt as FeedParams, O as UpdateProfileInput, On as PinPostResult, Ot as ReportsResource, P as TelemetryBatch, Pn as CommentBuilder, Pt as PostsResource, Q as CreateShopOrderInput, Qn as Page, Qt as TextMarkup, R as TelemetryResource, Rn as ItdBuilder, Rt as PostInput, S as VIDEO_MIME_TYPES, Sn as Attachment, Sr as AttemptNext, St as ShopProductStatus, T as fromUrl, Tn as CommentUpdateResult, Tr as OperationTransformer, Tt as ShopSizeChartRow, U as SubscriptionResource, Un as CreateReportInput, Ut as poll, V as ViewTrackerInput, Vn as CreatePollInput, Vt as PollBuilder, W as CreateShopOrderOptions, Wn as UpdatePostInput, Wt as ParseMarkupOptions, X as ShopProductsResource, Xn as UpdateNotificationSettingsInput, Xt as MarkupInput, Y as ShopOrdersResource, Yn as NotificationsResource, Yt as MarkupContent, Z as ShopResource, Zn as BaseResource, Zt as MarkupSpan, _ as AUDIO_MIME_TYPES, _n as FilesResource, _r as ResolveFileOptions, _t as ShopPayment, a as ShopFeatureOptions, an as ServiceStatus, ar as ClientFeature, at as ShopDeliveryCountry, b as IMAGE_MIME_TYPES, bn as CommentsResource, br as AttemptExtensions, bt as ShopProductColor, c as ShopOrderAccessStorage, cn as Announcement, cr as FeatureInstallation, ct as ShopOrder, d as createShopOrderAccessStorage, dn as Clan, dr as ManagedClientResource, dt as ShopOrderDelivery, en as markup, er as PaginationMode, et as ShopConsentContext, f as statusDays, fn as Portal, fr as FileResolver, ft as ShopOrderItem, g as ALLOWED_MIME_TYPES, gn as HashtagsResource, gr as ResolveFileContext, gt as ShopOrderSupport, h as utcStampToIso, hn as HashtagPostsParams, hr as PreparedStreamSource, ht as ShopOrderSummary, i as ShopFeatureApi, in as PlatformStatus, ir as RateLimitBucketState, it as ShopDeliveryCity, j as DwellEntry, jn as Post, jt as report, k as UserListParams, kn as Poll, kt as ReportBuilder, l as ShopOrderAccessStorageAdapterOptions, ln as AnnouncementButton, lr as FeatureOperationDefinition, lt as ShopOrderAccessSession, m as toDate, mn as VerificationStatus, mr as PreparedFileSource, mt as ShopOrderStatus, n as SpanRenderFormat, nn as PlatformResource, nr as PaginatorOptions, nt as ShopCreatedOrder, o as createShopFeature, on as StatusDay, or as FeatureBucketDefinition, ot as ShopDeliveryDestination, p as isMyProfile, pn as Report, pr as PreparedBufferSource, pt as ShopOrderItemInput, q as ShopDeliveryResource, qn as Subscription, qt as AutoSpansOptions, r as renderSpans, rn as PlatformVersions, rr as mapPage, rt as ShopDeliveryCalculation, s as MemoryShopOrderAccessStorage, sn as StatusIncidentLine, sr as FeatureContext, st as ShopDeliveryPoint, t as RenderSpansOptions, tn as PlatformClientVersion, tr as Paginator, tt as ShopConsentKind, u as createMemoryShopOrderAccessStorage, un as ChangelogEntry, ur as FeatureRequestOptions, ut as ShopOrderAccessVerification, v as AllowedMimeType, vn as UploadOptions, vr as HttpClient, vt as ShopProduct, w as fromStream, wn as CommentReplyTo, wr as OperationExtensions, wt as ShopSizeChart, x as ImageMimeType, xn as RepliesParams, xr as AttemptInterceptor, xt as ShopProductSpec, y as AudioMimeType, yn as UploadedFile, yr as AttemptContext, yt as ShopProductCategory, z as VideoProgressInput, zn as isBuilder, zt as PostUpdateInput } from "./shared/render-CZ_-F2Tl.js";
3
- import { $ as EventTransport, A as ReconnectOptions, B as NotificationContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventPredicate, G as NotificationEventsUpdate, H as NotificationEventFilter, I as EventSequentializer, J as NotificationUpdateOfType, K as NotificationOfType, L as EventTypeGuard, M as EventMiddleware, N as EventMiddlewareObject, O as EventSyncReason, P as EventNext, Q as UnreadCountUpdate, R as runEventMiddleware, S as EventChannel, T as EventChannelOptions, U as NotificationEventOfType, V as NotificationEventContext, W as NotificationEventSelector, X as NotificationUpdateType, Y as NotificationUpdateOrigin, Z as UnknownNotificationUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportContext, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventHandler, l as EventFilter, m as EventRouter, n as WebSocketLike, nt as UnauthorizedStreamError, o as EventComposer, p as EventRouteSelector, q as NotificationUpdate, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as EventTransportFrame, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as EventContext } from "./shared/events-BDdJyH2p.js";
1
+ import { $ as isItdStateError, $t as DEFAULT_RATE_LIMIT_BUCKET, A as ItdErrorKind, At as RequestOptions, B as ItdStateError, Bt as RuntimeMode, C as ItdApiError, Ct as PaginationOptions, D as ItdConfigError, Dt as RawRequestOptions, E as ItdAuthError, Et as RateLimitOptions, F as ItdNetworkError, Ft as RuntimeOptions, G as isItdConflictError, Gt as ItdOperationDefinition, H as ItdValidationError, Ht as systemClock, I as ItdNotFoundError, It as QueryParams, J as isItdForbiddenError, Jt as isBuiltInOperationId, K as isItdError, Kt as OPERATIONS, L as ItdPhoneVerificationError, Lt as QueryValue, M as ItdFileError, Mt as RetryContext, N as ItdFileErrorReason, Nt as RetryDecisionContext, O as ItdConflictError, Ot as RequestContext, P as ItdForbiddenError, Pt as RetryOptions, Q as isItdServerError, Qt as BUCKET_LIMITS, R as ItdRateLimitError, Rt as ServiceDefinition, S as ItdAbortError, Sn as WallAccess, St as OperationRequestOptions, T as ItdApiErrorKind, Tt as RateLimitBucketOverride, U as isItdApiError, Ut as BuiltInOperationId, V as ItdTimeoutError, Vt as ItdClock, W as isItdAuthError, Wt as CustomOperationId, X as isItdPhoneVerificationError, Xt as operationMethod, Y as isItdNotFoundError, Yt as operationBucket, Z as isItdRateLimitError, Zt as operationRetrySafety, _ as PrivacySettings, _n as ReportTargetType, _t as OperationMethod, a as NotificationEvent, an as AccessType, b as SubscriptionState, bn as ViewReason, bt as ErrorContextHook, c as NotificationSettings, cn as EventChannelStatus, ct as Listener, d as AuthUser, dn as InteractionType, dt as STATUS_SERVICE, en as RateLimitBucket, et as isItdValidationError, f as Author, fn as ItdErrorCode, ft as LIBRARY_VERSION, g as PinsResult, gn as ReportReason, gt as OperationMetadata, h as Pin, hn as NotificationType, i as formatNotificationText, in as UserRef, j as ItdFieldErrors, jt as ResponseContext, k as ItdError, kt as RequestExtensions, l as Actor, ln as FeedTab, lt as Unsubscribe, m as MyProfile, mn as Loose, mt as OperationAnnotations, n as canonicalNotificationType, nn as Span, nt as AuthIdentity, o as normalizeNotification, on as AttachmentType, p as FollowResult, pn as LikesVisibility, pt as FeatureOperationId, q as isItdFileError, qt as OperationId, r as isKnownNotificationType, rn as UserId, rt as AuthProvider, s as Notification, sn as CommentSort, st as Emitter, t as resolveNotificationUrl, tn as IsoDate, tt as ClientConnection, u as AuthState, un as IncidentKind, ut as DEFAULT_BASE_URL, v as Profile, vn as ServiceState, vt as RetrySafety, w as ItdApiErrorInit, wt as RateLimitBucketContext, x as UserSummary, xn as ViewSource, xt as Logger, y as PublicProfile, yn as SpanType, yt as ClientHooks, z as ItdServerError, zt as RateLimitPacing } from "./shared/url-DubjkRR9.js";
2
+ import { $ as ShopConsentContext, $n as PaginationMode, $t as markup, A as DwellEntry, An as Post, At as report, B as ViewTrackerInput, Bn as CreatePollInput, Bt as PollBuilder, C as fromStream, Cn as CommentReplyTo, Cr as OperationExtensions, Ct as ShopSizeChart, D as UpdateProfileInput, Dn as PinPostResult, Dr as PluginTeardown, Dt as ReportsResource, E as UpdatePrivacyInput, En as LikeResult, Er as PluginApi, Et as SearchResult, F as TelemetryClock, Fn as comment, Ft as CreatePostInput, G as ShopConsentsResource, Gn as Session, Gt as parseMarkdown, H as SubscriptionResource, Hn as CreateReportInput, Ht as poll, I as TelemetryOptions, In as BuilderInput, It as PostBuilder, J as ShopOrdersResource, Jn as NotificationsResource, Jt as MarkupContent, K as ShopDeliveryResource, Kn as Subscription, Kt as AutoSpansOptions, L as TelemetryResource, Ln as ItdBuilder, Lt as PostInput, M as PhotoOpenInput, Mn as PostUpdateResult, Mt as FeedParams, N as TelemetryBatch, Nn as CommentBuilder, Nt as PostsResource, O as UserListParams, On as Poll, Or as CookieJar, Ot as ReportBuilder, P as TelemetryBatchOptions, Pn as CommentInput, Pt as UserPostsParams, Q as ShopConsent, Qn as PageState, Qt as autoSpans, R as VideoProgressInput, Rn as isBuilder, Rt as PostUpdateInput, S as VideoMimeType, Sn as Comment, Sr as ClientPlugin, St as ShopRecipient, T as VerificationResource, Tn as Hashtag, Tr as OperationTransformer, Tt as SearchResource, U as CreateShopOrderOptions, Un as UpdatePostInput, Ut as ParseMarkupOptions, V as ViewTrackerOptions, Vn as CreatePostData, Vt as PollInput, W as PayShopOrderOptions, Wn as PaymentMethod, Wt as parseHtml, X as ShopResource, Xn as BaseResource, Xt as MarkupSpan, Y as ShopProductsResource, Yn as UpdateNotificationSettingsInput, Yt as MarkupInput, Z as CreateShopOrderInput, Zn as Page, Zt as TextMarkup, _ as AllowedMimeType, _n as UploadOptions, _r as HttpClient, _t as ShopProduct, a as ShopFeatureOptions, an as StatusDay, ar as FeatureBucketDefinition, at as ShopDeliveryDestination, b as ImageMimeType, bn as RepliesParams, br as AttemptInterceptor, bt as ShopProductSpec, c as ShopOrderAccessStorage, cn as AnnouncementButton, cr as FeatureOperationDefinition, ct as ShopOrderAccessSession, d as statusDays, dn as Portal, dr as FileResolver, dt as ShopOrderItem, en as PlatformClientVersion, er as Paginator, et as ShopConsentKind, f as isMyProfile, fn as Report, fr as PreparedBufferSource, ft as ShopOrderItemInput, g as AUDIO_MIME_TYPES, gn as FilesResource, gr as ResolveFileOptions, gt as ShopPayment, h as ALLOWED_MIME_TYPES, hn as HashtagsResource, hr as ResolveFileContext, ht as ShopOrderSupport, i as ShopFeatureApi, in as ServiceStatus, ir as ClientFeature, it as ShopDeliveryCountry, j as InteractionEntry, jn as PostStats, jt as CommentsParams, k as UsersResource, kn as PollOption, kt as ReportInput, l as ShopOrderAccessStorageAdapterOptions, ln as ChangelogEntry, lr as FeatureRequestOptions, lt as ShopOrderAccessVerification, m as utcStampToIso, mn as HashtagPostsParams, mr as PreparedStreamSource, mt as ShopOrderSummary, n as SpanRenderFormat, nn as PlatformVersions, nr as mapPage, nt as ShopDeliveryCalculation, o as createShopFeature, on as StatusIncidentLine, or as FeatureContext, ot as ShopDeliveryPoint, p as toDate, pn as VerificationStatus, pr as PreparedFileSource, pt as ShopOrderStatus, q as ShopOrderRequestOptions, qn as NotificationListParams, qt as MarkupBuilder, r as renderSpans, rn as PlatformStatus, rr as RateLimitBucketState, rt as ShopDeliveryCity, s as MemoryShopOrderAccessStorage, sn as Announcement, sr as FeatureInstallation, st as ShopOrder, t as RenderSpansOptions, tn as PlatformResource, tr as PaginatorOptions, tt as ShopCreatedOrder, u as createShopOrderAccessStorage, un as Clan, ur as ManagedClientResource, ut as ShopOrderDelivery, v as AudioMimeType, vn as UploadedFile, vr as AttemptContext, vt as ShopProductCategory, w as fromUrl, wn as CommentUpdateResult, wr as OperationTransformContext, wt as ShopSizeChartRow, x as VIDEO_MIME_TYPES, xn as Attachment, xr as AttemptNext, xt as ShopProductStatus, y as IMAGE_MIME_TYPES, yn as CommentsResource, yr as AttemptExtensions, yt as ShopProductColor, z as ViewTracker, zn as CreateCommentInput, zt as post } from "./shared/render-uFW2kDxp.js";
3
+ import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "./shared/events-DnwfcLxS.js";
4
4
  import { a as FileStreamOptions, c as LazyFile, d as UrlFileOptions, i as FileStreamContent, l as StreamFile, n as FileContext, o as FileTransferMode, r as FileInput, s as FromStreamOptions, t as FileContent, u as UrlFile } from "./shared/contracts-BoT7msmq.js";
5
5
  import { a as KeyValueStoreResult, c as createKeyValueStore, d as withCodec, f as withNamespace, i as KeyValueStoreKeys, l as createRecordKeyValueStore, n as KeyValueCodec, o as MemoryKeyValueStore, r as KeyValueStore, s as RecordKeyValueStoreSource, t as EnumerableKeyValueStore, u as isEnumerableKeyValueStore } from "./shared/key-value-store-COZaNHZS.js";
6
6
  import { a as createTokenStorage, i as TokenStorageAdapterOptions, n as MemoryTokenStorage, r as TokenStorage, t as ItdSession } from "./shared/storage-CTRGT5wF.js";
7
7
  import { a as scopedTokenStorage, i as createMultiTokenStorage, n as MultiTokenStorage, r as MultiTokenStorageAdapterOptions, t as MemoryMultiTokenStorage } from "./shared/multi-storage-LkljOSzA.js";
8
- //#region src/core/cookies.d.ts
9
- /**
10
- * Минимальное хранилище cookie для сред без своего.
11
- *
12
- * Refresh-токен итд.com приходит в `Set-Cookie`, а `fetch` вне браузера cookie не хранит —
13
- * без jar сессию не продлить. В браузере и React Native не используется: там cookie ведёт
14
- * сама среда.
15
- *
16
- * Реализована практическая часть RFC 6265: origin, путь, срок жизни, флаг `Secure`.
17
- * Доменные cookie для поддоменов намеренно не поддерживаются — API работает с одного хоста.
18
- */
19
- declare class CookieJar {
20
- #private;
21
- /**
22
- * Забирает `Set-Cookie` из ответа.
23
- *
24
- * Использует `Headers.getSetCookie()`, где он есть (Node 20+, undici). В остальных средах
25
- * заголовки склеены в одну строку, и её нельзя резать по запятой напрямую: запятая есть
26
- * внутри `Expires=Wed, 09 Jun 2027 …`. Разделением занимается `set-cookie-parser`.
27
- */
28
- setFromResponse(url: string, response: Response): void;
29
- /**
30
- * Кладёт cookie напрямую, минуя `Set-Cookie`.
31
- *
32
- * Нужно ровно в одном случае: пользователь передал refresh-токен строкой, а сервер читает
33
- * его только из cookie. Значение не кодируется — оно уходит в заголовок как есть.
34
- */
35
- set(url: string, name: string, value: string, path?: string): void;
36
- /** Сохраняет cookie из готовых строк `Set-Cookie`. */
37
- setFromStrings(url: string, setCookieStrings: string[]): void;
38
- /**
39
- * Собирает значение заголовка `Cookie` для запроса.
40
- *
41
- * @returns строка вида `a=1; b=2` либо `undefined`, если подходящих cookie нет
42
- */
43
- getHeader(url: string): string | undefined;
44
- /**
45
- * Значение действующей cookie.
46
- *
47
- * Нужно, чтобы забрать обновлённый refresh-токен: сервер ротирует его при каждом
48
- * продлении сессии, и сохранять надо именно новое значение.
49
- *
50
- * @param url если указан, учитываются origin, путь и флаг `Secure`
51
- */
52
- getValue(name: string, url?: string): string | undefined;
53
- /**
54
- * Есть ли действующая cookie с таким именем.
55
- *
56
- * Используется для проверки флага {@link AUTH_FLAG_COOKIE} перед запросом обновления
57
- * токена: у анонима refresh-сессии нет, и дёргать API незачем.
58
- */
59
- has(name: string, url?: string): boolean;
60
- /** Сохраняет содержимое jar для записи в {@link TokenStorage}. */
61
- serialize(): string[];
62
- /** Восстанавливает jar из результата {@link serialize}. Некорректные записи молча пропускаются. */
63
- deserialize(entries: readonly string[] | undefined): void;
64
- /** Удаляет все cookie. */
65
- clear(): void;
66
- }
67
- //#endregion
68
8
  //#region src/notifications-api.d.ts
69
9
  /** Уведомления полного клиента: REST-методы и стабильный канал событий. */
70
10
  interface NotificationsApi extends NotificationsResource {
@@ -126,7 +66,8 @@ interface SessionOptions {
126
66
  /** Где хранить сессию. По умолчанию {@link MemoryTokenStorage}. */
127
67
  storage?: TokenStorage | undefined;
128
68
  /**
129
- * Обновлять токен автоматически при ответе `401`. По умолчанию `true`.
69
+ * Обновлять токен перед истечением и восстанавливать сессию при ответе `401`.
70
+ * По умолчанию `true`.
130
71
  *
131
72
  * При `false` библиотека просто пробросит {@link ItdAuthError}, а обновлением
132
73
  * вы управляете сами через `itd.auth.refresh()`.
@@ -276,6 +217,12 @@ declare class AuthManager implements AuthProvider {
276
217
  getAuthIdentity(): Promise<AuthIdentity>;
277
218
  /** Идентификаторы аккаунта и сессии без чтения хранилища. @internal */
278
219
  getCurrentAuthIdentity(): AuthIdentity;
220
+ /** Ревизия владельца сессии для условного commit внешнего auth-flow. @internal */
221
+ revision(): number;
222
+ /** Создаёт изолированный jar для сетевого auth-flow. @internal */
223
+ createCookieFlow(inherit?: boolean): CookieJar;
224
+ /** Применяет cookies только если владелец сессии не сменился. @internal */
225
+ commitCookieFlow(cookies: CookieJar, expectedRevision: number): boolean;
279
226
  /**
280
227
  * Есть ли признак живой refresh-сессии.
281
228
  *
@@ -287,12 +234,9 @@ declare class AuthManager implements AuthProvider {
287
234
  * ответ был бы `false` даже при полностью рабочей сохранённой сессии.
288
235
  */
289
236
  hasRefreshSession(): Promise<boolean>;
290
- /**
291
- * Готовит состояние авторизации до входа запроса в очередь. Стадия `auth_preparation`.
292
- *
293
- * Загрузка хранилища, внешний источник токена и отложенный вход асинхронны, поэтому
294
- * обязаны завершиться до захвата слота очереди.
295
- */
237
+ /** Готовит внутреннюю сессию до retry исходного запроса. */
238
+ preflight(allowRefresh: boolean): Promise<void>;
239
+ /** Перед каждой попыткой перечитывает внешний источник токена. */
296
240
  prepare(): Promise<void>;
297
241
  /**
298
242
  * Заголовки уже подготовленной авторизации без чтения storage или вызова внешнего источника.
@@ -338,7 +282,7 @@ declare class AuthManager implements AuthProvider {
338
282
  */
339
283
  refresh(): Promise<string>;
340
284
  /** Сохраняет токен, полученный извне, — например после подтверждения OTP. */
341
- setAccessToken(accessToken: string): Promise<void>;
285
+ setAccessToken(accessToken: string, expectedRevision?: number, cookies?: CookieJar): Promise<boolean>;
342
286
  /** Текущая сессия целиком. Полезно, чтобы сохранить её самому. */
343
287
  getSession(): Promise<ItdSession | null>;
344
288
  /**
@@ -1090,5 +1034,5 @@ declare class ItdAccounts {
1090
1034
  */
1091
1035
  declare function createAccounts(options?: ItdAccountsOptions): ItdAccounts;
1092
1036
  //#endregion
1093
- export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, type CaptchaCredentials, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMemoryShopOrderAccessStorage, 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 };
1037
+ export { ALLOWED_MIME_TYPES, AUDIO_MIME_TYPES, AccessType, type AccountEvents, type AccountFeature, type Actor, type AddAccountOptions, type AllowedMimeType, type Announcement, type AnnouncementButton, type Attachment, AttachmentType, type AttemptContext, type AttemptExtensions, type AttemptInterceptor, type AttemptNext, type AudioMimeType, type AuthEvents, type AuthIdentity, type AuthInput, type AuthProvider, type AuthResource, type AuthState, type AuthUser, type Author, type AutoSpansOptions, BUCKET_LIMITS, type BuilderInput, type BuiltInOperationId, type CaptchaCredentials, type ChangelogEntry, type Clan, type ClientConnection, type ClientFeature, type ClientHooks, type ClientPlugin, type Comment, type CommentBuilder, type CommentInput, type CommentReplyTo, CommentSort, type CommentUpdateResult, type CommentsParams, type CommentsResource, type CreateCommentInput, type CreatePollInput, type CreatePostData, type CreatePostInput, type CreateReportInput, type CreateShopOrderInput, type CreateShopOrderOptions, type Credentials, type CredentialsAuth, type CustomOperationId, DEFAULT_BASE_URL, DEFAULT_RATE_LIMIT_BUCKET, type DwellEntry, type EnumerableKeyValueStore, type ErrorContextHook, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, type FeatureBucketDefinition, type FeatureContext, type FeatureInstallation, type FeatureOperationDefinition, type FeatureOperationId, type FeatureRequestOptions, type FeedParams, FeedTab, type FileContent, type FileContext, type FileInput, type FileResolver, type FileStreamContent, type FileStreamOptions, FileTransferMode, type FilesResource, type FollowResult, type ForgotPasswordInput, type FromStreamOptions, type Hashtag, type HashtagPostsParams, type HashtagsResource, IMAGE_MIME_TYPES, type ImageMimeType, IncidentKind, type InteractionEntry, InteractionType, type IsoDate, ItdAbortError, ItdAccounts, type ItdAccountsOptions, ItdApiError, type ItdApiErrorInit, ItdApiErrorKind, ItdAuthError, type ItdBuilder, ItdClient, type ItdClientOptions, type ItdClock, ItdConfigError, ItdConflictError, ItdError, ItdErrorCode, ItdErrorKind, type ItdFieldErrors, ItdFileError, ItdFileErrorReason, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdPhoneVerificationError, ItdRateLimitError, ItdServerError, type ItdSession, ItdStateError, ItdTimeoutError, ItdValidationError, type KeyValueCodec, type KeyValueStore, type KeyValueStoreKeys, type KeyValueStoreResult, LIBRARY_VERSION, type LazyFile, type LikeResult, LikesVisibility, type Listener, type Logger, type Loose, type ManagedClientResource, type MarkupBuilder, type MarkupContent, type MarkupInput, type MarkupSpan, MemoryKeyValueStore, MemoryMultiTokenStorage, MemoryShopOrderAccessStorage, MemoryTokenStorage, type MultiTokenStorage, type MultiTokenStorageAdapterOptions, type MyProfile, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationListParams, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type NotificationsApi, type NotificationsResource, OPERATIONS, type OperationAnnotations, type ItdOperationDefinition as OperationDefinition, type OperationExtensions, type OperationId, type OperationMetadata, type OperationMethod, type OperationRequestOptions, type OperationTransformContext, type OperationTransformer, type Page, type PageState, PaginationMode, type PaginationOptions, Paginator, type PaginatorOptions, type ParseMarkupOptions, type PayShopOrderOptions, type PaymentMethod, type PhotoOpenInput, type Pin, type PinPostResult, type PinsResult, type PlatformClientVersion, type PlatformResource, type PlatformStatus, type PlatformVersions, type PluginApi, type PluginTeardown, type Poll, type PollBuilder, type PollInput, type PollOption, type Portal, type Post, type PostBuilder, type PostInput, type PostStats, type PostUpdateInput, type PostUpdateResult, type PostsResource, type PreparedBufferSource, type PreparedFileSource, type PreparedStreamSource, type PrivacySettings, type Profile, type PublicProfile, type QueryParams, type QueryValue, type RateLimitBucket, type RateLimitBucketContext, type RateLimitBucketOverride, type RateLimitBucketState, type RateLimitOptions, RateLimitPacing, type RateLimitScope, type RawRequestOptions, type ReconnectOptions, type RecordKeyValueStoreSource, type RemoveAccountOptions, type RenderSpansOptions, type RepliesParams, type Report, type ReportBuilder, type ReportInput, ReportReason, ReportTargetType, type ReportsResource, type RequestContext, type RequestExtensions, type RequestOptions, type ResetPasswordInput, type ResolveFileContext, type ResolveFileOptions, type ResponseContext, type RetryContext, type RetryDecisionContext, type RetryOptions, RetrySafety, RuntimeMode, type RuntimeOptions, STATUS_SERVICE, type SearchResource, type SearchResult, type ServiceDefinition, ServiceState, type ServiceStatus, type Session, type SessionOptions, type ShopConsent, type ShopConsentContext, ShopConsentKind, type ShopConsentsResource, type ShopCreatedOrder, type ShopDeliveryCalculation, type ShopDeliveryCity, type ShopDeliveryCountry, type ShopDeliveryDestination, type ShopDeliveryPoint, type ShopDeliveryResource, type ShopFeatureApi, type ShopFeatureOptions, type ShopOrder, type ShopOrderAccessSession, type ShopOrderAccessStorage, type ShopOrderAccessStorageAdapterOptions, type ShopOrderAccessVerification, type ShopOrderDelivery, type ShopOrderItem, type ShopOrderItemInput, type ShopOrderRequestOptions, ShopOrderStatus, type ShopOrderSummary, type ShopOrderSupport, type ShopOrdersResource, type ShopPayment, type ShopProduct, ShopProductCategory, type ShopProductColor, type ShopProductSpec, ShopProductStatus, type ShopProductsResource, type ShopRecipient, type ShopResource, type ShopSizeChart, type ShopSizeChartRow, type SignInResult, SignInStatus, type Span, SpanRenderFormat, SpanType, type StatusDay, type StatusIncidentLine, type StreamFile, type Subscription, type SubscriptionResource, type SubscriptionState, TURNSTILE_SITE_KEY, type TelemetryBatch, type TelemetryBatchOptions, type TelemetryClock, type TelemetryOptions, type TelemetryResource, type TextMarkup, type TokenStorage, type TokenStorageAdapterOptions, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type UpdateNotificationSettingsInput, type UpdatePostInput, type UpdatePrivacyInput, type UpdateProfileInput, type UploadOptions, type UploadedFile, type UrlFile, type UrlFileOptions, type UserId, type UserListParams, type UserPostsParams, type UserRef, type UserSummary, type UsersResource, VIDEO_MIME_TYPES, type VerificationResource, type VerificationStatus, type VideoMimeType, type VideoProgressInput, ViewReason, ViewSource, type ViewTracker, type ViewTrackerInput, type ViewTrackerOptions, WallAccess, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, autoSpans, canonicalNotificationType, comment, createAccounts, createClient, createKeyValueStore, createMultiTokenStorage, createNotificationEventsClient, createRecordKeyValueStore, createShopFeature, createShopOrderAccessStorage, createTokenStorage, formatNotificationText, fromStream, fromUrl, isBuilder, isBuiltInOperationId, isEnumerableKeyValueStore, isItdApiError, isItdAuthError, isItdConflictError, isItdError, isItdFileError, isItdForbiddenError, isItdNotFoundError, isItdPhoneVerificationError, isItdRateLimitError, isItdServerError, isItdStateError, isItdValidationError, isKnownNotificationType, isMyProfile, mapPage, markup, normalizeNotification, operationBucket, operationMethod, operationRetrySafety, parseHtml, parseMarkdown, poll, post, renderSpans, report, resolveNotificationUrl, runEventMiddleware, scopedTokenStorage, statusDays, systemClock, toDate, utcStampToIso, withCodec, withNamespace };
1094
1038
  //# sourceMappingURL=index.d.ts.map