itd-api 0.8.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 +66 -21
- package/dist/events/index.cjs +3 -3
- package/dist/events/index.d.cts +2 -2
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +3 -3
- package/dist/index.cjs +26 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +5 -4
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +2 -2
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +4 -3
- package/dist/node/index.js.map +1 -1
- package/dist/rest/index.cjs +16 -4
- package/dist/rest/index.cjs.map +1 -1
- package/dist/rest/index.d.cts +5 -3
- package/dist/rest/index.d.ts +5 -3
- package/dist/rest/index.js +9 -5
- package/dist/rest/index.js.map +1 -1
- package/dist/shared/{events-QyhQZrnC.d.ts → events-BDdJyH2p.d.ts} +2 -2
- package/dist/shared/{events-Br2r7coi.d.cts → events-BQyH5-S0.d.cts} +2 -2
- package/dist/shared/{events-iTteVsd_.cjs → events-BqFkwwTw.cjs} +3 -3
- package/dist/shared/{events-iTteVsd_.cjs.map → events-BqFkwwTw.cjs.map} +1 -1
- package/dist/shared/{events-TfhKh26b.js → events-D6y0Hxyz.js} +3 -3
- package/dist/shared/{events-TfhKh26b.js.map → events-D6y0Hxyz.js.map} +1 -1
- package/dist/shared/{storage-BLmXmzKF.cjs → key-value-store-B5GYVEYZ.cjs} +1 -85
- package/dist/shared/key-value-store-B5GYVEYZ.cjs.map +1 -0
- package/dist/shared/{storage-CCxn0Kkv.js → key-value-store-Bt2PSMxY.js} +2 -68
- package/dist/shared/key-value-store-Bt2PSMxY.js.map +1 -0
- package/dist/shared/key-value-store-COZaNHZS.d.cts +69 -0
- package/dist/shared/key-value-store-COZaNHZS.d.ts +69 -0
- package/dist/shared/{multi-storage-DccjD7Ww.d.ts → multi-storage-BEL7tcKn.d.cts} +3 -2
- package/dist/shared/{multi-storage-CCUgkqvI.cjs → multi-storage-CDKLa956.cjs} +8 -7
- package/dist/shared/{multi-storage-CCUgkqvI.cjs.map → multi-storage-CDKLa956.cjs.map} +1 -1
- package/dist/shared/{multi-storage-CjAPB5Kq.d.cts → multi-storage-LkljOSzA.d.ts} +3 -2
- package/dist/shared/{multi-storage-1AEZTczk.js → multi-storage-SoW05uzO.js} +4 -3
- package/dist/shared/{multi-storage-1AEZTczk.js.map → multi-storage-SoW05uzO.js.map} +1 -1
- package/dist/shared/{options-BUfoHE9G.cjs → options-DOJYtoti.cjs} +2 -2
- package/dist/shared/{options-BUfoHE9G.cjs.map → options-DOJYtoti.cjs.map} +1 -1
- package/dist/shared/{options-BNP633A5.js → options-DhgGg7Ms.js} +2 -2
- package/dist/shared/{options-BNP633A5.js.map → options-DhgGg7Ms.js.map} +1 -1
- package/dist/shared/{redact-DB9EMGJx.cjs → redact-BP00URmQ.cjs} +15 -4
- package/dist/shared/{redact-DB9EMGJx.cjs.map → redact-BP00URmQ.cjs.map} +1 -1
- package/dist/shared/{redact-FNK29Fv-.js → redact-Ba5iSVYZ.js} +15 -4
- package/dist/shared/{redact-FNK29Fv-.js.map → redact-Ba5iSVYZ.js.map} +1 -1
- package/dist/shared/{render-BszcKF7S.d.cts → render-BU1_wex8.d.cts} +378 -12
- package/dist/shared/{render-DVB7T8pm.d.ts → render-CZ_-F2Tl.d.ts} +378 -12
- package/dist/shared/{render-DNTESBSl.cjs → render-DAEeCMk9.cjs} +461 -8
- package/dist/shared/render-DAEeCMk9.cjs.map +1 -0
- package/dist/shared/{render-CiL1VS0b.js → render-sb1VJhUA.js} +415 -10
- package/dist/shared/render-sb1VJhUA.js.map +1 -0
- package/dist/shared/storage-BQrtKon9.d.cts +86 -0
- package/dist/shared/storage-CTRGT5wF.d.ts +86 -0
- package/dist/shared/storage-CfHKzVHf.js +71 -0
- package/dist/shared/storage-CfHKzVHf.js.map +1 -0
- package/dist/shared/storage-QNVxzpDB.cjs +88 -0
- package/dist/shared/storage-QNVxzpDB.cjs.map +1 -0
- package/dist/shared/{url-Be9jlWRv.d.ts → url-CZZcyPI0.d.cts} +92 -5
- package/dist/shared/{url-Be9jlWRv.d.cts → url-CZZcyPI0.d.ts} +92 -5
- package/dist/shared/{url-CFN1sT9S.cjs → url-CzHqE-Fg.cjs} +83 -4
- package/dist/shared/{url-CFN1sT9S.cjs.map → url-CzHqE-Fg.cjs.map} +1 -1
- package/dist/shared/{url-B3ocFlHj.js → url-Dsr4c5r5.js} +78 -5
- package/dist/shared/{url-B3ocFlHj.js.map → url-Dsr4c5r5.js.map} +1 -1
- package/dist/web/index.cjs +4 -3
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +1 -1
- package/dist/web/index.d.ts +1 -1
- package/dist/web/index.js +2 -1
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/shared/render-CiL1VS0b.js.map +0 -1
- package/dist/shared/render-DNTESBSl.cjs.map +0 -1
- package/dist/shared/storage-BLmXmzKF.cjs.map +0 -1
- package/dist/shared/storage-CCxn0Kkv.js.map +0 -1
- package/dist/shared/storage-C_eICCep.d.cts +0 -152
- package/dist/shared/storage-C_eICCep.d.ts +0 -152
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as isItdRateLimitError, _ as ItdStateError, a as ItdConfigError, b as isItdApiError, d as ItdForbiddenError, f as ItdNetworkError, g as ItdServerError, h as ItdRateLimitError, i as ItdAuthError, l as ItdFileError, m as ItdPhoneVerificationError, n as ItdApiError, o as ItdConflictError, p as ItdNotFoundError, s as ItdError, t as ItdAbortError, v as ItdTimeoutError, y as ItdValidationError } from "./errors-GI10kZxk.js";
|
|
2
|
-
import { C as shouldUseCookieJar, S as shouldSendCredentials, _ as RuntimeMode, f as hostOf, g as originOf, h as normalizeBaseUrl, i as redactHeaders, m as joinUrl, n as redactBody, p as isSameSite, s as CookieJar, u as buildQuery, v as createDeviceId, x as resolveFetch, y as isBlob } from "./redact-
|
|
2
|
+
import { C as shouldUseCookieJar, S as shouldSendCredentials, _ as RuntimeMode, f as hostOf, g as originOf, h as normalizeBaseUrl, i as redactHeaders, m as joinUrl, n as redactBody, p as isSameSite, s as CookieJar, u as buildQuery, v as createDeviceId, x as resolveFetch, y as isBlob } from "./redact-Ba5iSVYZ.js";
|
|
3
3
|
//#region src/core/async-dispose.ts
|
|
4
4
|
/**
|
|
5
5
|
* Подставляет метод `await using` там, где `Symbol.asyncDispose` отсутствует.
|
|
@@ -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.
|
|
88
|
+
const LIBRARY_VERSION = "0.9.1";
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/core/config.ts
|
|
91
91
|
/** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
|
|
@@ -2608,7 +2608,16 @@ const BUCKET_LIMITS = Object.freeze({
|
|
|
2608
2608
|
"posts.create": 5,
|
|
2609
2609
|
"users.updateMe": 3,
|
|
2610
2610
|
"reports.create": 3,
|
|
2611
|
-
"verification.submit": 3
|
|
2611
|
+
"verification.submit": 3,
|
|
2612
|
+
shop: 150,
|
|
2613
|
+
"shop.delivery.cities": 60,
|
|
2614
|
+
"shop.delivery.calculate": 45,
|
|
2615
|
+
"shop.delivery.points": 30,
|
|
2616
|
+
"shop.consents.record": 15,
|
|
2617
|
+
"shop.orders.pay": 13,
|
|
2618
|
+
"shop.orders.verifyAccessCode": 13,
|
|
2619
|
+
"shop.orders.create": 12,
|
|
2620
|
+
"shop.orders.requestAccessCode": 4
|
|
2612
2621
|
});
|
|
2613
2622
|
/** Счётчик, из которого списывается путь без собственного правила на сервере. */
|
|
2614
2623
|
const DEFAULT_RATE_LIMIT_BUCKET = "default";
|
|
@@ -3059,6 +3068,69 @@ const OPERATIONS = freezeOperations({
|
|
|
3059
3068
|
"telemetry.interaction": {
|
|
3060
3069
|
method: "POST",
|
|
3061
3070
|
retrySafety: RetrySafety.Unsafe
|
|
3071
|
+
},
|
|
3072
|
+
"shop.products.list": {
|
|
3073
|
+
method: "GET",
|
|
3074
|
+
retrySafety: RetrySafety.Safe,
|
|
3075
|
+
bucket: "shop"
|
|
3076
|
+
},
|
|
3077
|
+
"shop.products.get": {
|
|
3078
|
+
method: "GET",
|
|
3079
|
+
retrySafety: RetrySafety.Safe,
|
|
3080
|
+
bucket: "shop"
|
|
3081
|
+
},
|
|
3082
|
+
"shop.delivery.countries": {
|
|
3083
|
+
method: "GET",
|
|
3084
|
+
retrySafety: RetrySafety.Safe,
|
|
3085
|
+
bucket: "shop"
|
|
3086
|
+
},
|
|
3087
|
+
"shop.delivery.cities": {
|
|
3088
|
+
method: "GET",
|
|
3089
|
+
retrySafety: RetrySafety.Safe,
|
|
3090
|
+
bucket: "shop.delivery.cities"
|
|
3091
|
+
},
|
|
3092
|
+
"shop.delivery.points": {
|
|
3093
|
+
method: "GET",
|
|
3094
|
+
retrySafety: RetrySafety.Safe,
|
|
3095
|
+
bucket: "shop.delivery.points"
|
|
3096
|
+
},
|
|
3097
|
+
"shop.delivery.calculate": {
|
|
3098
|
+
method: "POST",
|
|
3099
|
+
retrySafety: RetrySafety.Safe,
|
|
3100
|
+
bucket: "shop.delivery.calculate"
|
|
3101
|
+
},
|
|
3102
|
+
"shop.orders.create": {
|
|
3103
|
+
method: "POST",
|
|
3104
|
+
retrySafety: RetrySafety.Idempotent,
|
|
3105
|
+
bucket: "shop.orders.create"
|
|
3106
|
+
},
|
|
3107
|
+
"shop.orders.list": {
|
|
3108
|
+
method: "GET",
|
|
3109
|
+
retrySafety: RetrySafety.Safe
|
|
3110
|
+
},
|
|
3111
|
+
"shop.orders.get": {
|
|
3112
|
+
method: "GET",
|
|
3113
|
+
retrySafety: RetrySafety.Safe
|
|
3114
|
+
},
|
|
3115
|
+
"shop.orders.pay": {
|
|
3116
|
+
method: "POST",
|
|
3117
|
+
retrySafety: RetrySafety.Unsafe,
|
|
3118
|
+
bucket: "shop.orders.pay"
|
|
3119
|
+
},
|
|
3120
|
+
"shop.orders.requestAccessCode": {
|
|
3121
|
+
method: "POST",
|
|
3122
|
+
retrySafety: RetrySafety.Unsafe,
|
|
3123
|
+
bucket: "shop.orders.requestAccessCode"
|
|
3124
|
+
},
|
|
3125
|
+
"shop.orders.verifyAccessCode": {
|
|
3126
|
+
method: "POST",
|
|
3127
|
+
retrySafety: RetrySafety.Unsafe,
|
|
3128
|
+
bucket: "shop.orders.verifyAccessCode"
|
|
3129
|
+
},
|
|
3130
|
+
"shop.consents.record": {
|
|
3131
|
+
method: "POST",
|
|
3132
|
+
retrySafety: RetrySafety.Unsafe,
|
|
3133
|
+
bucket: "shop.consents.record"
|
|
3062
3134
|
}
|
|
3063
3135
|
});
|
|
3064
3136
|
/** Создаёт контракт результата встроенной операции с проверяемым ID. */
|
|
@@ -3356,6 +3428,7 @@ const ItdErrorCode = Object.freeze({
|
|
|
3356
3428
|
SESSION_NOT_FOUND: "SESSION_NOT_FOUND",
|
|
3357
3429
|
MISSING_FLOW_TOKEN: "MISSING_FLOW_TOKEN",
|
|
3358
3430
|
PROFILE_USERNAME_TAKEN: "PROFILE_USERNAME_TAKEN",
|
|
3431
|
+
PROFILE_USERNAME_RESERVED: "PROFILE_USERNAME_RESERVED",
|
|
3359
3432
|
PROFILE_RESTRICTION_ACTIVE: "PROFILE_RESTRICTION_ACTIVE",
|
|
3360
3433
|
PROFILE_MODIFICATION_RESTRICTED: "PROFILE_MODIFICATION_RESTRICTED",
|
|
3361
3434
|
CONTENT_MODERATION_FAILED: "CONTENT_MODERATION_FAILED",
|
|
@@ -3734,6 +3807,6 @@ function resolveNotificationUrl(notification) {
|
|
|
3734
3807
|
return clickUrl || "/notifications";
|
|
3735
3808
|
}
|
|
3736
3809
|
//#endregion
|
|
3737
|
-
export {
|
|
3810
|
+
export { orderPluginDefinitions as $, ITD_CATALOG as A, isRecord as B, ReportReason as C, ViewReason as D, SpanType as E, operationMethod as F, pickString as G, pickBoolean as H, operationRetrySafety as I, identityResult as J, RetrySafety as K, BUCKET_LIMITS as L, defineBuiltInOperation as M, isBuiltInOperationId as N, ViewSource as O, operationBucket as P, assertPluginRemovable as Q, DEFAULT_RATE_LIMIT_BUCKET as R, NotificationType as S, ServiceState as T, pickNumber as U, pickArray as V, pickObject as W, mergeService as X, voidResult as Y, RequestQueuePool as Z, FeedTab as _, tokenProvider as a, isRecord$1 as at, ItdErrorCode as b, normalizeNotification as c, createDeadline as ct, canonicalNotificationType as d, DEFAULT_BASE_URL as et, isKnownNotificationType as f, EventChannelStatus as g, CommentSort as h, bearerToken as i, LIBRARY_VERSION as it, OPERATIONS as j, WallAccess as k, readNotificationEvent as l, systemClock as lt, AttachmentType as m, formatNotificationText as n, STATUS_SERVICE as nt, passthroughOperation as o, requireOptionalBoolean as ot, AccessType as p, defineOperation as q, anonymousAuth as r, resolveRateLimit as rt, voidOperation as s, RateLimitPacing as st, resolveNotificationUrl as t, DEFAULT_STATUS_BASE_URL as tt, readUnreadCountEvent as u, installAsyncDisposeFallback as ut, IncidentKind as v, ReportTargetType as w, LikesVisibility as x, InteractionType as y, createClientRuntime as z };
|
|
3738
3811
|
|
|
3739
|
-
//# sourceMappingURL=url-
|
|
3812
|
+
//# sourceMappingURL=url-Dsr4c5r5.js.map
|