itd-api 0.12.1 → 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-FaXfdle0.d.cts → events-B6uqXOSs.d.cts} +42 -63
- package/dist/shared/{events-_iYo8EP5.js → events-C_MgYlXR.js} +30 -40
- package/dist/shared/events-C_MgYlXR.js.map +1 -0
- package/dist/shared/{events-BKyxZQNw.cjs → events-DV1i1t6J.cjs} +30 -40
- package/dist/shared/events-DV1i1t6J.cjs.map +1 -0
- package/dist/shared/{events-9215JDDd.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-BQvC5UxF.cjs → render-0-JJPOwb.cjs} +204 -109
- package/dist/shared/render-0-JJPOwb.cjs.map +1 -0
- package/dist/shared/{render-CFoF2WaH.js → render-CF49aBO8.js} +181 -110
- package/dist/shared/render-CF49aBO8.js.map +1 -0
- package/dist/shared/{render-X2JCo1JS.d.cts → render-CYVOc_IW.d.cts} +152 -251
- package/dist/shared/{render-BS09ygcy.d.ts → render-eOxYgdoA.d.ts} +152 -102
- 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-CdT4lMxQ.js → url-CPKhcxf1.js} +250 -91
- package/dist/shared/url-CPKhcxf1.js.map +1 -0
- package/dist/shared/{url-_R0oJ7gE.d.ts → url-DCqxoxGX.d.cts} +1903 -1623
- package/dist/shared/{url-_R0oJ7gE.d.cts → url-DL5Mip4L.d.ts} +209 -78
- package/dist/shared/{url-ioIaywDi.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-BKyxZQNw.cjs.map +0 -1
- package/dist/shared/events-_iYo8EP5.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-BQvC5UxF.cjs.map +0 -1
- package/dist/shared/render-CFoF2WaH.js.map +0 -1
- package/dist/shared/url-CdT4lMxQ.js.map +0 -1
- package/dist/shared/url-ioIaywDi.cjs.map +0 -1
- package/dist/shared/validate-CFx2dISs.cjs.map +0 -1
- package/dist/shared/validate-D7_kq3g5.js.map +0 -1
|
@@ -1,162 +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
|
|
5
|
-
/**
|
|
6
|
-
* Минимальное хранилище cookie для сред без своего.
|
|
7
|
-
*
|
|
8
|
-
* Refresh-токен итд.com приходит в `Set-Cookie`, а `fetch` вне браузера cookie не хранит —
|
|
9
|
-
* без jar сессию не продлить. В браузере и React Native не используется: там cookie ведёт
|
|
10
|
-
* сама среда.
|
|
11
|
-
*
|
|
12
|
-
* Реализована практическая часть RFC 6265: origin, путь, срок жизни, флаг `Secure`.
|
|
13
|
-
* Доменные cookie для поддоменов намеренно не поддерживаются — API работает с одного хоста.
|
|
14
|
-
*/
|
|
15
|
-
declare class CookieJar {
|
|
16
|
-
#private;
|
|
17
|
-
/** Независимая копия для auth-flow, который ещё не получил право на commit. */
|
|
18
|
-
clone(): CookieJar;
|
|
19
|
-
/** Атомарно с точки зрения синхронных читателей заменяет содержимое снимком другого jar. */
|
|
20
|
-
replaceWith(source: CookieJar): void;
|
|
21
|
-
/**
|
|
22
|
-
* Забирает `Set-Cookie` из ответа.
|
|
23
|
-
*
|
|
24
|
-
* Использует `Headers.getSetCookie()`, где он есть (Node 20+, undici). В остальных средах
|
|
25
|
-
* заголовки склеены в одну строку, и её нельзя резать по запятой напрямую: запятая есть
|
|
26
|
-
* внутри `Expires=Wed, 09 Jun 2027 …`. Разделением занимается `set-cookie-parser`.
|
|
27
|
-
*/
|
|
28
|
-
setFromResponse(url: string, response: Response): void;
|
|
29
|
-
/**
|
|
30
|
-
* Кладёт cookie напрямую, минуя `Set-Cookie`.
|
|
31
|
-
*
|
|
32
|
-
* Нужно ровно в одном случае: пользователь передал refresh-токен строкой, а сервер читает
|
|
33
|
-
* его только из cookie. Значение не кодируется — оно уходит в заголовок как есть.
|
|
34
|
-
*/
|
|
35
|
-
set(url: string, name: string, value: string, path?: string): void;
|
|
36
|
-
/** Сохраняет cookie из готовых строк `Set-Cookie`. */
|
|
37
|
-
setFromStrings(url: string, setCookieStrings: string[]): void;
|
|
38
|
-
/**
|
|
39
|
-
* Собирает значение заголовка `Cookie` для запроса.
|
|
40
|
-
*
|
|
41
|
-
* @returns строка вида `a=1; b=2` либо `undefined`, если подходящих cookie нет
|
|
42
|
-
*/
|
|
43
|
-
getHeader(url: string): string | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Значение действующей cookie.
|
|
46
|
-
*
|
|
47
|
-
* Нужно, чтобы забрать обновлённый refresh-токен: сервер ротирует его при каждом
|
|
48
|
-
* продлении сессии, и сохранять надо именно новое значение.
|
|
49
|
-
*
|
|
50
|
-
* @param url если указан, учитываются origin, путь и флаг `Secure`
|
|
51
|
-
*/
|
|
52
|
-
getValue(name: string, url?: string): string | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Есть ли действующая cookie с таким именем.
|
|
55
|
-
*
|
|
56
|
-
* Используется для проверки флага {@link AUTH_FLAG_COOKIE} перед запросом обновления
|
|
57
|
-
* токена: у анонима refresh-сессии нет, и дёргать API незачем.
|
|
58
|
-
*/
|
|
59
|
-
has(name: string, url?: string): boolean;
|
|
60
|
-
/** Сохраняет содержимое jar для записи в {@link TokenStorage}. */
|
|
61
|
-
serialize(): string[];
|
|
62
|
-
/** Восстанавливает jar из результата {@link serialize}. Некорректные записи молча пропускаются. */
|
|
63
|
-
deserialize(entries: readonly string[] | undefined): void;
|
|
64
|
-
/** Удаляет все cookie. */
|
|
65
|
-
clear(): void;
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/core/execution/pipeline.d.ts
|
|
69
|
-
/** Тело, заново подготовленное для одной транспортной попытки. */
|
|
70
|
-
interface PreparedRequestBody {
|
|
71
|
-
body: BodyInit;
|
|
72
|
-
/** Заголовки тела, например multipart boundary. Пользовательские заголовки важнее. */
|
|
73
|
-
headers?: Record<string, string> | undefined;
|
|
74
|
-
/** Освобождает открытый файл или входящий HTTP-поток. */
|
|
75
|
-
cleanup?: (() => void | Promise<void>) | undefined;
|
|
76
|
-
}
|
|
77
|
-
/** Контекст подготовки повторяемого тела. */
|
|
78
|
-
interface RequestBodyContext {
|
|
79
|
-
signal: AbortSignal;
|
|
80
|
-
attempt: number;
|
|
81
|
-
}
|
|
82
|
-
/** Создаёт новое тело для каждой транспортной попытки. */
|
|
83
|
-
type RequestBodyFactory = (context: RequestBodyContext) => PreparedRequestBody | Promise<PreparedRequestBody>;
|
|
84
|
-
/**
|
|
85
|
-
* Описание запроса внутри конвейера.
|
|
86
|
-
*
|
|
87
|
-
* Отличается от публичного {@link RawRequestOptions} служебными полями. Главное из них —
|
|
88
|
-
* `layerHeaders`: слои конвейера дописывают заголовки так, чтобы пользовательские `headers`
|
|
89
|
-
* остались важнее, иначе слой авторизации перебивал бы `Authorization`, заданный вручную.
|
|
90
|
-
*/
|
|
91
|
-
interface PipelineRequest extends OperationRequestOptions {
|
|
92
|
-
/** Изолированный cookie jar конкретного auth-flow. @internal */
|
|
93
|
-
cookieJar?: CookieJar | undefined;
|
|
94
|
-
/** Повторяемое тело. Используется внутренними ресурсами вместо `body`. @internal */
|
|
95
|
-
bodyFactory?: RequestBodyFactory | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* Заголовки, добавленные слоями конвейера.
|
|
98
|
-
*
|
|
99
|
-
* Ставятся до пользовательских `headers` и потому могут быть ими переопределены.
|
|
100
|
-
*
|
|
101
|
-
* @internal
|
|
102
|
-
*/
|
|
103
|
-
layerHeaders?: Record<string, string> | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Номер фактически начатой транспортной попытки, начиная с 1. Проставляет attempt layer.
|
|
106
|
-
*
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
attempt?: number | undefined;
|
|
110
|
-
}
|
|
111
|
-
/** Запрос на внешней границе pipeline. Низкоуровневый вызов без ID считается `raw`. */
|
|
112
|
-
type PipelineRequestInput = Omit<PipelineRequest, 'operationId'> & {
|
|
113
|
-
operationId?: OperationId | undefined;
|
|
114
|
-
};
|
|
115
|
-
/** Обработчик запроса. Самый внутренний в цепочке — транспорт. */
|
|
116
|
-
type RequestHandler = (request: PipelineRequest) => Promise<unknown>;
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region src/core/execution/http.d.ts
|
|
119
|
-
/** Что нужно точке входа в конвейер. */
|
|
120
|
-
interface HttpClientDeps {
|
|
121
|
-
/** Готовый обработчик — вся цепочка стадий поверх транспорта. */
|
|
122
|
-
handler: RequestHandler;
|
|
123
|
-
baseUrl: string;
|
|
124
|
-
/** Общий срок логической операции по умолчанию; `0` — без срока. */
|
|
125
|
-
deadline: number;
|
|
126
|
-
clock: ItdClock;
|
|
127
|
-
lifetimeSignal?: AbortSignal | undefined;
|
|
128
|
-
hooks: ClientHooks;
|
|
129
|
-
assertActive?: (() => void) | undefined;
|
|
130
|
-
}
|
|
131
|
-
/** Параметры операции без полей, которые задаёт её контракт или проставляют стадии. @internal */
|
|
132
|
-
type HttpOperationOptions = Omit<PipelineRequest, 'operationId' | 'method' | 'layerHeaders' | 'attempt'>;
|
|
133
|
-
/**
|
|
134
|
-
* Точка входа ресурсов в конвейер запросов.
|
|
135
|
-
*
|
|
136
|
-
* Заводит общий lifecycle логической операции — отмену, освобождение клиента и `deadline`, —
|
|
137
|
-
* передаёт запрос собранной цепочке стадий и сообщает в `onError` об ошибках, которые
|
|
138
|
-
* не дошли до транспорта. О стадиях и их порядке ресурсы не знают.
|
|
139
|
-
*/
|
|
140
|
-
declare class HttpClient {
|
|
141
|
-
#private;
|
|
142
|
-
constructor(deps: HttpClientDeps);
|
|
143
|
-
/**
|
|
144
|
-
* Выполняет низкоуровневый запрос через собранный конвейер.
|
|
145
|
-
*
|
|
146
|
-
* @typeParam T ожидаемая форма ответа после снятия обёртки `{ data: … }`
|
|
147
|
-
* @throws {ItdApiError} если сервер ответил статусом ≥ 400
|
|
148
|
-
* @throws {ItdTimeoutError} если истёк `timeout` попытки или `deadline` операции
|
|
149
|
-
* @throws {ItdAbortError} если запрос отменён через `signal`
|
|
150
|
-
* @throws {ItdNetworkError} если запрос не дошёл до сервера
|
|
151
|
-
*/
|
|
152
|
-
request<T = unknown>(options: PipelineRequestInput): Promise<T>;
|
|
153
|
-
/** Выполняет контракт операции; `next()` плагина возвращает результат после `read`. */
|
|
154
|
-
execute<T, TId extends OperationId>(operation: OperationContract<T, TId>, options: HttpOperationOptions): Promise<T>;
|
|
155
|
-
/** Выполняет внутреннюю операцию финализации после начала `ItdClient.dispose()`. @internal */
|
|
156
|
-
cleanupOperation<T, TId extends OperationId>(operation: OperationContract<T, TId>, options: HttpOperationOptions): Promise<T>;
|
|
157
|
-
}
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/core/attachments/resolver.d.ts
|
|
1
|
+
import { $ as Profile, An as ClientConnection, At as Loose, Bt as ViewSource, Dn as ServiceDefinition, Et as InteractionType, Fn as Unsubscribe, Ft as ReportTargetType, Gt as BuiltInOperationId, H as NotificationSettings, Ht as HttpClient, It as ServiceState, K as Author, Ln as Logger, Nt as QrLocationPrecision, Pt as ReportReason, Q as PrivacySettings, St as CommentSort, Tn as QueryParams, Tt as IncidentKind, Ut as HttpOperationOptions, V as Notification, Y as MyProfile, Yt as OperationId, Z as PinsResult, an as OperationContract, at as AuthIdentity, cn as RetrySafety, dn as OperationRequestOptions, et as PublicProfile, fn as PaginationOptions, gn as RawRequestOptions, gt as UserRef, ht as UserId, in as OperationAnnotations, it as UsernameAvailability, jn as ItdClock, mn as RateLimitBucketOverride, mt as Span, nt as UserBase, on as OperationMetadata, pt as IsoDate, q as FollowResult, rt as UserSummary, sn as OperationMethod, vt as AttachmentType, wt as FeedTab, yn as RequestOptions, zt as ViewReason } from "./url-DCqxoxGX.cjs";
|
|
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
|
+
import { r as KeyValueStore } from "./key-value-store-BGoSgLze.cjs";
|
|
160
4
|
/** Дополнительные требования потребителя к подготовленному источнику. */
|
|
161
5
|
interface ResolveFileOptions {
|
|
162
6
|
/** Имя, которое имеет приоритет над именем источника. */
|
|
@@ -208,8 +52,6 @@ interface FileResolver {
|
|
|
208
52
|
interface InternalFileResolver extends FileResolver {
|
|
209
53
|
mode(input: FileInput): FileTransferMode;
|
|
210
54
|
}
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/core/managed-resources.d.ts
|
|
213
55
|
/** Долгоживущий ресурс клиента. */
|
|
214
56
|
interface ManagedClientResource {
|
|
215
57
|
/** Короткое имя для диагностики зависшей остановки. */
|
|
@@ -219,8 +61,6 @@ interface ManagedClientResource {
|
|
|
219
61
|
/** Завершается после остановки обработчиков и освобождения внешних ресурсов. */
|
|
220
62
|
drain(): Promise<void>;
|
|
221
63
|
}
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region src/core/features.d.ts
|
|
224
64
|
/** Параметры запроса feature: маршрут задаёт ресурс, transport metadata — manifest. */
|
|
225
65
|
type FeatureRequestOptions = Omit<RawRequestOptions, 'operationId' | 'method' | 'service' | 'baseUrl' | 'retrySafety' | 'rateLimitBucket'>;
|
|
226
66
|
/** Операция одного feature. Локальный ключ используется в {@link FeatureContext.request}. */
|
|
@@ -286,8 +126,6 @@ interface FeatureContext {
|
|
|
286
126
|
/** Проверяет, что создавший модуль клиент ещё работает. */
|
|
287
127
|
assertActive(action: string): void;
|
|
288
128
|
}
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region src/core/plugins/contracts.d.ts
|
|
291
129
|
/**
|
|
292
130
|
* Обёртка одной логической операции.
|
|
293
131
|
*
|
|
@@ -446,8 +284,6 @@ interface ClientPlugin {
|
|
|
446
284
|
*/
|
|
447
285
|
install(api: PluginApi): void | PluginTeardown;
|
|
448
286
|
}
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region src/core/scheduling/rate-limit.d.ts
|
|
451
287
|
/** Снимок одного бакета. */
|
|
452
288
|
interface RateLimitBucketState {
|
|
453
289
|
/** Origin, на котором ведётся счётчик. `undefined` — очередь без известного направления. */
|
|
@@ -462,8 +298,6 @@ interface RateLimitBucketState {
|
|
|
462
298
|
/** Запросов бакета ждёт своей очереди — из-за паузы или предела одновременности. */
|
|
463
299
|
pending: number;
|
|
464
300
|
}
|
|
465
|
-
//#endregion
|
|
466
|
-
//#region src/resources/pagination.d.ts
|
|
467
301
|
/**
|
|
468
302
|
* Страница списка — единая форма для всех трёх схем пагинации API.
|
|
469
303
|
*
|
|
@@ -587,8 +421,6 @@ declare class Paginator<T> implements AsyncIterable<T> {
|
|
|
587
421
|
*/
|
|
588
422
|
collect(max?: number): Promise<T[]>;
|
|
589
423
|
}
|
|
590
|
-
//#endregion
|
|
591
|
-
//#region src/resources/base.d.ts
|
|
592
424
|
/**
|
|
593
425
|
* Описание перебираемого эндпоинта.
|
|
594
426
|
*
|
|
@@ -653,8 +485,6 @@ declare class BaseResource {
|
|
|
653
485
|
*/
|
|
654
486
|
protected paginated<T, P extends object>(spec: ListingSpec<T, P>): Listing<T, P>;
|
|
655
487
|
}
|
|
656
|
-
//#endregion
|
|
657
|
-
//#region src/resources/notifications.d.ts
|
|
658
488
|
/** Параметры запроса списка уведомлений. */
|
|
659
489
|
interface NotificationListParams {
|
|
660
490
|
limit?: number;
|
|
@@ -723,8 +553,6 @@ declare class NotificationsResource extends BaseResource {
|
|
|
723
553
|
*/
|
|
724
554
|
updateSettings(input: UpdateNotificationSettingsInput, options?: RequestOptions): Promise<NotificationSettings>;
|
|
725
555
|
}
|
|
726
|
-
//#endregion
|
|
727
|
-
//#region src/models/account.d.ts
|
|
728
556
|
/** Активная сессия входа. */
|
|
729
557
|
interface Session {
|
|
730
558
|
id: string;
|
|
@@ -791,8 +619,13 @@ interface PaymentMethod {
|
|
|
791
619
|
isDefault?: boolean;
|
|
792
620
|
expiresAt?: IsoDate | null;
|
|
793
621
|
}
|
|
794
|
-
|
|
795
|
-
|
|
622
|
+
/** Деактивация и восстановление текущего аккаунта. */
|
|
623
|
+
declare class AccountLifecycleResource extends BaseResource {
|
|
624
|
+
/** Деактивирует аккаунт. Вернуть его можно через {@link restore}. */
|
|
625
|
+
deactivate(options?: RequestOptions): Promise<void>;
|
|
626
|
+
/** Восстанавливает деактивированный аккаунт. */
|
|
627
|
+
restore(options?: RequestOptions): Promise<void>;
|
|
628
|
+
}
|
|
796
629
|
/** Данные для создания опроса. */
|
|
797
630
|
interface CreatePollInput {
|
|
798
631
|
/** Вопрос. Не может быть пустым. */
|
|
@@ -865,8 +698,6 @@ interface CreateReportInput {
|
|
|
865
698
|
/** Пояснение в свободной форме. */
|
|
866
699
|
description?: string;
|
|
867
700
|
}
|
|
868
|
-
//#endregion
|
|
869
|
-
//#region src/builders/base.d.ts
|
|
870
701
|
/** Метка билдера. Через `Symbol.for` — чтобы распознавание переживало смешивание ESM и CJS. */
|
|
871
702
|
declare const BUILDER: unique symbol;
|
|
872
703
|
/**
|
|
@@ -900,8 +731,6 @@ interface ItdBuilder<T> {
|
|
|
900
731
|
type BuilderInput<T, B extends ItdBuilder<T>> = T | B | ((builder: B) => B | T);
|
|
901
732
|
/** Является ли значение билдером. */
|
|
902
733
|
declare function isBuilder<T>(value: unknown): value is ItdBuilder<T>;
|
|
903
|
-
//#endregion
|
|
904
|
-
//#region src/builders/comment.d.ts
|
|
905
734
|
/** Внутреннее состояние {@link CommentBuilder}. */
|
|
906
735
|
interface CommentState extends CreateCommentInput {
|
|
907
736
|
content: string;
|
|
@@ -966,8 +795,6 @@ declare class CommentBuilder implements ItdBuilder<CreateCommentInput> {
|
|
|
966
795
|
declare function comment(content?: string): CommentBuilder;
|
|
967
796
|
/** Что принимает параметр комментария: объект, билдер или функция-настройщик. */
|
|
968
797
|
type CommentInput = BuilderInput<CreateCommentInput, CommentBuilder>;
|
|
969
|
-
//#endregion
|
|
970
|
-
//#region src/models/content.d.ts
|
|
971
798
|
/** Вложение поста или комментария. */
|
|
972
799
|
interface Attachment {
|
|
973
800
|
id: string;
|
|
@@ -1049,9 +876,9 @@ interface OriginalPost extends PostBase {
|
|
|
1049
876
|
}
|
|
1050
877
|
/** Пост ленты, стены или профиля. */
|
|
1051
878
|
interface Post extends PostBase {
|
|
1052
|
-
/**
|
|
1053
|
-
wallRecipientId
|
|
1054
|
-
/**
|
|
879
|
+
/** ID владельца чужой стены. `null` — пост опубликован не на чужой стене. */
|
|
880
|
+
wallRecipientId?: UserId | null;
|
|
881
|
+
/** Профиль владельца стены. */
|
|
1055
882
|
wallRecipient?: Author | null;
|
|
1056
883
|
/** Поставили ли вы реакцию. */
|
|
1057
884
|
isLiked: boolean;
|
|
@@ -1138,8 +965,6 @@ interface PinPostResult {
|
|
|
1138
965
|
success: boolean;
|
|
1139
966
|
pinnedPostId: string | null;
|
|
1140
967
|
}
|
|
1141
|
-
//#endregion
|
|
1142
|
-
//#region src/resources/comments.d.ts
|
|
1143
968
|
/** Параметры запроса ответов на комментарий. */
|
|
1144
969
|
interface RepliesParams {
|
|
1145
970
|
limit?: number;
|
|
@@ -1185,8 +1010,45 @@ declare class CommentsResource extends BaseResource {
|
|
|
1185
1010
|
/** Убирает реакцию с комментария. */
|
|
1186
1011
|
unlike(commentId: string, options?: RequestOptions): Promise<LikeResult>;
|
|
1187
1012
|
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1013
|
+
/** Инструменты редактора баннера в формате версии 1. */
|
|
1014
|
+
declare const BannerDrawingTool: Readonly<{
|
|
1015
|
+
readonly Brush: "brush";
|
|
1016
|
+
readonly Eraser: "eraser";
|
|
1017
|
+
readonly Line: "line";
|
|
1018
|
+
readonly Rectangle: "rectangle";
|
|
1019
|
+
readonly Circle: "circle";
|
|
1020
|
+
}>;
|
|
1021
|
+
type BannerDrawingTool = (typeof BannerDrawingTool)[keyof typeof BannerDrawingTool];
|
|
1022
|
+
/** Координаты точки в пикселях холста. */
|
|
1023
|
+
type BannerDrawingPoint = readonly [x: number, y: number];
|
|
1024
|
+
/** Штрих или фигура, которую нужно нарисовать на холсте. */
|
|
1025
|
+
interface BannerDrawingOperation {
|
|
1026
|
+
tool: BannerDrawingTool;
|
|
1027
|
+
/** Цвет в формате CSS hex, например `#000000`. */
|
|
1028
|
+
color: string;
|
|
1029
|
+
/** Толщина линии в пикселях. */
|
|
1030
|
+
width: number;
|
|
1031
|
+
/** Точки штриха. Для линии, прямоугольника и круга передайте две точки. */
|
|
1032
|
+
points: readonly BannerDrawingPoint[];
|
|
1033
|
+
}
|
|
1034
|
+
/** Описание рисунка для загрузки в качестве баннера. */
|
|
1035
|
+
interface BannerDrawing {
|
|
1036
|
+
version: 1;
|
|
1037
|
+
/** Ширина холста в пикселях. */
|
|
1038
|
+
width: number;
|
|
1039
|
+
/** Высота холста в пикселях. */
|
|
1040
|
+
height: number;
|
|
1041
|
+
/** Операции в порядке рисования. */
|
|
1042
|
+
ops: readonly BannerDrawingOperation[];
|
|
1043
|
+
}
|
|
1044
|
+
/** Изображение, созданное сервером из рисунка. */
|
|
1045
|
+
interface UploadedBannerDrawing {
|
|
1046
|
+
/** Идентификатор для поля `bannerId` при обновлении профиля. */
|
|
1047
|
+
id: string;
|
|
1048
|
+
url: string;
|
|
1049
|
+
width: number;
|
|
1050
|
+
height: number;
|
|
1051
|
+
}
|
|
1190
1052
|
/** Ответ загрузки файла. */
|
|
1191
1053
|
interface UploadedFile {
|
|
1192
1054
|
/** Идентификатор вложения — его передают в `attachmentIds`. */
|
|
@@ -1226,13 +1088,18 @@ declare class FilesResource extends BaseResource {
|
|
|
1226
1088
|
* после успешного чтения переиспользуется.
|
|
1227
1089
|
*/
|
|
1228
1090
|
upload(input: FileInput, uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<UploadedFile>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Отправляет описание рисунка и возвращает созданное сервером изображение.
|
|
1093
|
+
*
|
|
1094
|
+
* Чтобы установить баннер, передайте полученный `id` в
|
|
1095
|
+
* `itd.users.updateMe({ bannerId: id })`.
|
|
1096
|
+
*/
|
|
1097
|
+
uploadBannerDrawing(drawing: BannerDrawing, options?: RequestOptions): Promise<UploadedBannerDrawing>;
|
|
1229
1098
|
/** Загружает несколько файлов последовательно, сохраняя порядок. */
|
|
1230
1099
|
uploadMany(files: FileInput[], uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<string[]>;
|
|
1231
1100
|
/** Удаляет загруженный файл. */
|
|
1232
1101
|
remove(fileId: string, options?: RequestOptions): Promise<void>;
|
|
1233
1102
|
}
|
|
1234
|
-
//#endregion
|
|
1235
|
-
//#region src/resources/hashtags.d.ts
|
|
1236
1103
|
/** Параметры запроса постов по хэштегу. */
|
|
1237
1104
|
interface HashtagPostsParams {
|
|
1238
1105
|
limit?: number;
|
|
@@ -1259,8 +1126,84 @@ declare class HashtagsResource extends BaseResource {
|
|
|
1259
1126
|
/** Перебирает посты по хэштегу. */
|
|
1260
1127
|
iteratePosts(tag: string, params?: HashtagPostsParams, options?: PaginationOptions): Paginator<Post>;
|
|
1261
1128
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1129
|
+
/** Область действия документа. */
|
|
1130
|
+
declare const LegalDocumentScope: Readonly<{
|
|
1131
|
+
readonly Social: "social";
|
|
1132
|
+
}>;
|
|
1133
|
+
type LegalDocumentScope = Loose<(typeof LegalDocumentScope)[keyof typeof LegalDocumentScope]>;
|
|
1134
|
+
/** Сведения о редакции документа в списке документов и истории редакций. */
|
|
1135
|
+
interface LegalDocumentSummary {
|
|
1136
|
+
scope: LegalDocumentScope;
|
|
1137
|
+
/** Идентификатор документа в пределах области действия. */
|
|
1138
|
+
slug: string;
|
|
1139
|
+
title: string;
|
|
1140
|
+
shortTitle: string;
|
|
1141
|
+
summary: string;
|
|
1142
|
+
/** Идентификатор редакции. Передавайте его в `legal.version()` как строку. */
|
|
1143
|
+
version: string;
|
|
1144
|
+
/** Дата вступления редакции в силу. */
|
|
1145
|
+
effectiveAt: string;
|
|
1146
|
+
/** Контрольная сумма текста, которую возвращает сервер. */
|
|
1147
|
+
contentSha256: string;
|
|
1148
|
+
/** Дата, указанная в документе. */
|
|
1149
|
+
documentDate: string;
|
|
1150
|
+
/** Дата публикации или `null`, если она не указана. */
|
|
1151
|
+
publishedAt: string | null;
|
|
1152
|
+
}
|
|
1153
|
+
/** Запись истории редакций. */
|
|
1154
|
+
interface LegalDocumentVersion extends LegalDocumentSummary {
|
|
1155
|
+
/** Действует ли эта редакция сейчас. */
|
|
1156
|
+
current: boolean;
|
|
1157
|
+
}
|
|
1158
|
+
/** Виды блоков текста документа. */
|
|
1159
|
+
declare const LegalDocumentBlockType: Readonly<{
|
|
1160
|
+
readonly Heading: "heading";
|
|
1161
|
+
readonly List: "list";
|
|
1162
|
+
readonly Lines: "lines";
|
|
1163
|
+
}>;
|
|
1164
|
+
type LegalDocumentBlockType = Loose<(typeof LegalDocumentBlockType)[keyof typeof LegalDocumentBlockType]>;
|
|
1165
|
+
/** Блок текста. Поля зависят от его вида. */
|
|
1166
|
+
interface LegalDocumentBlock {
|
|
1167
|
+
type: LegalDocumentBlockType;
|
|
1168
|
+
/** Уровень заголовка. */
|
|
1169
|
+
level?: number;
|
|
1170
|
+
/** Текст заголовка или абзаца. */
|
|
1171
|
+
text?: string;
|
|
1172
|
+
/** Пункты списка или строки многострочного блока. */
|
|
1173
|
+
items?: string[];
|
|
1174
|
+
}
|
|
1175
|
+
/** Редакция документа с полным текстом. */
|
|
1176
|
+
interface LegalDocument extends LegalDocumentSummary {
|
|
1177
|
+
/** Блоки в порядке чтения. */
|
|
1178
|
+
blocks: LegalDocumentBlock[];
|
|
1179
|
+
}
|
|
1180
|
+
/** Публичные документы ИТД и история их редакций. Доступны через `itd.legal`. */
|
|
1181
|
+
declare class LegalResource extends BaseResource {
|
|
1182
|
+
/**
|
|
1183
|
+
* Возвращает список документов выбранной области.
|
|
1184
|
+
*
|
|
1185
|
+
* В списке указаны действующие редакции. Полный текст загружается через {@link current}.
|
|
1186
|
+
*/
|
|
1187
|
+
list(scope?: LegalDocumentScope, options?: RequestOptions): Promise<LegalDocumentSummary[]>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Загружает действующую редакцию документа с полным текстом.
|
|
1190
|
+
*
|
|
1191
|
+
* @example
|
|
1192
|
+
* ```ts
|
|
1193
|
+
* const terms = await itd.legal.current(LegalDocumentScope.Social, 'terms');
|
|
1194
|
+
* console.log(terms.version, terms.blocks);
|
|
1195
|
+
* ```
|
|
1196
|
+
*/
|
|
1197
|
+
current(scope: LegalDocumentScope, slug: string, options?: RequestOptions): Promise<LegalDocument>;
|
|
1198
|
+
/** Возвращает историю редакций без текста. Поле `current` отмечает действующую редакцию. */
|
|
1199
|
+
versions(scope: LegalDocumentScope, slug: string, options?: RequestOptions): Promise<LegalDocumentVersion[]>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Загружает конкретную редакцию документа с полным текстом.
|
|
1202
|
+
*
|
|
1203
|
+
* @param version идентификатор редакции из {@link versions}, например `2026-04-03`
|
|
1204
|
+
*/
|
|
1205
|
+
version(scope: LegalDocumentScope, slug: string, version: string, options?: RequestOptions): Promise<LegalDocument>;
|
|
1206
|
+
}
|
|
1264
1207
|
/** Клан в рейтинге. */
|
|
1265
1208
|
interface Clan {
|
|
1266
1209
|
/** Эмодзи клана — оно же `clanAvatar` его участников. */
|
|
@@ -1312,8 +1255,6 @@ interface Report {
|
|
|
1312
1255
|
id: string;
|
|
1313
1256
|
createdAt: IsoDate;
|
|
1314
1257
|
}
|
|
1315
|
-
//#endregion
|
|
1316
|
-
//#region src/models/status.d.ts
|
|
1317
1258
|
/** Происшествие в истории сервиса. */
|
|
1318
1259
|
interface StatusIncidentLine {
|
|
1319
1260
|
/** Вид происшествия. */
|
|
@@ -1353,6 +1294,8 @@ interface ServiceStatus {
|
|
|
1353
1294
|
last_checked: IsoDate;
|
|
1354
1295
|
/** Доступность за 90 суток в процентах. */
|
|
1355
1296
|
uptime_90d: number;
|
|
1297
|
+
/** Считает ли сервер данные последней проверки актуальными. */
|
|
1298
|
+
data_fresh?: boolean;
|
|
1356
1299
|
/**
|
|
1357
1300
|
* История по суткам. Ключ — сколько суток назад, `'0'` — сегодня.
|
|
1358
1301
|
*
|
|
@@ -1367,18 +1310,26 @@ interface PlatformStatus {
|
|
|
1367
1310
|
overall_status: ServiceState;
|
|
1368
1311
|
/** Когда данные последний раз пересчитаны. */
|
|
1369
1312
|
updated_at: IsoDate;
|
|
1313
|
+
/** Когда сформирован ответ. */
|
|
1314
|
+
generated_at?: IsoDate;
|
|
1315
|
+
/** Через сколько миллисекунд сервер считает данные устаревшими. */
|
|
1316
|
+
stale_after_ms?: number;
|
|
1317
|
+
/** Доступность платформы за 90 суток в процентах. */
|
|
1318
|
+
uptime_90d?: number;
|
|
1319
|
+
/** Первая дата периода, `YYYY-MM-DD`. */
|
|
1320
|
+
window_start?: string;
|
|
1321
|
+
/** Последняя дата периода, `YYYY-MM-DD`. */
|
|
1322
|
+
window_end?: string;
|
|
1323
|
+
/** Число суток с данными за период. */
|
|
1324
|
+
sample_days?: number;
|
|
1370
1325
|
services: ServiceStatus[];
|
|
1371
1326
|
}
|
|
1372
|
-
//#endregion
|
|
1373
|
-
//#region src/resources/status.d.ts
|
|
1374
1327
|
/** API встроенного status feature. @internal */
|
|
1375
1328
|
declare class StatusResource {
|
|
1376
1329
|
#private;
|
|
1377
1330
|
constructor(context: FeatureContext);
|
|
1378
1331
|
get(options?: RequestOptions): Promise<PlatformStatus>;
|
|
1379
1332
|
}
|
|
1380
|
-
//#endregion
|
|
1381
|
-
//#region src/resources/platform.d.ts
|
|
1382
1333
|
/** Требования к версии одного приложения платформы. */
|
|
1383
1334
|
interface PlatformClientVersion {
|
|
1384
1335
|
/** Минимальная поддерживаемая версия приложения. */
|
|
@@ -1439,8 +1390,6 @@ declare class PlatformResource extends BaseResource {
|
|
|
1439
1390
|
*/
|
|
1440
1391
|
status(options?: RequestOptions): Promise<PlatformStatus>;
|
|
1441
1392
|
}
|
|
1442
|
-
//#endregion
|
|
1443
|
-
//#region src/builders/markup.d.ts
|
|
1444
1393
|
/** Текст вместе с рассчитанной разметкой. */
|
|
1445
1394
|
interface TextMarkup {
|
|
1446
1395
|
content: string;
|
|
@@ -1527,8 +1476,6 @@ declare function markup(content?: string): MarkupBuilder;
|
|
|
1527
1476
|
* `substring`, DOM Selection и wire-форматом сайта даже при наличии эмодзи.
|
|
1528
1477
|
*/
|
|
1529
1478
|
declare function autoSpans(text: string, options?: AutoSpansOptions): Span[];
|
|
1530
|
-
//#endregion
|
|
1531
|
-
//#region src/spans/parse.d.ts
|
|
1532
1479
|
/** Настройки безопасного импорта разметки. */
|
|
1533
1480
|
interface ParseMarkupOptions {
|
|
1534
1481
|
/**
|
|
@@ -1555,8 +1502,6 @@ declare function parseMarkdown(source: string, options?: ParseMarkupOptions): Te
|
|
|
1555
1502
|
* удаляется. Опасный `href` сохраняет текст ссылки, но не создаёт span.
|
|
1556
1503
|
*/
|
|
1557
1504
|
declare function parseHtml(source: string, options?: ParseMarkupOptions): TextMarkup;
|
|
1558
|
-
//#endregion
|
|
1559
|
-
//#region src/builders/poll.d.ts
|
|
1560
1505
|
/**
|
|
1561
1506
|
* Билдер опроса.
|
|
1562
1507
|
*
|
|
@@ -1606,8 +1551,6 @@ declare class PollBuilder implements ItdBuilder<CreatePollInput> {
|
|
|
1606
1551
|
declare function poll(question?: string): PollBuilder;
|
|
1607
1552
|
/** Что принимает параметр опроса: объект, билдер или функция-настройщик. */
|
|
1608
1553
|
type PollInput = BuilderInput<CreatePollInput, PollBuilder>;
|
|
1609
|
-
//#endregion
|
|
1610
|
-
//#region src/builders/post.d.ts
|
|
1611
1554
|
declare const BUILD_UPDATE: unique symbol;
|
|
1612
1555
|
/** Данные для создания поста, включая поддерживаемые builder-формы вложенного опроса. */
|
|
1613
1556
|
interface CreatePostInput extends Omit<CreatePostData, 'poll'> {
|
|
@@ -1727,8 +1670,6 @@ declare function post(content?: string): PostBuilder;
|
|
|
1727
1670
|
type PostInput = BuilderInput<CreatePostInput, PostBuilder>;
|
|
1728
1671
|
/** Что принимает `posts.update`: объект, билдер поста или функция-настройщик. */
|
|
1729
1672
|
type PostUpdateInput = UpdatePostInput | PostBuilder | ((builder: PostBuilder) => PostBuilder | UpdatePostInput);
|
|
1730
|
-
//#endregion
|
|
1731
|
-
//#region src/resources/posts.d.ts
|
|
1732
1673
|
/** Параметры запроса ленты. */
|
|
1733
1674
|
interface FeedParams {
|
|
1734
1675
|
/** Вкладка ленты. По умолчанию сервер отдаёт популярное. */
|
|
@@ -1900,8 +1841,6 @@ declare class PostsResource extends BaseResource {
|
|
|
1900
1841
|
*/
|
|
1901
1842
|
voiceComment(postId: string, audio: FileInput, options?: RequestOptions): Promise<Comment>;
|
|
1902
1843
|
}
|
|
1903
|
-
//#endregion
|
|
1904
|
-
//#region src/builders/report.d.ts
|
|
1905
1844
|
/**
|
|
1906
1845
|
* Билдер жалобы.
|
|
1907
1846
|
*
|
|
@@ -1945,8 +1884,6 @@ declare const report: Readonly<{
|
|
|
1945
1884
|
}>;
|
|
1946
1885
|
/** Что принимает параметр жалобы: объект, билдер или функция-настройщик. */
|
|
1947
1886
|
type ReportInput = BuilderInput<CreateReportInput, ReportBuilder>;
|
|
1948
|
-
//#endregion
|
|
1949
|
-
//#region src/resources/reports.d.ts
|
|
1950
1887
|
/**
|
|
1951
1888
|
* Жалобы на контент и пользователей.
|
|
1952
1889
|
*
|
|
@@ -1967,8 +1904,6 @@ declare class ReportsResource extends BaseResource {
|
|
|
1967
1904
|
*/
|
|
1968
1905
|
create(input: ReportInput, options?: RequestOptions): Promise<Report>;
|
|
1969
1906
|
}
|
|
1970
|
-
//#endregion
|
|
1971
|
-
//#region src/resources/search.d.ts
|
|
1972
1907
|
/** Результат глобального поиска. */
|
|
1973
1908
|
interface SearchResult {
|
|
1974
1909
|
users: UserSummary[];
|
|
@@ -1990,8 +1925,6 @@ declare class SearchResource extends BaseResource {
|
|
|
1990
1925
|
*/
|
|
1991
1926
|
all(query: string, options?: RequestOptions): Promise<SearchResult>;
|
|
1992
1927
|
}
|
|
1993
|
-
//#endregion
|
|
1994
|
-
//#region src/models/shop.d.ts
|
|
1995
1928
|
/** Категория товара магазина. */
|
|
1996
1929
|
declare const ShopProductCategory: Readonly<{
|
|
1997
1930
|
readonly Apparel: "apparel";
|
|
@@ -2216,8 +2149,6 @@ interface ShopOrderAccessVerification {
|
|
|
2216
2149
|
token: string;
|
|
2217
2150
|
expiresInSec: number;
|
|
2218
2151
|
}
|
|
2219
|
-
//#endregion
|
|
2220
|
-
//#region src/resources/shop.d.ts
|
|
2221
2152
|
/** Параметры запроса, который может использовать токен доступа к заказам. */
|
|
2222
2153
|
interface ShopOrderRequestOptions extends RequestOptions {
|
|
2223
2154
|
/** Временный токен из проверки кода или `pass` созданного заказа. */
|
|
@@ -2284,8 +2215,6 @@ declare class ShopResource {
|
|
|
2284
2215
|
/** @internal */
|
|
2285
2216
|
constructor(http: ConstructorParameters<typeof BaseResource>[0]);
|
|
2286
2217
|
}
|
|
2287
|
-
//#endregion
|
|
2288
|
-
//#region src/resources/subscription.d.ts
|
|
2289
2218
|
/**
|
|
2290
2219
|
* Подписка и способы оплаты.
|
|
2291
2220
|
*
|
|
@@ -2311,8 +2240,6 @@ declare class SubscriptionResource extends BaseResource {
|
|
|
2311
2240
|
/** Удаляет способ оплаты. */
|
|
2312
2241
|
removeMethod(methodId: string, options?: RequestOptions): Promise<void>;
|
|
2313
2242
|
}
|
|
2314
|
-
//#endregion
|
|
2315
|
-
//#region src/resources/telemetry.d.ts
|
|
2316
2243
|
/** Параметры событий телеметрии. */
|
|
2317
2244
|
interface TelemetryOptions {
|
|
2318
2245
|
/** Переопределяет идентификатор сессии телеметрии (`sid`) для этого запроса. */
|
|
@@ -2480,8 +2407,6 @@ declare class TelemetryResource extends BaseResource {
|
|
|
2480
2407
|
/** Закрывает все созданные накопители, отправляя оставшиеся записи. */
|
|
2481
2408
|
close(): Promise<void>;
|
|
2482
2409
|
}
|
|
2483
|
-
//#endregion
|
|
2484
|
-
//#region src/resources/users.d.ts
|
|
2485
2410
|
/**
|
|
2486
2411
|
* Параметры списков пользователей.
|
|
2487
2412
|
*
|
|
@@ -2534,10 +2459,6 @@ declare class UsersResource extends BaseResource {
|
|
|
2534
2459
|
setBanner(file: FileInput, uploadOptions?: UploadOptions, requestOptions?: RequestOptions): Promise<MyProfile>;
|
|
2535
2460
|
/** Удаляет баннер профиля, устанавливая `bannerId` в `null`. */
|
|
2536
2461
|
removeBanner(options?: RequestOptions): Promise<MyProfile>;
|
|
2537
|
-
/** Деактивирует аккаунт. Вернуть его можно через {@link restore}. */
|
|
2538
|
-
deactivate(options?: RequestOptions): Promise<void>;
|
|
2539
|
-
/** Восстанавливает деактивированный аккаунт. */
|
|
2540
|
-
restore(options?: RequestOptions): Promise<void>;
|
|
2541
2462
|
/** Создаёт профиль после регистрации. */
|
|
2542
2463
|
createProfile(input: {
|
|
2543
2464
|
username: string;
|
|
@@ -2637,8 +2558,6 @@ declare class UsersResource extends BaseResource {
|
|
|
2637
2558
|
/** Снимает активный значок. */
|
|
2638
2559
|
removePin(options?: RequestOptions): Promise<void>;
|
|
2639
2560
|
}
|
|
2640
|
-
//#endregion
|
|
2641
|
-
//#region src/resources/verification.d.ts
|
|
2642
2561
|
/**
|
|
2643
2562
|
* Верификация профиля.
|
|
2644
2563
|
*
|
|
@@ -2650,8 +2569,6 @@ declare class VerificationResource extends BaseResource {
|
|
|
2650
2569
|
/** Подаёт заявку на верификацию с видео. */
|
|
2651
2570
|
submit(videoUrl: string, options?: RequestOptions): Promise<unknown>;
|
|
2652
2571
|
}
|
|
2653
|
-
//#endregion
|
|
2654
|
-
//#region src/core/attachments/factories.d.ts
|
|
2655
2572
|
/** Создаёт URL-источник в выбранном режиме. */
|
|
2656
2573
|
declare function fromUrl(url: string, options: UrlFileOptions & {
|
|
2657
2574
|
mode: typeof FileTransferMode.Stream;
|
|
@@ -2666,8 +2583,6 @@ declare function fromUrl(url: string, options: UrlFileOptions): LazyFile | Strea
|
|
|
2666
2583
|
* Фабрика вызывается заново для каждой попытки; возвращать один и тот же поток нельзя.
|
|
2667
2584
|
*/
|
|
2668
2585
|
declare function fromStream(factory: (context: FileContext) => ReadableStream<Uint8Array> | FileStreamContent | Promise<ReadableStream<Uint8Array> | FileStreamContent>, options?: FromStreamOptions): StreamFile;
|
|
2669
|
-
//#endregion
|
|
2670
|
-
//#region src/domain/mime.d.ts
|
|
2671
2586
|
/** Изображения, которые принимает `POST /api/files/upload`. */
|
|
2672
2587
|
declare const IMAGE_MIME_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/avif", "image/heic", "image/heif"];
|
|
2673
2588
|
type ImageMimeType = (typeof IMAGE_MIME_TYPES)[number];
|
|
@@ -2680,8 +2595,6 @@ type AudioMimeType = (typeof AUDIO_MIME_TYPES)[number];
|
|
|
2680
2595
|
/** Все типы, которые принимает загрузка. */
|
|
2681
2596
|
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"];
|
|
2682
2597
|
type AllowedMimeType = (typeof ALLOWED_MIME_TYPES)[number];
|
|
2683
|
-
//#endregion
|
|
2684
|
-
//#region src/domain/time.d.ts
|
|
2685
2598
|
/**
|
|
2686
2599
|
* Приводит отметку времени PostgreSQL к ISO-8601 в UTC.
|
|
2687
2600
|
*
|
|
@@ -2707,8 +2620,6 @@ declare function utcStampToIso(value: string): string;
|
|
|
2707
2620
|
* ```
|
|
2708
2621
|
*/
|
|
2709
2622
|
declare function toDate(value: IsoDate | null | undefined): Date | null;
|
|
2710
|
-
//#endregion
|
|
2711
|
-
//#region src/models/guards.d.ts
|
|
2712
2623
|
/**
|
|
2713
2624
|
* Свой ли это профиль.
|
|
2714
2625
|
*
|
|
@@ -2718,8 +2629,6 @@ declare function toDate(value: IsoDate | null | undefined): Date | null;
|
|
|
2718
2629
|
* ```
|
|
2719
2630
|
*/
|
|
2720
2631
|
declare function isMyProfile(profile: Profile): profile is MyProfile;
|
|
2721
|
-
//#endregion
|
|
2722
|
-
//#region src/models/status-helpers.d.ts
|
|
2723
2632
|
/**
|
|
2724
2633
|
* Разворачивает историю сервиса в массив на 90 суток.
|
|
2725
2634
|
* Сутки без данных становятся `null`.
|
|
@@ -2736,8 +2645,6 @@ declare function isMyProfile(profile: Profile): profile is MyProfile;
|
|
|
2736
2645
|
* ```
|
|
2737
2646
|
*/
|
|
2738
2647
|
declare function statusDays(service: ServiceStatus): (StatusDay | null)[];
|
|
2739
|
-
//#endregion
|
|
2740
|
-
//#region src/shop/order-access.d.ts
|
|
2741
2648
|
/** Хранилище временного доступа к гостевым заказам. */
|
|
2742
2649
|
interface ShopOrderAccessStorage {
|
|
2743
2650
|
get(): ShopOrderAccessSession | null | Promise<ShopOrderAccessSession | null>;
|
|
@@ -2759,8 +2666,6 @@ interface ShopOrderAccessStorageAdapterOptions {
|
|
|
2759
2666
|
}
|
|
2760
2667
|
/** Создаёт хранилище доступа к заказам поверх `KeyValueStore`. */
|
|
2761
2668
|
declare function createShopOrderAccessStorage(store: KeyValueStore<ShopOrderAccessSession>, options?: ShopOrderAccessStorageAdapterOptions): ShopOrderAccessStorage;
|
|
2762
|
-
//#endregion
|
|
2763
|
-
//#region src/shop/feature.d.ts
|
|
2764
2669
|
/** Настройки подключаемого модуля доступа к заказам по коду из письма. */
|
|
2765
2670
|
interface ShopFeatureOptions {
|
|
2766
2671
|
/** Отдельное хранилище токена заказов. По умолчанию используется память процесса. */
|
|
@@ -2787,8 +2692,6 @@ interface ShopFeatureApi {
|
|
|
2787
2692
|
}
|
|
2788
2693
|
/** Создаёт подключаемый модуль для доступа к заказам по коду из письма. */
|
|
2789
2694
|
declare function createShopFeature(options?: ShopFeatureOptions): ClientFeature<ShopFeatureApi>;
|
|
2790
|
-
//#endregion
|
|
2791
|
-
//#region src/spans/render.d.ts
|
|
2792
2695
|
/** Формат результата {@link renderSpans}. */
|
|
2793
2696
|
declare const SpanRenderFormat: Readonly<{
|
|
2794
2697
|
readonly Html: "html";
|
|
@@ -2818,6 +2721,4 @@ interface RenderSpansOptions {
|
|
|
2818
2721
|
* Отсутствующий массив считается пустым; формат по умолчанию — HTML.
|
|
2819
2722
|
*/
|
|
2820
2723
|
declare function renderSpans(content: string, spans?: readonly Span[] | null | undefined, options?: RenderSpansOptions): string;
|
|
2821
|
-
|
|
2822
|
-
export { ShopConsentContext as $, NotificationListParams as $n, autoSpans as $t, DwellEntry as A, Poll as An, PreparedStreamSource as Ar, ReportInput as At, ViewTrackerInput as B, comment as Bn, post as Bt, fromStream as C, Comment as Cn, FeatureInstallation as Cr, ShopRecipient as Ct, UpdateProfileInput as D, LikeResult as Dn, FileResolver as Dr, SearchResult as Dt, UpdatePrivacyInput as E, Hashtag as En, ManagedClientResource as Er, SearchResource as Et, TelemetryClock as F, PostStats as Fn, UserPostsParams as Ft, ShopConsentsResource as G, CreatePollInput as Gn, parseHtml as Gt, SubscriptionResource as H, ItdBuilder as Hn, PollInput as Ht, TelemetryOptions as I, PostUpdateResult as In, CreatePostInput as It, ShopOrdersResource as J, UpdatePostInput as Jn, MarkupBuilder as Jt, ShopDeliveryResource as K, CreatePostData as Kn, parseMarkdown as Kt, TelemetryResource as L, UpdateResultBase as Ln, PostBuilder as Lt, PhotoOpenInput as M, Post as Mn, ResolveFileOptions as Mr, CommentsParams as Mt, TelemetryBatch as N, PostBase as Nn, HttpClient as Nr, FeedParams as Nt, UserListParams as O, OriginalPost as On, PreparedBufferSource as Or, ReportsResource as Ot, TelemetryBatchOptions as P, PostCounters as Pn, CookieJar as Pr, PostsResource as Pt, ShopConsent as Q, Subscription as Qn, TextMarkup as Qt, VideoProgressInput as R, CommentBuilder as Rn, PostInput as Rt, VideoMimeType as S, Attachment as Sn, FeatureContext as Sr, ShopProductStatus as St, VerificationResource as T, CommentUpdateResult as Tn, FeatureRequestOptions as Tr, ShopSizeChartRow as Tt, CreateShopOrderOptions as U, isBuilder as Un, poll as Ut, ViewTrackerOptions as V, BuilderInput as Vn, PollBuilder as Vt, PayShopOrderOptions as W, CreateCommentInput as Wn, ParseMarkupOptions as Wt, ShopResource as X, QrLoginTarget as Xn, MarkupInput as Xt, ShopProductsResource as Y, PaymentMethod as Yn, MarkupContent as Yt, CreateShopOrderInput as Z, Session as Zn, MarkupSpan as Zt, AllowedMimeType as _, FilesResource as _n, OperationTransformer as _r, ShopPayment as _t, ShopFeatureOptions as a, ServiceStatus as an, PaginationMode as ar, ShopDeliveryDestination as at, ImageMimeType as b, CommentsResource as bn, ClientFeature as br, ShopProductColor as bt, ShopOrderAccessStorage as c, Announcement as cn, mapPage as cr, ShopOrderAccessSession as ct, statusDays as d, Clan as dn, AttemptExtensions as dr, ShopOrderDelivery as dt, markup as en, NotificationsResource as er, ShopConsentKind as et, isMyProfile as f, Portal as fn, AttemptInterceptor as fr, ShopOrderItem as ft, AUDIO_MIME_TYPES as g, HashtagsResource as gn, OperationTransformContext as gr, ShopOrderSupport as gt, ALLOWED_MIME_TYPES as h, HashtagPostsParams as hn, OperationExtensions as hr, ShopOrderSummary as ht, ShopFeatureApi as i, PlatformStatus as in, PageState as ir, ShopDeliveryCountry as it, InteractionEntry as j, PollOption as jn, ResolveFileContext as jr, report as jt, UsersResource as k, PinPostResult as kn, PreparedFileSource as kr, ReportBuilder as kt, ShopOrderAccessStorageAdapterOptions as l, AnnouncementButton as ln, RateLimitBucketState as lr, ShopOrderAccessVerification as lt, utcStampToIso as m, VerificationStatus as mn, ClientPlugin as mr, ShopOrderStatus as mt, SpanRenderFormat as n, PlatformResource as nn, BaseResource as nr, ShopDeliveryCalculation as nt, createShopFeature as o, StatusDay as on, Paginator as or, ShopDeliveryPoint as ot, toDate as p, Report as pn, AttemptNext as pr, ShopOrderItemInput as pt, ShopOrderRequestOptions as q, CreateReportInput as qn, AutoSpansOptions as qt, renderSpans as r, PlatformVersions as rn, Page as rr, ShopDeliveryCity as rt, MemoryShopOrderAccessStorage as s, StatusIncidentLine as sn, PaginatorOptions as sr, ShopOrder as st, RenderSpansOptions as t, PlatformClientVersion as tn, UpdateNotificationSettingsInput as tr, ShopCreatedOrder as tt, createShopOrderAccessStorage as u, ChangelogEntry as un, AttemptContext as ur, ShopOrderBase as ut, AudioMimeType as v, UploadOptions as vn, PluginApi as vr, ShopProduct as vt, fromUrl as w, CommentReplyTo as wn, FeatureOperationDefinition as wr, ShopSizeChart as wt, VIDEO_MIME_TYPES as x, RepliesParams as xn, FeatureBucketDefinition as xr, ShopProductSpec as xt, IMAGE_MIME_TYPES as y, UploadedFile as yn, PluginTeardown as yr, ShopProductCategory as yt, ViewTracker as z, CommentInput as zn, PostUpdateInput as zt };
|
|
2823
|
-
//# sourceMappingURL=render-X2JCo1JS.d.cts.map
|
|
2724
|
+
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, 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, 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 };
|