itd-api 0.9.2 → 0.9.3
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 +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 +87 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +87 -53
- 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-BCn5LRnT.d.cts → events-BPxBF0gQ.d.cts} +2 -2
- package/dist/shared/{events-BIBO2Jif.js → events-BzjI6pn5.js} +2 -2
- package/dist/shared/{events-BIBO2Jif.js.map → events-BzjI6pn5.js.map} +1 -1
- package/dist/shared/{events-BsRm_Fba.cjs → events-C1FudmSe.cjs} +2 -2
- package/dist/shared/{events-BsRm_Fba.cjs.map → events-C1FudmSe.cjs.map} +1 -1
- package/dist/shared/{events-t1uGgpkf.d.ts → events-DnwfcLxS.d.ts} +2 -2
- package/dist/shared/{render-DA83gS0f.d.cts → render-C1F_QWYD.d.cts} +2 -14
- package/dist/shared/{render--ZXmYEf-.js → render-CtOpp9Pm.js} +2 -30
- package/dist/shared/render-CtOpp9Pm.js.map +1 -0
- package/dist/shared/{render-DqVzx68r.cjs → render-Omy1drH1.cjs} +2 -30
- package/dist/shared/render-Omy1drH1.cjs.map +1 -0
- package/dist/shared/{render-BdnBV-aT.d.ts → render-uFW2kDxp.d.ts} +2 -14
- package/dist/shared/{url-i2f-X1hX.js → url-3Ts6EEHQ.js} +32 -15
- package/dist/shared/url-3Ts6EEHQ.js.map +1 -0
- package/dist/shared/{url-Doc0XXW_.cjs → url-D6wsXm1T.cjs} +32 -15
- package/dist/shared/url-D6wsXm1T.cjs.map +1 -0
- package/dist/shared/{url-Dbj6V6fk.d.ts → url-DubjkRR9.d.cts} +8 -16
- package/dist/shared/{url-Dbj6V6fk.d.cts → url-DubjkRR9.d.ts} +8 -16
- package/package.json +3 -3
- package/dist/shared/render--ZXmYEf-.js.map +0 -1
- package/dist/shared/render-DqVzx68r.cjs.map +0 -1
- package/dist/shared/url-Doc0XXW_.cjs.map +0 -1
- package/dist/shared/url-i2f-X1hX.js.map +0 -1
|
@@ -527,11 +527,6 @@ declare const OPERATIONS: Readonly<{
|
|
|
527
527
|
readonly retrySafety: "safe";
|
|
528
528
|
readonly bucket: "users";
|
|
529
529
|
}>;
|
|
530
|
-
readonly 'users.search': Readonly<{
|
|
531
|
-
readonly method: "GET";
|
|
532
|
-
readonly retrySafety: "safe";
|
|
533
|
-
readonly bucket: "users";
|
|
534
|
-
}>;
|
|
535
530
|
readonly 'users.whoToFollow': Readonly<{
|
|
536
531
|
readonly method: "GET";
|
|
537
532
|
readonly retrySafety: "safe";
|
|
@@ -768,11 +763,6 @@ declare const OPERATIONS: Readonly<{
|
|
|
768
763
|
readonly retrySafety: "safe";
|
|
769
764
|
readonly bucket: "notifications";
|
|
770
765
|
}>;
|
|
771
|
-
readonly 'hashtags.search': Readonly<{
|
|
772
|
-
readonly method: "GET";
|
|
773
|
-
readonly retrySafety: "safe";
|
|
774
|
-
readonly bucket: "hashtags";
|
|
775
|
-
}>;
|
|
776
766
|
readonly 'hashtags.trending': Readonly<{
|
|
777
767
|
readonly method: "GET";
|
|
778
768
|
readonly retrySafety: "safe";
|
|
@@ -1296,7 +1286,7 @@ interface RawRequestOptions extends RequestOptions {
|
|
|
1296
1286
|
* токен автоматически отправляется только основному хосту и его поддоменам.
|
|
1297
1287
|
*/
|
|
1298
1288
|
skipAuth?: boolean | undefined;
|
|
1299
|
-
/** Не
|
|
1289
|
+
/** Не обновлять токен заранее и при `401` — используется эндпоинтами авторизации. */
|
|
1300
1290
|
skipAuthRefresh?: boolean | undefined;
|
|
1301
1291
|
/**
|
|
1302
1292
|
* Выполнить запрос мимо очереди.
|
|
@@ -1364,7 +1354,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1364
1354
|
//#endregion
|
|
1365
1355
|
//#region src/core/version.d.ts
|
|
1366
1356
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1367
|
-
declare const LIBRARY_VERSION = "0.9.
|
|
1357
|
+
declare const LIBRARY_VERSION = "0.9.3";
|
|
1368
1358
|
//#endregion
|
|
1369
1359
|
//#region src/core/config.d.ts
|
|
1370
1360
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1442,11 +1432,13 @@ interface AuthProvider {
|
|
|
1442
1432
|
*/
|
|
1443
1433
|
token(): Promise<string | null>;
|
|
1444
1434
|
/**
|
|
1445
|
-
*
|
|
1435
|
+
* Один раз готовит авторизацию до retry исходного запроса.
|
|
1436
|
+
* Вложенные auth-операции используют собственную retry-политику.
|
|
1446
1437
|
*
|
|
1447
|
-
*
|
|
1448
|
-
* поэтому обязаны завершиться до захвата слота очереди.
|
|
1438
|
+
* @param allowRefresh можно ли заранее обновить токен
|
|
1449
1439
|
*/
|
|
1440
|
+
preflight?(allowRefresh: boolean): Promise<void>;
|
|
1441
|
+
/** Перед каждой попыткой читает внешний источник токена до захвата слота очереди. */
|
|
1450
1442
|
prepare(): Promise<void>;
|
|
1451
1443
|
/**
|
|
1452
1444
|
* Заголовки уже подготовленной авторизации.
|
|
@@ -2207,4 +2199,4 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2207
2199
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2208
2200
|
//#endregion
|
|
2209
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, WallAccess as Sn, OperationRequestOptions as St, ItdApiErrorKind as T, 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 _, ReportTargetType as _n, OperationMethod as _t, NotificationEvent as a, AccessType as an, bearerToken as at, SubscriptionState as b, ViewReason as bn, ErrorContextHook as bt, NotificationSettings as c, EventChannelStatus as cn, Listener as ct, AuthUser as d, InteractionType as dn, STATUS_SERVICE as dt, RateLimitBucket as en, isItdValidationError as et, Author as f, ItdErrorCode as fn, LIBRARY_VERSION as ft, PinsResult as g, ReportReason as gn, OperationMetadata as gt, Pin as h, NotificationType 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, FeedTab as ln, Unsubscribe as lt, MyProfile as m, Loose 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, LikesVisibility as pn, FeatureOperationId as pt, isItdFileError as q, OperationId as qt, isKnownNotificationType as r, UserId as rn, AuthProvider as rt, Notification as s, CommentSort as sn, Emitter as st, resolveNotificationUrl as t, IsoDate as tn, ClientConnection as tt, AuthState as u, IncidentKind as un, DEFAULT_BASE_URL as ut, Profile as v, ServiceState as vn, RetrySafety as vt, ItdApiErrorInit as w, RateLimitBucketContext as wt, UserSummary as x, ViewSource as xn, Logger as xt, PublicProfile as y, SpanType as yn, ClientHooks as yt, ItdServerError as z, RateLimitPacing as zt };
|
|
2210
|
-
//# sourceMappingURL=url-
|
|
2202
|
+
//# sourceMappingURL=url-DubjkRR9.d.cts.map
|
|
@@ -527,11 +527,6 @@ declare const OPERATIONS: Readonly<{
|
|
|
527
527
|
readonly retrySafety: "safe";
|
|
528
528
|
readonly bucket: "users";
|
|
529
529
|
}>;
|
|
530
|
-
readonly 'users.search': Readonly<{
|
|
531
|
-
readonly method: "GET";
|
|
532
|
-
readonly retrySafety: "safe";
|
|
533
|
-
readonly bucket: "users";
|
|
534
|
-
}>;
|
|
535
530
|
readonly 'users.whoToFollow': Readonly<{
|
|
536
531
|
readonly method: "GET";
|
|
537
532
|
readonly retrySafety: "safe";
|
|
@@ -768,11 +763,6 @@ declare const OPERATIONS: Readonly<{
|
|
|
768
763
|
readonly retrySafety: "safe";
|
|
769
764
|
readonly bucket: "notifications";
|
|
770
765
|
}>;
|
|
771
|
-
readonly 'hashtags.search': Readonly<{
|
|
772
|
-
readonly method: "GET";
|
|
773
|
-
readonly retrySafety: "safe";
|
|
774
|
-
readonly bucket: "hashtags";
|
|
775
|
-
}>;
|
|
776
766
|
readonly 'hashtags.trending': Readonly<{
|
|
777
767
|
readonly method: "GET";
|
|
778
768
|
readonly retrySafety: "safe";
|
|
@@ -1296,7 +1286,7 @@ interface RawRequestOptions extends RequestOptions {
|
|
|
1296
1286
|
* токен автоматически отправляется только основному хосту и его поддоменам.
|
|
1297
1287
|
*/
|
|
1298
1288
|
skipAuth?: boolean | undefined;
|
|
1299
|
-
/** Не
|
|
1289
|
+
/** Не обновлять токен заранее и при `401` — используется эндпоинтами авторизации. */
|
|
1300
1290
|
skipAuthRefresh?: boolean | undefined;
|
|
1301
1291
|
/**
|
|
1302
1292
|
* Выполнить запрос мимо очереди.
|
|
@@ -1364,7 +1354,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1364
1354
|
//#endregion
|
|
1365
1355
|
//#region src/core/version.d.ts
|
|
1366
1356
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1367
|
-
declare const LIBRARY_VERSION = "0.9.
|
|
1357
|
+
declare const LIBRARY_VERSION = "0.9.3";
|
|
1368
1358
|
//#endregion
|
|
1369
1359
|
//#region src/core/config.d.ts
|
|
1370
1360
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1442,11 +1432,13 @@ interface AuthProvider {
|
|
|
1442
1432
|
*/
|
|
1443
1433
|
token(): Promise<string | null>;
|
|
1444
1434
|
/**
|
|
1445
|
-
*
|
|
1435
|
+
* Один раз готовит авторизацию до retry исходного запроса.
|
|
1436
|
+
* Вложенные auth-операции используют собственную retry-политику.
|
|
1446
1437
|
*
|
|
1447
|
-
*
|
|
1448
|
-
* поэтому обязаны завершиться до захвата слота очереди.
|
|
1438
|
+
* @param allowRefresh можно ли заранее обновить токен
|
|
1449
1439
|
*/
|
|
1440
|
+
preflight?(allowRefresh: boolean): Promise<void>;
|
|
1441
|
+
/** Перед каждой попыткой читает внешний источник токена до захвата слота очереди. */
|
|
1450
1442
|
prepare(): Promise<void>;
|
|
1451
1443
|
/**
|
|
1452
1444
|
* Заголовки уже подготовленной авторизации.
|
|
@@ -2207,4 +2199,4 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2207
2199
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2208
2200
|
//#endregion
|
|
2209
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, WallAccess as Sn, OperationRequestOptions as St, ItdApiErrorKind as T, 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 _, ReportTargetType as _n, OperationMethod as _t, NotificationEvent as a, AccessType as an, bearerToken as at, SubscriptionState as b, ViewReason as bn, ErrorContextHook as bt, NotificationSettings as c, EventChannelStatus as cn, Listener as ct, AuthUser as d, InteractionType as dn, STATUS_SERVICE as dt, RateLimitBucket as en, isItdValidationError as et, Author as f, ItdErrorCode as fn, LIBRARY_VERSION as ft, PinsResult as g, ReportReason as gn, OperationMetadata as gt, Pin as h, NotificationType 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, FeedTab as ln, Unsubscribe as lt, MyProfile as m, Loose 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, LikesVisibility as pn, FeatureOperationId as pt, isItdFileError as q, OperationId as qt, isKnownNotificationType as r, UserId as rn, AuthProvider as rt, Notification as s, CommentSort as sn, Emitter as st, resolveNotificationUrl as t, IsoDate as tn, ClientConnection as tt, AuthState as u, IncidentKind as un, DEFAULT_BASE_URL as ut, Profile as v, ServiceState as vn, RetrySafety as vt, ItdApiErrorInit as w, RateLimitBucketContext as wt, UserSummary as x, ViewSource as xn, Logger as xt, PublicProfile as y, SpanType as yn, ClientHooks as yt, ItdServerError as z, RateLimitPacing as zt };
|
|
2210
|
-
//# sourceMappingURL=url-
|
|
2202
|
+
//# sourceMappingURL=url-DubjkRR9.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itd-api",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "JS/TS SDK & API клиент для соцсети ИТД (итд.com)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -139,11 +139,11 @@
|
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
142
|
-
"@biomejs/biome": "^2.5.
|
|
142
|
+
"@biomejs/biome": "^2.5.10",
|
|
143
143
|
"@types/node": "^26.2.0",
|
|
144
144
|
"@vitest/coverage-v8": "^4.1.11",
|
|
145
145
|
"eventsource-parser": "^3.1.1",
|
|
146
|
-
"publint": "^0.3.
|
|
146
|
+
"publint": "^0.3.24",
|
|
147
147
|
"set-cookie-parser": "^3.1.2",
|
|
148
148
|
"tsdown": "^0.22.14",
|
|
149
149
|
"typedoc": "^0.28.20",
|