itd-api 0.14.4 → 0.14.6
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 +4 -4
- package/dist/events/index.d.cts +2 -2
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +4 -4
- package/dist/index.cjs +61 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -35
- package/dist/index.d.ts +16 -35
- package/dist/index.js +60 -56
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +5 -5
- package/dist/node/index.js +5 -5
- package/dist/rest/index.cjs +5 -5
- package/dist/rest/index.d.cts +2 -2
- package/dist/rest/index.d.ts +2 -2
- package/dist/rest/index.js +5 -5
- package/dist/shared/{cookies-BLmvIZBD.cjs → cookies-Dv5LQp55.cjs} +2 -2
- package/dist/shared/{cookies-BLmvIZBD.cjs.map → cookies-Dv5LQp55.cjs.map} +1 -1
- package/dist/shared/{cookies-lIXHWhOd.js → cookies-mDZE19_j.js} +2 -2
- package/dist/shared/{cookies-lIXHWhOd.js.map → cookies-mDZE19_j.js.map} +1 -1
- package/dist/shared/{events-BSotWa3Z.d.cts → events-BsmLCdog.d.cts} +1 -1
- package/dist/shared/{events-B18vQGEH.d.ts → events-By7baZfE.d.ts} +1 -1
- package/dist/shared/{events-9dRKcUPZ.cjs → events-DFQSN5H6.cjs} +4 -4
- package/dist/shared/{events-9dRKcUPZ.cjs.map → events-DFQSN5H6.cjs.map} +1 -1
- package/dist/shared/{events-C7MJnuJw.js → events-DorlX-Xd.js} +4 -4
- package/dist/shared/{events-C7MJnuJw.js.map → events-DorlX-Xd.js.map} +1 -1
- package/dist/shared/{key-value-store-BJdmlzkM.js → key-value-store-BDvrZ-GQ.js} +2 -2
- package/dist/shared/{key-value-store-BJdmlzkM.js.map → key-value-store-BDvrZ-GQ.js.map} +1 -1
- package/dist/shared/{key-value-store-Bxt33ZF3.cjs → key-value-store-CeiDXFAC.cjs} +2 -2
- package/dist/shared/{key-value-store-Bxt33ZF3.cjs.map → key-value-store-CeiDXFAC.cjs.map} +1 -1
- package/dist/shared/{multi-storage-CPiHgcXH.js → multi-storage-CLPyg8_T.js} +5 -5
- package/dist/shared/{multi-storage-CPiHgcXH.js.map → multi-storage-CLPyg8_T.js.map} +1 -1
- package/dist/shared/{multi-storage-lwn-cmG6.cjs → multi-storage-DXBY9ceK.cjs} +5 -5
- package/dist/shared/{multi-storage-lwn-cmG6.cjs.map → multi-storage-DXBY9ceK.cjs.map} +1 -1
- package/dist/shared/{options-DorH4keX.js → options-Dana2yeL.js} +3 -3
- package/dist/shared/{options-DorH4keX.js.map → options-Dana2yeL.js.map} +1 -1
- package/dist/shared/{options-DYeE1hFt.cjs → options-eaq9yK8b.cjs} +3 -3
- package/dist/shared/{options-DYeE1hFt.cjs.map → options-eaq9yK8b.cjs.map} +1 -1
- package/dist/shared/{render-CWiDhdKI.d.cts → render-CZoSZHnh.d.cts} +92 -67
- package/dist/shared/{render-DOLkOCVs.cjs → render-CklT-3gT.cjs} +19 -14
- package/dist/shared/{render-DOLkOCVs.cjs.map → render-CklT-3gT.cjs.map} +1 -1
- package/dist/shared/{render-DFhMFt1f.js → render-DBt-OBbC.js} +19 -14
- package/dist/shared/{render-DFhMFt1f.js.map → render-DBt-OBbC.js.map} +1 -1
- package/dist/shared/{render-C5G2o3yL.d.ts → render-DOxbtUga.d.ts} +119 -68
- package/dist/shared/{storage-xximVWs_.cjs → storage-Bj7GKkEQ.cjs} +3 -3
- package/dist/shared/{storage-xximVWs_.cjs.map → storage-Bj7GKkEQ.cjs.map} +1 -1
- package/dist/shared/{storage-8oAVzQmF.js → storage-ChR4KC8V.js} +3 -3
- package/dist/shared/{storage-8oAVzQmF.js.map → storage-ChR4KC8V.js.map} +1 -1
- package/dist/shared/{url-vXQWF--L.cjs → url-CStw2h1g.cjs} +962 -519
- package/dist/shared/url-CStw2h1g.cjs.map +1 -0
- package/dist/shared/{url-DcjNue8i.js → url-DTDqkKpf.js} +950 -519
- package/dist/shared/url-DTDqkKpf.js.map +1 -0
- package/dist/shared/{url-ZRjcpC__.d.cts → url-Ls6HGxZl.d.cts} +881 -803
- package/dist/shared/{url-C49-l_KW.d.ts → url-U1Q7c-SD.d.ts} +502 -450
- package/dist/shared/{validate-oLSGiGwQ.js → validate-CCgIq5u0.js} +5 -4
- package/dist/shared/validate-CCgIq5u0.js.map +1 -0
- package/dist/shared/{validate-CbM3k811.cjs → validate-DQrtiCtV.cjs} +5 -4
- package/dist/shared/validate-DQrtiCtV.cjs.map +1 -0
- package/dist/web/index.cjs +3 -3
- package/dist/web/index.js +3 -3
- package/package.json +1 -1
- package/dist/shared/url-DcjNue8i.js.map +0 -1
- package/dist/shared/url-vXQWF--L.cjs.map +0 -1
- package/dist/shared/validate-CbM3k811.cjs.map +0 -1
- package/dist/shared/validate-oLSGiGwQ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as ClientConnection, Bn as ViewReason, Cn as CommentSort, Dn as InteractionType, E as UsernameAvailability, En as IncidentKind, Fn as ReportReason, G as OperationContract, I as HttpClient, In as ReportTargetType, J as RetrySafety, K as OperationMetadata, L as HttpOperationOptions, Ln as ServiceState, Pn as QrLocationPrecision, Q as PaginationOptions, S as PublicProfile, T as UserSummary, Tn as FeedTab, Tt as OperationId, Vn as ViewSource, W as OperationAnnotations, Z as OperationRequestOptions, _ as MyProfile, _n as UserRef, at as RequestOptions, b as PrivacySettings, c as NotificationSettings, dt as QueryParams, et as RateLimitBucketOverride, f as Author, g as MessageAllowlistUser, gn as UserId, h as MessageAllowlistMembership, hn as Span, j as AuthIdentity, jn as Loose, k as Unsubscribe, mn as IsoDate, nt as RawRequestOptions, p as FollowResult, pt as ServiceDefinition, q as OperationMethod, s as Notification, vt as Logger, w as UserBase, x as Profile, xt as BuiltInOperationId, y as PinsResult, yn as AttachmentType, yt as ItdClock } from "./url-Ls6HGxZl.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-DEbkC0cB.cjs";
|
|
3
3
|
import { r as KeyValueStore } from "./key-value-store-BGoSgLze.cjs";
|
|
4
4
|
/**
|
|
@@ -159,20 +159,6 @@ interface ClientPlugin {
|
|
|
159
159
|
*/
|
|
160
160
|
install(api: PluginApi): void | PluginTeardown;
|
|
161
161
|
}
|
|
162
|
-
/** Снимок одного бакета. */
|
|
163
|
-
interface RateLimitBucketState {
|
|
164
|
-
/** Origin, на котором ведётся счётчик. `undefined` — очередь без известного направления. */
|
|
165
|
-
destination: string | undefined;
|
|
166
|
-
bucket: string;
|
|
167
|
-
/** Ёмкость из последнего ответа; `undefined`, пока ответов не было. */
|
|
168
|
-
limit: number | undefined;
|
|
169
|
-
/** Остаток из последнего ответа. */
|
|
170
|
-
remaining: number | undefined;
|
|
171
|
-
/** Запросов бакета прошло в общую очередь и ещё не завершилось. */
|
|
172
|
-
active: number;
|
|
173
|
-
/** Запросов бакета ждёт своей очереди — из-за паузы или предела одновременности. */
|
|
174
|
-
pending: number;
|
|
175
|
-
}
|
|
176
162
|
/** Дополнительные требования потребителя к подготовленному источнику. */
|
|
177
163
|
interface ResolveFileOptions {
|
|
178
164
|
/** Имя, которое имеет приоритет над именем источника. */
|
|
@@ -1391,6 +1377,96 @@ interface QrLoginTarget {
|
|
|
1391
1377
|
/** Насколько точно известны координаты. */
|
|
1392
1378
|
precision?: QrLocationPrecision | null | undefined;
|
|
1393
1379
|
}
|
|
1380
|
+
/** Редакция документа, включённая в контекст согласия. */
|
|
1381
|
+
interface ConsentDocument {
|
|
1382
|
+
scope: string;
|
|
1383
|
+
slug: string;
|
|
1384
|
+
version: string;
|
|
1385
|
+
contentSha256: string;
|
|
1386
|
+
url: string;
|
|
1387
|
+
}
|
|
1388
|
+
/** Текст, редакции документов и подписанный контекст согласия. */
|
|
1389
|
+
interface ConsentContext<Flow extends string> {
|
|
1390
|
+
protocolVersion: number;
|
|
1391
|
+
contextToken: string;
|
|
1392
|
+
id: string;
|
|
1393
|
+
/** Время выдачи контекста, Unix-время в миллисекундах. */
|
|
1394
|
+
issuedAt: number;
|
|
1395
|
+
/** Срок действия контекста, Unix-время в миллисекундах. */
|
|
1396
|
+
expiresAt: number;
|
|
1397
|
+
bundle: {
|
|
1398
|
+
id: string;
|
|
1399
|
+
flow: Flow;
|
|
1400
|
+
documents: ConsentDocument[];
|
|
1401
|
+
actions: Record<string, string>;
|
|
1402
|
+
actionVersion: string;
|
|
1403
|
+
submitLabel: string;
|
|
1404
|
+
text: {
|
|
1405
|
+
text: string;
|
|
1406
|
+
document?: string;
|
|
1407
|
+
}[];
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
/** Редакция условий и необходимость согласия для текущего аккаунта. */
|
|
1411
|
+
type TermsAcceptance = {
|
|
1412
|
+
version: string;
|
|
1413
|
+
required: false;
|
|
1414
|
+
} | {
|
|
1415
|
+
version: string;
|
|
1416
|
+
required: true;
|
|
1417
|
+
consent: ConsentContext<'account_terms'>;
|
|
1418
|
+
};
|
|
1419
|
+
/** Область действия документа. */
|
|
1420
|
+
declare const LegalDocumentScope: Readonly<{
|
|
1421
|
+
readonly Social: "social";
|
|
1422
|
+
}>;
|
|
1423
|
+
type LegalDocumentScope = Loose<(typeof LegalDocumentScope)[keyof typeof LegalDocumentScope]>;
|
|
1424
|
+
/** Сведения о редакции документа в списке документов и истории редакций. */
|
|
1425
|
+
interface LegalDocumentSummary {
|
|
1426
|
+
scope: LegalDocumentScope;
|
|
1427
|
+
/** Идентификатор документа в пределах области действия. */
|
|
1428
|
+
slug: string;
|
|
1429
|
+
title: string;
|
|
1430
|
+
shortTitle: string;
|
|
1431
|
+
summary: string;
|
|
1432
|
+
/** Идентификатор редакции. Передавайте его в `legal.version()` как строку. */
|
|
1433
|
+
version: string;
|
|
1434
|
+
/** Дата вступления редакции в силу. */
|
|
1435
|
+
effectiveAt: string;
|
|
1436
|
+
/** Контрольная сумма текста, которую возвращает сервер. */
|
|
1437
|
+
contentSha256: string;
|
|
1438
|
+
/** Дата, указанная в документе. */
|
|
1439
|
+
documentDate: string;
|
|
1440
|
+
/** Дата публикации или `null`, если она не указана. */
|
|
1441
|
+
publishedAt: string | null;
|
|
1442
|
+
}
|
|
1443
|
+
/** Запись истории редакций. */
|
|
1444
|
+
interface LegalDocumentVersion extends LegalDocumentSummary {
|
|
1445
|
+
/** Действует ли эта редакция сейчас. */
|
|
1446
|
+
current: boolean;
|
|
1447
|
+
}
|
|
1448
|
+
/** Виды блоков текста документа. */
|
|
1449
|
+
declare const LegalDocumentBlockType: Readonly<{
|
|
1450
|
+
readonly Heading: "heading";
|
|
1451
|
+
readonly List: "list";
|
|
1452
|
+
readonly Lines: "lines";
|
|
1453
|
+
}>;
|
|
1454
|
+
type LegalDocumentBlockType = Loose<(typeof LegalDocumentBlockType)[keyof typeof LegalDocumentBlockType]>;
|
|
1455
|
+
/** Блок текста. Поля зависят от его вида. */
|
|
1456
|
+
interface LegalDocumentBlock {
|
|
1457
|
+
type: LegalDocumentBlockType;
|
|
1458
|
+
/** Уровень заголовка. */
|
|
1459
|
+
level?: number;
|
|
1460
|
+
/** Текст заголовка или абзаца. */
|
|
1461
|
+
text?: string;
|
|
1462
|
+
/** Пункты списка или строки многострочного блока. */
|
|
1463
|
+
items?: string[];
|
|
1464
|
+
}
|
|
1465
|
+
/** Редакция документа с полным текстом. */
|
|
1466
|
+
interface LegalDocument extends LegalDocumentSummary {
|
|
1467
|
+
/** Блоки в порядке чтения. */
|
|
1468
|
+
blocks: LegalDocumentBlock[];
|
|
1469
|
+
}
|
|
1394
1470
|
/** Деактивация и восстановление текущего аккаунта. */
|
|
1395
1471
|
declare class AccountLifecycleResource extends BaseResource {
|
|
1396
1472
|
/** Деактивирует аккаунт. Вернуть его можно через {@link restore}. */
|
|
@@ -1793,57 +1869,6 @@ declare class HashtagsResource extends BaseResource {
|
|
|
1793
1869
|
/** Перебирает посты по хэштегу. */
|
|
1794
1870
|
iteratePosts(tag: string, params?: HashtagPostsParams, options?: PaginationOptions): Paginator<Post>;
|
|
1795
1871
|
}
|
|
1796
|
-
/** Область действия документа. */
|
|
1797
|
-
declare const LegalDocumentScope: Readonly<{
|
|
1798
|
-
readonly Social: "social";
|
|
1799
|
-
}>;
|
|
1800
|
-
type LegalDocumentScope = Loose<(typeof LegalDocumentScope)[keyof typeof LegalDocumentScope]>;
|
|
1801
|
-
/** Сведения о редакции документа в списке документов и истории редакций. */
|
|
1802
|
-
interface LegalDocumentSummary {
|
|
1803
|
-
scope: LegalDocumentScope;
|
|
1804
|
-
/** Идентификатор документа в пределах области действия. */
|
|
1805
|
-
slug: string;
|
|
1806
|
-
title: string;
|
|
1807
|
-
shortTitle: string;
|
|
1808
|
-
summary: string;
|
|
1809
|
-
/** Идентификатор редакции. Передавайте его в `legal.version()` как строку. */
|
|
1810
|
-
version: string;
|
|
1811
|
-
/** Дата вступления редакции в силу. */
|
|
1812
|
-
effectiveAt: string;
|
|
1813
|
-
/** Контрольная сумма текста, которую возвращает сервер. */
|
|
1814
|
-
contentSha256: string;
|
|
1815
|
-
/** Дата, указанная в документе. */
|
|
1816
|
-
documentDate: string;
|
|
1817
|
-
/** Дата публикации или `null`, если она не указана. */
|
|
1818
|
-
publishedAt: string | null;
|
|
1819
|
-
}
|
|
1820
|
-
/** Запись истории редакций. */
|
|
1821
|
-
interface LegalDocumentVersion extends LegalDocumentSummary {
|
|
1822
|
-
/** Действует ли эта редакция сейчас. */
|
|
1823
|
-
current: boolean;
|
|
1824
|
-
}
|
|
1825
|
-
/** Виды блоков текста документа. */
|
|
1826
|
-
declare const LegalDocumentBlockType: Readonly<{
|
|
1827
|
-
readonly Heading: "heading";
|
|
1828
|
-
readonly List: "list";
|
|
1829
|
-
readonly Lines: "lines";
|
|
1830
|
-
}>;
|
|
1831
|
-
type LegalDocumentBlockType = Loose<(typeof LegalDocumentBlockType)[keyof typeof LegalDocumentBlockType]>;
|
|
1832
|
-
/** Блок текста. Поля зависят от его вида. */
|
|
1833
|
-
interface LegalDocumentBlock {
|
|
1834
|
-
type: LegalDocumentBlockType;
|
|
1835
|
-
/** Уровень заголовка. */
|
|
1836
|
-
level?: number;
|
|
1837
|
-
/** Текст заголовка или абзаца. */
|
|
1838
|
-
text?: string;
|
|
1839
|
-
/** Пункты списка или строки многострочного блока. */
|
|
1840
|
-
items?: string[];
|
|
1841
|
-
}
|
|
1842
|
-
/** Редакция документа с полным текстом. */
|
|
1843
|
-
interface LegalDocument extends LegalDocumentSummary {
|
|
1844
|
-
/** Блоки в порядке чтения. */
|
|
1845
|
-
blocks: LegalDocumentBlock[];
|
|
1846
|
-
}
|
|
1847
1872
|
/** Публичные документы ИТД и история их редакций. Доступны через `itd.legal`. */
|
|
1848
1873
|
declare class LegalResource extends BaseResource {
|
|
1849
1874
|
/**
|
|
@@ -3676,4 +3701,4 @@ interface RenderSpansOptions {
|
|
|
3676
3701
|
* Отсутствующий массив считается пустым; формат по умолчанию — HTML.
|
|
3677
3702
|
*/
|
|
3678
3703
|
declare function renderSpans(content: string, spans?: readonly Span[] | null | undefined, options?: RenderSpansOptions): string;
|
|
3679
|
-
export { InternationalSubscriptionCheckoutMode as $,
|
|
3704
|
+
export { InternationalSubscriptionCheckoutMode as $, ResolveFileContext as $i, Poll as $n, CreateCommentInput as $r, ReportsResource as $t, UsersResource as A, ChatReadCursor as Ai, Report as An, Page as Ar, ShopDeliveryDestination as At, ViewTracker as B, ChatUploadOptions as Bi, BannerDrawingPoint as Bn, MessageMarkupBuilder as Br, ShopOrderSummary as Bt, fromStream as C, ChatMessageReactions as Ci, StatusDay as Cn, NotificationsResource as Cr, ShopConsent as Ct, UpdatePrivacyInput as D, ChatReactionCatalog as Di, ChangelogEntry as Dn, ForwardChatMessagesInput as Dr, ShopDeliveryCalculation as Dt, MessageAllowlistParams as E, ChatReaction as Ei, AnnouncementButton as En, ChatsResource as Er, ShopCreatedOrder as Et, TelemetryBatchOptions as F, ChatTextEntity as Fi, FilesResource as Fn, mapPage as Fr, ShopOrderBase as Ft, SubscriptionCheckoutReleaseInput as G, FeatureInstallation as Gi, Attachment as Gn, MarkupBuilder as Gr, ShopProductColor as Gt, ViewTrackerOptions as H, ClientFeature as Hi, UploadedBannerDrawing as Hn, MessageMarkupInput as Hr, ShopPayment as Ht, TelemetryClock as I, ChatUnreadState as Ii, UploadOptions as In, MessageBuilder as Ir, ShopOrderDelivery as It, SubscriptionPayOptions as J, ManagedClientResource as Ji, CommentUpdateResult as Jn, MarkupSpan as Jr, ShopRecipient as Jt, SubscriptionCheckoutTerms as K, FeatureOperationDefinition as Ki, Comment as Kn, MarkupContent as Kr, ShopProductSpec as Kt, TelemetryOptions as L, ChatUpdate as Li, UploadedFile as Ln, MessageInput as Lr, ShopOrderItem as Lt, InteractionEntry as M, ChatReply as Mi, LegalResource as Mn, PaginationMode as Mr, ShopOrder as Mt, PhotoOpenInput as N, ChatSentMessage as Ni, HashtagPostsParams as Nn, Paginator as Nr, ShopOrderAccessSession as Nt, UpdateProfileInput as O, ChatReactionCount as Oi, Clan as On, SetChatReactionsInput as Or, ShopDeliveryCity as Ot, TelemetryBatch as P, ChatSummary as Pi, HashtagsResource as Pn, PaginatorOptions as Pr, ShopOrderAccessVerification as Pt, InternationalSubscriptionCheckout as Q, PreparedStreamSource as Qi, PinPostResult as Qn, ChatMessageContent as Qr, SearchResult as Qt, TelemetryResource as R, ChatUpdateType as Ri, BannerDrawing as Rn, message as Rr, ShopOrderItemInput as Rt, VideoMimeType as S, ChatMessage as Si, ServiceStatus as Sn, NotificationListParams as Sr, CreateShopOrderInput as St, VerificationResource as T, ChatPreview as Ti, Announcement as Tn, ChatListParams as Tr, ShopConsentKind as Tt, SubscriptionBindCardOptions as U, FeatureBucketDefinition as Ui, CommentsResource as Un, messageMarkup as Ur, ShopProduct as Ut, ViewTrackerInput as V, ChatUploadedFile as Vi, BannerDrawingTool as Vn, MessageMarkupContent as Vr, ShopOrderSupport as Vt, SubscriptionCheckoutInput as W, FeatureContext as Wi, RepliesParams as Wn, AutoSpansOptions as Wr, ShopProductCategory as Wt, SubscriptionResource as X, PreparedBufferSource as Xi, LikeResult as Xn, autoSpans as Xr, ShopSizeChartRow as Xt, SubscriptionPaymentInput as Y, FileResolver as Yi, Hashtag as Yn, TextMarkup as Yr, ShopSizeChart as Yt, InternationalSubscriptionCapability as Z, PreparedFileSource as Zi, OriginalPost as Zn, markup as Zr, SearchResource as Zt, AllowedMimeType as _, ChatHistoryPage as _i, parseMarkdown as _n, LegalDocumentSummary as _r, ShopDeliveryResource as _t, ShopFeatureOptions as a, ClientPlugin as aa, BuilderInput as ai, PostsResource as an, PostUpdateResult as ar, SubscriptionCheckoutState as at, ImageMimeType as b, ChatMediaItem as bi, PlatformVersions as bn, QrLoginTarget as br, ShopProductsResource as bt, ShopOrderAccessStorage as c, OperationTransformer as ca, ChatActionType as ci, PostBuilder as cn, CommentInput as cr, SubscriptionGift as ct, statusDays as d, ChatDeletedMessages as di, post as dn, ConsentContext as dr, SubscriptionPaymentProvider as dt, ResolveFileOptions as ea, CreatePollInput as ei, ReportBuilder as en, PollOption as er, InternationalSubscriptionOffer as et, isMyProfile as f, ChatDirectResult as fi, PollBuilder as fn, ConsentDocument as fr, SubscriptionQuote as ft, AUDIO_MIME_TYPES as g, ChatForwardedMessages as gi, parseHtml as gn, LegalDocumentScope as gr, ShopConsentsResource as gt, ALLOWED_MIME_TYPES as h, ChatFirstMessage as hi, ParseMarkupOptions as hn, LegalDocumentBlockType as hr, PayShopOrderOptions as ht, ShopFeatureApi as i, AttemptNext as ia, UpdatePostInput as ii, FeedParams as in, PostStats as ir, SubscriptionCheckoutKind as it, DwellEntry as j, ChatReadResult as ji, VerificationStatus as jn, PageState as jr, ShopDeliveryPoint as jt, UserListParams as k, ChatReactionType as ki, Portal as kn, BaseResource as kr, ShopDeliveryCountry as kt, ShopOrderAccessStorageAdapterOptions as l, PluginApi as la, ChatAttachment as li, PostInput as ln, comment as lr, SubscriptionOffer as lt, utcStampToIso as m, ChatFileLink as mi, poll as mn, LegalDocumentBlock as mr, CreateShopOrderOptions as mt, SpanRenderFormat as n, AttemptExtensions as na, CreateReportInput as ni, report as nn, PostBase as nr, PaymentMethodType as nt, createShopFeature as o, OperationExtensions as oa, ItdBuilder as oi, UserPostsParams as on, UpdateResultBase as or, SubscriptionCheckoutStatus as ot, toDate as p, ChatEditedMessage as pi, PollInput as pn, LegalDocument as pr, SubscriptionRenewalAgreement as pt, SubscriptionGiftInput as q, FeatureRequestOptions as qi, CommentReplyTo as qn, MarkupInput as qr, ShopProductStatus as qt, renderSpans as r, AttemptInterceptor as ra, SendChatMessageInput as ri, CommentsParams as rn, PostCounters as rr, Subscription as rt, MemoryShopOrderAccessStorage as s, OperationTransformContext as sa, isBuilder as si, CreatePostInput as sn, CommentBuilder as sr, SubscriptionCheckoutSubject as st, RenderSpansOptions as t, AttemptContext as ta, CreatePostData as ti, ReportInput as tn, Post as tr, PaymentMethod as tt, createShopOrderAccessStorage as u, PluginTeardown as ua, ChatChange as ui, PostUpdateInput as un, AccountLifecycleResource as ur, SubscriptionPayment as ut, AudioMimeType as v, ChatListPage as vi, PlatformClientVersion as vn, LegalDocumentVersion as vr, ShopOrderRequestOptions as vt, fromUrl as w, ChatPresence as wi, StatusIncidentLine as wn, UpdateNotificationSettingsInput as wr, ShopConsentContext as wt, VIDEO_MIME_TYPES as x, ChatMediaPage as xi, PlatformStatus as xn, Session as xr, ShopResource as xt, IMAGE_MIME_TYPES as y, ChatMediaCategory as yi, PlatformResource as yn, TermsAcceptance as yr, ShopOrdersResource as yt, VideoProgressInput as z, ChatUpdatesPage as zi, BannerDrawingOperation as zn, MessageMarkup as zr, ShopOrderStatus as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_validate = require("./validate-
|
|
2
|
-
const require_url = require("./url-
|
|
3
|
-
const require_cookies = require("./cookies-
|
|
4
|
-
const require_options = require("./options-
|
|
5
|
-
const require_key_value_store = require("./key-value-store-
|
|
1
|
+
const require_validate = require("./validate-DQrtiCtV.cjs");
|
|
2
|
+
const require_url = require("./url-CStw2h1g.cjs");
|
|
3
|
+
const require_cookies = require("./cookies-Dv5LQp55.cjs");
|
|
4
|
+
const require_options = require("./options-eaq9yK8b.cjs");
|
|
5
|
+
const require_key_value_store = require("./key-value-store-CeiDXFAC.cjs");
|
|
6
6
|
// src/models/chats.ts
|
|
7
7
|
/** Тип реакции на сообщение. */
|
|
8
8
|
const ChatReactionType = Object.freeze({
|
|
@@ -1700,7 +1700,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1700
1700
|
client_message_id: data.clientMessageId
|
|
1701
1701
|
},
|
|
1702
1702
|
...request
|
|
1703
|
-
}));
|
|
1703
|
+
}, this.http.bucketInstance("chat", chatId)));
|
|
1704
1704
|
}
|
|
1705
1705
|
/** Отправляет сообщение по ID собеседника. Если диалога ещё нет, сервер создаёт его. */
|
|
1706
1706
|
sendMessageToUser(userId, input, options = {}) {
|
|
@@ -1718,7 +1718,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1718
1718
|
client_message_id: data.clientMessageId
|
|
1719
1719
|
},
|
|
1720
1720
|
...request
|
|
1721
|
-
}));
|
|
1721
|
+
}, this.http.bucketInstance("recipient", userId)));
|
|
1722
1722
|
}
|
|
1723
1723
|
/** Меняет содержимое сообщения. Пустые `entities` и `attachmentIds` удаляют разметку с карточками и файлы соответственно. */
|
|
1724
1724
|
editMessage(chatId, messageId, input, options = {}) {
|
|
@@ -1735,7 +1735,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1735
1735
|
entities: data.entities?.map(writeChatEntity)
|
|
1736
1736
|
},
|
|
1737
1737
|
...request
|
|
1738
|
-
}));
|
|
1738
|
+
}, this.http.bucketInstance("chat", chatId)));
|
|
1739
1739
|
}
|
|
1740
1740
|
/** Загружает файлы перед запросом с общим сроком выполнения. */
|
|
1741
1741
|
async #withAttachments({ attachmentIds, files }, operation, options, send) {
|
|
@@ -1773,7 +1773,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1773
1773
|
client_message_ids: input.clientMessageIds
|
|
1774
1774
|
},
|
|
1775
1775
|
...options
|
|
1776
|
-
});
|
|
1776
|
+
}, this.http.bucketInstance("chat", chatId, Math.max(1, input.messageIds.length)));
|
|
1777
1777
|
}
|
|
1778
1778
|
/** Удаляет сообщения из истории текущего пользователя. */
|
|
1779
1779
|
deleteMessagesForMe(chatId, messageIds, options = {}) {
|
|
@@ -1781,7 +1781,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1781
1781
|
path: `${chatPath(chatId)}/messages/delete-for-me`,
|
|
1782
1782
|
body: { message_ids: messageIds },
|
|
1783
1783
|
...options
|
|
1784
|
-
});
|
|
1784
|
+
}, this.http.bucketInstance("chat", chatId));
|
|
1785
1785
|
}
|
|
1786
1786
|
/** Удаляет сообщения из истории всех участников. */
|
|
1787
1787
|
deleteMessagesForAll(chatId, messageIds, options = {}) {
|
|
@@ -1879,7 +1879,7 @@ var ChatsResource = class extends BaseResource {
|
|
|
1879
1879
|
operation_id: input.operationId
|
|
1880
1880
|
},
|
|
1881
1881
|
...options
|
|
1882
|
-
});
|
|
1882
|
+
}, this.http.bucketInstance("chat", chatId));
|
|
1883
1883
|
}
|
|
1884
1884
|
};
|
|
1885
1885
|
// src/core/feature-catalog.ts
|
|
@@ -1912,8 +1912,8 @@ var ExtensibleOperationCatalog = class {
|
|
|
1912
1912
|
definitionOf(id) {
|
|
1913
1913
|
return this.#operations.get(id) ?? this.#base.definitionOf(id);
|
|
1914
1914
|
}
|
|
1915
|
-
bucketOf(id) {
|
|
1916
|
-
return this.#operations.get(id)?.bucket ?? this.#base.bucketOf(id);
|
|
1915
|
+
bucketOf(id, instance) {
|
|
1916
|
+
return this.#operations.get(id)?.bucket ?? this.#base.bucketOf(id, instance);
|
|
1917
1917
|
}
|
|
1918
1918
|
isKnownBucket(name) {
|
|
1919
1919
|
return this.#buckets.has(name) || this.#base.isKnownBucket(name);
|
|
@@ -1921,12 +1921,16 @@ var ExtensibleOperationCatalog = class {
|
|
|
1921
1921
|
bucketDefinitionOf(name) {
|
|
1922
1922
|
return this.#buckets.get(name)?.definition ?? this.#base.bucketDefinitionOf(name);
|
|
1923
1923
|
}
|
|
1924
|
+
rateLimitPauseTarget(id, scope) {
|
|
1925
|
+
return this.#base.rateLimitPauseTarget?.(id, scope);
|
|
1926
|
+
}
|
|
1924
1927
|
/** Регистрирует принадлежащий feature бакет и возвращает откат регистрации. */
|
|
1925
1928
|
registerBucket(owner, name, definition) {
|
|
1926
1929
|
if (this.#base.isKnownBucket(name) || this.#buckets.has(name)) throw new require_validate.ItdConfigError(`feature «${owner}»: бакет «${name}» уже зарегистрирован`);
|
|
1927
1930
|
this.#buckets.set(name, {
|
|
1928
1931
|
owner,
|
|
1929
1932
|
definition: Object.freeze({
|
|
1933
|
+
...definition.burst === void 0 ? {} : { burst: definition.burst },
|
|
1930
1934
|
...definition.limit === void 0 ? {} : { limit: definition.limit },
|
|
1931
1935
|
...definition.concurrency === void 0 ? {} : { concurrency: definition.concurrency },
|
|
1932
1936
|
...definition.rps === void 0 ? {} : { rps: definition.rps }
|
|
@@ -2268,6 +2272,7 @@ function validateBucket(owner, localName, bucket) {
|
|
|
2268
2272
|
if (typeof bucket !== "object" || bucket === null || Array.isArray(bucket)) throw new require_validate.ItdConfigError(`feature «${owner}»: бакет «${localName}» должен быть объектом`);
|
|
2269
2273
|
if (bucket.limit !== void 0 && (!Number.isFinite(bucket.limit) || bucket.limit <= 0)) throw new require_validate.ItdConfigError(`feature «${owner}»: limit бакета «${localName}» должен быть положительным числом`);
|
|
2270
2274
|
if (bucket.concurrency !== void 0 && (!Number.isInteger(bucket.concurrency) || bucket.concurrency < 1)) throw new require_validate.ItdConfigError(`feature «${owner}»: concurrency бакета «${localName}» должен быть целым числом от 1`);
|
|
2275
|
+
if (bucket.burst !== void 0 && (!Number.isSafeInteger(bucket.burst) || bucket.burst < 1)) throw new require_validate.ItdConfigError(`feature «${owner}»: burst бакета «${localName}» должен быть целым числом от 1`);
|
|
2271
2276
|
if (bucket.rps !== void 0 && (!Number.isFinite(bucket.rps) || bucket.rps <= 0)) throw new require_validate.ItdConfigError(`feature «${owner}»: rps бакета «${localName}» должен быть положительным числом`);
|
|
2272
2277
|
}
|
|
2273
2278
|
function validateFeatureDefinition(feature, isInstalled) {
|
|
@@ -6820,4 +6825,4 @@ Object.defineProperty(exports, "utcStampToIso", {
|
|
|
6820
6825
|
}
|
|
6821
6826
|
});
|
|
6822
6827
|
|
|
6823
|
-
//# sourceMappingURL=render-
|
|
6828
|
+
//# sourceMappingURL=render-CklT-3gT.cjs.map
|