itd-api 0.12.0 → 0.12.1
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.
- package/dist/events/index.cjs +2 -2
- package/dist/events/index.d.cts +2 -2
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/rest/index.cjs +2 -2
- package/dist/rest/index.d.cts +3 -3
- package/dist/rest/index.d.ts +3 -3
- package/dist/rest/index.js +2 -2
- package/dist/shared/{events-BpLAIiMj.d.ts → events-9215JDDd.d.ts} +2 -2
- package/dist/shared/{events-C2DJZyI0.cjs → events-BKyxZQNw.cjs} +2 -2
- package/dist/shared/{events-C2DJZyI0.cjs.map → events-BKyxZQNw.cjs.map} +1 -1
- package/dist/shared/{events-9L0Fonak.d.cts → events-FaXfdle0.d.cts} +2 -2
- package/dist/shared/{events-D1BfefBT.js → events-_iYo8EP5.js} +2 -2
- package/dist/shared/{events-D1BfefBT.js.map → events-_iYo8EP5.js.map} +1 -1
- package/dist/shared/{render-CrGXcj6L.cjs → render-BQvC5UxF.cjs} +20 -4
- package/dist/shared/render-BQvC5UxF.cjs.map +1 -0
- package/dist/shared/{render-UsQ1hb2U.d.ts → render-BS09ygcy.d.ts} +42 -60
- package/dist/shared/{render-D3vSEbLL.js → render-CFoF2WaH.js} +20 -4
- package/dist/shared/render-CFoF2WaH.js.map +1 -0
- package/dist/shared/{render-Dzw3KeN5.d.cts → render-X2JCo1JS.d.cts} +42 -60
- package/dist/shared/{url-Dg1u29cu.js → url-CdT4lMxQ.js} +2 -2
- package/dist/shared/{url-Dg1u29cu.js.map → url-CdT4lMxQ.js.map} +1 -1
- package/dist/shared/{url-C9YADYNg.d.ts → url-_R0oJ7gE.d.cts} +24 -29
- package/dist/shared/{url-C9YADYNg.d.cts → url-_R0oJ7gE.d.ts} +24 -29
- package/dist/shared/{url-B21Bdmw_.cjs → url-ioIaywDi.cjs} +2 -2
- package/dist/shared/{url-B21Bdmw_.cjs.map → url-ioIaywDi.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/shared/render-CrGXcj6L.cjs.map +0 -1
- package/dist/shared/render-D3vSEbLL.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as RawRequestOptions, C as UserSummary, Cn as Loose, Ct as ClientHooks, Dn as ReportReason, En as QrLocationPrecision, Et as PaginationOptions, Gt as Logger, Jt as BuiltInOperationId, Kt as ItdClock, Mn as ViewReason, Nn as ViewSource, Nt as RequestOptions, On as ReportTargetType, Ot as RateLimitBucketOverride, Qt as OperationId, S as UserBase, St as RetrySafety, Tt as OperationRequestOptions, Vt as ServiceDefinition, _ as PinsResult, _n as FeedTab, b as PublicProfile, bt as OperationMetadata, c as NotificationSettings, cn as UserId, ct as ClientConnection, dn as AttachmentType, f as Author, h as MyProfile, hn as CommentSort, kn as ServiceState, ln as UserRef, lt as AuthIdentity, on as IsoDate, p as FollowResult, s as Notification, sn as Span, st as Unsubscribe, v as PrivacySettings, vn as IncidentKind, vt as OperationAnnotations, w as UsernameAvailability, xt as OperationMethod, y as Profile, yn as InteractionType, yt as OperationContract, zt as QueryParams } from "./url-_R0oJ7gE.cjs";
|
|
2
2
|
import { c as LazyFile, d as UrlFileOptions, i as FileStreamContent, l as StreamFile, n as FileContext, o as FileTransferMode, r as FileInput, s as FromStreamOptions } from "./contracts-BoT7msmq.cjs";
|
|
3
3
|
import { r as KeyValueStore } from "./key-value-store-COZaNHZS.cjs";
|
|
4
4
|
//#region src/core/cookies.d.ts
|
|
@@ -1014,41 +1014,41 @@ interface Poll {
|
|
|
1014
1014
|
votedOptionIds: string[];
|
|
1015
1015
|
createdAt: IsoDate;
|
|
1016
1016
|
}
|
|
1017
|
-
/**
|
|
1018
|
-
|
|
1019
|
-
* без признаков относительно текущего пользователя и без собственного `originalPost`.
|
|
1020
|
-
*/
|
|
1021
|
-
interface OriginalPost {
|
|
1022
|
-
id: string;
|
|
1023
|
-
content: string;
|
|
1024
|
-
/** Разметка текста, см. {@link Span}. */
|
|
1025
|
-
spans: Span[];
|
|
1026
|
-
author: Author;
|
|
1027
|
-
attachments: Attachment[];
|
|
1017
|
+
/** Счётчики поста. */
|
|
1018
|
+
interface PostCounters {
|
|
1028
1019
|
likesCount: number;
|
|
1029
1020
|
commentsCount: number;
|
|
1030
1021
|
repostsCount: number;
|
|
1031
1022
|
viewsCount: number;
|
|
1032
|
-
/** Удалён ли пост. */
|
|
1033
|
-
isDeleted: boolean;
|
|
1034
1023
|
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1035
1024
|
dominantEmoji?: string | null;
|
|
1036
|
-
createdAt: IsoDate;
|
|
1037
|
-
/** Служебная метка показа для телеметрии, см. {@link Post.vs}. */
|
|
1038
|
-
vs?: string;
|
|
1039
1025
|
}
|
|
1040
|
-
/**
|
|
1041
|
-
interface
|
|
1026
|
+
/** Общая часть поста ленты и поста, на который ссылается репост. */
|
|
1027
|
+
interface PostBase extends PostCounters {
|
|
1042
1028
|
id: string;
|
|
1043
1029
|
content: string;
|
|
1044
1030
|
/** Разметка текста. Передаётся без изменений, см. {@link Span}. */
|
|
1045
1031
|
spans: Span[];
|
|
1046
1032
|
author: Author;
|
|
1047
1033
|
attachments: Attachment[];
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1034
|
+
createdAt: IsoDate;
|
|
1035
|
+
/**
|
|
1036
|
+
* Служебная метка показа для телеметрии.
|
|
1037
|
+
*
|
|
1038
|
+
* Нужна только эндпоинтам `itd.telemetry.*`. В остальных случаях игнорируйте.
|
|
1039
|
+
*/
|
|
1040
|
+
vs?: string;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Пост, на который ссылается репост. Сервер отдаёт его урезанным и только на один уровень:
|
|
1044
|
+
* без признаков относительно текущего пользователя и без собственного `originalPost`.
|
|
1045
|
+
*/
|
|
1046
|
+
interface OriginalPost extends PostBase {
|
|
1047
|
+
/** Удалён ли пост. */
|
|
1048
|
+
isDeleted: boolean;
|
|
1049
|
+
}
|
|
1050
|
+
/** Пост ленты, стены или профиля. */
|
|
1051
|
+
interface Post extends PostBase {
|
|
1052
1052
|
/** Чья это стена, если пост опубликован не у себя. */
|
|
1053
1053
|
wallRecipientId: UserId | null;
|
|
1054
1054
|
/** Владелец стены. Приходит не во всех ответах. */
|
|
@@ -1064,17 +1064,8 @@ interface Post {
|
|
|
1064
1064
|
/** Пост, который репостнули, если это репост. `null` у обычного поста. */
|
|
1065
1065
|
originalPost?: OriginalPost | null;
|
|
1066
1066
|
poll?: Poll | null;
|
|
1067
|
-
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1068
|
-
dominantEmoji?: string | null;
|
|
1069
1067
|
/** Когда пост отредактировали. `null`, если не редактировали. */
|
|
1070
1068
|
editedAt?: IsoDate | null;
|
|
1071
|
-
createdAt: IsoDate;
|
|
1072
|
-
/**
|
|
1073
|
-
* Служебная метка показа для телеметрии.
|
|
1074
|
-
*
|
|
1075
|
-
* Нужна только эндпоинтам `itd.telemetry.*`. В остальных случаях игнорируйте.
|
|
1076
|
-
*/
|
|
1077
|
-
vs?: string;
|
|
1078
1069
|
/**
|
|
1079
1070
|
* Топовые комментарии. Приходят только в ответе `GET /api/posts/{id}`.
|
|
1080
1071
|
*
|
|
@@ -1083,11 +1074,7 @@ interface Post {
|
|
|
1083
1074
|
comments?: Comment[];
|
|
1084
1075
|
}
|
|
1085
1076
|
/** На чей комментарий дан ответ. */
|
|
1086
|
-
interface CommentReplyTo {
|
|
1087
|
-
id: string;
|
|
1088
|
-
username: string;
|
|
1089
|
-
displayName: string;
|
|
1090
|
-
}
|
|
1077
|
+
interface CommentReplyTo extends UserBase {}
|
|
1091
1078
|
/** Комментарий к посту или ответ на комментарий. */
|
|
1092
1079
|
interface Comment {
|
|
1093
1080
|
id: string;
|
|
@@ -1114,19 +1101,19 @@ interface Comment {
|
|
|
1114
1101
|
/** Заполнено только у ответов. */
|
|
1115
1102
|
replyTo?: CommentReplyTo | null;
|
|
1116
1103
|
}
|
|
1117
|
-
/**
|
|
1118
|
-
interface
|
|
1104
|
+
/** Общая часть компактных ответов редактирования поста и комментария. */
|
|
1105
|
+
interface UpdateResultBase {
|
|
1119
1106
|
id: string;
|
|
1120
1107
|
content: string;
|
|
1108
|
+
/** Когда сохранена правка. */
|
|
1109
|
+
editedAt: IsoDate;
|
|
1110
|
+
}
|
|
1111
|
+
/** Компактный ответ редактирования поста. */
|
|
1112
|
+
interface PostUpdateResult extends UpdateResultBase {
|
|
1121
1113
|
spans: Span[];
|
|
1122
|
-
updatedAt: IsoDate;
|
|
1123
1114
|
}
|
|
1124
1115
|
/** Компактный ответ редактирования комментария. */
|
|
1125
|
-
interface CommentUpdateResult {
|
|
1126
|
-
id: string;
|
|
1127
|
-
content: string;
|
|
1128
|
-
editedAt: IsoDate;
|
|
1129
|
-
}
|
|
1116
|
+
interface CommentUpdateResult extends UpdateResultBase {}
|
|
1130
1117
|
/** Хэштег. */
|
|
1131
1118
|
interface Hashtag {
|
|
1132
1119
|
id: string;
|
|
@@ -1136,12 +1123,8 @@ interface Hashtag {
|
|
|
1136
1123
|
postsCount: number;
|
|
1137
1124
|
}
|
|
1138
1125
|
/** Счётчики поста из `itd.posts.stats()`. */
|
|
1139
|
-
interface PostStats {
|
|
1126
|
+
interface PostStats extends PostCounters {
|
|
1140
1127
|
id: string;
|
|
1141
|
-
likesCount: number;
|
|
1142
|
-
commentsCount: number;
|
|
1143
|
-
repostsCount: number;
|
|
1144
|
-
viewsCount: number;
|
|
1145
1128
|
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1146
1129
|
dominantEmoji: string | null;
|
|
1147
1130
|
}
|
|
@@ -2174,14 +2157,17 @@ declare const ShopOrderStatus: Readonly<{
|
|
|
2174
2157
|
readonly Expired: "expired";
|
|
2175
2158
|
}>;
|
|
2176
2159
|
type ShopOrderStatus = Loose<(typeof ShopOrderStatus)[keyof typeof ShopOrderStatus]>;
|
|
2177
|
-
/**
|
|
2178
|
-
interface
|
|
2160
|
+
/** Общая часть заказа в списке и оформленного заказа. */
|
|
2161
|
+
interface ShopOrderBase {
|
|
2179
2162
|
number: string;
|
|
2180
|
-
titles: string[];
|
|
2181
2163
|
status: ShopOrderStatus;
|
|
2182
2164
|
total: number;
|
|
2183
2165
|
createdAt: IsoDate;
|
|
2184
2166
|
}
|
|
2167
|
+
/** Заказ в списке заказов. */
|
|
2168
|
+
interface ShopOrderSummary extends ShopOrderBase {
|
|
2169
|
+
titles: string[];
|
|
2170
|
+
}
|
|
2185
2171
|
/** Товар в оформленном заказе. */
|
|
2186
2172
|
interface ShopOrderItem {
|
|
2187
2173
|
slug: string;
|
|
@@ -2203,17 +2189,13 @@ interface ShopOrderSupport {
|
|
|
2203
2189
|
telegram?: string | undefined;
|
|
2204
2190
|
}
|
|
2205
2191
|
/** Оформленный заказ. */
|
|
2206
|
-
interface ShopOrder {
|
|
2207
|
-
number: string;
|
|
2208
|
-
status: ShopOrderStatus;
|
|
2209
|
-
createdAt: IsoDate;
|
|
2192
|
+
interface ShopOrder extends ShopOrderBase {
|
|
2210
2193
|
payment: {
|
|
2211
2194
|
pending: boolean;
|
|
2212
2195
|
};
|
|
2213
2196
|
items: ShopOrderItem[];
|
|
2214
2197
|
itemsTotal: number;
|
|
2215
2198
|
shipping: number;
|
|
2216
|
-
total: number;
|
|
2217
2199
|
delivery: ShopOrderDelivery;
|
|
2218
2200
|
track?: string | null | undefined;
|
|
2219
2201
|
comment?: string | null | undefined;
|
|
@@ -2837,5 +2819,5 @@ interface RenderSpansOptions {
|
|
|
2837
2819
|
*/
|
|
2838
2820
|
declare function renderSpans(content: string, spans?: readonly Span[] | null | undefined, options?: RenderSpansOptions): string;
|
|
2839
2821
|
//#endregion
|
|
2840
|
-
export { ShopConsentContext as $,
|
|
2841
|
-
//# sourceMappingURL=render-
|
|
2822
|
+
export { ShopConsentContext as $, NotificationListParams as $n, autoSpans as $t, DwellEntry as A, Poll as An, PreparedStreamSource as Ar, ReportInput as At, ViewTrackerInput as B, comment as Bn, post as Bt, fromStream as C, Comment as Cn, FeatureInstallation as Cr, ShopRecipient as Ct, UpdateProfileInput as D, LikeResult as Dn, FileResolver as Dr, SearchResult as Dt, UpdatePrivacyInput as E, Hashtag as En, ManagedClientResource as Er, SearchResource as Et, TelemetryClock as F, PostStats as Fn, UserPostsParams as Ft, ShopConsentsResource as G, CreatePollInput as Gn, parseHtml as Gt, SubscriptionResource as H, ItdBuilder as Hn, PollInput as Ht, TelemetryOptions as I, PostUpdateResult as In, CreatePostInput as It, ShopOrdersResource as J, UpdatePostInput as Jn, MarkupBuilder as Jt, ShopDeliveryResource as K, CreatePostData as Kn, parseMarkdown as Kt, TelemetryResource as L, UpdateResultBase as Ln, PostBuilder as Lt, PhotoOpenInput as M, Post as Mn, ResolveFileOptions as Mr, CommentsParams as Mt, TelemetryBatch as N, PostBase as Nn, HttpClient as Nr, FeedParams as Nt, UserListParams as O, OriginalPost as On, PreparedBufferSource as Or, ReportsResource as Ot, TelemetryBatchOptions as P, PostCounters as Pn, CookieJar as Pr, PostsResource as Pt, ShopConsent as Q, Subscription as Qn, TextMarkup as Qt, VideoProgressInput as R, CommentBuilder as Rn, PostInput as Rt, VideoMimeType as S, Attachment as Sn, FeatureContext as Sr, ShopProductStatus as St, VerificationResource as T, CommentUpdateResult as Tn, FeatureRequestOptions as Tr, ShopSizeChartRow as Tt, CreateShopOrderOptions as U, isBuilder as Un, poll as Ut, ViewTrackerOptions as V, BuilderInput as Vn, PollBuilder as Vt, PayShopOrderOptions as W, CreateCommentInput as Wn, ParseMarkupOptions as Wt, ShopResource as X, QrLoginTarget as Xn, MarkupInput as Xt, ShopProductsResource as Y, PaymentMethod as Yn, MarkupContent as Yt, CreateShopOrderInput as Z, Session as Zn, MarkupSpan as Zt, AllowedMimeType as _, FilesResource as _n, OperationTransformer as _r, ShopPayment as _t, ShopFeatureOptions as a, ServiceStatus as an, PaginationMode as ar, ShopDeliveryDestination as at, ImageMimeType as b, CommentsResource as bn, ClientFeature as br, ShopProductColor as bt, ShopOrderAccessStorage as c, Announcement as cn, mapPage as cr, ShopOrderAccessSession as ct, statusDays as d, Clan as dn, AttemptExtensions as dr, ShopOrderDelivery as dt, markup as en, NotificationsResource as er, ShopConsentKind as et, isMyProfile as f, Portal as fn, AttemptInterceptor as fr, ShopOrderItem as ft, AUDIO_MIME_TYPES as g, HashtagsResource as gn, OperationTransformContext as gr, ShopOrderSupport as gt, ALLOWED_MIME_TYPES as h, HashtagPostsParams as hn, OperationExtensions as hr, ShopOrderSummary as ht, ShopFeatureApi as i, PlatformStatus as in, PageState as ir, ShopDeliveryCountry as it, InteractionEntry as j, PollOption as jn, ResolveFileContext as jr, report as jt, UsersResource as k, PinPostResult as kn, PreparedFileSource as kr, ReportBuilder as kt, ShopOrderAccessStorageAdapterOptions as l, AnnouncementButton as ln, RateLimitBucketState as lr, ShopOrderAccessVerification as lt, utcStampToIso as m, VerificationStatus as mn, ClientPlugin as mr, ShopOrderStatus as mt, SpanRenderFormat as n, PlatformResource as nn, BaseResource as nr, ShopDeliveryCalculation as nt, createShopFeature as o, StatusDay as on, Paginator as or, ShopDeliveryPoint as ot, toDate as p, Report as pn, AttemptNext as pr, ShopOrderItemInput as pt, ShopOrderRequestOptions as q, CreateReportInput as qn, AutoSpansOptions as qt, renderSpans as r, PlatformVersions as rn, Page as rr, ShopDeliveryCity as rt, MemoryShopOrderAccessStorage as s, StatusIncidentLine as sn, PaginatorOptions as sr, ShopOrder as st, RenderSpansOptions as t, PlatformClientVersion as tn, UpdateNotificationSettingsInput as tr, ShopCreatedOrder as tt, createShopOrderAccessStorage as u, ChangelogEntry as un, AttemptContext as ur, ShopOrderBase as ut, AudioMimeType as v, UploadOptions as vn, PluginApi as vr, ShopProduct as vt, fromUrl as w, CommentReplyTo as wn, FeatureOperationDefinition as wr, ShopSizeChart as wt, VIDEO_MIME_TYPES as x, RepliesParams as xn, FeatureBucketDefinition as xr, ShopProductSpec as xt, IMAGE_MIME_TYPES as y, UploadedFile as yn, PluginTeardown as yr, ShopProductCategory as yt, ViewTracker as z, CommentInput as zn, PostUpdateInput as zt };
|
|
2823
|
+
//# sourceMappingURL=render-X2JCo1JS.d.cts.map
|
|
@@ -64,7 +64,7 @@ const RateLimitPacing = Object.freeze({
|
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/core/version.ts
|
|
66
66
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
67
|
-
const LIBRARY_VERSION = "0.12.
|
|
67
|
+
const LIBRARY_VERSION = "0.12.1";
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/core/config.ts
|
|
70
70
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -4264,4 +4264,4 @@ function resolveNotificationUrl(notification) {
|
|
|
4264
4264
|
//#endregion
|
|
4265
4265
|
export { OperationMethod as $, ReportTargetType as A, isBuiltInOperationId as B, ItdErrorCode as C, NotificationType as D, MessageAccess as E, ViewSource as F, DEFAULT_RATE_LIMIT_BUCKET as G, operationMethod as H, WallAccess as I, pickArray as J, createClientRuntime as K, ITD_CATALOG as L, SpanType as M, UsernameUnavailableReason as N, QrLocationPrecision as O, ViewReason as P, pickString as Q, OPERATIONS as R, InteractionType as S, LikesVisibility as T, operationRetrySafety as U, operationBucket as V, BUCKET_LIMITS as W, pickNumber as X, pickBoolean as Y, pickObject as Z, CaptchaType as _, systemClock as _t, tokenProvider as a, requestAbortError as at, FeedTab as b, normalizeNotification as c, assertPluginRemovable as ct, canonicalNotificationType as d, DEFAULT_STATUS_BASE_URL as dt, RetrySafety as et, isKnownNotificationType as f, STATUS_SERVICE as ft, CaptchaField as g, createDeadline as gt, CaptchaChoice as h, RateLimitPacing as ht, bearerToken as i, createRequestAbortScope as it, ServiceState as j, ReportReason as k, readNotificationEvent as l, orderPluginDefinitions as lt, AttachmentType as m, LIBRARY_VERSION as mt, formatNotificationText as n, identityResult as nt, passthroughOperation as o, mergeService as ot, AccessType as p, resolveRateLimit as pt, createApiError as q, anonymousAuth as r, voidResult as rt, voidOperation as s, RequestQueuePool as st, resolveNotificationUrl as t, defineOperation as tt, readUnreadCountEvent as u, DEFAULT_BASE_URL as ut, CommentSort as v, installAsyncDisposeFallback as vt, LastSeenUnit as w, IncidentKind as x, EventChannelStatus as y, defineBuiltInOperation as z };
|
|
4266
4266
|
|
|
4267
|
-
//# sourceMappingURL=url-
|
|
4267
|
+
//# sourceMappingURL=url-CdT4lMxQ.js.map
|