itd-api 0.14.4 → 0.14.5
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 +32 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +31 -51
- 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-C7MJnuJw.js → events-BbpL69OD.js} +4 -4
- package/dist/shared/{events-C7MJnuJw.js.map → events-BbpL69OD.js.map} +1 -1
- package/dist/shared/{events-9dRKcUPZ.cjs → events-C3Wup3mC.cjs} +4 -4
- package/dist/shared/{events-9dRKcUPZ.cjs.map → events-C3Wup3mC.cjs.map} +1 -1
- package/dist/shared/{events-BSotWa3Z.d.cts → events-CMhrmHei.d.cts} +1 -1
- package/dist/shared/{events-B18vQGEH.d.ts → events-Cupq8UXH.d.ts} +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-C5G2o3yL.d.ts → render-B3nhAeaQ.d.ts} +29 -17
- package/dist/shared/{render-DOLkOCVs.cjs → render-BXeYbuuY.cjs} +19 -14
- package/dist/shared/render-BXeYbuuY.cjs.map +1 -0
- package/dist/shared/{render-CWiDhdKI.d.cts → render-ByW1tXn-.d.cts} +2 -16
- package/dist/shared/{render-DFhMFt1f.js → render-C706i1rL.js} +19 -14
- package/dist/shared/render-C706i1rL.js.map +1 -0
- 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-DcjNue8i.js → url-CZpgaPdI.js} +940 -519
- package/dist/shared/url-CZpgaPdI.js.map +1 -0
- package/dist/shared/{url-C49-l_KW.d.ts → url-D4bo3tpX.d.ts} +492 -450
- package/dist/shared/{url-ZRjcpC__.d.cts → url-DHWmfmrE.d.cts} +871 -803
- package/dist/shared/{url-vXQWF--L.cjs → url-Duzw4X6d.cjs} +952 -519
- package/dist/shared/url-Duzw4X6d.cjs.map +1 -0
- 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/render-DFhMFt1f.js.map +0 -1
- package/dist/shared/render-DOLkOCVs.cjs.map +0 -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-DHWmfmrE.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
|
/** Имя, которое имеет приоритет над именем источника. */
|
|
@@ -3676,4 +3662,4 @@ interface RenderSpansOptions {
|
|
|
3676
3662
|
* Отсутствующий массив считается пустым; формат по умолчанию — HTML.
|
|
3677
3663
|
*/
|
|
3678
3664
|
declare function renderSpans(content: string, spans?: readonly Span[] | null | undefined, options?: RenderSpansOptions): string;
|
|
3679
|
-
export { InternationalSubscriptionCheckoutMode as $,
|
|
3665
|
+
export { InternationalSubscriptionCheckoutMode as $, AttemptExtensions as $i, CommentReplyTo as $n, CreateReportInput as $r, ReportsResource as $t, UsersResource as A, ChatSentMessage as Ai, Report as An, Paginator as Ar, ShopDeliveryDestination as At, ViewTracker as B, FeatureBucketDefinition as Bi, HashtagsResource as Bn, messageMarkup as Br, ShopOrderSummary as Bt, fromStream as C, ChatReaction as Ci, StatusDay as Cn, ChatsResource as Cr, ShopConsent as Ct, UpdatePrivacyInput as D, ChatReadCursor as Di, ChangelogEntry as Dn, Page as Dr, ShopDeliveryCalculation as Dt, MessageAllowlistParams as E, ChatReactionType as Ei, AnnouncementButton as En, BaseResource as Er, ShopCreatedOrder as Et, TelemetryBatchOptions as F, ChatUpdateType as Fi, LegalDocumentBlockType as Fn, message as Fr, ShopOrderBase as Ft, SubscriptionCheckoutReleaseInput as G, ManagedClientResource as Gi, BannerDrawingOperation as Gn, MarkupSpan as Gr, ShopProductColor as Gt, ViewTrackerOptions as H, FeatureInstallation as Hi, UploadOptions as Hn, MarkupBuilder as Hr, ShopPayment as Ht, TelemetryClock as I, ChatUpdatesPage as Ii, LegalDocumentScope as In, MessageMarkup as Ir, ShopOrderDelivery as It, SubscriptionPayOptions as J, PreparedFileSource as Ji, UploadedBannerDrawing as Jn, markup as Jr, ShopRecipient as Jt, SubscriptionCheckoutTerms as K, FileResolver as Ki, BannerDrawingPoint as Kn, TextMarkup as Kr, ShopProductSpec as Kt, TelemetryOptions as L, ChatUploadOptions as Li, LegalDocumentSummary as Ln, MessageMarkupBuilder as Lr, ShopOrderItem as Lt, InteractionEntry as M, ChatTextEntity as Mi, LegalResource as Mn, mapPage as Mr, ShopOrder as Mt, PhotoOpenInput as N, ChatUnreadState as Ni, LegalDocument as Nn, MessageBuilder as Nr, ShopOrderAccessSession as Nt, UpdateProfileInput as O, ChatReadResult as Oi, Clan as On, PageState as Or, ShopDeliveryCity as Ot, TelemetryBatch as P, ChatUpdate as Pi, LegalDocumentBlock as Pn, MessageInput as Pr, ShopOrderAccessVerification as Pt, InternationalSubscriptionCheckout as Q, AttemptContext as Qi, Comment as Qn, CreatePostData as Qr, SearchResult as Qt, TelemetryResource as R, ChatUploadedFile as Ri, LegalDocumentVersion as Rn, MessageMarkupContent as Rr, ShopOrderItemInput as Rt, VideoMimeType as S, ChatPreview as Si, ServiceStatus as Sn, ChatListParams as Sr, CreateShopOrderInput as St, VerificationResource as T, ChatReactionCount as Ti, Announcement as Tn, SetChatReactionsInput as Tr, ShopConsentKind as Tt, SubscriptionBindCardOptions as U, FeatureOperationDefinition as Ui, UploadedFile as Un, MarkupContent as Ur, ShopProduct as Ut, ViewTrackerInput as V, FeatureContext as Vi, FilesResource as Vn, AutoSpansOptions as Vr, ShopOrderSupport as Vt, SubscriptionCheckoutInput as W, FeatureRequestOptions as Wi, BannerDrawing as Wn, MarkupInput as Wr, ShopProductCategory as Wt, SubscriptionResource as X, ResolveFileContext as Xi, RepliesParams as Xn, CreateCommentInput as Xr, ShopSizeChartRow as Xt, SubscriptionPaymentInput as Y, PreparedStreamSource as Yi, CommentsResource as Yn, ChatMessageContent as Yr, ShopSizeChart as Yt, InternationalSubscriptionCapability as Z, ResolveFileOptions as Zi, Attachment as Zn, CreatePollInput as Zr, SearchResource as Zt, AllowedMimeType as _, ChatMediaItem as _i, parseMarkdown as _n, QrLoginTarget as _r, ShopDeliveryResource as _t, ShopFeatureOptions as a, OperationTransformer as aa, ChatActionType as ai, PostsResource as an, Poll as ar, SubscriptionCheckoutState as at, ImageMimeType as b, ChatMessageReactions as bi, PlatformVersions as bn, NotificationsResource as br, ShopProductsResource as bt, ShopOrderAccessStorage as c, ChatDeletedMessages as ci, PostBuilder as cn, PostBase as cr, SubscriptionGift as ct, statusDays as d, ChatFileLink as di, post as dn, PostUpdateResult as dr, SubscriptionPaymentProvider as dt, AttemptInterceptor as ea, SendChatMessageInput as ei, ReportBuilder as en, CommentUpdateResult as er, InternationalSubscriptionOffer as et, isMyProfile as f, ChatFirstMessage as fi, PollBuilder as fn, UpdateResultBase as fr, SubscriptionQuote as ft, AUDIO_MIME_TYPES as g, ChatMediaCategory as gi, parseHtml as gn, AccountLifecycleResource as gr, ShopConsentsResource as gt, ALLOWED_MIME_TYPES as h, ChatListPage as hi, ParseMarkupOptions as hn, comment as hr, PayShopOrderOptions as ht, ShopFeatureApi as i, OperationTransformContext as ia, isBuilder as ii, FeedParams as in, PinPostResult as ir, SubscriptionCheckoutKind as it, DwellEntry as j, ChatSummary as ji, VerificationStatus as jn, PaginatorOptions as jr, ShopDeliveryPoint as jt, UserListParams as k, ChatReply as ki, Portal as kn, PaginationMode as kr, ShopDeliveryCountry as kt, ShopOrderAccessStorageAdapterOptions as l, ChatDirectResult as li, PostInput as ln, PostCounters as lr, SubscriptionOffer as lt, utcStampToIso as m, ChatHistoryPage as mi, poll as mn, CommentInput as mr, CreateShopOrderOptions as mt, SpanRenderFormat as n, ClientPlugin as na, BuilderInput as ni, report as nn, LikeResult as nr, PaymentMethodType as nt, createShopFeature as o, PluginApi as oa, ChatAttachment as oi, UserPostsParams as on, PollOption as or, SubscriptionCheckoutStatus as ot, toDate as p, ChatForwardedMessages as pi, PollInput as pn, CommentBuilder as pr, SubscriptionRenewalAgreement as pt, SubscriptionGiftInput as q, PreparedBufferSource as qi, BannerDrawingTool as qn, autoSpans as qr, ShopProductStatus as qt, renderSpans as r, OperationExtensions as ra, ItdBuilder as ri, CommentsParams as rn, OriginalPost as rr, Subscription as rt, MemoryShopOrderAccessStorage as s, PluginTeardown as sa, ChatChange as si, CreatePostInput as sn, Post as sr, SubscriptionCheckoutSubject as st, RenderSpansOptions as t, AttemptNext as ta, UpdatePostInput as ti, ReportInput as tn, Hashtag as tr, PaymentMethod as tt, createShopOrderAccessStorage as u, ChatEditedMessage as ui, PostUpdateInput as un, PostStats as ur, SubscriptionPayment as ut, AudioMimeType as v, ChatMediaPage as vi, PlatformClientVersion as vn, Session as vr, ShopOrderRequestOptions as vt, fromUrl as w, ChatReactionCatalog as wi, StatusIncidentLine as wn, ForwardChatMessagesInput as wr, ShopConsentContext as wt, VIDEO_MIME_TYPES as x, ChatPresence as xi, PlatformStatus as xn, UpdateNotificationSettingsInput as xr, ShopResource as xt, IMAGE_MIME_TYPES as y, ChatMessage as yi, PlatformResource as yn, NotificationListParams as yr, ShopOrdersResource as yt, VideoProgressInput as z, ClientFeature as zi, HashtagPostsParams as zn, MessageMarkupInput as zr, ShopOrderStatus as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as isItdApiError, a as ItdAbortError, d as ItdError, l as ItdConfigError, m as ItdFileErrorReason, n as isRecord, p as ItdFileError, x as ItdStateError } from "./validate-
|
|
2
|
-
import { A as
|
|
3
|
-
import { _ as redactUrl, b as isBlob, h as redactErrorCause, s as encodePathSegment, x as isFile, y as createUuidV4 } from "./cookies-
|
|
4
|
-
import { a as fileTooLarge, c as FileTransferMode, i as isReadableByteStream, n as boundedFileStream, o as optionalBytes, r as isBoundedFileStream, s as DEFAULT_URL_FILE_MAX_BYTES, t as resolveFileStreamOptions } from "./options-
|
|
5
|
-
import { r as createKeyValueStore } from "./key-value-store-
|
|
1
|
+
import { E as isItdApiError, a as ItdAbortError, d as ItdError, l as ItdConfigError, m as ItdFileErrorReason, n as isRecord, p as ItdFileError, x as ItdStateError } from "./validate-CCgIq5u0.js";
|
|
2
|
+
import { A as pickObject, D as pickArray, F as defineBuiltInOperation, G as identityResult, H as OperationMethod, J as requestAbortError, K as voidResult, M as passthroughOperation, N as voidOperation, O as pickBoolean, U as RetrySafety, W as defineOperation, Y as waitForRequest, _ as STATUS_SERVICE, at as InteractionType, bt as createDeadline, d as mergeService, ft as ReportReason, g as DEFAULT_STATUS_BASE_URL, ht as SpanType, j as pickString, k as pickNumber, pt as ReportTargetType, r as normalizeNotification } from "./url-CZpgaPdI.js";
|
|
3
|
+
import { _ as redactUrl, b as isBlob, h as redactErrorCause, s as encodePathSegment, x as isFile, y as createUuidV4 } from "./cookies-mDZE19_j.js";
|
|
4
|
+
import { a as fileTooLarge, c as FileTransferMode, i as isReadableByteStream, n as boundedFileStream, o as optionalBytes, r as isBoundedFileStream, s as DEFAULT_URL_FILE_MAX_BYTES, t as resolveFileStreamOptions } from "./options-Dana2yeL.js";
|
|
5
|
+
import { r as createKeyValueStore } from "./key-value-store-BDvrZ-GQ.js";
|
|
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 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 ItdConfigError(`feature «${owner}»: бакет «${localName}» должен быть объектом`);
|
|
2269
2273
|
if (bucket.limit !== void 0 && (!Number.isFinite(bucket.limit) || bucket.limit <= 0)) throw new ItdConfigError(`feature «${owner}»: limit бакета «${localName}» должен быть положительным числом`);
|
|
2270
2274
|
if (bucket.concurrency !== void 0 && (!Number.isInteger(bucket.concurrency) || bucket.concurrency < 1)) throw new ItdConfigError(`feature «${owner}»: concurrency бакета «${localName}» должен быть целым числом от 1`);
|
|
2275
|
+
if (bucket.burst !== void 0 && (!Number.isSafeInteger(bucket.burst) || bucket.burst < 1)) throw new ItdConfigError(`feature «${owner}»: burst бакета «${localName}» должен быть целым числом от 1`);
|
|
2271
2276
|
if (bucket.rps !== void 0 && (!Number.isFinite(bucket.rps) || bucket.rps <= 0)) throw new ItdConfigError(`feature «${owner}»: rps бакета «${localName}» должен быть положительным числом`);
|
|
2272
2277
|
}
|
|
2273
2278
|
function validateFeatureDefinition(feature, isInstalled) {
|
|
@@ -6497,4 +6502,4 @@ function renderSpans(content, spans = [], options = {}) {
|
|
|
6497
6502
|
}
|
|
6498
6503
|
export { ChatReactionType as $, AccountLifecycleResource as A, AUDIO_MIME_TYPES as B, poll as C, LegalDocumentScope as D, LegalDocumentBlockType as E, BaseResource as F, autoSpans as G, VIDEO_MIME_TYPES as H, PaginationMode as I, normalizeChatUpdate as J, markup as K, Paginator as L, createFeatureHost as M, ExtensibleOperationCatalog as N, comment as O, ChatsResource as P, ChatMediaCategory as Q, mapPage as R, post as S, parseMarkdown as T, message as U, IMAGE_MIME_TYPES as V, messageMarkup as W, utcStampToIso as X, toDate as Y, ChatActionType as Z, PaymentMethodType as _, createShopOrderAccessStorage as a, SubscriptionPaymentProvider as b, ShopOrderStatus as c, isMyProfile as d, ChatUpdateType as et, BannerDrawingTool as f, InternationalSubscriptionCheckoutMode as g, createResources as h, MemoryShopOrderAccessStorage as i, NotificationsResource as j, createStatusFeature as k, ShopProductCategory as l, fromUrl as m, renderSpans as n, statusDays as o, fromStream as p, isBuilder as q, createShopFeature as r, ShopConsentKind as s, SpanRenderFormat as t, ShopProductStatus as u, SubscriptionCheckoutKind as v, parseHtml as w, report as x, SubscriptionCheckoutStatus as y, ALLOWED_MIME_TYPES as z };
|
|
6499
6504
|
|
|
6500
|
-
//# sourceMappingURL=render-
|
|
6505
|
+
//# sourceMappingURL=render-C706i1rL.js.map
|