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.
Files changed (80) hide show
  1. package/README.md +66 -21
  2. package/dist/events/index.cjs +3 -3
  3. package/dist/events/index.d.cts +2 -2
  4. package/dist/events/index.d.ts +2 -2
  5. package/dist/events/index.js +3 -3
  6. package/dist/index.cjs +26 -13
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +9 -6
  9. package/dist/index.d.ts +9 -6
  10. package/dist/index.js +13 -8
  11. package/dist/index.js.map +1 -1
  12. package/dist/node/index.cjs +5 -4
  13. package/dist/node/index.cjs.map +1 -1
  14. package/dist/node/index.d.cts +2 -2
  15. package/dist/node/index.d.ts +2 -2
  16. package/dist/node/index.js +4 -3
  17. package/dist/node/index.js.map +1 -1
  18. package/dist/rest/index.cjs +16 -4
  19. package/dist/rest/index.cjs.map +1 -1
  20. package/dist/rest/index.d.cts +5 -3
  21. package/dist/rest/index.d.ts +5 -3
  22. package/dist/rest/index.js +9 -5
  23. package/dist/rest/index.js.map +1 -1
  24. package/dist/shared/{events-QyhQZrnC.d.ts → events-BDdJyH2p.d.ts} +2 -2
  25. package/dist/shared/{events-Br2r7coi.d.cts → events-BQyH5-S0.d.cts} +2 -2
  26. package/dist/shared/{events-iTteVsd_.cjs → events-BqFkwwTw.cjs} +3 -3
  27. package/dist/shared/{events-iTteVsd_.cjs.map → events-BqFkwwTw.cjs.map} +1 -1
  28. package/dist/shared/{events-TfhKh26b.js → events-D6y0Hxyz.js} +3 -3
  29. package/dist/shared/{events-TfhKh26b.js.map → events-D6y0Hxyz.js.map} +1 -1
  30. package/dist/shared/{storage-BLmXmzKF.cjs → key-value-store-B5GYVEYZ.cjs} +1 -85
  31. package/dist/shared/key-value-store-B5GYVEYZ.cjs.map +1 -0
  32. package/dist/shared/{storage-CCxn0Kkv.js → key-value-store-Bt2PSMxY.js} +2 -68
  33. package/dist/shared/key-value-store-Bt2PSMxY.js.map +1 -0
  34. package/dist/shared/key-value-store-COZaNHZS.d.cts +69 -0
  35. package/dist/shared/key-value-store-COZaNHZS.d.ts +69 -0
  36. package/dist/shared/{multi-storage-DccjD7Ww.d.ts → multi-storage-BEL7tcKn.d.cts} +3 -2
  37. package/dist/shared/{multi-storage-CCUgkqvI.cjs → multi-storage-CDKLa956.cjs} +8 -7
  38. package/dist/shared/{multi-storage-CCUgkqvI.cjs.map → multi-storage-CDKLa956.cjs.map} +1 -1
  39. package/dist/shared/{multi-storage-CjAPB5Kq.d.cts → multi-storage-LkljOSzA.d.ts} +3 -2
  40. package/dist/shared/{multi-storage-1AEZTczk.js → multi-storage-SoW05uzO.js} +4 -3
  41. package/dist/shared/{multi-storage-1AEZTczk.js.map → multi-storage-SoW05uzO.js.map} +1 -1
  42. package/dist/shared/{options-BUfoHE9G.cjs → options-DOJYtoti.cjs} +2 -2
  43. package/dist/shared/{options-BUfoHE9G.cjs.map → options-DOJYtoti.cjs.map} +1 -1
  44. package/dist/shared/{options-BNP633A5.js → options-DhgGg7Ms.js} +2 -2
  45. package/dist/shared/{options-BNP633A5.js.map → options-DhgGg7Ms.js.map} +1 -1
  46. package/dist/shared/{redact-DB9EMGJx.cjs → redact-BP00URmQ.cjs} +15 -4
  47. package/dist/shared/{redact-DB9EMGJx.cjs.map → redact-BP00URmQ.cjs.map} +1 -1
  48. package/dist/shared/{redact-FNK29Fv-.js → redact-Ba5iSVYZ.js} +15 -4
  49. package/dist/shared/{redact-FNK29Fv-.js.map → redact-Ba5iSVYZ.js.map} +1 -1
  50. package/dist/shared/{render-BszcKF7S.d.cts → render-BU1_wex8.d.cts} +378 -12
  51. package/dist/shared/{render-DVB7T8pm.d.ts → render-CZ_-F2Tl.d.ts} +378 -12
  52. package/dist/shared/{render-DNTESBSl.cjs → render-DAEeCMk9.cjs} +461 -8
  53. package/dist/shared/render-DAEeCMk9.cjs.map +1 -0
  54. package/dist/shared/{render-CiL1VS0b.js → render-sb1VJhUA.js} +415 -10
  55. package/dist/shared/render-sb1VJhUA.js.map +1 -0
  56. package/dist/shared/storage-BQrtKon9.d.cts +86 -0
  57. package/dist/shared/storage-CTRGT5wF.d.ts +86 -0
  58. package/dist/shared/storage-CfHKzVHf.js +71 -0
  59. package/dist/shared/storage-CfHKzVHf.js.map +1 -0
  60. package/dist/shared/storage-QNVxzpDB.cjs +88 -0
  61. package/dist/shared/storage-QNVxzpDB.cjs.map +1 -0
  62. package/dist/shared/{url-Be9jlWRv.d.ts → url-CZZcyPI0.d.cts} +92 -5
  63. package/dist/shared/{url-Be9jlWRv.d.cts → url-CZZcyPI0.d.ts} +92 -5
  64. package/dist/shared/{url-CFN1sT9S.cjs → url-CzHqE-Fg.cjs} +83 -4
  65. package/dist/shared/{url-CFN1sT9S.cjs.map → url-CzHqE-Fg.cjs.map} +1 -1
  66. package/dist/shared/{url-B3ocFlHj.js → url-Dsr4c5r5.js} +78 -5
  67. package/dist/shared/{url-B3ocFlHj.js.map → url-Dsr4c5r5.js.map} +1 -1
  68. package/dist/web/index.cjs +4 -3
  69. package/dist/web/index.cjs.map +1 -1
  70. package/dist/web/index.d.cts +1 -1
  71. package/dist/web/index.d.ts +1 -1
  72. package/dist/web/index.js +2 -1
  73. package/dist/web/index.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/shared/render-CiL1VS0b.js.map +0 -1
  76. package/dist/shared/render-DNTESBSl.cjs.map +0 -1
  77. package/dist/shared/storage-BLmXmzKF.cjs.map +0 -1
  78. package/dist/shared/storage-CCxn0Kkv.js.map +0 -1
  79. package/dist/shared/storage-C_eICCep.d.cts +0 -152
  80. 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-FNK29Fv-.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-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.8.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 { DEFAULT_BASE_URL 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, orderPluginDefinitions as Q, DEFAULT_RATE_LIMIT_BUCKET as R, NotificationType as S, ServiceState as T, pickNumber as U, pickArray as V, pickObject as W, RequestQueuePool as X, mergeService as Y, assertPluginRemovable as Z, FeedTab as _, tokenProvider as a, requireOptionalBoolean as at, ItdErrorCode as b, normalizeNotification as c, systemClock as ct, canonicalNotificationType as d, DEFAULT_STATUS_BASE_URL as et, isKnownNotificationType as f, EventChannelStatus as g, CommentSort as h, bearerToken as i, isRecord$1 as it, OPERATIONS as j, WallAccess as k, readNotificationEvent as l, installAsyncDisposeFallback as lt, AttachmentType as m, formatNotificationText as n, resolveRateLimit as nt, passthroughOperation as o, RateLimitPacing as ot, AccessType as p, defineOperation as q, anonymousAuth as r, LIBRARY_VERSION as rt, voidOperation as s, createDeadline as st, resolveNotificationUrl as t, STATUS_SERVICE as tt, readUnreadCountEvent as u, IncidentKind as v, ReportTargetType as w, LikesVisibility as x, InteractionType as y, createClientRuntime as z };
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-B3ocFlHj.js.map
3812
+ //# sourceMappingURL=url-Dsr4c5r5.js.map