itd-api 0.9.0 → 0.9.1
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 +4 -4
- 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 +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/rest/index.cjs +2 -2
- package/dist/rest/index.d.cts +3 -3
- package/dist/rest/index.d.ts +3 -3
- package/dist/rest/index.js +2 -2
- package/dist/shared/{events-CqtkP65d.d.ts → events-BDdJyH2p.d.ts} +2 -2
- package/dist/shared/{events-DGAWlCaI.d.cts → events-BQyH5-S0.d.cts} +2 -2
- package/dist/shared/{events-FZfnEez0.cjs → events-BqFkwwTw.cjs} +2 -2
- package/dist/shared/{events-FZfnEez0.cjs.map → events-BqFkwwTw.cjs.map} +1 -1
- package/dist/shared/{events-C5wnTXPT.js → events-D6y0Hxyz.js} +2 -2
- package/dist/shared/{events-C5wnTXPT.js.map → events-D6y0Hxyz.js.map} +1 -1
- package/dist/shared/{render-DDwy2Ame.d.cts → render-BU1_wex8.d.cts} +33 -12
- package/dist/shared/{render-B4qis7Sb.d.ts → render-CZ_-F2Tl.d.ts} +33 -12
- package/dist/shared/{render-Dqi8Owqk.cjs → render-DAEeCMk9.cjs} +6 -6
- package/dist/shared/render-DAEeCMk9.cjs.map +1 -0
- package/dist/shared/{render-hiWFh2s4.js → render-sb1VJhUA.js} +6 -6
- package/dist/shared/render-sb1VJhUA.js.map +1 -0
- package/dist/shared/{url-XBsMdAcv.d.ts → url-CZZcyPI0.d.cts} +19 -5
- package/dist/shared/{url-XBsMdAcv.d.cts → url-CZZcyPI0.d.ts} +19 -5
- package/dist/shared/{url-Bsb3xE5U.cjs → url-CzHqE-Fg.cjs} +2 -2
- package/dist/shared/{url-Bsb3xE5U.cjs.map → url-CzHqE-Fg.cjs.map} +1 -1
- package/dist/shared/{url-DP33mp3s.js → url-Dsr4c5r5.js} +2 -2
- package/dist/shared/{url-DP33mp3s.js.map → url-Dsr4c5r5.js.map} +1 -1
- package/package.json +1 -1
- package/dist/shared/render-Dqi8Owqk.cjs.map +0 -1
- package/dist/shared/render-hiWFh2s4.js.map +0 -1
|
@@ -1362,7 +1362,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1362
1362
|
//#endregion
|
|
1363
1363
|
//#region src/core/version.d.ts
|
|
1364
1364
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1365
|
-
declare const LIBRARY_VERSION = "0.9.
|
|
1365
|
+
declare const LIBRARY_VERSION = "0.9.1";
|
|
1366
1366
|
//#endregion
|
|
1367
1367
|
//#region src/core/config.d.ts
|
|
1368
1368
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1978,13 +1978,25 @@ interface MyProfile extends ProfileBase {
|
|
|
1978
1978
|
* Endpoint доступен без сессии: в этом случае `authenticated` равен `false`,
|
|
1979
1979
|
* а `user` — `null`.
|
|
1980
1980
|
*/
|
|
1981
|
+
interface AuthUser {
|
|
1982
|
+
id: UserId;
|
|
1983
|
+
username: string;
|
|
1984
|
+
displayName: string;
|
|
1985
|
+
/** Эмодзи-аватар, см. {@link Author.avatar}. */
|
|
1986
|
+
avatar: string;
|
|
1987
|
+
bio: string;
|
|
1988
|
+
verified: boolean;
|
|
1989
|
+
isPhoneVerified: boolean;
|
|
1990
|
+
/** Роли текущего пользователя, например `user`. */
|
|
1991
|
+
roles: string[];
|
|
1992
|
+
}
|
|
1981
1993
|
interface AuthState {
|
|
1982
1994
|
/** Есть ли действующая сессия. */
|
|
1983
1995
|
authenticated: boolean;
|
|
1984
1996
|
/** Заблокирован ли текущий аккаунт. */
|
|
1985
1997
|
banned: boolean;
|
|
1986
|
-
/**
|
|
1987
|
-
user:
|
|
1998
|
+
/** Компактные данные текущего пользователя либо `null` без действующей сессии. */
|
|
1999
|
+
user: AuthUser | null;
|
|
1988
2000
|
}
|
|
1989
2001
|
/**
|
|
1990
2002
|
* Чужой профиль — ответ `GET /api/users/{id|username}`.
|
|
@@ -1999,6 +2011,8 @@ interface PublicProfile extends ProfileBase {
|
|
|
1999
2011
|
isFollowing: boolean;
|
|
2000
2012
|
/** Подписан ли он на вас. */
|
|
2001
2013
|
isFollowedBy: boolean;
|
|
2014
|
+
/** Может ли текущий пользователь написать этому профилю личное сообщение. */
|
|
2015
|
+
canMessage: boolean;
|
|
2002
2016
|
/** Сейчас ли пользователь в сети. */
|
|
2003
2017
|
online: boolean;
|
|
2004
2018
|
/** Когда был в сети. `null`, если скрыто настройками приватности. */
|
|
@@ -2190,5 +2204,5 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2190
2204
|
*/
|
|
2191
2205
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2192
2206
|
//#endregion
|
|
2193
|
-
export {
|
|
2194
|
-
//# sourceMappingURL=url-
|
|
2207
|
+
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 };
|
|
2208
|
+
//# sourceMappingURL=url-CZZcyPI0.d.cts.map
|
|
@@ -1362,7 +1362,7 @@ interface OperationDefinition extends OperationMetadata {
|
|
|
1362
1362
|
//#endregion
|
|
1363
1363
|
//#region src/core/version.d.ts
|
|
1364
1364
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
1365
|
-
declare const LIBRARY_VERSION = "0.9.
|
|
1365
|
+
declare const LIBRARY_VERSION = "0.9.1";
|
|
1366
1366
|
//#endregion
|
|
1367
1367
|
//#region src/core/config.d.ts
|
|
1368
1368
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -1978,13 +1978,25 @@ interface MyProfile extends ProfileBase {
|
|
|
1978
1978
|
* Endpoint доступен без сессии: в этом случае `authenticated` равен `false`,
|
|
1979
1979
|
* а `user` — `null`.
|
|
1980
1980
|
*/
|
|
1981
|
+
interface AuthUser {
|
|
1982
|
+
id: UserId;
|
|
1983
|
+
username: string;
|
|
1984
|
+
displayName: string;
|
|
1985
|
+
/** Эмодзи-аватар, см. {@link Author.avatar}. */
|
|
1986
|
+
avatar: string;
|
|
1987
|
+
bio: string;
|
|
1988
|
+
verified: boolean;
|
|
1989
|
+
isPhoneVerified: boolean;
|
|
1990
|
+
/** Роли текущего пользователя, например `user`. */
|
|
1991
|
+
roles: string[];
|
|
1992
|
+
}
|
|
1981
1993
|
interface AuthState {
|
|
1982
1994
|
/** Есть ли действующая сессия. */
|
|
1983
1995
|
authenticated: boolean;
|
|
1984
1996
|
/** Заблокирован ли текущий аккаунт. */
|
|
1985
1997
|
banned: boolean;
|
|
1986
|
-
/**
|
|
1987
|
-
user:
|
|
1998
|
+
/** Компактные данные текущего пользователя либо `null` без действующей сессии. */
|
|
1999
|
+
user: AuthUser | null;
|
|
1988
2000
|
}
|
|
1989
2001
|
/**
|
|
1990
2002
|
* Чужой профиль — ответ `GET /api/users/{id|username}`.
|
|
@@ -1999,6 +2011,8 @@ interface PublicProfile extends ProfileBase {
|
|
|
1999
2011
|
isFollowing: boolean;
|
|
2000
2012
|
/** Подписан ли он на вас. */
|
|
2001
2013
|
isFollowedBy: boolean;
|
|
2014
|
+
/** Может ли текущий пользователь написать этому профилю личное сообщение. */
|
|
2015
|
+
canMessage: boolean;
|
|
2002
2016
|
/** Сейчас ли пользователь в сети. */
|
|
2003
2017
|
online: boolean;
|
|
2004
2018
|
/** Когда был в сети. `null`, если скрыто настройками приватности. */
|
|
@@ -2190,5 +2204,5 @@ declare function isKnownNotificationType(type: string): boolean;
|
|
|
2190
2204
|
*/
|
|
2191
2205
|
declare function resolveNotificationUrl(notification: Notification): string;
|
|
2192
2206
|
//#endregion
|
|
2193
|
-
export {
|
|
2194
|
-
//# sourceMappingURL=url-
|
|
2207
|
+
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 };
|
|
2208
|
+
//# sourceMappingURL=url-CZZcyPI0.d.ts.map
|
|
@@ -85,7 +85,7 @@ function requireOptionalBoolean(value, name) {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/core/version.ts
|
|
87
87
|
/** Версия библиотеки. Попадает в `User-Agent`. */
|
|
88
|
-
const LIBRARY_VERSION = "0.9.
|
|
88
|
+
const LIBRARY_VERSION = "0.9.1";
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/core/config.ts
|
|
91
91
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -4192,4 +4192,4 @@ Object.defineProperty(exports, "voidResult", {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
});
|
|
4194
4194
|
|
|
4195
|
-
//# sourceMappingURL=url-
|
|
4195
|
+
//# sourceMappingURL=url-CzHqE-Fg.cjs.map
|