itd-api 0.9.3 → 0.10.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/README.md +9 -8
- package/dist/events/index.cjs +2 -2
- package/dist/events/index.d.cts +2 -2
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +2 -2
- package/dist/index.cjs +405 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +181 -29
- package/dist/index.d.ts +181 -29
- package/dist/index.js +401 -44
- package/dist/index.js.map +1 -1
- package/dist/rest/index.cjs +2 -2
- package/dist/rest/index.d.cts +2 -2
- package/dist/rest/index.d.ts +2 -2
- package/dist/rest/index.js +2 -2
- package/dist/shared/{events-BzjI6pn5.js → events-B0Wtn4cF.js} +3 -3
- package/dist/shared/{events-BzjI6pn5.js.map → events-B0Wtn4cF.js.map} +1 -1
- package/dist/shared/{events-C1FudmSe.cjs → events-BB791aPk.cjs} +8 -2
- package/dist/shared/{events-C1FudmSe.cjs.map → events-BB791aPk.cjs.map} +1 -1
- package/dist/shared/{events-BPxBF0gQ.d.cts → events-BNGjJVI3.d.cts} +2 -2
- package/dist/shared/{events-DnwfcLxS.d.ts → events-CJO6q93Z.d.ts} +2 -2
- package/dist/shared/{render-Omy1drH1.cjs → render-BimHjOhw.cjs} +2 -2
- package/dist/shared/{render-Omy1drH1.cjs.map → render-BimHjOhw.cjs.map} +1 -1
- package/dist/shared/{render-C1F_QWYD.d.cts → render-C1A57W-5.d.cts} +2 -2
- package/dist/shared/{render-CtOpp9Pm.js → render-CkhvH_yh.js} +2 -2
- package/dist/shared/{render-CtOpp9Pm.js.map → render-CkhvH_yh.js.map} +1 -1
- package/dist/shared/{render-uFW2kDxp.d.ts → render-DC5nvqcP.d.ts} +2 -2
- package/dist/shared/{url-3Ts6EEHQ.js → url-BA5hEwj2.js} +65 -3
- package/dist/shared/url-BA5hEwj2.js.map +1 -0
- package/dist/shared/{url-D6wsXm1T.cjs → url-CDVgMIq5.cjs} +100 -2
- package/dist/shared/url-CDVgMIq5.cjs.map +1 -0
- package/dist/shared/{url-DubjkRR9.d.ts → url-DkMueFAT.d.cts} +70 -3
- package/dist/shared/{url-DubjkRR9.d.cts → url-DkMueFAT.d.ts} +70 -3
- package/package.json +2 -1
- package/dist/shared/url-3Ts6EEHQ.js.map +0 -1
- package/dist/shared/url-D6wsXm1T.cjs.map +0 -1
|
@@ -114,6 +114,44 @@ declare const ReportReason: Readonly<{
|
|
|
114
114
|
readonly Other: "other";
|
|
115
115
|
}>;
|
|
116
116
|
type ReportReason = (typeof ReportReason)[keyof typeof ReportReason];
|
|
117
|
+
/**
|
|
118
|
+
* Провайдер капчи, которую сервер требует пройти при входе. Тип открытый.
|
|
119
|
+
*
|
|
120
|
+
* Активного сообщает `itd.auth.captchaProvider()`.
|
|
121
|
+
*/
|
|
122
|
+
declare const CaptchaType: Readonly<{
|
|
123
|
+
/** Собственная капча ИТД. */
|
|
124
|
+
readonly Itd: "itd";
|
|
125
|
+
/** Cloudflare Turnstile. */
|
|
126
|
+
readonly Cloudflare: "cloudflare";
|
|
127
|
+
}>;
|
|
128
|
+
type CaptchaType = Loose<(typeof CaptchaType)[keyof typeof CaptchaType]>;
|
|
129
|
+
/**
|
|
130
|
+
* Какую капчу решать при входе по логину и паролю.
|
|
131
|
+
*
|
|
132
|
+
* `CaptchaChoice.Auto` — спросить сервер перед каждым входом; названный провайдер
|
|
133
|
+
* решается без этого запроса.
|
|
134
|
+
*/
|
|
135
|
+
declare const CaptchaChoice: Readonly<{
|
|
136
|
+
/** Провайдера называет сервер. */
|
|
137
|
+
readonly Auto: "auto";
|
|
138
|
+
readonly Itd: "itd";
|
|
139
|
+
readonly Cloudflare: "cloudflare";
|
|
140
|
+
}>;
|
|
141
|
+
type CaptchaChoice = Loose<(typeof CaptchaChoice)[keyof typeof CaptchaChoice]>;
|
|
142
|
+
/**
|
|
143
|
+
* Поле тела запроса, в котором сервер ждёт токен капчи. Тип открытый.
|
|
144
|
+
*
|
|
145
|
+
* При `CaptchaChoice.Auto` имя берётся из ответа сервера; эти значения — умолчания
|
|
146
|
+
* для явно выбранного провайдера.
|
|
147
|
+
*/
|
|
148
|
+
declare const CaptchaField: Readonly<{
|
|
149
|
+
/** Поле собственной капчи ИТД. */
|
|
150
|
+
readonly Itd: "token";
|
|
151
|
+
/** Поле Cloudflare Turnstile. */
|
|
152
|
+
readonly Cloudflare: "turnstileToken";
|
|
153
|
+
}>;
|
|
154
|
+
type CaptchaField = Loose<(typeof CaptchaField)[keyof typeof CaptchaField]>;
|
|
117
155
|
/** Состояние соединения событийного канала. */
|
|
118
156
|
declare const EventChannelStatus: Readonly<{
|
|
119
157
|
readonly Connecting: "connecting";
|
|
@@ -295,6 +333,8 @@ declare const ItdErrorCode: Readonly<{
|
|
|
295
333
|
readonly CAPTCHA_FAILED: "CAPTCHA_FAILED";
|
|
296
334
|
/** Капча не пройдена: токен Turnstile недействителен, просрочен или уже использован. */
|
|
297
335
|
readonly TURNSTILE_VERIFICATION_FAILED: "TURNSTILE_VERIFICATION_FAILED";
|
|
336
|
+
/** Собственная captcha ИТД не подтвердила целостность проверки. */
|
|
337
|
+
readonly INTEGRITY_CHECK_FAILED: "INTEGRITY_CHECK_FAILED";
|
|
298
338
|
readonly OTP_INVALID: "OTP_INVALID";
|
|
299
339
|
/** `flowToken` неизвестен или просрочен — поток подтверждения нужно начинать заново. */
|
|
300
340
|
readonly INVALID_FLOW_TOKEN: "INVALID_FLOW_TOKEN";
|
|
@@ -311,6 +351,12 @@ declare const ItdErrorCode: Readonly<{
|
|
|
311
351
|
/** Cookie `refresh_token` есть, но сессии за ней уже нет: отозвана или истекла. */
|
|
312
352
|
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
313
353
|
readonly MISSING_FLOW_TOKEN: "MISSING_FLOW_TOKEN";
|
|
354
|
+
readonly QR_EXPIRED: "QR_EXPIRED";
|
|
355
|
+
readonly QR_TOKEN_MISMATCH: "QR_TOKEN_MISMATCH";
|
|
356
|
+
readonly QR_ALREADY_USED: "QR_ALREADY_USED";
|
|
357
|
+
readonly QR_NOT_SCANNED: "QR_NOT_SCANNED";
|
|
358
|
+
readonly USER_INACTIVE: "USER_INACTIVE";
|
|
359
|
+
readonly TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS";
|
|
314
360
|
readonly PROFILE_USERNAME_TAKEN: "PROFILE_USERNAME_TAKEN";
|
|
315
361
|
readonly PROFILE_USERNAME_RESERVED: "PROFILE_USERNAME_RESERVED";
|
|
316
362
|
readonly PROFILE_RESTRICTION_ACTIVE: "PROFILE_RESTRICTION_ACTIVE";
|
|
@@ -391,6 +437,8 @@ declare const BUCKET_LIMITS: Readonly<{
|
|
|
391
437
|
readonly 'files.get': 40;
|
|
392
438
|
readonly auth: 35;
|
|
393
439
|
readonly 'auth.refresh': 25;
|
|
440
|
+
readonly 'auth.qrStart': 40;
|
|
441
|
+
readonly 'auth.qrClaim': 300;
|
|
394
442
|
readonly search: 25;
|
|
395
443
|
readonly 'comments.like': 22;
|
|
396
444
|
readonly 'files.upload': 15;
|
|
@@ -435,6 +483,11 @@ declare const OPERATIONS: Readonly<{
|
|
|
435
483
|
readonly method: "GET";
|
|
436
484
|
readonly retrySafety: "safe";
|
|
437
485
|
}>;
|
|
486
|
+
readonly 'auth.captchaProvider': Readonly<{
|
|
487
|
+
readonly method: "GET";
|
|
488
|
+
readonly retrySafety: "safe";
|
|
489
|
+
readonly bucket: "auth";
|
|
490
|
+
}>;
|
|
438
491
|
readonly 'auth.signUp': Readonly<{
|
|
439
492
|
readonly method: "POST";
|
|
440
493
|
readonly retrySafety: "unsafe";
|
|
@@ -495,6 +548,16 @@ declare const OPERATIONS: Readonly<{
|
|
|
495
548
|
readonly retrySafety: "unsafe";
|
|
496
549
|
readonly bucket: "auth";
|
|
497
550
|
}>;
|
|
551
|
+
readonly 'auth.qrStart': Readonly<{
|
|
552
|
+
readonly method: "POST";
|
|
553
|
+
readonly retrySafety: "unsafe";
|
|
554
|
+
readonly bucket: "auth.qrStart";
|
|
555
|
+
}>;
|
|
556
|
+
readonly 'auth.qrClaim': Readonly<{
|
|
557
|
+
readonly method: "POST";
|
|
558
|
+
readonly retrySafety: "unsafe";
|
|
559
|
+
readonly bucket: "auth.qrClaim";
|
|
560
|
+
}>;
|
|
498
561
|
readonly 'users.me': Readonly<{
|
|
499
562
|
readonly method: "GET";
|
|
500
563
|
readonly retrySafety: "safe";
|
|
@@ -1354,7 +1417,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1354
1417
|
//#endregion
|
|
1355
1418
|
//#region src/core/version.d.ts
|
|
1356
1419
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1357
|
-
declare const LIBRARY_VERSION = "0.
|
|
1420
|
+
declare const LIBRARY_VERSION = "0.10.0";
|
|
1358
1421
|
//#endregion
|
|
1359
1422
|
//#region src/core/config.d.ts
|
|
1360
1423
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1507,6 +1570,10 @@ interface ClientConnection {
|
|
|
1507
1570
|
readonly fetch: typeof fetch;
|
|
1508
1571
|
readonly clock: ItdClock;
|
|
1509
1572
|
readonly logger: Logger | undefined;
|
|
1573
|
+
/** Терминальная отмена владельца соединения. @internal */
|
|
1574
|
+
readonly signal?: AbortSignal | undefined;
|
|
1575
|
+
/** Проверяет, что владелец соединения ещё принимает новые операции. @internal */
|
|
1576
|
+
readonly assertActive?: ((action: string) => void) | undefined;
|
|
1510
1577
|
/** Заголовки платформы и сервиса без Bearer-токена. */
|
|
1511
1578
|
baseHeaders(url: string): Promise<Headers>;
|
|
1512
1579
|
/** Текущий токен; способ его передачи выбирает транспорт. */
|
|
@@ -2198,5 +2265,5 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2198
2265
|
*/
|
|
2199
2266
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2200
2267
|
//#endregion
|
|
2201
|
-
export { isItdStateError as $, DEFAULT_RATE_LIMIT_BUCKET as $t, ItdErrorKind as A, RequestOptions as At, ItdStateError as B, RuntimeMode as Bt, ItdApiError as C, PaginationOptions as Ct, ItdConfigError as D, RawRequestOptions as Dt, ItdAuthError as E, RateLimitOptions as Et, ItdNetworkError as F, RuntimeOptions as Ft, isItdConflictError as G, ItdOperationDefinition as Gt, ItdValidationError as H, systemClock as Ht, ItdNotFoundError as I, QueryParams as It, isItdForbiddenError as J, isBuiltInOperationId as Jt, isItdError as K, OPERATIONS as Kt, ItdPhoneVerificationError as L, QueryValue as Lt, ItdFileError as M, RetryContext as Mt, ItdFileErrorReason as N, RetryDecisionContext as Nt, ItdConflictError as O, RequestContext as Ot, ItdForbiddenError as P, RetryOptions as Pt, isItdServerError as Q, BUCKET_LIMITS as Qt, ItdRateLimitError as R, ServiceDefinition as Rt, ItdAbortError as S,
|
|
2202
|
-
//# sourceMappingURL=url-
|
|
2268
|
+
export { isItdStateError as $, DEFAULT_RATE_LIMIT_BUCKET as $t, ItdErrorKind as A, RequestOptions as At, ItdStateError as B, RuntimeMode as Bt, ItdApiError as C, ViewReason as Cn, PaginationOptions as Ct, ItdConfigError as D, RawRequestOptions as Dt, ItdAuthError as E, RateLimitOptions as Et, ItdNetworkError as F, RuntimeOptions as Ft, isItdConflictError as G, ItdOperationDefinition as Gt, ItdValidationError as H, systemClock as Ht, ItdNotFoundError as I, QueryParams as It, isItdForbiddenError as J, isBuiltInOperationId as Jt, isItdError as K, OPERATIONS as Kt, ItdPhoneVerificationError as L, QueryValue as Lt, ItdFileError as M, RetryContext as Mt, ItdFileErrorReason as N, RetryDecisionContext as Nt, ItdConflictError as O, RequestContext as Ot, ItdForbiddenError as P, RetryOptions as Pt, isItdServerError as Q, BUCKET_LIMITS as Qt, ItdRateLimitError as R, ServiceDefinition as Rt, ItdAbortError as S, SpanType as Sn, OperationRequestOptions as St, ItdApiErrorKind as T, WallAccess as Tn, RateLimitBucketOverride as Tt, isItdApiError as U, BuiltInOperationId as Ut, ItdTimeoutError as V, ItdClock as Vt, isItdAuthError as W, CustomOperationId as Wt, isItdPhoneVerificationError as X, operationMethod as Xt, isItdNotFoundError as Y, operationBucket as Yt, isItdRateLimitError as Z, operationRetrySafety as Zt, PrivacySettings as _, Loose as _n, OperationMethod as _t, NotificationEvent as a, AccessType as an, bearerToken as at, SubscriptionState as b, ReportTargetType as bn, ErrorContextHook as bt, NotificationSettings as c, CaptchaField as cn, Listener as ct, AuthUser as d, EventChannelStatus as dn, STATUS_SERVICE as dt, RateLimitBucket as en, isItdValidationError as et, Author as f, FeedTab as fn, LIBRARY_VERSION as ft, PinsResult as g, LikesVisibility as gn, OperationMetadata as gt, Pin as h, ItdErrorCode as hn, OperationContract as ht, formatNotificationText as i, UserRef as in, anonymousAuth as it, ItdFieldErrors as j, ResponseContext as jt, ItdError as k, RequestExtensions as kt, Actor as l, CaptchaType as ln, Unsubscribe as lt, MyProfile as m, InteractionType as mn, OperationAnnotations as mt, canonicalNotificationType as n, Span as nn, AuthIdentity as nt, normalizeNotification as o, AttachmentType as on, tokenProvider as ot, FollowResult as p, IncidentKind as pn, FeatureOperationId as pt, isItdFileError as q, OperationId as qt, isKnownNotificationType as r, UserId as rn, AuthProvider as rt, Notification as s, CaptchaChoice as sn, Emitter as st, resolveNotificationUrl as t, IsoDate as tn, ClientConnection as tt, AuthState as u, CommentSort as un, DEFAULT_BASE_URL as ut, Profile as v, NotificationType as vn, RetrySafety as vt, ItdApiErrorInit as w, ViewSource as wn, RateLimitBucketContext as wt, UserSummary as x, ServiceState as xn, Logger as xt, PublicProfile as y, ReportReason as yn, ClientHooks as yt, ItdServerError as z, RateLimitPacing as zt };
|
|
2269
|
+
//# sourceMappingURL=url-DkMueFAT.d.cts.map
|
|
@@ -114,6 +114,44 @@ declare const ReportReason: Readonly<{
|
|
|
114
114
|
readonly Other: "other";
|
|
115
115
|
}>;
|
|
116
116
|
type ReportReason = (typeof ReportReason)[keyof typeof ReportReason];
|
|
117
|
+
/**
|
|
118
|
+
* Провайдер капчи, которую сервер требует пройти при входе. Тип открытый.
|
|
119
|
+
*
|
|
120
|
+
* Активного сообщает `itd.auth.captchaProvider()`.
|
|
121
|
+
*/
|
|
122
|
+
declare const CaptchaType: Readonly<{
|
|
123
|
+
/** Собственная капча ИТД. */
|
|
124
|
+
readonly Itd: "itd";
|
|
125
|
+
/** Cloudflare Turnstile. */
|
|
126
|
+
readonly Cloudflare: "cloudflare";
|
|
127
|
+
}>;
|
|
128
|
+
type CaptchaType = Loose<(typeof CaptchaType)[keyof typeof CaptchaType]>;
|
|
129
|
+
/**
|
|
130
|
+
* Какую капчу решать при входе по логину и паролю.
|
|
131
|
+
*
|
|
132
|
+
* `CaptchaChoice.Auto` — спросить сервер перед каждым входом; названный провайдер
|
|
133
|
+
* решается без этого запроса.
|
|
134
|
+
*/
|
|
135
|
+
declare const CaptchaChoice: Readonly<{
|
|
136
|
+
/** Провайдера называет сервер. */
|
|
137
|
+
readonly Auto: "auto";
|
|
138
|
+
readonly Itd: "itd";
|
|
139
|
+
readonly Cloudflare: "cloudflare";
|
|
140
|
+
}>;
|
|
141
|
+
type CaptchaChoice = Loose<(typeof CaptchaChoice)[keyof typeof CaptchaChoice]>;
|
|
142
|
+
/**
|
|
143
|
+
* Поле тела запроса, в котором сервер ждёт токен капчи. Тип открытый.
|
|
144
|
+
*
|
|
145
|
+
* При `CaptchaChoice.Auto` имя берётся из ответа сервера; эти значения — умолчания
|
|
146
|
+
* для явно выбранного провайдера.
|
|
147
|
+
*/
|
|
148
|
+
declare const CaptchaField: Readonly<{
|
|
149
|
+
/** Поле собственной капчи ИТД. */
|
|
150
|
+
readonly Itd: "token";
|
|
151
|
+
/** Поле Cloudflare Turnstile. */
|
|
152
|
+
readonly Cloudflare: "turnstileToken";
|
|
153
|
+
}>;
|
|
154
|
+
type CaptchaField = Loose<(typeof CaptchaField)[keyof typeof CaptchaField]>;
|
|
117
155
|
/** Состояние соединения событийного канала. */
|
|
118
156
|
declare const EventChannelStatus: Readonly<{
|
|
119
157
|
readonly Connecting: "connecting";
|
|
@@ -295,6 +333,8 @@ declare const ItdErrorCode: Readonly<{
|
|
|
295
333
|
readonly CAPTCHA_FAILED: "CAPTCHA_FAILED";
|
|
296
334
|
/** Капча не пройдена: токен Turnstile недействителен, просрочен или уже использован. */
|
|
297
335
|
readonly TURNSTILE_VERIFICATION_FAILED: "TURNSTILE_VERIFICATION_FAILED";
|
|
336
|
+
/** Собственная captcha ИТД не подтвердила целостность проверки. */
|
|
337
|
+
readonly INTEGRITY_CHECK_FAILED: "INTEGRITY_CHECK_FAILED";
|
|
298
338
|
readonly OTP_INVALID: "OTP_INVALID";
|
|
299
339
|
/** `flowToken` неизвестен или просрочен — поток подтверждения нужно начинать заново. */
|
|
300
340
|
readonly INVALID_FLOW_TOKEN: "INVALID_FLOW_TOKEN";
|
|
@@ -311,6 +351,12 @@ declare const ItdErrorCode: Readonly<{
|
|
|
311
351
|
/** Cookie `refresh_token` есть, но сессии за ней уже нет: отозвана или истекла. */
|
|
312
352
|
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
313
353
|
readonly MISSING_FLOW_TOKEN: "MISSING_FLOW_TOKEN";
|
|
354
|
+
readonly QR_EXPIRED: "QR_EXPIRED";
|
|
355
|
+
readonly QR_TOKEN_MISMATCH: "QR_TOKEN_MISMATCH";
|
|
356
|
+
readonly QR_ALREADY_USED: "QR_ALREADY_USED";
|
|
357
|
+
readonly QR_NOT_SCANNED: "QR_NOT_SCANNED";
|
|
358
|
+
readonly USER_INACTIVE: "USER_INACTIVE";
|
|
359
|
+
readonly TOO_MANY_REQUESTS: "TOO_MANY_REQUESTS";
|
|
314
360
|
readonly PROFILE_USERNAME_TAKEN: "PROFILE_USERNAME_TAKEN";
|
|
315
361
|
readonly PROFILE_USERNAME_RESERVED: "PROFILE_USERNAME_RESERVED";
|
|
316
362
|
readonly PROFILE_RESTRICTION_ACTIVE: "PROFILE_RESTRICTION_ACTIVE";
|
|
@@ -391,6 +437,8 @@ declare const BUCKET_LIMITS: Readonly<{
|
|
|
391
437
|
readonly 'files.get': 40;
|
|
392
438
|
readonly auth: 35;
|
|
393
439
|
readonly 'auth.refresh': 25;
|
|
440
|
+
readonly 'auth.qrStart': 40;
|
|
441
|
+
readonly 'auth.qrClaim': 300;
|
|
394
442
|
readonly search: 25;
|
|
395
443
|
readonly 'comments.like': 22;
|
|
396
444
|
readonly 'files.upload': 15;
|
|
@@ -435,6 +483,11 @@ declare const OPERATIONS: Readonly<{
|
|
|
435
483
|
readonly method: "GET";
|
|
436
484
|
readonly retrySafety: "safe";
|
|
437
485
|
}>;
|
|
486
|
+
readonly 'auth.captchaProvider': Readonly<{
|
|
487
|
+
readonly method: "GET";
|
|
488
|
+
readonly retrySafety: "safe";
|
|
489
|
+
readonly bucket: "auth";
|
|
490
|
+
}>;
|
|
438
491
|
readonly 'auth.signUp': Readonly<{
|
|
439
492
|
readonly method: "POST";
|
|
440
493
|
readonly retrySafety: "unsafe";
|
|
@@ -495,6 +548,16 @@ declare const OPERATIONS: Readonly<{
|
|
|
495
548
|
readonly retrySafety: "unsafe";
|
|
496
549
|
readonly bucket: "auth";
|
|
497
550
|
}>;
|
|
551
|
+
readonly 'auth.qrStart': Readonly<{
|
|
552
|
+
readonly method: "POST";
|
|
553
|
+
readonly retrySafety: "unsafe";
|
|
554
|
+
readonly bucket: "auth.qrStart";
|
|
555
|
+
}>;
|
|
556
|
+
readonly 'auth.qrClaim': Readonly<{
|
|
557
|
+
readonly method: "POST";
|
|
558
|
+
readonly retrySafety: "unsafe";
|
|
559
|
+
readonly bucket: "auth.qrClaim";
|
|
560
|
+
}>;
|
|
498
561
|
readonly 'users.me': Readonly<{
|
|
499
562
|
readonly method: "GET";
|
|
500
563
|
readonly retrySafety: "safe";
|
|
@@ -1354,7 +1417,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1354
1417
|
//#endregion
|
|
1355
1418
|
//#region src/core/version.d.ts
|
|
1356
1419
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1357
|
-
declare const LIBRARY_VERSION = "0.
|
|
1420
|
+
declare const LIBRARY_VERSION = "0.10.0";
|
|
1358
1421
|
//#endregion
|
|
1359
1422
|
//#region src/core/config.d.ts
|
|
1360
1423
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1507,6 +1570,10 @@ interface ClientConnection {
|
|
|
1507
1570
|
readonly fetch: typeof fetch;
|
|
1508
1571
|
readonly clock: ItdClock;
|
|
1509
1572
|
readonly logger: Logger | undefined;
|
|
1573
|
+
/** Терминальная отмена владельца соединения. @internal */
|
|
1574
|
+
readonly signal?: AbortSignal | undefined;
|
|
1575
|
+
/** Проверяет, что владелец соединения ещё принимает новые операции. @internal */
|
|
1576
|
+
readonly assertActive?: ((action: string) => void) | undefined;
|
|
1510
1577
|
/** Заголовки платформы и сервиса без Bearer-токена. */
|
|
1511
1578
|
baseHeaders(url: string): Promise<Headers>;
|
|
1512
1579
|
/** Текущий токен; способ его передачи выбирает транспорт. */
|
|
@@ -2198,5 +2265,5 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2198
2265
|
*/
|
|
2199
2266
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2200
2267
|
//#endregion
|
|
2201
|
-
export { isItdStateError as $, DEFAULT_RATE_LIMIT_BUCKET as $t, ItdErrorKind as A, RequestOptions as At, ItdStateError as B, RuntimeMode as Bt, ItdApiError as C, PaginationOptions as Ct, ItdConfigError as D, RawRequestOptions as Dt, ItdAuthError as E, RateLimitOptions as Et, ItdNetworkError as F, RuntimeOptions as Ft, isItdConflictError as G, ItdOperationDefinition as Gt, ItdValidationError as H, systemClock as Ht, ItdNotFoundError as I, QueryParams as It, isItdForbiddenError as J, isBuiltInOperationId as Jt, isItdError as K, OPERATIONS as Kt, ItdPhoneVerificationError as L, QueryValue as Lt, ItdFileError as M, RetryContext as Mt, ItdFileErrorReason as N, RetryDecisionContext as Nt, ItdConflictError as O, RequestContext as Ot, ItdForbiddenError as P, RetryOptions as Pt, isItdServerError as Q, BUCKET_LIMITS as Qt, ItdRateLimitError as R, ServiceDefinition as Rt, ItdAbortError as S,
|
|
2202
|
-
//# sourceMappingURL=url-
|
|
2268
|
+
export { isItdStateError as $, DEFAULT_RATE_LIMIT_BUCKET as $t, ItdErrorKind as A, RequestOptions as At, ItdStateError as B, RuntimeMode as Bt, ItdApiError as C, ViewReason as Cn, PaginationOptions as Ct, ItdConfigError as D, RawRequestOptions as Dt, ItdAuthError as E, RateLimitOptions as Et, ItdNetworkError as F, RuntimeOptions as Ft, isItdConflictError as G, ItdOperationDefinition as Gt, ItdValidationError as H, systemClock as Ht, ItdNotFoundError as I, QueryParams as It, isItdForbiddenError as J, isBuiltInOperationId as Jt, isItdError as K, OPERATIONS as Kt, ItdPhoneVerificationError as L, QueryValue as Lt, ItdFileError as M, RetryContext as Mt, ItdFileErrorReason as N, RetryDecisionContext as Nt, ItdConflictError as O, RequestContext as Ot, ItdForbiddenError as P, RetryOptions as Pt, isItdServerError as Q, BUCKET_LIMITS as Qt, ItdRateLimitError as R, ServiceDefinition as Rt, ItdAbortError as S, SpanType as Sn, OperationRequestOptions as St, ItdApiErrorKind as T, WallAccess as Tn, RateLimitBucketOverride as Tt, isItdApiError as U, BuiltInOperationId as Ut, ItdTimeoutError as V, ItdClock as Vt, isItdAuthError as W, CustomOperationId as Wt, isItdPhoneVerificationError as X, operationMethod as Xt, isItdNotFoundError as Y, operationBucket as Yt, isItdRateLimitError as Z, operationRetrySafety as Zt, PrivacySettings as _, Loose as _n, OperationMethod as _t, NotificationEvent as a, AccessType as an, bearerToken as at, SubscriptionState as b, ReportTargetType as bn, ErrorContextHook as bt, NotificationSettings as c, CaptchaField as cn, Listener as ct, AuthUser as d, EventChannelStatus as dn, STATUS_SERVICE as dt, RateLimitBucket as en, isItdValidationError as et, Author as f, FeedTab as fn, LIBRARY_VERSION as ft, PinsResult as g, LikesVisibility as gn, OperationMetadata as gt, Pin as h, ItdErrorCode as hn, OperationContract as ht, formatNotificationText as i, UserRef as in, anonymousAuth as it, ItdFieldErrors as j, ResponseContext as jt, ItdError as k, RequestExtensions as kt, Actor as l, CaptchaType as ln, Unsubscribe as lt, MyProfile as m, InteractionType as mn, OperationAnnotations as mt, canonicalNotificationType as n, Span as nn, AuthIdentity as nt, normalizeNotification as o, AttachmentType as on, tokenProvider as ot, FollowResult as p, IncidentKind as pn, FeatureOperationId as pt, isItdFileError as q, OperationId as qt, isKnownNotificationType as r, UserId as rn, AuthProvider as rt, Notification as s, CaptchaChoice as sn, Emitter as st, resolveNotificationUrl as t, IsoDate as tn, ClientConnection as tt, AuthState as u, CommentSort as un, DEFAULT_BASE_URL as ut, Profile as v, NotificationType as vn, RetrySafety as vt, ItdApiErrorInit as w, ViewSource as wn, RateLimitBucketContext as wt, UserSummary as x, ServiceState as xn, Logger as xt, PublicProfile as y, ReportReason as yn, ClientHooks as yt, ItdServerError as z, RateLimitPacing as zt };
|
|
2269
|
+
//# sourceMappingURL=url-DkMueFAT.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itd-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "JS/TS SDK & API клиент для соцсети ИТД (итд.com)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"prebuild": "npm run sync-version",
|
|
118
118
|
"build": "tsdown",
|
|
119
119
|
"dev": "tsdown --watch",
|
|
120
|
+
"example:qr": "npm run build && npm run build --workspace @itd-api/captcha && node guides/authentication/examples/qr-login-server.mjs",
|
|
120
121
|
"test": "vitest run",
|
|
121
122
|
"test:all": "npm run test && npm run test --workspaces --if-present",
|
|
122
123
|
"test:watch": "vitest",
|