itd-api 0.12.0 → 0.13.0
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 +7 -2
- package/dist/events/index.d.ts +7 -2
- package/dist/events/index.js +4 -4
- package/dist/index.cjs +672 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +497 -46
- package/dist/index.d.ts +497 -46
- package/dist/index.js +664 -91
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +6 -7
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +24 -7
- package/dist/node/index.d.ts +24 -7
- package/dist/node/index.js +6 -7
- package/dist/node/index.js.map +1 -1
- package/dist/rest/index.cjs +19 -7
- package/dist/rest/index.cjs.map +1 -1
- package/dist/rest/index.d.cts +28 -7
- package/dist/rest/index.d.ts +28 -7
- package/dist/rest/index.js +17 -8
- package/dist/rest/index.js.map +1 -1
- package/dist/shared/{contracts-BoT7msmq.d.ts → contracts-DEbkC0cB.d.cts} +1 -4
- package/dist/shared/{contracts-BoT7msmq.d.cts → contracts-pxnDIsQP.d.ts} +1 -4
- package/dist/shared/{events-9L0Fonak.d.cts → events-B6uqXOSs.d.cts} +42 -63
- package/dist/shared/{events-D1BfefBT.js → events-C_MgYlXR.js} +30 -40
- package/dist/shared/events-C_MgYlXR.js.map +1 -0
- package/dist/shared/{events-C2DJZyI0.cjs → events-DV1i1t6J.cjs} +30 -40
- package/dist/shared/events-DV1i1t6J.cjs.map +1 -0
- package/dist/shared/{events-BpLAIiMj.d.ts → events-D_aMNrPd.d.ts} +2 -23
- package/dist/shared/{key-value-store-DYSPsqwq.cjs → key-value-store-6DHm_iNW.cjs} +3 -4
- package/dist/shared/{key-value-store-DYSPsqwq.cjs.map → key-value-store-6DHm_iNW.cjs.map} +1 -1
- package/dist/shared/{key-value-store-COZaNHZS.d.ts → key-value-store-BGoSgLze.d.cts} +1 -4
- package/dist/shared/{key-value-store-w1Dn5Pjb.js → key-value-store-PnZE_DFC.js} +3 -4
- package/dist/shared/{key-value-store-w1Dn5Pjb.js.map → key-value-store-PnZE_DFC.js.map} +1 -1
- package/dist/shared/{key-value-store-COZaNHZS.d.cts → key-value-store-WUQBeTAr.d.ts} +1 -4
- package/dist/shared/{multi-storage-DiBSx64p.js → multi-storage-DM0skcSO.js} +6 -7
- package/dist/shared/{multi-storage-DiBSx64p.js.map → multi-storage-DM0skcSO.js.map} +1 -1
- package/dist/shared/{multi-storage-LkljOSzA.d.ts → multi-storage-DQiERirK.d.ts} +3 -6
- package/dist/shared/{multi-storage-7Y3KCseI.cjs → multi-storage-DnonVBfO.cjs} +6 -7
- package/dist/shared/multi-storage-DnonVBfO.cjs.map +1 -0
- package/dist/shared/{multi-storage-BEL7tcKn.d.cts → multi-storage-OGWNMK3x.d.cts} +3 -6
- package/dist/shared/{options-D5ttspWk.cjs → options-SvAWOaqT.cjs} +8 -12
- package/dist/shared/{options-D5ttspWk.cjs.map → options-SvAWOaqT.cjs.map} +1 -1
- package/dist/shared/{options-DLlaETn_.js → options-bS27r_gR.js} +8 -12
- package/dist/shared/{options-DLlaETn_.js.map → options-bS27r_gR.js.map} +1 -1
- package/dist/shared/{redact-DSfdmeY7.js → redact-C4b2NzdB.js} +16 -16
- package/dist/shared/redact-C4b2NzdB.js.map +1 -0
- package/dist/shared/{redact-BbhtA9o-.cjs → redact-DDGkv8KF.cjs} +16 -16
- package/dist/shared/redact-DDGkv8KF.cjs.map +1 -0
- package/dist/shared/{render-CrGXcj6L.cjs → render-0-JJPOwb.cjs} +222 -111
- package/dist/shared/render-0-JJPOwb.cjs.map +1 -0
- package/dist/shared/{render-D3vSEbLL.js → render-CF49aBO8.js} +199 -112
- package/dist/shared/render-CF49aBO8.js.map +1 -0
- package/dist/shared/{render-Dzw3KeN5.d.cts → render-CYVOc_IW.d.cts} +191 -308
- package/dist/shared/{render-UsQ1hb2U.d.ts → render-eOxYgdoA.d.ts} +191 -159
- package/dist/shared/{storage-86wiHeXD.js → storage-B6OkSi38.js} +4 -5
- package/dist/shared/{storage-86wiHeXD.js.map → storage-B6OkSi38.js.map} +1 -1
- package/dist/shared/{storage-CTRGT5wF.d.ts → storage-C_ZujAZt.d.ts} +2 -5
- package/dist/shared/{storage-CIjejZDt.cjs → storage-CezF2Mvz.cjs} +4 -5
- package/dist/shared/{storage-CIjejZDt.cjs.map → storage-CezF2Mvz.cjs.map} +1 -1
- package/dist/shared/{storage-BQrtKon9.d.cts → storage-FtS4NIC7.d.cts} +2 -5
- package/dist/shared/{url-Dg1u29cu.js → url-CPKhcxf1.js} +250 -91
- package/dist/shared/url-CPKhcxf1.js.map +1 -0
- package/dist/shared/{url-C9YADYNg.d.cts → url-DCqxoxGX.d.cts} +1909 -1634
- package/dist/shared/{url-C9YADYNg.d.ts → url-DL5Mip4L.d.ts} +230 -104
- package/dist/shared/{url-B21Bdmw_.cjs → url-DOfjru6L.cjs} +250 -91
- package/dist/shared/url-DOfjru6L.cjs.map +1 -0
- package/dist/shared/{validate-D7_kq3g5.js → validate-B5l_vLKD.js} +5 -7
- package/dist/shared/validate-B5l_vLKD.js.map +1 -0
- package/dist/shared/{validate-CFx2dISs.cjs → validate-CfxCK1BC.cjs} +5 -7
- package/dist/shared/validate-CfxCK1BC.cjs.map +1 -0
- package/dist/web/index.cjs +4 -5
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +22 -5
- package/dist/web/index.d.ts +22 -5
- package/dist/web/index.js +4 -5
- package/dist/web/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/shared/events-C2DJZyI0.cjs.map +0 -1
- package/dist/shared/events-D1BfefBT.js.map +0 -1
- package/dist/shared/multi-storage-7Y3KCseI.cjs.map +0 -1
- package/dist/shared/redact-BbhtA9o-.cjs.map +0 -1
- package/dist/shared/redact-DSfdmeY7.js.map +0 -1
- package/dist/shared/render-CrGXcj6L.cjs.map +0 -1
- package/dist/shared/render-D3vSEbLL.js.map +0 -1
- package/dist/shared/url-B21Bdmw_.cjs.map +0 -1
- package/dist/shared/url-Dg1u29cu.js.map +0 -1
- package/dist/shared/validate-CFx2dISs.cjs.map +0 -1
- package/dist/shared/validate-D7_kq3g5.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
3
|
-
import { r as KeyValueStore } from "./key-value-store-
|
|
4
|
-
//#region src/core/cookies.d.ts
|
|
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-DL5Mip4L.js";
|
|
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-pxnDIsQP.js";
|
|
3
|
+
import { r as KeyValueStore } from "./key-value-store-WUQBeTAr.js";
|
|
5
4
|
/**
|
|
6
5
|
* Минимальное хранилище cookie для сред без своего.
|
|
7
6
|
*
|
|
@@ -64,8 +63,6 @@ declare class CookieJar {
|
|
|
64
63
|
/** Удаляет все cookie. */
|
|
65
64
|
clear(): void;
|
|
66
65
|
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/core/execution/pipeline.d.ts
|
|
69
66
|
/** Тело, заново подготовленное для одной транспортной попытки. */
|
|
70
67
|
interface PreparedRequestBody {
|
|
71
68
|
body: BodyInit;
|
|
@@ -114,8 +111,6 @@ type PipelineRequestInput = Omit<PipelineRequest, 'operationId'> & {
|
|
|
114
111
|
};
|
|
115
112
|
/** Обработчик запроса. Самый внутренний в цепочке — транспорт. */
|
|
116
113
|
type RequestHandler = (request: PipelineRequest) => Promise<unknown>;
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region src/core/execution/http.d.ts
|
|
119
114
|
/** Что нужно точке входа в конвейер. */
|
|
120
115
|
interface HttpClientDeps {
|
|
121
116
|
/** Готовый обработчик — вся цепочка стадий поверх транспорта. */
|
|
@@ -155,8 +150,6 @@ declare class HttpClient {
|
|
|
155
150
|
/** Выполняет внутреннюю операцию финализации после начала `ItdClient.dispose()`. @internal */
|
|
156
151
|
cleanupOperation<T, TId extends OperationId>(operation: OperationContract<T, TId>, options: HttpOperationOptions): Promise<T>;
|
|
157
152
|
}
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/core/attachments/resolver.d.ts
|
|
160
153
|
/** Дополнительные требования потребителя к подготовленному источнику. */
|
|
161
154
|
interface ResolveFileOptions {
|
|
162
155
|
/** Имя, которое имеет приоритет над именем источника. */
|
|
@@ -208,8 +201,6 @@ interface FileResolver {
|
|
|
208
201
|
interface InternalFileResolver extends FileResolver {
|
|
209
202
|
mode(input: FileInput): FileTransferMode;
|
|
210
203
|
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/core/managed-resources.d.ts
|
|
213
204
|
/** Долгоживущий ресурс клиента. */
|
|
214
205
|
interface ManagedClientResource {
|
|
215
206
|
/** Короткое имя для диагностики зависшей остановки. */
|
|
@@ -219,8 +210,6 @@ interface ManagedClientResource {
|
|
|
219
210
|
/** Завершается после остановки обработчиков и освобождения внешних ресурсов. */
|
|
220
211
|
drain(): Promise<void>;
|
|
221
212
|
}
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region src/core/features.d.ts
|
|
224
213
|
/** Параметры запроса feature: маршрут задаёт ресурс, transport metadata — manifest. */
|
|
225
214
|
type FeatureRequestOptions = Omit<RawRequestOptions, 'operationId' | 'method' | 'service' | 'baseUrl' | 'retrySafety' | 'rateLimitBucket'>;
|
|
226
215
|
/** Операция одного feature. Локальный ключ используется в {@link FeatureContext.request}. */
|
|
@@ -286,8 +275,6 @@ interface FeatureContext {
|
|
|
286
275
|
/** Проверяет, что создавший модуль клиент ещё работает. */
|
|
287
276
|
assertActive(action: string): void;
|
|
288
277
|
}
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region src/core/plugins/contracts.d.ts
|
|
291
278
|
/**
|
|
292
279
|
* Обёртка одной логической операции.
|
|
293
280
|
*
|
|
@@ -446,8 +433,6 @@ interface ClientPlugin {
|
|
|
446
433
|
*/
|
|
447
434
|
install(api: PluginApi): void | PluginTeardown;
|
|
448
435
|
}
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region src/core/scheduling/rate-limit.d.ts
|
|
451
436
|
/** Снимок одного бакета. */
|
|
452
437
|
interface RateLimitBucketState {
|
|
453
438
|
/** Origin, на котором ведётся счётчик. `undefined` — очередь без известного направления. */
|
|
@@ -462,8 +447,6 @@ interface RateLimitBucketState {
|
|
|
462
447
|
/** Запросов бакета ждёт своей очереди — из-за паузы или предела одновременности. */
|
|
463
448
|
pending: number;
|
|
464
449
|
}
|
|
465
|
-
//#endregion
|
|
466
|
-
//#region src/resources/pagination.d.ts
|
|
467
450
|
/**
|
|
468
451
|
* Страница списка — единая форма для всех трёх схем пагинации API.
|
|
469
452
|
*
|
|
@@ -587,8 +570,6 @@ declare class Paginator<T> implements AsyncIterable<T> {
|
|
|
587
570
|
*/
|
|
588
571
|
collect(max?: number): Promise<T[]>;
|
|
589
572
|
}
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/resources/base.d.ts
|
|
592
573
|
/**
|
|
593
574
|
* Описание перебираемого эндпоинта.
|
|
594
575
|
*
|
|
@@ -653,8 +634,6 @@ declare class BaseResource {
|
|
|
653
634
|
*/
|
|
654
635
|
protected paginated<T, P extends object>(spec: ListingSpec<T, P>): Listing<T, P>;
|
|
655
636
|
}
|
|
656
|
-
//#endregion
|
|
657
|
-
//#region src/resources/notifications.d.ts
|
|
658
637
|
/** Параметры запроса списка уведомлений. */
|
|
659
638
|
interface NotificationListParams {
|
|
660
639
|
limit?: number;
|
|
@@ -723,8 +702,6 @@ declare class NotificationsResource extends BaseResource {
|
|
|
723
702
|
*/
|
|
724
703
|
updateSettings(input: UpdateNotificationSettingsInput, options?: RequestOptions): Promise<NotificationSettings>;
|
|
725
704
|
}
|
|
726
|
-
//#endregion
|
|
727
|
-
//#region src/models/account.d.ts
|
|
728
705
|
/** Активная сессия входа. */
|
|
729
706
|
interface Session {
|
|
730
707
|
id: string;
|
|
@@ -791,8 +768,13 @@ interface PaymentMethod {
|
|
|
791
768
|
isDefault?: boolean;
|
|
792
769
|
expiresAt?: IsoDate | null;
|
|
793
770
|
}
|
|
794
|
-
|
|
795
|
-
|
|
771
|
+
/** Деактивация и восстановление текущего аккаунта. */
|
|
772
|
+
declare class AccountLifecycleResource extends BaseResource {
|
|
773
|
+
/** Деактивирует аккаунт. Вернуть его можно через {@link restore}. */
|
|
774
|
+
deactivate(options?: RequestOptions): Promise<void>;
|
|
775
|
+
/** Восстанавливает деактивированный аккаунт. */
|
|
776
|
+
restore(options?: RequestOptions): Promise<void>;
|
|
777
|
+
}
|
|
796
778
|
/** Данные для создания опроса. */
|
|
797
779
|
interface CreatePollInput {
|
|
798
780
|
/** Вопрос. Не может быть пустым. */
|
|
@@ -865,8 +847,6 @@ interface CreateReportInput {
|
|
|
865
847
|
/** Пояснение в свободной форме. */
|
|
866
848
|
description?: string;
|
|
867
849
|
}
|
|
868
|
-
//#endregion
|
|
869
|
-
//#region src/builders/base.d.ts
|
|
870
850
|
/** Метка билдера. Через `Symbol.for` — чтобы распознавание переживало смешивание ESM и CJS. */
|
|
871
851
|
declare const BUILDER: unique symbol;
|
|
872
852
|
/**
|
|
@@ -900,8 +880,6 @@ interface ItdBuilder<T> {
|
|
|
900
880
|
type BuilderInput<T, B extends ItdBuilder<T>> = T | B | ((builder: B) => B | T);
|
|
901
881
|
/** Является ли значение билдером. */
|
|
902
882
|
declare function isBuilder<T>(value: unknown): value is ItdBuilder<T>;
|
|
903
|
-
//#endregion
|
|
904
|
-
//#region src/builders/comment.d.ts
|
|
905
883
|
/** Внутреннее состояние {@link CommentBuilder}. */
|
|
906
884
|
interface CommentState extends CreateCommentInput {
|
|
907
885
|
content: string;
|
|
@@ -966,8 +944,6 @@ declare class CommentBuilder implements ItdBuilder<CreateCommentInput> {
|
|
|
966
944
|
declare function comment(content?: string): CommentBuilder;
|
|
967
945
|
/** Что принимает параметр комментария: объект, билдер или функция-настройщик. */
|
|
968
946
|
type CommentInput = BuilderInput<CreateCommentInput, CommentBuilder>;
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/models/content.d.ts
|
|
971
947
|
/** Вложение поста или комментария. */
|
|
972
948
|
interface Attachment {
|
|
973
949
|
id: string;
|
|
@@ -1014,44 +990,44 @@ interface Poll {
|
|
|
1014
990
|
votedOptionIds: string[];
|
|
1015
991
|
createdAt: IsoDate;
|
|
1016
992
|
}
|
|
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[];
|
|
993
|
+
/** Счётчики поста. */
|
|
994
|
+
interface PostCounters {
|
|
1028
995
|
likesCount: number;
|
|
1029
996
|
commentsCount: number;
|
|
1030
997
|
repostsCount: number;
|
|
1031
998
|
viewsCount: number;
|
|
1032
|
-
/** Удалён ли пост. */
|
|
1033
|
-
isDeleted: boolean;
|
|
1034
999
|
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1035
1000
|
dominantEmoji?: string | null;
|
|
1036
|
-
createdAt: IsoDate;
|
|
1037
|
-
/** Служебная метка показа для телеметрии, см. {@link Post.vs}. */
|
|
1038
|
-
vs?: string;
|
|
1039
1001
|
}
|
|
1040
|
-
/**
|
|
1041
|
-
interface
|
|
1002
|
+
/** Общая часть поста ленты и поста, на который ссылается репост. */
|
|
1003
|
+
interface PostBase extends PostCounters {
|
|
1042
1004
|
id: string;
|
|
1043
1005
|
content: string;
|
|
1044
1006
|
/** Разметка текста. Передаётся без изменений, см. {@link Span}. */
|
|
1045
1007
|
spans: Span[];
|
|
1046
1008
|
author: Author;
|
|
1047
1009
|
attachments: Attachment[];
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1010
|
+
createdAt: IsoDate;
|
|
1011
|
+
/**
|
|
1012
|
+
* Служебная метка показа для телеметрии.
|
|
1013
|
+
*
|
|
1014
|
+
* Нужна только эндпоинтам `itd.telemetry.*`. В остальных случаях игнорируйте.
|
|
1015
|
+
*/
|
|
1016
|
+
vs?: string;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Пост, на который ссылается репост. Сервер отдаёт его урезанным и только на один уровень:
|
|
1020
|
+
* без признаков относительно текущего пользователя и без собственного `originalPost`.
|
|
1021
|
+
*/
|
|
1022
|
+
interface OriginalPost extends PostBase {
|
|
1023
|
+
/** Удалён ли пост. */
|
|
1024
|
+
isDeleted: boolean;
|
|
1025
|
+
}
|
|
1026
|
+
/** Пост ленты, стены или профиля. */
|
|
1027
|
+
interface Post extends PostBase {
|
|
1028
|
+
/** ID владельца чужой стены. `null` — пост опубликован не на чужой стене. */
|
|
1029
|
+
wallRecipientId?: UserId | null;
|
|
1030
|
+
/** Профиль владельца стены. */
|
|
1055
1031
|
wallRecipient?: Author | null;
|
|
1056
1032
|
/** Поставили ли вы реакцию. */
|
|
1057
1033
|
isLiked: boolean;
|
|
@@ -1064,17 +1040,8 @@ interface Post {
|
|
|
1064
1040
|
/** Пост, который репостнули, если это репост. `null` у обычного поста. */
|
|
1065
1041
|
originalPost?: OriginalPost | null;
|
|
1066
1042
|
poll?: Poll | null;
|
|
1067
|
-
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1068
|
-
dominantEmoji?: string | null;
|
|
1069
1043
|
/** Когда пост отредактировали. `null`, если не редактировали. */
|
|
1070
1044
|
editedAt?: IsoDate | null;
|
|
1071
|
-
createdAt: IsoDate;
|
|
1072
|
-
/**
|
|
1073
|
-
* Служебная метка показа для телеметрии.
|
|
1074
|
-
*
|
|
1075
|
-
* Нужна только эндпоинтам `itd.telemetry.*`. В остальных случаях игнорируйте.
|
|
1076
|
-
*/
|
|
1077
|
-
vs?: string;
|
|
1078
1045
|
/**
|
|
1079
1046
|
* Топовые комментарии. Приходят только в ответе `GET /api/posts/{id}`.
|
|
1080
1047
|
*
|
|
@@ -1083,11 +1050,7 @@ interface Post {
|
|
|
1083
1050
|
comments?: Comment[];
|
|
1084
1051
|
}
|
|
1085
1052
|
/** На чей комментарий дан ответ. */
|
|
1086
|
-
interface CommentReplyTo {
|
|
1087
|
-
id: string;
|
|
1088
|
-
username: string;
|
|
1089
|
-
displayName: string;
|
|
1090
|
-
}
|
|
1053
|
+
interface CommentReplyTo extends UserBase {}
|
|
1091
1054
|
/** Комментарий к посту или ответ на комментарий. */
|
|
1092
1055
|
interface Comment {
|
|
1093
1056
|
id: string;
|
|
@@ -1114,19 +1077,19 @@ interface Comment {
|
|
|
1114
1077
|
/** Заполнено только у ответов. */
|
|
1115
1078
|
replyTo?: CommentReplyTo | null;
|
|
1116
1079
|
}
|
|
1117
|
-
/**
|
|
1118
|
-
interface
|
|
1080
|
+
/** Общая часть компактных ответов редактирования поста и комментария. */
|
|
1081
|
+
interface UpdateResultBase {
|
|
1119
1082
|
id: string;
|
|
1120
1083
|
content: string;
|
|
1084
|
+
/** Когда сохранена правка. */
|
|
1085
|
+
editedAt: IsoDate;
|
|
1086
|
+
}
|
|
1087
|
+
/** Компактный ответ редактирования поста. */
|
|
1088
|
+
interface PostUpdateResult extends UpdateResultBase {
|
|
1121
1089
|
spans: Span[];
|
|
1122
|
-
updatedAt: IsoDate;
|
|
1123
1090
|
}
|
|
1124
1091
|
/** Компактный ответ редактирования комментария. */
|
|
1125
|
-
interface CommentUpdateResult {
|
|
1126
|
-
id: string;
|
|
1127
|
-
content: string;
|
|
1128
|
-
editedAt: IsoDate;
|
|
1129
|
-
}
|
|
1092
|
+
interface CommentUpdateResult extends UpdateResultBase {}
|
|
1130
1093
|
/** Хэштег. */
|
|
1131
1094
|
interface Hashtag {
|
|
1132
1095
|
id: string;
|
|
@@ -1136,12 +1099,8 @@ interface Hashtag {
|
|
|
1136
1099
|
postsCount: number;
|
|
1137
1100
|
}
|
|
1138
1101
|
/** Счётчики поста из `itd.posts.stats()`. */
|
|
1139
|
-
interface PostStats {
|
|
1102
|
+
interface PostStats extends PostCounters {
|
|
1140
1103
|
id: string;
|
|
1141
|
-
likesCount: number;
|
|
1142
|
-
commentsCount: number;
|
|
1143
|
-
repostsCount: number;
|
|
1144
|
-
viewsCount: number;
|
|
1145
1104
|
/** Преобладающая реакция — эмодзи либо `null`. */
|
|
1146
1105
|
dominantEmoji: string | null;
|
|
1147
1106
|
}
|
|
@@ -1155,8 +1114,6 @@ interface PinPostResult {
|
|
|
1155
1114
|
success: boolean;
|
|
1156
1115
|
pinnedPostId: string | null;
|
|
1157
1116
|
}
|
|
1158
|
-
//#endregion
|
|
1159
|
-
//#region src/resources/comments.d.ts
|
|
1160
1117
|
/** Параметры запроса ответов на комментарий. */
|
|
1161
1118
|
interface RepliesParams {
|
|
1162
1119
|
limit?: number;
|
|
@@ -1202,8 +1159,45 @@ declare class CommentsResource extends BaseResource {
|
|
|
1202
1159
|
/** Убирает реакцию с комментария. */
|
|
1203
1160
|
unlike(commentId: string, options?: RequestOptions): Promise<LikeResult>;
|
|
1204
1161
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1162
|
+
/** Инструменты редактора баннера в формате версии 1. */
|
|
1163
|
+
declare const BannerDrawingTool: Readonly<{
|
|
1164
|
+
readonly Brush: "brush";
|
|
1165
|
+
readonly Eraser: "eraser";
|
|
1166
|
+
readonly Line: "line";
|
|
1167
|
+
readonly Rectangle: "rectangle";
|
|
1168
|
+
readonly Circle: "circle";
|
|
1169
|
+
}>;
|
|
1170
|
+
type BannerDrawingTool = (typeof BannerDrawingTool)[keyof typeof BannerDrawingTool];
|
|
1171
|
+
/** Координаты точки в пикселях холста. */
|
|
1172
|
+
type BannerDrawingPoint = readonly [x: number, y: number];
|
|
1173
|
+
/** Штрих или фигура, которую нужно нарисовать на холсте. */
|
|
1174
|
+
interface BannerDrawingOperation {
|
|
1175
|
+
tool: BannerDrawingTool;
|
|
1176
|
+
/** Цвет в формате CSS hex, например `#000000`. */
|
|
1177
|
+
color: string;
|
|
1178
|
+
/** Толщина линии в пикселях. */
|
|
1179
|
+
width: number;
|
|
1180
|
+
/** Точки штриха. Для линии, прямоугольника и круга передайте две точки. */
|
|
1181
|
+
points: readonly BannerDrawingPoint[];
|
|
1182
|
+
}
|
|
1183
|
+
/** Описание рисунка для загрузки в качестве баннера. */
|
|
1184
|
+
interface BannerDrawing {
|
|
1185
|
+
version: 1;
|
|
1186
|
+
/** Ширина холста в пикселях. */
|
|
1187
|
+
width: number;
|
|
1188
|
+
/** Высота холста в пикселях. */
|
|
1189
|
+
height: number;
|
|
1190
|
+
/** Операции в порядке рисования. */
|
|
1191
|
+
ops: readonly BannerDrawingOperation[];
|
|
1192
|
+
}
|
|
1193
|
+
/** Изображение, созданное сервером из рисунка. */
|
|
1194
|
+
interface UploadedBannerDrawing {
|
|
1195
|
+
/** Идентификатор для поля `bannerId` при обновлении профиля. */
|
|
1196
|
+
id: string;
|
|
1197
|
+
url: string;
|
|
1198
|
+
width: number;
|
|
1199
|
+
height: number;
|
|
1200
|
+
}
|
|
1207
1201
|
/** Ответ загрузки файла. */
|
|
1208
1202
|
interface UploadedFile {
|
|
1209
1203
|
/** Идентификатор вложения — его передают в `attachmentIds`. */
|
|
@@ -1243,13 +1237,18 @@ declare class FilesResource extends BaseResource {
|
|
|
1243
1237
|
* после успешного чтения переиспользуется.
|
|
1244
1238
|
*/
|
|
1245
1239
|
upload(input: FileInput, uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<UploadedFile>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Отправляет описание рисунка и возвращает созданное сервером изображение.
|
|
1242
|
+
*
|
|
1243
|
+
* Чтобы установить баннер, передайте полученный `id` в
|
|
1244
|
+
* `itd.users.updateMe({ bannerId: id })`.
|
|
1245
|
+
*/
|
|
1246
|
+
uploadBannerDrawing(drawing: BannerDrawing, options?: RequestOptions): Promise<UploadedBannerDrawing>;
|
|
1246
1247
|
/** Загружает несколько файлов последовательно, сохраняя порядок. */
|
|
1247
1248
|
uploadMany(files: FileInput[], uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<string[]>;
|
|
1248
1249
|
/** Удаляет загруженный файл. */
|
|
1249
1250
|
remove(fileId: string, options?: RequestOptions): Promise<void>;
|
|
1250
1251
|
}
|
|
1251
|
-
//#endregion
|
|
1252
|
-
//#region src/resources/hashtags.d.ts
|
|
1253
1252
|
/** Параметры запроса постов по хэштегу. */
|
|
1254
1253
|
interface HashtagPostsParams {
|
|
1255
1254
|
limit?: number;
|
|
@@ -1276,8 +1275,84 @@ declare class HashtagsResource extends BaseResource {
|
|
|
1276
1275
|
/** Перебирает посты по хэштегу. */
|
|
1277
1276
|
iteratePosts(tag: string, params?: HashtagPostsParams, options?: PaginationOptions): Paginator<Post>;
|
|
1278
1277
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1278
|
+
/** Область действия документа. */
|
|
1279
|
+
declare const LegalDocumentScope: Readonly<{
|
|
1280
|
+
readonly Social: "social";
|
|
1281
|
+
}>;
|
|
1282
|
+
type LegalDocumentScope = Loose<(typeof LegalDocumentScope)[keyof typeof LegalDocumentScope]>;
|
|
1283
|
+
/** Сведения о редакции документа в списке документов и истории редакций. */
|
|
1284
|
+
interface LegalDocumentSummary {
|
|
1285
|
+
scope: LegalDocumentScope;
|
|
1286
|
+
/** Идентификатор документа в пределах области действия. */
|
|
1287
|
+
slug: string;
|
|
1288
|
+
title: string;
|
|
1289
|
+
shortTitle: string;
|
|
1290
|
+
summary: string;
|
|
1291
|
+
/** Идентификатор редакции. Передавайте его в `legal.version()` как строку. */
|
|
1292
|
+
version: string;
|
|
1293
|
+
/** Дата вступления редакции в силу. */
|
|
1294
|
+
effectiveAt: string;
|
|
1295
|
+
/** Контрольная сумма текста, которую возвращает сервер. */
|
|
1296
|
+
contentSha256: string;
|
|
1297
|
+
/** Дата, указанная в документе. */
|
|
1298
|
+
documentDate: string;
|
|
1299
|
+
/** Дата публикации или `null`, если она не указана. */
|
|
1300
|
+
publishedAt: string | null;
|
|
1301
|
+
}
|
|
1302
|
+
/** Запись истории редакций. */
|
|
1303
|
+
interface LegalDocumentVersion extends LegalDocumentSummary {
|
|
1304
|
+
/** Действует ли эта редакция сейчас. */
|
|
1305
|
+
current: boolean;
|
|
1306
|
+
}
|
|
1307
|
+
/** Виды блоков текста документа. */
|
|
1308
|
+
declare const LegalDocumentBlockType: Readonly<{
|
|
1309
|
+
readonly Heading: "heading";
|
|
1310
|
+
readonly List: "list";
|
|
1311
|
+
readonly Lines: "lines";
|
|
1312
|
+
}>;
|
|
1313
|
+
type LegalDocumentBlockType = Loose<(typeof LegalDocumentBlockType)[keyof typeof LegalDocumentBlockType]>;
|
|
1314
|
+
/** Блок текста. Поля зависят от его вида. */
|
|
1315
|
+
interface LegalDocumentBlock {
|
|
1316
|
+
type: LegalDocumentBlockType;
|
|
1317
|
+
/** Уровень заголовка. */
|
|
1318
|
+
level?: number;
|
|
1319
|
+
/** Текст заголовка или абзаца. */
|
|
1320
|
+
text?: string;
|
|
1321
|
+
/** Пункты списка или строки многострочного блока. */
|
|
1322
|
+
items?: string[];
|
|
1323
|
+
}
|
|
1324
|
+
/** Редакция документа с полным текстом. */
|
|
1325
|
+
interface LegalDocument extends LegalDocumentSummary {
|
|
1326
|
+
/** Блоки в порядке чтения. */
|
|
1327
|
+
blocks: LegalDocumentBlock[];
|
|
1328
|
+
}
|
|
1329
|
+
/** Публичные документы ИТД и история их редакций. Доступны через `itd.legal`. */
|
|
1330
|
+
declare class LegalResource extends BaseResource {
|
|
1331
|
+
/**
|
|
1332
|
+
* Возвращает список документов выбранной области.
|
|
1333
|
+
*
|
|
1334
|
+
* В списке указаны действующие редакции. Полный текст загружается через {@link current}.
|
|
1335
|
+
*/
|
|
1336
|
+
list(scope?: LegalDocumentScope, options?: RequestOptions): Promise<LegalDocumentSummary[]>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Загружает действующую редакцию документа с полным текстом.
|
|
1339
|
+
*
|
|
1340
|
+
* @example
|
|
1341
|
+
* ```ts
|
|
1342
|
+
* const terms = await itd.legal.current(LegalDocumentScope.Social, 'terms');
|
|
1343
|
+
* console.log(terms.version, terms.blocks);
|
|
1344
|
+
* ```
|
|
1345
|
+
*/
|
|
1346
|
+
current(scope: LegalDocumentScope, slug: string, options?: RequestOptions): Promise<LegalDocument>;
|
|
1347
|
+
/** Возвращает историю редакций без текста. Поле `current` отмечает действующую редакцию. */
|
|
1348
|
+
versions(scope: LegalDocumentScope, slug: string, options?: RequestOptions): Promise<LegalDocumentVersion[]>;
|
|
1349
|
+
/**
|
|
1350
|
+
* Загружает конкретную редакцию документа с полным текстом.
|
|
1351
|
+
*
|
|
1352
|
+
* @param version идентификатор редакции из {@link versions}, например `2026-04-03`
|
|
1353
|
+
*/
|
|
1354
|
+
version(scope: LegalDocumentScope, slug: string, version: string, options?: RequestOptions): Promise<LegalDocument>;
|
|
1355
|
+
}
|
|
1281
1356
|
/** Клан в рейтинге. */
|
|
1282
1357
|
interface Clan {
|
|
1283
1358
|
/** Эмодзи клана — оно же `clanAvatar` его участников. */
|
|
@@ -1329,8 +1404,6 @@ interface Report {
|
|
|
1329
1404
|
id: string;
|
|
1330
1405
|
createdAt: IsoDate;
|
|
1331
1406
|
}
|
|
1332
|
-
//#endregion
|
|
1333
|
-
//#region src/models/status.d.ts
|
|
1334
1407
|
/** Происшествие в истории сервиса. */
|
|
1335
1408
|
interface StatusIncidentLine {
|
|
1336
1409
|
/** Вид происшествия. */
|
|
@@ -1370,6 +1443,8 @@ interface ServiceStatus {
|
|
|
1370
1443
|
last_checked: IsoDate;
|
|
1371
1444
|
/** Доступность за 90 суток в процентах. */
|
|
1372
1445
|
uptime_90d: number;
|
|
1446
|
+
/** Считает ли сервер данные последней проверки актуальными. */
|
|
1447
|
+
data_fresh?: boolean;
|
|
1373
1448
|
/**
|
|
1374
1449
|
* История по суткам. Ключ — сколько суток назад, `'0'` — сегодня.
|
|
1375
1450
|
*
|
|
@@ -1384,18 +1459,26 @@ interface PlatformStatus {
|
|
|
1384
1459
|
overall_status: ServiceState;
|
|
1385
1460
|
/** Когда данные последний раз пересчитаны. */
|
|
1386
1461
|
updated_at: IsoDate;
|
|
1462
|
+
/** Когда сформирован ответ. */
|
|
1463
|
+
generated_at?: IsoDate;
|
|
1464
|
+
/** Через сколько миллисекунд сервер считает данные устаревшими. */
|
|
1465
|
+
stale_after_ms?: number;
|
|
1466
|
+
/** Доступность платформы за 90 суток в процентах. */
|
|
1467
|
+
uptime_90d?: number;
|
|
1468
|
+
/** Первая дата периода, `YYYY-MM-DD`. */
|
|
1469
|
+
window_start?: string;
|
|
1470
|
+
/** Последняя дата периода, `YYYY-MM-DD`. */
|
|
1471
|
+
window_end?: string;
|
|
1472
|
+
/** Число суток с данными за период. */
|
|
1473
|
+
sample_days?: number;
|
|
1387
1474
|
services: ServiceStatus[];
|
|
1388
1475
|
}
|
|
1389
|
-
//#endregion
|
|
1390
|
-
//#region src/resources/status.d.ts
|
|
1391
1476
|
/** API встроенного status feature. @internal */
|
|
1392
1477
|
declare class StatusResource {
|
|
1393
1478
|
#private;
|
|
1394
1479
|
constructor(context: FeatureContext);
|
|
1395
1480
|
get(options?: RequestOptions): Promise<PlatformStatus>;
|
|
1396
1481
|
}
|
|
1397
|
-
//#endregion
|
|
1398
|
-
//#region src/resources/platform.d.ts
|
|
1399
1482
|
/** Требования к версии одного приложения платформы. */
|
|
1400
1483
|
interface PlatformClientVersion {
|
|
1401
1484
|
/** Минимальная поддерживаемая версия приложения. */
|
|
@@ -1456,8 +1539,6 @@ declare class PlatformResource extends BaseResource {
|
|
|
1456
1539
|
*/
|
|
1457
1540
|
status(options?: RequestOptions): Promise<PlatformStatus>;
|
|
1458
1541
|
}
|
|
1459
|
-
//#endregion
|
|
1460
|
-
//#region src/builders/markup.d.ts
|
|
1461
1542
|
/** Текст вместе с рассчитанной разметкой. */
|
|
1462
1543
|
interface TextMarkup {
|
|
1463
1544
|
content: string;
|
|
@@ -1544,8 +1625,6 @@ declare function markup(content?: string): MarkupBuilder;
|
|
|
1544
1625
|
* `substring`, DOM Selection и wire-форматом сайта даже при наличии эмодзи.
|
|
1545
1626
|
*/
|
|
1546
1627
|
declare function autoSpans(text: string, options?: AutoSpansOptions): Span[];
|
|
1547
|
-
//#endregion
|
|
1548
|
-
//#region src/spans/parse.d.ts
|
|
1549
1628
|
/** Настройки безопасного импорта разметки. */
|
|
1550
1629
|
interface ParseMarkupOptions {
|
|
1551
1630
|
/**
|
|
@@ -1572,8 +1651,6 @@ declare function parseMarkdown(source: string, options?: ParseMarkupOptions): Te
|
|
|
1572
1651
|
* удаляется. Опасный `href` сохраняет текст ссылки, но не создаёт span.
|
|
1573
1652
|
*/
|
|
1574
1653
|
declare function parseHtml(source: string, options?: ParseMarkupOptions): TextMarkup;
|
|
1575
|
-
//#endregion
|
|
1576
|
-
//#region src/builders/poll.d.ts
|
|
1577
1654
|
/**
|
|
1578
1655
|
* Билдер опроса.
|
|
1579
1656
|
*
|
|
@@ -1623,8 +1700,6 @@ declare class PollBuilder implements ItdBuilder<CreatePollInput> {
|
|
|
1623
1700
|
declare function poll(question?: string): PollBuilder;
|
|
1624
1701
|
/** Что принимает параметр опроса: объект, билдер или функция-настройщик. */
|
|
1625
1702
|
type PollInput = BuilderInput<CreatePollInput, PollBuilder>;
|
|
1626
|
-
//#endregion
|
|
1627
|
-
//#region src/builders/post.d.ts
|
|
1628
1703
|
declare const BUILD_UPDATE: unique symbol;
|
|
1629
1704
|
/** Данные для создания поста, включая поддерживаемые builder-формы вложенного опроса. */
|
|
1630
1705
|
interface CreatePostInput extends Omit<CreatePostData, 'poll'> {
|
|
@@ -1744,8 +1819,6 @@ declare function post(content?: string): PostBuilder;
|
|
|
1744
1819
|
type PostInput = BuilderInput<CreatePostInput, PostBuilder>;
|
|
1745
1820
|
/** Что принимает `posts.update`: объект, билдер поста или функция-настройщик. */
|
|
1746
1821
|
type PostUpdateInput = UpdatePostInput | PostBuilder | ((builder: PostBuilder) => PostBuilder | UpdatePostInput);
|
|
1747
|
-
//#endregion
|
|
1748
|
-
//#region src/resources/posts.d.ts
|
|
1749
1822
|
/** Параметры запроса ленты. */
|
|
1750
1823
|
interface FeedParams {
|
|
1751
1824
|
/** Вкладка ленты. По умолчанию сервер отдаёт популярное. */
|
|
@@ -1917,8 +1990,6 @@ declare class PostsResource extends BaseResource {
|
|
|
1917
1990
|
*/
|
|
1918
1991
|
voiceComment(postId: string, audio: FileInput, options?: RequestOptions): Promise<Comment>;
|
|
1919
1992
|
}
|
|
1920
|
-
//#endregion
|
|
1921
|
-
//#region src/builders/report.d.ts
|
|
1922
1993
|
/**
|
|
1923
1994
|
* Билдер жалобы.
|
|
1924
1995
|
*
|
|
@@ -1962,8 +2033,6 @@ declare const report: Readonly<{
|
|
|
1962
2033
|
}>;
|
|
1963
2034
|
/** Что принимает параметр жалобы: объект, билдер или функция-настройщик. */
|
|
1964
2035
|
type ReportInput = BuilderInput<CreateReportInput, ReportBuilder>;
|
|
1965
|
-
//#endregion
|
|
1966
|
-
//#region src/resources/reports.d.ts
|
|
1967
2036
|
/**
|
|
1968
2037
|
* Жалобы на контент и пользователей.
|
|
1969
2038
|
*
|
|
@@ -1984,8 +2053,6 @@ declare class ReportsResource extends BaseResource {
|
|
|
1984
2053
|
*/
|
|
1985
2054
|
create(input: ReportInput, options?: RequestOptions): Promise<Report>;
|
|
1986
2055
|
}
|
|
1987
|
-
//#endregion
|
|
1988
|
-
//#region src/resources/search.d.ts
|
|
1989
2056
|
/** Результат глобального поиска. */
|
|
1990
2057
|
interface SearchResult {
|
|
1991
2058
|
users: UserSummary[];
|
|
@@ -2007,8 +2074,6 @@ declare class SearchResource extends BaseResource {
|
|
|
2007
2074
|
*/
|
|
2008
2075
|
all(query: string, options?: RequestOptions): Promise<SearchResult>;
|
|
2009
2076
|
}
|
|
2010
|
-
//#endregion
|
|
2011
|
-
//#region src/models/shop.d.ts
|
|
2012
2077
|
/** Категория товара магазина. */
|
|
2013
2078
|
declare const ShopProductCategory: Readonly<{
|
|
2014
2079
|
readonly Apparel: "apparel";
|
|
@@ -2174,14 +2239,17 @@ declare const ShopOrderStatus: Readonly<{
|
|
|
2174
2239
|
readonly Expired: "expired";
|
|
2175
2240
|
}>;
|
|
2176
2241
|
type ShopOrderStatus = Loose<(typeof ShopOrderStatus)[keyof typeof ShopOrderStatus]>;
|
|
2177
|
-
/**
|
|
2178
|
-
interface
|
|
2242
|
+
/** Общая часть заказа в списке и оформленного заказа. */
|
|
2243
|
+
interface ShopOrderBase {
|
|
2179
2244
|
number: string;
|
|
2180
|
-
titles: string[];
|
|
2181
2245
|
status: ShopOrderStatus;
|
|
2182
2246
|
total: number;
|
|
2183
2247
|
createdAt: IsoDate;
|
|
2184
2248
|
}
|
|
2249
|
+
/** Заказ в списке заказов. */
|
|
2250
|
+
interface ShopOrderSummary extends ShopOrderBase {
|
|
2251
|
+
titles: string[];
|
|
2252
|
+
}
|
|
2185
2253
|
/** Товар в оформленном заказе. */
|
|
2186
2254
|
interface ShopOrderItem {
|
|
2187
2255
|
slug: string;
|
|
@@ -2203,17 +2271,13 @@ interface ShopOrderSupport {
|
|
|
2203
2271
|
telegram?: string | undefined;
|
|
2204
2272
|
}
|
|
2205
2273
|
/** Оформленный заказ. */
|
|
2206
|
-
interface ShopOrder {
|
|
2207
|
-
number: string;
|
|
2208
|
-
status: ShopOrderStatus;
|
|
2209
|
-
createdAt: IsoDate;
|
|
2274
|
+
interface ShopOrder extends ShopOrderBase {
|
|
2210
2275
|
payment: {
|
|
2211
2276
|
pending: boolean;
|
|
2212
2277
|
};
|
|
2213
2278
|
items: ShopOrderItem[];
|
|
2214
2279
|
itemsTotal: number;
|
|
2215
2280
|
shipping: number;
|
|
2216
|
-
total: number;
|
|
2217
2281
|
delivery: ShopOrderDelivery;
|
|
2218
2282
|
track?: string | null | undefined;
|
|
2219
2283
|
comment?: string | null | undefined;
|
|
@@ -2234,8 +2298,6 @@ interface ShopOrderAccessVerification {
|
|
|
2234
2298
|
token: string;
|
|
2235
2299
|
expiresInSec: number;
|
|
2236
2300
|
}
|
|
2237
|
-
//#endregion
|
|
2238
|
-
//#region src/resources/shop.d.ts
|
|
2239
2301
|
/** Параметры запроса, который может использовать токен доступа к заказам. */
|
|
2240
2302
|
interface ShopOrderRequestOptions extends RequestOptions {
|
|
2241
2303
|
/** Временный токен из проверки кода или `pass` созданного заказа. */
|
|
@@ -2302,8 +2364,6 @@ declare class ShopResource {
|
|
|
2302
2364
|
/** @internal */
|
|
2303
2365
|
constructor(http: ConstructorParameters<typeof BaseResource>[0]);
|
|
2304
2366
|
}
|
|
2305
|
-
//#endregion
|
|
2306
|
-
//#region src/resources/subscription.d.ts
|
|
2307
2367
|
/**
|
|
2308
2368
|
* Подписка и способы оплаты.
|
|
2309
2369
|
*
|
|
@@ -2329,8 +2389,6 @@ declare class SubscriptionResource extends BaseResource {
|
|
|
2329
2389
|
/** Удаляет способ оплаты. */
|
|
2330
2390
|
removeMethod(methodId: string, options?: RequestOptions): Promise<void>;
|
|
2331
2391
|
}
|
|
2332
|
-
//#endregion
|
|
2333
|
-
//#region src/resources/telemetry.d.ts
|
|
2334
2392
|
/** Параметры событий телеметрии. */
|
|
2335
2393
|
interface TelemetryOptions {
|
|
2336
2394
|
/** Переопределяет идентификатор сессии телеметрии (`sid`) для этого запроса. */
|
|
@@ -2498,8 +2556,6 @@ declare class TelemetryResource extends BaseResource {
|
|
|
2498
2556
|
/** Закрывает все созданные накопители, отправляя оставшиеся записи. */
|
|
2499
2557
|
close(): Promise<void>;
|
|
2500
2558
|
}
|
|
2501
|
-
//#endregion
|
|
2502
|
-
//#region src/resources/users.d.ts
|
|
2503
2559
|
/**
|
|
2504
2560
|
* Параметры списков пользователей.
|
|
2505
2561
|
*
|
|
@@ -2552,10 +2608,6 @@ declare class UsersResource extends BaseResource {
|
|
|
2552
2608
|
setBanner(file: FileInput, uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<MyProfile>;
|
|
2553
2609
|
/** Удаляет баннер профиля, устанавливая `bannerId` в `null`. */
|
|
2554
2610
|
removeBanner(options?: RequestOptions): Promise<MyProfile>;
|
|
2555
|
-
/** Деактивирует аккаунт. Вернуть его можно через {@link restore}. */
|
|
2556
|
-
deactivate(options?: RequestOptions): Promise<void>;
|
|
2557
|
-
/** Восстанавливает деактивированный аккаунт. */
|
|
2558
|
-
restore(options?: RequestOptions): Promise<void>;
|
|
2559
2611
|
/** Создаёт профиль после регистрации. */
|
|
2560
2612
|
createProfile(input: {
|
|
2561
2613
|
username: string;
|
|
@@ -2655,8 +2707,6 @@ declare class UsersResource extends BaseResource {
|
|
|
2655
2707
|
/** Снимает активный значок. */
|
|
2656
2708
|
removePin(options?: RequestOptions): Promise<void>;
|
|
2657
2709
|
}
|
|
2658
|
-
//#endregion
|
|
2659
|
-
//#region src/resources/verification.d.ts
|
|
2660
2710
|
/**
|
|
2661
2711
|
* Верификация профиля.
|
|
2662
2712
|
*
|
|
@@ -2668,8 +2718,6 @@ declare class VerificationResource extends BaseResource {
|
|
|
2668
2718
|
/** Подаёт заявку на верификацию с видео. */
|
|
2669
2719
|
submit(videoUrl: string, options?: RequestOptions): Promise<unknown>;
|
|
2670
2720
|
}
|
|
2671
|
-
//#endregion
|
|
2672
|
-
//#region src/core/attachments/factories.d.ts
|
|
2673
2721
|
/** Создаёт URL-источник в выбранном режиме. */
|
|
2674
2722
|
declare function fromUrl(url: string, options: UrlFileOptions & {
|
|
2675
2723
|
mode: typeof FileTransferMode.Stream;
|
|
@@ -2684,8 +2732,6 @@ declare function fromUrl(url: string, options: UrlFileOptions): LazyFile | Strea
|
|
|
2684
2732
|
* Фабрика вызывается заново для каждой попытки; возвращать один и тот же поток нельзя.
|
|
2685
2733
|
*/
|
|
2686
2734
|
declare function fromStream(factory: (context: FileContext) => ReadableStream<Uint8Array> | FileStreamContent | Promise<ReadableStream<Uint8Array> | FileStreamContent>, options?: FromStreamOptions): StreamFile;
|
|
2687
|
-
//#endregion
|
|
2688
|
-
//#region src/domain/mime.d.ts
|
|
2689
2735
|
/** Изображения, которые принимает `POST /api/files/upload`. */
|
|
2690
2736
|
declare const IMAGE_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/avif", "image/heic", "image/heif"];
|
|
2691
2737
|
type ImageMimeType = (typeof IMAGE_MIME_TYPES)[number];
|
|
@@ -2698,8 +2744,6 @@ type AudioMimeType = (typeof AUDIO_MIME_TYPES)[number];
|
|
|
2698
2744
|
/** Все типы, которые принимает загрузка. */
|
|
2699
2745
|
declare const ALLOWED_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/avif", "image/heic", "image/heif", "video/mp4", "video/webm", "video/quicktime", "audio/ogg"];
|
|
2700
2746
|
type AllowedMimeType = (typeof ALLOWED_MIME_TYPES)[number];
|
|
2701
|
-
//#endregion
|
|
2702
|
-
//#region src/domain/time.d.ts
|
|
2703
2747
|
/**
|
|
2704
2748
|
* Приводит отметку времени PostgreSQL к ISO-8601 в UTC.
|
|
2705
2749
|
*
|
|
@@ -2725,8 +2769,6 @@ declare function utcStampToIso(value: string): string;
|
|
|
2725
2769
|
* ```
|
|
2726
2770
|
*/
|
|
2727
2771
|
declare function toDate(value: IsoDate | null | undefined): Date | null;
|
|
2728
|
-
//#endregion
|
|
2729
|
-
//#region src/models/guards.d.ts
|
|
2730
2772
|
/**
|
|
2731
2773
|
* Свой ли это профиль.
|
|
2732
2774
|
*
|
|
@@ -2736,8 +2778,6 @@ declare function toDate(value: IsoDate | null | undefined): Date | null;
|
|
|
2736
2778
|
* ```
|
|
2737
2779
|
*/
|
|
2738
2780
|
declare function isMyProfile(profile: Profile): profile is MyProfile;
|
|
2739
|
-
//#endregion
|
|
2740
|
-
//#region src/models/status-helpers.d.ts
|
|
2741
2781
|
/**
|
|
2742
2782
|
* Разворачивает историю сервиса в массив на 90 суток.
|
|
2743
2783
|
* Сутки без данных становятся `null`.
|
|
@@ -2754,8 +2794,6 @@ declare function isMyProfile(profile: Profile): profile is MyProfile;
|
|
|
2754
2794
|
* ```
|
|
2755
2795
|
*/
|
|
2756
2796
|
declare function statusDays(service: ServiceStatus): (StatusDay | null)[];
|
|
2757
|
-
//#endregion
|
|
2758
|
-
//#region src/shop/order-access.d.ts
|
|
2759
2797
|
/** Хранилище временного доступа к гостевым заказам. */
|
|
2760
2798
|
interface ShopOrderAccessStorage {
|
|
2761
2799
|
get(): ShopOrderAccessSession | null | Promise<ShopOrderAccessSession | null>;
|
|
@@ -2777,8 +2815,6 @@ interface ShopOrderAccessStorageAdapterOptions {
|
|
|
2777
2815
|
}
|
|
2778
2816
|
/** Создаёт хранилище доступа к заказам поверх `KeyValueStore`. */
|
|
2779
2817
|
declare function createShopOrderAccessStorage(store: KeyValueStore<ShopOrderAccessSession>, options?: ShopOrderAccessStorageAdapterOptions): ShopOrderAccessStorage;
|
|
2780
|
-
//#endregion
|
|
2781
|
-
//#region src/shop/feature.d.ts
|
|
2782
2818
|
/** Настройки подключаемого модуля доступа к заказам по коду из письма. */
|
|
2783
2819
|
interface ShopFeatureOptions {
|
|
2784
2820
|
/** Отдельное хранилище токена заказов. По умолчанию используется память процесса. */
|
|
@@ -2805,8 +2841,6 @@ interface ShopFeatureApi {
|
|
|
2805
2841
|
}
|
|
2806
2842
|
/** Создаёт подключаемый модуль для доступа к заказам по коду из письма. */
|
|
2807
2843
|
declare function createShopFeature(options?: ShopFeatureOptions): ClientFeature<ShopFeatureApi>;
|
|
2808
|
-
//#endregion
|
|
2809
|
-
//#region src/spans/render.d.ts
|
|
2810
2844
|
/** Формат результата {@link renderSpans}. */
|
|
2811
2845
|
declare const SpanRenderFormat: Readonly<{
|
|
2812
2846
|
readonly Html: "html";
|
|
@@ -2836,6 +2870,4 @@ interface RenderSpansOptions {
|
|
|
2836
2870
|
* Отсутствующий массив считается пустым; формат по умолчанию — HTML.
|
|
2837
2871
|
*/
|
|
2838
2872
|
declare function renderSpans(content: string, spans?: readonly Span[] | null | undefined, options?: RenderSpansOptions): string;
|
|
2839
|
-
|
|
2840
|
-
export { ShopConsentContext as $, Page as $n, markup as $t, DwellEntry as A, PollOption as An, CookieJar as Ar, report as At, ViewTrackerInput as B, CreateCommentInput as Bn, PollBuilder as Bt, fromStream as C, CommentReplyTo as Cn, FileResolver as Cr, ShopSizeChart as Ct, UpdateProfileInput as D, OriginalPost as Dn, ResolveFileContext as Dr, ReportsResource as Dt, UpdatePrivacyInput as E, LikeResult as En, PreparedStreamSource as Er, SearchResult as Et, TelemetryClock as F, CommentInput as Fn, CreatePostInput as Ft, ShopConsentsResource as G, PaymentMethod as Gn, parseMarkdown as Gt, SubscriptionResource as H, CreatePostData as Hn, poll as Ht, TelemetryOptions as I, comment as In, PostBuilder as It, ShopOrdersResource as J, Subscription as Jn, MarkupContent as Jt, ShopDeliveryResource as K, QrLoginTarget as Kn, AutoSpansOptions as Kt, TelemetryResource as L, BuilderInput as Ln, PostInput as Lt, PhotoOpenInput as M, PostStats as Mn, FeedParams as Mt, TelemetryBatch as N, PostUpdateResult as Nn, PostsResource as Nt, UserListParams as O, PinPostResult as On, ResolveFileOptions as Or, ReportBuilder as Ot, TelemetryBatchOptions as P, CommentBuilder as Pn, UserPostsParams as Pt, ShopConsent as Q, BaseResource as Qn, autoSpans as Qt, VideoProgressInput as R, ItdBuilder as Rn, PostUpdateInput as Rt, VideoMimeType as S, Comment as Sn, ManagedClientResource as Sr, ShopRecipient as St, VerificationResource as T, Hashtag as Tn, PreparedFileSource as Tr, SearchResource as Tt, CreateShopOrderOptions as U, CreateReportInput as Un, ParseMarkupOptions as Ut, ViewTrackerOptions as V, CreatePollInput as Vn, PollInput as Vt, PayShopOrderOptions as W, UpdatePostInput as Wn, parseHtml as Wt, ShopResource as X, NotificationsResource as Xn, MarkupSpan as Xt, ShopProductsResource as Y, NotificationListParams as Yn, MarkupInput as Yt, CreateShopOrderInput as Z, UpdateNotificationSettingsInput as Zn, TextMarkup as Zt, AllowedMimeType as _, UploadOptions as _n, FeatureBucketDefinition as _r, ShopProduct as _t, ShopFeatureOptions as a, StatusDay as an, RateLimitBucketState as ar, ShopDeliveryDestination as at, ImageMimeType as b, RepliesParams as bn, FeatureOperationDefinition as br, ShopProductSpec as bt, ShopOrderAccessStorage as c, AnnouncementButton as cn, AttemptInterceptor as cr, ShopOrderAccessSession as ct, statusDays as d, Portal as dn, OperationExtensions as dr, ShopOrderItem as dt, PlatformClientVersion as en, PageState as er, ShopConsentKind as et, isMyProfile as f, Report as fn, OperationTransformContext as fr, ShopOrderItemInput as ft, AUDIO_MIME_TYPES as g, FilesResource as gn, ClientFeature as gr, ShopPayment as gt, ALLOWED_MIME_TYPES as h, HashtagsResource as hn, PluginTeardown as hr, ShopOrderSupport as ht, ShopFeatureApi as i, ServiceStatus as in, mapPage as ir, ShopDeliveryCountry as it, InteractionEntry as j, Post as jn, CommentsParams as jt, UsersResource as k, Poll as kn, HttpClient as kr, ReportInput as kt, ShopOrderAccessStorageAdapterOptions as l, ChangelogEntry as ln, AttemptNext as lr, ShopOrderAccessVerification as lt, utcStampToIso as m, HashtagPostsParams as mn, PluginApi as mr, ShopOrderSummary as mt, SpanRenderFormat as n, PlatformVersions as nn, Paginator as nr, ShopDeliveryCalculation as nt, createShopFeature as o, StatusIncidentLine as on, AttemptContext as or, ShopDeliveryPoint as ot, toDate as p, VerificationStatus as pn, OperationTransformer as pr, ShopOrderStatus as pt, ShopOrderRequestOptions as q, Session as qn, MarkupBuilder as qt, renderSpans as r, PlatformStatus as rn, PaginatorOptions as rr, ShopDeliveryCity as rt, MemoryShopOrderAccessStorage as s, Announcement as sn, AttemptExtensions as sr, ShopOrder as st, RenderSpansOptions as t, PlatformResource as tn, PaginationMode as tr, ShopCreatedOrder as tt, createShopOrderAccessStorage as u, Clan as un, ClientPlugin as ur, ShopOrderDelivery as ut, AudioMimeType as v, UploadedFile as vn, FeatureContext as vr, ShopProductCategory as vt, fromUrl as w, CommentUpdateResult as wn, PreparedBufferSource as wr, ShopSizeChartRow as wt, VIDEO_MIME_TYPES as x, Attachment as xn, FeatureRequestOptions as xr, ShopProductStatus as xt, IMAGE_MIME_TYPES as y, CommentsResource as yn, FeatureInstallation as yr, ShopProductColor as yt, ViewTracker as z, isBuilder as zn, post as zt };
|
|
2841
|
-
//# sourceMappingURL=render-UsQ1hb2U.d.ts.map
|
|
2873
|
+
export { ShopConsentContext as $, BuilderInput as $n, autoSpans as $t, DwellEntry as A, BannerDrawingTool as An, OperationTransformer as Ar, ReportInput as At, ViewTrackerInput as B, OriginalPost as Bn, FileResolver as Br, post as Bt, fromStream as C, HashtagsResource as Cn, AttemptContext as Cr, ShopRecipient as Ct, UpdateProfileInput as D, BannerDrawing as Dn, ClientPlugin as Dr, SearchResult as Dt, UpdatePrivacyInput as E, UploadedFile as En, AttemptNext as Er, SearchResource as Et, TelemetryClock as F, Comment as Fn, FeatureContext as Fr, UserPostsParams as Ft, ShopConsentsResource as G, PostBase as Gn, ResolveFileOptions as Gr, parseHtml as Gt, SubscriptionResource as H, Poll as Hn, PreparedFileSource as Hr, PollInput as Ht, TelemetryOptions as I, CommentReplyTo as In, FeatureInstallation as Ir, CreatePostInput as It, ShopOrdersResource as J, PostUpdateResult as Jn, MarkupBuilder as Jt, ShopDeliveryResource as K, PostCounters as Kn, HttpClient as Kr, parseMarkdown as Kt, TelemetryResource as L, CommentUpdateResult as Ln, FeatureOperationDefinition as Lr, PostBuilder as Lt, PhotoOpenInput as M, CommentsResource as Mn, PluginTeardown as Mr, CommentsParams as Mt, TelemetryBatch as N, RepliesParams as Nn, ClientFeature as Nr, FeedParams as Nt, UserListParams as O, BannerDrawingOperation as On, OperationExtensions as Or, ReportsResource as Ot, TelemetryBatchOptions as P, Attachment as Pn, FeatureBucketDefinition as Pr, PostsResource as Pt, ShopConsent as Q, comment as Qn, TextMarkup as Qt, VideoProgressInput as R, Hashtag as Rn, FeatureRequestOptions as Rr, PostInput as Rt, VideoMimeType as S, HashtagPostsParams as Sn, RateLimitBucketState as Sr, ShopProductStatus as St, VerificationResource as T, UploadOptions as Tn, AttemptInterceptor as Tr, ShopSizeChartRow as Tt, CreateShopOrderOptions as U, PollOption as Un, PreparedStreamSource as Ur, poll as Ut, ViewTrackerOptions as V, PinPostResult as Vn, PreparedBufferSource as Vr, PollBuilder as Vt, PayShopOrderOptions as W, Post as Wn, ResolveFileContext as Wr, ParseMarkupOptions as Wt, ShopResource as X, CommentBuilder as Xn, MarkupInput as Xt, ShopProductsResource as Y, UpdateResultBase as Yn, MarkupContent as Yt, CreateShopOrderInput as Z, CommentInput as Zn, MarkupSpan as Zt, AllowedMimeType as _, LegalDocumentBlock as _n, PageState as _r, ShopPayment as _t, ShopFeatureOptions as a, ServiceStatus as an, CreateReportInput as ar, ShopDeliveryDestination as at, ImageMimeType as b, LegalDocumentSummary as bn, PaginatorOptions as br, ShopProductColor as bt, ShopOrderAccessStorage as c, Announcement as cn, PaymentMethod as cr, ShopOrderAccessSession as ct, statusDays as d, Clan as dn, Subscription as dr, ShopOrderDelivery as dt, markup as en, ItdBuilder as er, ShopConsentKind as et, isMyProfile as f, Portal as fn, NotificationListParams as fr, ShopOrderItem as ft, AUDIO_MIME_TYPES as g, LegalDocument as gn, Page as gr, ShopOrderSupport as gt, ALLOWED_MIME_TYPES as h, LegalResource as hn, BaseResource as hr, ShopOrderSummary as ht, ShopFeatureApi as i, PlatformStatus as in, CreatePostData as ir, ShopDeliveryCountry as it, InteractionEntry as j, UploadedBannerDrawing as jn, PluginApi as jr, report as jt, UsersResource as k, BannerDrawingPoint as kn, OperationTransformContext as kr, ReportBuilder as kt, ShopOrderAccessStorageAdapterOptions as l, AnnouncementButton as ln, QrLoginTarget as lr, ShopOrderAccessVerification as lt, utcStampToIso as m, VerificationStatus as mn, UpdateNotificationSettingsInput as mr, ShopOrderStatus as mt, SpanRenderFormat as n, PlatformResource as nn, CreateCommentInput as nr, ShopDeliveryCalculation as nt, createShopFeature as o, StatusDay as on, UpdatePostInput as or, ShopDeliveryPoint as ot, toDate as p, Report as pn, NotificationsResource as pr, ShopOrderItemInput as pt, ShopOrderRequestOptions as q, PostStats as qn, CookieJar as qr, AutoSpansOptions as qt, renderSpans as r, PlatformVersions as rn, CreatePollInput as rr, ShopDeliveryCity as rt, MemoryShopOrderAccessStorage as s, StatusIncidentLine as sn, AccountLifecycleResource as sr, ShopOrder as st, RenderSpansOptions as t, PlatformClientVersion as tn, isBuilder as tr, ShopCreatedOrder as tt, createShopOrderAccessStorage as u, ChangelogEntry as un, Session as ur, ShopOrderBase as ut, AudioMimeType as v, LegalDocumentBlockType as vn, PaginationMode as vr, ShopProduct as vt, fromUrl as w, FilesResource as wn, AttemptExtensions as wr, ShopSizeChart as wt, VIDEO_MIME_TYPES as x, LegalDocumentVersion as xn, mapPage as xr, ShopProductSpec as xt, IMAGE_MIME_TYPES as y, LegalDocumentScope as yn, Paginator as yr, ShopProductCategory as yt, ViewTracker as z, LikeResult as zn, ManagedClientResource as zr, PostUpdateInput as zt };
|