itd-api 0.12.1 → 0.13.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 (90) hide show
  1. package/dist/events/index.cjs +4 -4
  2. package/dist/events/index.d.cts +7 -2
  3. package/dist/events/index.d.ts +7 -2
  4. package/dist/events/index.js +4 -4
  5. package/dist/index.cjs +715 -90
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +515 -46
  8. package/dist/index.d.ts +515 -46
  9. package/dist/index.js +707 -91
  10. package/dist/index.js.map +1 -1
  11. package/dist/node/index.cjs +6 -7
  12. package/dist/node/index.cjs.map +1 -1
  13. package/dist/node/index.d.cts +24 -7
  14. package/dist/node/index.d.ts +24 -7
  15. package/dist/node/index.js +6 -7
  16. package/dist/node/index.js.map +1 -1
  17. package/dist/rest/index.cjs +19 -7
  18. package/dist/rest/index.cjs.map +1 -1
  19. package/dist/rest/index.d.cts +28 -7
  20. package/dist/rest/index.d.ts +28 -7
  21. package/dist/rest/index.js +17 -8
  22. package/dist/rest/index.js.map +1 -1
  23. package/dist/shared/{contracts-BoT7msmq.d.ts → contracts-DEbkC0cB.d.cts} +1 -4
  24. package/dist/shared/{contracts-BoT7msmq.d.cts → contracts-pxnDIsQP.d.ts} +1 -4
  25. package/dist/shared/{events-FaXfdle0.d.cts → events-Bip3qvCc.d.cts} +42 -63
  26. package/dist/shared/{events-9215JDDd.d.ts → events-DF1elRzZ.d.ts} +2 -23
  27. package/dist/shared/{events-_iYo8EP5.js → events-DRbBDq9p.js} +30 -40
  28. package/dist/shared/events-DRbBDq9p.js.map +1 -0
  29. package/dist/shared/{events-BKyxZQNw.cjs → events-DcxmyPTX.cjs} +30 -40
  30. package/dist/shared/events-DcxmyPTX.cjs.map +1 -0
  31. package/dist/shared/{key-value-store-COZaNHZS.d.ts → key-value-store-BGoSgLze.d.cts} +1 -4
  32. package/dist/shared/{key-value-store-w1Dn5Pjb.js → key-value-store-BwXlaoD4.js} +3 -4
  33. package/dist/shared/{key-value-store-w1Dn5Pjb.js.map → key-value-store-BwXlaoD4.js.map} +1 -1
  34. package/dist/shared/{key-value-store-DYSPsqwq.cjs → key-value-store-CmnIjuE4.cjs} +3 -4
  35. package/dist/shared/{key-value-store-DYSPsqwq.cjs.map → key-value-store-CmnIjuE4.cjs.map} +1 -1
  36. package/dist/shared/{key-value-store-COZaNHZS.d.cts → key-value-store-WUQBeTAr.d.ts} +1 -4
  37. package/dist/shared/{multi-storage-LkljOSzA.d.ts → multi-storage-DQiERirK.d.ts} +3 -6
  38. package/dist/shared/{multi-storage-DiBSx64p.js → multi-storage-DffEAzdc.js} +6 -7
  39. package/dist/shared/{multi-storage-DiBSx64p.js.map → multi-storage-DffEAzdc.js.map} +1 -1
  40. package/dist/shared/{multi-storage-7Y3KCseI.cjs → multi-storage-Dp5x6OOl.cjs} +6 -7
  41. package/dist/shared/multi-storage-Dp5x6OOl.cjs.map +1 -0
  42. package/dist/shared/{multi-storage-BEL7tcKn.d.cts → multi-storage-OGWNMK3x.d.cts} +3 -6
  43. package/dist/shared/{options-DLlaETn_.js → options-Ddyc5qec.js} +8 -12
  44. package/dist/shared/{options-DLlaETn_.js.map → options-Ddyc5qec.js.map} +1 -1
  45. package/dist/shared/{options-D5ttspWk.cjs → options-DsmQRyx4.cjs} +8 -12
  46. package/dist/shared/{options-D5ttspWk.cjs.map → options-DsmQRyx4.cjs.map} +1 -1
  47. package/dist/shared/{redact-DSfdmeY7.js → redact-BCmucE19.js} +16 -16
  48. package/dist/shared/redact-BCmucE19.js.map +1 -0
  49. package/dist/shared/{redact-BbhtA9o-.cjs → redact-BuXRKC1G.cjs} +16 -16
  50. package/dist/shared/redact-BuXRKC1G.cjs.map +1 -0
  51. package/dist/shared/{render-BS09ygcy.d.ts → render-Bvv1V5Tp.d.ts} +154 -102
  52. package/dist/shared/{render-BQvC5UxF.cjs → render-C1lmsu1i.cjs} +204 -109
  53. package/dist/shared/render-C1lmsu1i.cjs.map +1 -0
  54. package/dist/shared/{render-X2JCo1JS.d.cts → render-D83t9ckd.d.cts} +152 -251
  55. package/dist/shared/{render-CFoF2WaH.js → render-DJKZqv9O.js} +181 -110
  56. package/dist/shared/render-DJKZqv9O.js.map +1 -0
  57. package/dist/shared/{storage-86wiHeXD.js → storage-Bc4lWtSj.js} +4 -5
  58. package/dist/shared/{storage-86wiHeXD.js.map → storage-Bc4lWtSj.js.map} +1 -1
  59. package/dist/shared/{storage-CTRGT5wF.d.ts → storage-C_ZujAZt.d.ts} +2 -5
  60. package/dist/shared/{storage-BQrtKon9.d.cts → storage-FtS4NIC7.d.cts} +2 -5
  61. package/dist/shared/{storage-CIjejZDt.cjs → storage-e2xYL6ro.cjs} +4 -5
  62. package/dist/shared/{storage-CIjejZDt.cjs.map → storage-e2xYL6ro.cjs.map} +1 -1
  63. package/dist/shared/{url-ioIaywDi.cjs → url-CXRaoR_w.cjs} +263 -91
  64. package/dist/shared/url-CXRaoR_w.cjs.map +1 -0
  65. package/dist/shared/{url-_R0oJ7gE.d.cts → url-V4bCae35.d.ts} +222 -78
  66. package/dist/shared/{url-CdT4lMxQ.js → url-aw_NZdVY.js} +263 -91
  67. package/dist/shared/url-aw_NZdVY.js.map +1 -0
  68. package/dist/shared/{url-_R0oJ7gE.d.ts → url-n_h2pvHA.d.cts} +1915 -1620
  69. package/dist/shared/{validate-CFx2dISs.cjs → validate-BHKy_YMv.cjs} +8 -7
  70. package/dist/shared/validate-BHKy_YMv.cjs.map +1 -0
  71. package/dist/shared/{validate-D7_kq3g5.js → validate-BQzL_oJ4.js} +8 -7
  72. package/dist/shared/validate-BQzL_oJ4.js.map +1 -0
  73. package/dist/web/index.cjs +4 -5
  74. package/dist/web/index.cjs.map +1 -1
  75. package/dist/web/index.d.cts +22 -5
  76. package/dist/web/index.d.ts +22 -5
  77. package/dist/web/index.js +4 -5
  78. package/dist/web/index.js.map +1 -1
  79. package/package.json +6 -6
  80. package/dist/shared/events-BKyxZQNw.cjs.map +0 -1
  81. package/dist/shared/events-_iYo8EP5.js.map +0 -1
  82. package/dist/shared/multi-storage-7Y3KCseI.cjs.map +0 -1
  83. package/dist/shared/redact-BbhtA9o-.cjs.map +0 -1
  84. package/dist/shared/redact-DSfdmeY7.js.map +0 -1
  85. package/dist/shared/render-BQvC5UxF.cjs.map +0 -1
  86. package/dist/shared/render-CFoF2WaH.js.map +0 -1
  87. package/dist/shared/url-CdT4lMxQ.js.map +0 -1
  88. package/dist/shared/url-ioIaywDi.cjs.map +0 -1
  89. package/dist/shared/validate-CFx2dISs.cjs.map +0 -1
  90. package/dist/shared/validate-D7_kq3g5.js.map +0 -1
@@ -1,4 +1,3 @@
1
- //#region src/types/enums.d.ts
2
1
  /**
3
2
  * Enum API итд.com.
4
3
  *
@@ -376,10 +375,15 @@ declare const ItdErrorCode: Readonly<{
376
375
  /** Собственная captcha ИТД не подтвердила целостность проверки. */
377
376
  readonly INTEGRITY_CHECK_FAILED: "INTEGRITY_CHECK_FAILED";
378
377
  readonly OTP_INVALID: "OTP_INVALID";
378
+ readonly OTP_EXPIRED: "OTP_EXPIRED";
379
+ readonly NO_PENDING_OTP: "NO_PENDING_OTP";
379
380
  /** `flowToken` неизвестен или просрочен — поток подтверждения нужно начинать заново. */
380
381
  readonly INVALID_FLOW_TOKEN: "INVALID_FLOW_TOKEN";
382
+ /** Для номера уже запущена проверка. */
383
+ readonly PHONE_VERIFICATION_PENDING: "PHONE_VERIFICATION_PENDING";
381
384
  readonly ACCOUNT_DEACTIVATED: "ACCOUNT_DEACTIVATED";
382
385
  readonly ACCOUNT_EMAIL_DOMAIN_NOT_ALLOWED: "ACCOUNT_EMAIL_DOMAIN_NOT_ALLOWED";
386
+ readonly EMAIL_SIGNUP_DISABLED: "EMAIL_SIGNUP_DISABLED";
383
387
  readonly ACCOUNT_INVALID_CREDENTIALS: "ACCOUNT_INVALID_CREDENTIALS";
384
388
  readonly ACCOUNT_TEMPORARILY_LOCKED: "ACCOUNT_TEMPORARILY_LOCKED";
385
389
  readonly ACCOUNT_CURRENT_PASSWORD_INCORRECT: "ACCOUNT_CURRENT_PASSWORD_INCORRECT";
@@ -412,8 +416,6 @@ declare const ItdErrorCode: Readonly<{
412
416
  readonly WRITE_ACCESS_RESTRICTED: "WRITE_ACCESS_RESTRICTED";
413
417
  }>;
414
418
  type ItdErrorCode = Loose<(typeof ItdErrorCode)[keyof typeof ItdErrorCode]>;
415
- //#endregion
416
- //#region src/models/common.d.ts
417
419
  /**
418
420
  * Дата и время в формате ISO-8601, например `2026-07-21T14:30:00.000Z`.
419
421
  *
@@ -458,8 +460,6 @@ interface Span {
458
460
  /** Идентификатор пользователя у некоторых ответов API с `mention`. */
459
461
  id?: string;
460
462
  }
461
- //#endregion
462
- //#region src/domain/buckets.d.ts
463
463
  /**
464
464
  * Ёмкость серверных счётчиков частоты, запросов в минуту.
465
465
  *
@@ -494,9 +494,6 @@ declare const BUCKET_LIMITS: Readonly<{
494
494
  readonly 'reports.create': 3;
495
495
  readonly 'verification.submit': 3;
496
496
  readonly shop: 150;
497
- readonly 'shop.delivery.cities': 60;
498
- readonly 'shop.delivery.calculate': 45;
499
- readonly 'shop.delivery.points': 30;
500
497
  readonly 'shop.consents.record': 15;
501
498
  readonly 'shop.orders.pay': 13;
502
499
  readonly 'shop.orders.verifyAccessCode': 13;
@@ -507,8 +504,6 @@ declare const BUCKET_LIMITS: Readonly<{
507
504
  type RateLimitBucket = keyof typeof BUCKET_LIMITS;
508
505
  /** Счётчик, из которого списывается путь без собственного правила на сервере. */
509
506
  declare const DEFAULT_RATE_LIMIT_BUCKET: RateLimitBucket;
510
- //#endregion
511
- //#region src/domain/operations.d.ts
512
507
  /** Описание встроенной операции: та же форма, что знает ядро, но с именем известного бакета. */
513
508
  interface ItdOperationDefinition extends OperationDefinition {
514
509
  readonly bucket?: RateLimitBucket;
@@ -534,6 +529,184 @@ declare const OPERATIONS: Readonly<{
534
529
  readonly retrySafety: "safe";
535
530
  readonly bucket: "auth";
536
531
  }>;
532
+ readonly 'account.getInfo': Readonly<{
533
+ readonly method: "GET";
534
+ readonly retrySafety: "safe";
535
+ readonly bucket: "auth";
536
+ }>;
537
+ readonly 'account.password.set': Readonly<{
538
+ readonly method: "POST";
539
+ readonly retrySafety: "unsafe";
540
+ readonly bucket: "auth";
541
+ }>;
542
+ readonly 'account.email.attach': Readonly<{
543
+ readonly method: "POST";
544
+ readonly retrySafety: "unsafe";
545
+ readonly bucket: "auth";
546
+ }>;
547
+ readonly 'account.phone.attach': Readonly<{
548
+ readonly method: "POST";
549
+ readonly retrySafety: "unsafe";
550
+ readonly bucket: "auth";
551
+ }>;
552
+ readonly 'account.email.startChange': Readonly<{
553
+ readonly method: "POST";
554
+ readonly retrySafety: "unsafe";
555
+ readonly bucket: "auth";
556
+ }>;
557
+ readonly 'account.phone.startChange': Readonly<{
558
+ readonly method: "POST";
559
+ readonly retrySafety: "unsafe";
560
+ readonly bucket: "auth";
561
+ }>;
562
+ readonly 'account.verifyAttach': Readonly<{
563
+ readonly method: "POST";
564
+ readonly retrySafety: "unsafe";
565
+ readonly bucket: "auth";
566
+ }>;
567
+ readonly 'account.verifyChange': Readonly<{
568
+ readonly method: "POST";
569
+ readonly retrySafety: "unsafe";
570
+ readonly bucket: "auth";
571
+ }>;
572
+ readonly 'account.email.resendOtp': Readonly<{
573
+ readonly method: "POST";
574
+ readonly retrySafety: "unsafe";
575
+ readonly bucket: "auth";
576
+ }>;
577
+ readonly 'account.phone.resendOtp': Readonly<{
578
+ readonly method: "POST";
579
+ readonly retrySafety: "unsafe";
580
+ readonly bucket: "auth";
581
+ }>;
582
+ readonly 'account.phone.sync': Readonly<{
583
+ readonly method: "POST";
584
+ readonly retrySafety: "unsafe";
585
+ readonly bucket: "auth";
586
+ }>;
587
+ readonly 'account.phone.reverseOptions': Readonly<{
588
+ readonly method: "POST";
589
+ readonly retrySafety: "safe";
590
+ readonly bucket: "auth";
591
+ }>;
592
+ readonly 'account.phone.reverseStart': Readonly<{
593
+ readonly method: "POST";
594
+ readonly retrySafety: "unsafe";
595
+ readonly bucket: "auth";
596
+ }>;
597
+ readonly 'account.phone.reverseStatus': Readonly<{
598
+ readonly method: "POST";
599
+ readonly retrySafety: "safe";
600
+ readonly bucket: "auth";
601
+ }>;
602
+ readonly 'account.phone.reverseAttachComplete': Readonly<{
603
+ readonly method: "POST";
604
+ readonly retrySafety: "unsafe";
605
+ readonly bucket: "auth";
606
+ }>;
607
+ readonly 'account.phone.reverseChangeComplete': Readonly<{
608
+ readonly method: "POST";
609
+ readonly retrySafety: "unsafe";
610
+ readonly bucket: "auth";
611
+ }>;
612
+ readonly 'account.changes.requestProof': Readonly<{
613
+ readonly method: "POST";
614
+ readonly retrySafety: "unsafe";
615
+ readonly bucket: "auth";
616
+ }>;
617
+ readonly 'account.changes.confirm': Readonly<{
618
+ readonly method: "POST";
619
+ readonly retrySafety: "unsafe";
620
+ readonly bucket: "auth";
621
+ }>;
622
+ readonly 'account.changes.wait': Readonly<{
623
+ readonly method: "POST";
624
+ readonly retrySafety: "unsafe";
625
+ readonly bucket: "auth";
626
+ }>;
627
+ readonly 'account.changes.pending': Readonly<{
628
+ readonly method: "GET";
629
+ readonly retrySafety: "safe";
630
+ readonly bucket: "auth";
631
+ }>;
632
+ readonly 'account.changes.cancelPending': Readonly<{
633
+ readonly method: "DELETE";
634
+ readonly retrySafety: "unsafe";
635
+ readonly bucket: "auth";
636
+ }>;
637
+ readonly 'account.password.change': Readonly<{
638
+ readonly method: "POST";
639
+ readonly retrySafety: "unsafe";
640
+ readonly bucket: "auth";
641
+ }>;
642
+ readonly 'account.deactivate': Readonly<{
643
+ readonly method: "DELETE";
644
+ readonly retrySafety: "unsafe";
645
+ }>;
646
+ readonly 'account.restore': Readonly<{
647
+ readonly method: "POST";
648
+ readonly retrySafety: "unsafe";
649
+ }>;
650
+ readonly 'auth.phone.config': Readonly<{
651
+ readonly method: "GET";
652
+ readonly retrySafety: "safe";
653
+ readonly bucket: "auth";
654
+ }>;
655
+ readonly 'auth.phone.consent': Readonly<{
656
+ readonly method: "GET";
657
+ readonly retrySafety: "safe";
658
+ readonly bucket: "auth";
659
+ }>;
660
+ readonly 'auth.phone.start': Readonly<{
661
+ readonly method: "POST";
662
+ readonly retrySafety: "unsafe";
663
+ readonly bucket: "auth";
664
+ }>;
665
+ readonly 'auth.phone.resume': Readonly<{
666
+ readonly method: "POST";
667
+ readonly retrySafety: "safe";
668
+ readonly bucket: "auth";
669
+ }>;
670
+ readonly 'auth.phone.verify': Readonly<{
671
+ readonly method: "POST";
672
+ readonly retrySafety: "unsafe";
673
+ readonly bucket: "auth";
674
+ }>;
675
+ readonly 'auth.phone.password': Readonly<{
676
+ readonly method: "POST";
677
+ readonly retrySafety: "unsafe";
678
+ readonly bucket: "auth";
679
+ }>;
680
+ readonly 'auth.phone.resetPassword': Readonly<{
681
+ readonly method: "POST";
682
+ readonly retrySafety: "unsafe";
683
+ readonly bucket: "auth";
684
+ }>;
685
+ readonly 'auth.phone.resend': Readonly<{
686
+ readonly method: "POST";
687
+ readonly retrySafety: "unsafe";
688
+ readonly bucket: "auth";
689
+ }>;
690
+ readonly 'auth.phone.reverseOptions': Readonly<{
691
+ readonly method: "POST";
692
+ readonly retrySafety: "safe";
693
+ readonly bucket: "auth";
694
+ }>;
695
+ readonly 'auth.phone.reverseStart': Readonly<{
696
+ readonly method: "POST";
697
+ readonly retrySafety: "unsafe";
698
+ readonly bucket: "auth";
699
+ }>;
700
+ readonly 'auth.phone.reverseStatus': Readonly<{
701
+ readonly method: "POST";
702
+ readonly retrySafety: "safe";
703
+ readonly bucket: "auth";
704
+ }>;
705
+ readonly 'auth.phone.reverseComplete': Readonly<{
706
+ readonly method: "POST";
707
+ readonly retrySafety: "unsafe";
708
+ readonly bucket: "auth";
709
+ }>;
537
710
  readonly 'auth.signUp': Readonly<{
538
711
  readonly method: "POST";
539
712
  readonly retrySafety: "unsafe";
@@ -574,11 +747,6 @@ declare const OPERATIONS: Readonly<{
574
747
  readonly retrySafety: "unsafe";
575
748
  readonly bucket: "auth";
576
749
  }>;
577
- readonly 'auth.changePassword': Readonly<{
578
- readonly method: "POST";
579
- readonly retrySafety: "unsafe";
580
- readonly bucket: "auth";
581
- }>;
582
750
  readonly 'auth.sessions': Readonly<{
583
751
  readonly method: "GET";
584
752
  readonly retrySafety: "safe";
@@ -629,14 +797,6 @@ declare const OPERATIONS: Readonly<{
629
797
  readonly retrySafety: "idempotent";
630
798
  readonly bucket: "users.updateMe";
631
799
  }>;
632
- readonly 'users.deactivate': Readonly<{
633
- readonly method: "DELETE";
634
- readonly retrySafety: "unsafe";
635
- }>;
636
- readonly 'users.restore': Readonly<{
637
- readonly method: "POST";
638
- readonly retrySafety: "unsafe";
639
- }>;
640
800
  readonly 'users.createProfile': Readonly<{
641
801
  readonly method: "POST";
642
802
  readonly retrySafety: "unsafe";
@@ -836,6 +996,11 @@ declare const OPERATIONS: Readonly<{
836
996
  readonly retrySafety: "unsafe";
837
997
  readonly bucket: "files.upload";
838
998
  }>;
999
+ readonly 'files.uploadBannerDrawing': Readonly<{
1000
+ readonly method: "POST";
1001
+ readonly retrySafety: "unsafe";
1002
+ readonly bucket: "files.upload";
1003
+ }>;
839
1004
  readonly 'files.remove': Readonly<{
840
1005
  readonly method: "DELETE";
841
1006
  readonly retrySafety: "unsafe";
@@ -944,6 +1109,22 @@ declare const OPERATIONS: Readonly<{
944
1109
  readonly method: "GET";
945
1110
  readonly retrySafety: "safe";
946
1111
  }>;
1112
+ readonly 'legal.list': Readonly<{
1113
+ readonly method: "GET";
1114
+ readonly retrySafety: "safe";
1115
+ }>;
1116
+ readonly 'legal.current': Readonly<{
1117
+ readonly method: "GET";
1118
+ readonly retrySafety: "safe";
1119
+ }>;
1120
+ readonly 'legal.versions': Readonly<{
1121
+ readonly method: "GET";
1122
+ readonly retrySafety: "safe";
1123
+ }>;
1124
+ readonly 'legal.version': Readonly<{
1125
+ readonly method: "GET";
1126
+ readonly retrySafety: "safe";
1127
+ }>;
947
1128
  readonly 'platform.changelog': Readonly<{
948
1129
  readonly method: "GET";
949
1130
  readonly retrySafety: "safe";
@@ -982,17 +1163,17 @@ declare const OPERATIONS: Readonly<{
982
1163
  readonly 'shop.delivery.cities': Readonly<{
983
1164
  readonly method: "GET";
984
1165
  readonly retrySafety: "safe";
985
- readonly bucket: "shop.delivery.cities";
1166
+ readonly bucket: "shop";
986
1167
  }>;
987
1168
  readonly 'shop.delivery.points': Readonly<{
988
1169
  readonly method: "GET";
989
1170
  readonly retrySafety: "safe";
990
- readonly bucket: "shop.delivery.points";
1171
+ readonly bucket: "shop";
991
1172
  }>;
992
1173
  readonly 'shop.delivery.calculate': Readonly<{
993
1174
  readonly method: "POST";
994
1175
  readonly retrySafety: "safe";
995
- readonly bucket: "shop.delivery.calculate";
1176
+ readonly bucket: "shop";
996
1177
  }>;
997
1178
  readonly 'shop.orders.create': Readonly<{
998
1179
  readonly method: "POST";
@@ -1047,8 +1228,6 @@ declare function operationRetrySafety(id: BuiltInOperationId): RetrySafety;
1047
1228
  * `rateLimitBucket` у запроса.
1048
1229
  */
1049
1230
  declare function operationBucket(id: OperationId): RateLimitBucket;
1050
- //#endregion
1051
- //#region src/core/clock.d.ts
1052
1231
  /**
1053
1232
  * Часы, которыми клиент измеряет время и планирует отложенную работу.
1054
1233
  *
@@ -1063,8 +1242,6 @@ interface ItdClock {
1063
1242
  }
1064
1243
  /** Системные часы, используемые клиентом по умолчанию. */
1065
1244
  declare const systemClock: ItdClock;
1066
- //#endregion
1067
- //#region src/core/logger.d.ts
1068
1245
  /**
1069
1246
  * Логгер библиотеки. Совместим с `console`: к сообщению прилагается не больше одного
1070
1247
  * аргумента — объект с деталями либо ошибка.
@@ -1085,8 +1262,6 @@ declare const LogLevel: Readonly<{
1085
1262
  readonly Error: "error";
1086
1263
  }>;
1087
1264
  type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
1088
- //#endregion
1089
- //#region src/core/runtime.d.ts
1090
1265
  /**
1091
1266
  * Как библиотека обращается с cookie.
1092
1267
  *
@@ -1103,8 +1278,6 @@ declare const RuntimeMode: Readonly<{
1103
1278
  readonly Server: "server";
1104
1279
  }>;
1105
1280
  type RuntimeMode = (typeof RuntimeMode)[keyof typeof RuntimeMode];
1106
- //#endregion
1107
- //#region src/core/scheduling/pacing.d.ts
1108
1281
  /** Реакция на остаток лимита из заголовков ответа. */
1109
1282
  declare const RateLimitPacing: Readonly<{
1110
1283
  /** Задержек нет, пока в бакете есть остаток; исчерпанный бакет ждёт `60000 / limit`. */
@@ -1115,8 +1288,6 @@ declare const RateLimitPacing: Readonly<{
1115
1288
  readonly Off: "off";
1116
1289
  }>;
1117
1290
  type RateLimitPacing = (typeof RateLimitPacing)[keyof typeof RateLimitPacing];
1118
- //#endregion
1119
- //#region src/core/services.d.ts
1120
1291
  /** Сервис платформы на отдельном домене. */
1121
1292
  interface ServiceDefinition {
1122
1293
  /** Имя, по которому запрос выбирает сервис: `{ service: 'status' }`. */
@@ -1133,14 +1304,10 @@ interface ServiceDefinition {
1133
1304
  */
1134
1305
  auth?: boolean | undefined;
1135
1306
  }
1136
- //#endregion
1137
- //#region src/core/url.d.ts
1138
1307
  /** Значение параметра запроса. `undefined` и `null` в строку не попадают. */
1139
1308
  type QueryValue = string | number | boolean | null | undefined | readonly (string | number | boolean)[];
1140
1309
  /** Параметры строки запроса. */
1141
1310
  type QueryParams = Record<string, QueryValue>;
1142
- //#endregion
1143
- //#region src/core/options.d.ts
1144
1311
  /** Настройки повторных попыток. */
1145
1312
  interface RetryOptions {
1146
1313
  /** Сколько всего попыток, включая первую. По умолчанию 3. */
@@ -1456,8 +1623,6 @@ interface RawRequestOptions extends RequestOptions {
1456
1623
  interface OperationRequestOptions extends RawRequestOptions {
1457
1624
  operationId: OperationId;
1458
1625
  }
1459
- //#endregion
1460
- //#region src/core/operation.d.ts
1461
1626
  /** HTTP-метод операции. */
1462
1627
  declare const OperationMethod: Readonly<{
1463
1628
  readonly Get: "GET";
@@ -1513,18 +1678,12 @@ interface OperationDefinition extends OperationMetadata {
1513
1678
  */
1514
1679
  readonly bucket?: string;
1515
1680
  }
1516
- //#endregion
1517
- //#region src/core/version.d.ts
1518
1681
  /** Версия библиотеки. Попадает в `User-Agent`. */
1519
- declare const LIBRARY_VERSION = "0.12.1";
1520
- //#endregion
1521
- //#region src/core/config.d.ts
1682
+ declare const LIBRARY_VERSION = "0.13.1";
1522
1683
  /** Базовый URL API итд.com. Домен записан в punycode: `итд.com`. */
1523
1684
  declare const DEFAULT_BASE_URL = "https://xn--d1ah4a.com";
1524
1685
  /** Имя встроенного сервиса статуса. */
1525
1686
  declare const STATUS_SERVICE = "status";
1526
- //#endregion
1527
- //#region src/core/auth-provider.d.ts
1528
1687
  /** Области аккаунта и конкретной сессии для локального состояния плагинов. */
1529
1688
  interface AuthIdentity {
1530
1689
  /** Идентификатор пользователя; отсутствует у непрозрачного или повреждённого токена. */
@@ -1611,8 +1770,6 @@ declare function bearerToken(accessToken: string): AuthProvider;
1611
1770
  * ```
1612
1771
  */
1613
1772
  declare function tokenProvider(getToken: () => string | null | Promise<string | null>): AuthProvider;
1614
- //#endregion
1615
- //#region src/core/connection.d.ts
1616
1773
  /**
1617
1774
  * Разрешённое окружение одного долговременного соединения клиента.
1618
1775
  *
@@ -1637,8 +1794,6 @@ interface ClientConnection {
1637
1794
  /** Пытается восстановить авторизацию после отказа транспорта. */
1638
1795
  refreshAuth(): Promise<boolean>;
1639
1796
  }
1640
- //#endregion
1641
- //#region src/core/emitter.d.ts
1642
1797
  /** Обработчик события. */
1643
1798
  type Listener<T> = (payload: T) => void;
1644
1799
  /** Функция отписки, которую возвращает подписка на событие. */
@@ -1680,8 +1835,6 @@ declare class Emitter<Events> {
1680
1835
  /** Снимает все подписки. */
1681
1836
  removeAllListeners(): void;
1682
1837
  }
1683
- //#endregion
1684
- //#region src/core/errors.d.ts
1685
1838
  /** Бренд, по которому ошибки библиотеки распознаются надёжнее, чем через `instanceof`. */
1686
1839
  declare const ITD_ERROR: unique symbol;
1687
1840
  /**
@@ -1777,8 +1930,10 @@ interface ItdApiErrorInit {
1777
1930
  raw: unknown;
1778
1931
  /** Сам объект ответа. Тело уже прочитано. */
1779
1932
  response?: Response | undefined;
1780
- /** Значение `Retry-After` в миллисекундах, если заголовок был. */
1933
+ /** Пауза из Retry-After или тела ошибки, в миллисекундах. */
1781
1934
  retryAfter?: number | undefined;
1935
+ /** Оставшееся время проверки номера в секундах (`X-ITD-Flow-Expires-In`). */
1936
+ flowExpiresIn?: number | undefined;
1782
1937
  /** Сколько запросов разрешено в окне (`x-ratelimit-limit`). */
1783
1938
  rateLimit?: number | undefined;
1784
1939
  /** Сколько запросов осталось в окне (`x-ratelimit-remaining`). */
@@ -1829,8 +1984,10 @@ declare class ItdApiError extends ItdError {
1829
1984
  readonly raw: unknown;
1830
1985
  /** Объект ответа. Тело уже прочитано и повторно прочитано быть не может. */
1831
1986
  readonly response: Response | undefined;
1832
- /** Пауза из заголовка `Retry-After` в миллисекундах. Сервер итд.com его не присылает. */
1987
+ /** Пауза из Retry-After либо retryIn/retryAfter тела ошибки, в миллисекундах. */
1833
1988
  readonly retryAfter: number | undefined;
1989
+ /** Оставшееся время проверки номера в секундах. `0` означает, что она истекла. */
1990
+ readonly flowExpiresIn: number | undefined;
1834
1991
  /**
1835
1992
  * Сколько запросов разрешено в окне — заголовок `x-ratelimit-limit`.
1836
1993
  *
@@ -1883,7 +2040,7 @@ declare class ItdConflictError extends ItdApiError {
1883
2040
  /**
1884
2041
  * `429` — превышен лимит запросов.
1885
2042
  *
1886
- * Если сервер прислал `Retry-After`, пауза доступна в {@link ItdApiError.retryAfter}
2043
+ * Пауза из `Retry-After` или тела ошибки доступна в {@link ItdApiError.retryAfter}
1887
2044
  * (в миллисекундах). При включённых ретраях библиотека выдерживает её автоматически.
1888
2045
  */
1889
2046
  declare class ItdRateLimitError extends ItdApiError {
@@ -2036,8 +2193,6 @@ declare function isItdRateLimitError(value: unknown): value is ItdRateLimitError
2036
2193
  declare function isItdPhoneVerificationError(value: unknown): value is ItdPhoneVerificationError;
2037
2194
  /** Ошибка на стороне сервера (`5xx`). */
2038
2195
  declare function isItdServerError(value: unknown): value is ItdServerError;
2039
- //#endregion
2040
- //#region src/models/users.d.ts
2041
2196
  /** Значок-«пин» в профиле — награда или отметка платформы. */
2042
2197
  interface Pin {
2043
2198
  /** Постоянный идентификатор, например `epepuy_202605_59`. */
@@ -2144,14 +2299,14 @@ interface SubscriptionState {
2144
2299
  /**
2145
2300
  * Свой профиль — ответ `GET /api/users/me`.
2146
2301
  *
2147
- * Отличается от чужого наличием {@link subscription} и {@link isPhoneVerified}
2148
- * и отсутствием полей связи (`isFollowing`, `online`).
2302
+ * Содержит сведения о своей подписке. Поля связи с другим пользователем,
2303
+ * такие как `isFollowing`, в этот профиль не входят.
2149
2304
  */
2150
2305
  interface MyProfile extends ProfileBase {
2151
2306
  /** Закрыт ли профиль. */
2152
2307
  isPrivate: boolean;
2153
- /** Подтверждён ли телефон. Без него часть действий недоступна. */
2154
- isPhoneVerified: boolean;
2308
+ /** Подтверждён ли номер телефона. */
2309
+ isPhoneVerified?: boolean;
2155
2310
  /** Своя премиум-подписка. */
2156
2311
  subscription: SubscriptionState;
2157
2312
  }
@@ -2163,7 +2318,8 @@ interface AuthUser extends UserBase {
2163
2318
  clanAvatar?: string;
2164
2319
  bio: string;
2165
2320
  verified: boolean;
2166
- isPhoneVerified: boolean;
2321
+ /** Подтверждён ли номер телефона. */
2322
+ isPhoneVerified?: boolean;
2167
2323
  /** Роли текущего пользователя, например `user`. */
2168
2324
  roles: string[];
2169
2325
  }
@@ -2257,8 +2413,6 @@ interface PinsResult {
2257
2413
  /** Идентификатор активного значка — строка, а не объект. */
2258
2414
  activePin: string | null;
2259
2415
  }
2260
- //#endregion
2261
- //#region src/models/notifications.d.ts
2262
2416
  /**
2263
2417
  * Уведомление в единой форме.
2264
2418
  *
@@ -2320,8 +2474,6 @@ interface NotificationSettings {
2320
2474
  /** Упоминания. */
2321
2475
  mentions: boolean;
2322
2476
  }
2323
- //#endregion
2324
- //#region src/notifications/normalize.d.ts
2325
2477
  /** Событие потока уведомлений после разбора. */
2326
2478
  interface NotificationEvent {
2327
2479
  /** Само уведомление в единой форме. */
@@ -2357,8 +2509,6 @@ interface NotificationEvent {
2357
2509
  * ```
2358
2510
  */
2359
2511
  declare function normalizeNotification(input: unknown): Notification;
2360
- //#endregion
2361
- //#region src/notifications/text.d.ts
2362
2512
  /**
2363
2513
  * Собирает текст уведомления на русском.
2364
2514
  *
@@ -2372,8 +2522,6 @@ declare function normalizeNotification(input: unknown): Notification;
2372
2522
  * ```
2373
2523
  */
2374
2524
  declare function formatNotificationText(notification: Notification): string;
2375
- //#endregion
2376
- //#region src/notifications/type-map.d.ts
2377
2525
  /**
2378
2526
  * Приводит имя типа к каноническому.
2379
2527
  *
@@ -2394,8 +2542,6 @@ declare function canonicalNotificationType(rawType: string): NotificationType;
2394
2542
  * Полезно, чтобы решить, показывать ли уведомление, для которого нет своего оформления.
2395
2543
  */
2396
2544
  declare function isKnownNotificationType(type: string): boolean;
2397
- //#endregion
2398
- //#region src/notifications/url.d.ts
2399
2545
  /**
2400
2546
  * Вычисляет адрес, на который ведёт уведомление.
2401
2547
  *
@@ -2410,6 +2556,4 @@ declare function isKnownNotificationType(type: string): boolean;
2410
2556
  * ```
2411
2557
  */
2412
2558
  declare function resolveNotificationUrl(notification: Notification): string;
2413
- //#endregion
2414
- export { isItdNotFoundError as $, isBuiltInOperationId as $t, ItdConfigError as A, SpanType as An, RawRequestOptions as At, ItdPhoneVerificationError as B, QueryValue as Bt, UserSummary as C, Loose as Cn, ClientHooks as Ct, ItdApiErrorInit as D, ReportReason as Dn, RateLimitBucketContext as Dt, ItdApiError as E, QrLocationPrecision as En, PaginationOptions as Et, ItdFileError as F, RetryContext as Ft, ItdValidationError as G, Logger as Gt, ItdServerError as H, RateLimitPacing as Ht, ItdFileErrorReason as I, RetryDecisionContext as It, isItdAuthError as J, BuiltInOperationId as Jt, TimeoutBudget as K, ItdClock as Kt, ItdForbiddenError as L, RetryOptions as Lt, ItdError as M, ViewReason as Mn, RequestExtensions as Mt, ItdErrorKind as N, ViewSource as Nn, RequestOptions as Nt, ItdApiErrorKind as O, ReportTargetType as On, RateLimitBucketOverride as Ot, ItdFieldErrors as P, WallAccess as Pn, ResponseContext as Pt, isItdForbiddenError as Q, OperationId as Qt, ItdNetworkError as R, RuntimeOptions as Rt, UserBase as S, LikesVisibility as Sn, RetrySafety as St, ItdAbortError as T, NotificationType as Tn, OperationRequestOptions as Tt, ItdStateError as U, RuntimeMode as Ut, ItdRateLimitError as V, ServiceDefinition as Vt, ItdTimeoutError as W, LogLevel as Wt, isItdError as X, ItdOperationDefinition as Xt, isItdConflictError as Y, CustomOperationId as Yt, isItdFileError as Z, OPERATIONS as Zt, PinsResult as _, FeedTab as _n, FeatureOperationId as _t, NotificationEvent as a, RateLimitBucket as an, Emitter as at, PublicProfile as b, ItdErrorCode as bn, OperationMetadata as bt, NotificationSettings as c, UserId as cn, ClientConnection as ct, AuthUser as d, AttachmentType as dn, anonymousAuth as dt, operationBucket as en, isItdPhoneVerificationError as et, Author as f, CaptchaChoice as fn, bearerToken as ft, Pin as g, EventChannelStatus as gn, LIBRARY_VERSION as gt, MyProfile as h, CommentSort as hn, STATUS_SERVICE as ht, formatNotificationText as i, DEFAULT_RATE_LIMIT_BUCKET as in, isItdValidationError as it, ItdConflictError as j, UsernameUnavailableReason as jn, RequestContext as jt, ItdAuthError as k, ServiceState as kn, RateLimitOptions as kt, Actor as l, UserRef as ln, AuthIdentity as lt, LastSeen as m, CaptchaType as mn, DEFAULT_BASE_URL as mt, canonicalNotificationType as n, operationRetrySafety as nn, isItdServerError as nt, normalizeNotification as o, IsoDate as on, Listener as ot, FollowResult as p, CaptchaField as pn, tokenProvider as pt, isItdApiError as q, systemClock as qt, isKnownNotificationType as r, BUCKET_LIMITS as rn, isItdStateError as rt, Notification as s, Span as sn, Unsubscribe as st, resolveNotificationUrl as t, operationMethod as tn, isItdRateLimitError as tt, AuthState as u, AccessType as un, AuthProvider as ut, PrivacySettings as v, IncidentKind as vn, OperationAnnotations as vt, UsernameAvailability as w, MessageAccess as wn, ErrorContextHook as wt, SubscriptionState as x, LastSeenUnit as xn, OperationMethod as xt, Profile as y, InteractionType as yn, OperationContract as yt, ItdNotFoundError as z, QueryParams as zt };
2415
- //# sourceMappingURL=url-_R0oJ7gE.d.cts.map
2559
+ export { isItdNotFoundError as $, isBuiltInOperationId as $t, ItdConfigError as A, SpanType as An, RawRequestOptions as At, ItdPhoneVerificationError as B, QueryValue as Bt, UserSummary as C, Loose as Cn, ClientHooks as Ct, ItdApiErrorInit as D, ReportReason as Dn, RateLimitBucketContext as Dt, ItdApiError as E, QrLocationPrecision as En, PaginationOptions as Et, ItdFileError as F, RetryContext as Ft, ItdValidationError as G, Logger as Gt, ItdServerError as H, RateLimitPacing as Ht, ItdFileErrorReason as I, RetryDecisionContext as It, isItdAuthError as J, BuiltInOperationId as Jt, TimeoutBudget as K, ItdClock as Kt, ItdForbiddenError as L, RetryOptions as Lt, ItdError as M, ViewReason as Mn, RequestExtensions as Mt, ItdErrorKind as N, ViewSource as Nn, RequestOptions as Nt, ItdApiErrorKind as O, ReportTargetType as On, RateLimitBucketOverride as Ot, ItdFieldErrors as P, WallAccess as Pn, ResponseContext as Pt, isItdForbiddenError as Q, OperationId as Qt, ItdNetworkError as R, RuntimeOptions as Rt, UserBase as S, LikesVisibility as Sn, RetrySafety as St, ItdAbortError as T, NotificationType as Tn, OperationRequestOptions as Tt, ItdStateError as U, RuntimeMode as Ut, ItdRateLimitError as V, ServiceDefinition as Vt, ItdTimeoutError as W, LogLevel as Wt, isItdError as X, ItdOperationDefinition as Xt, isItdConflictError as Y, CustomOperationId as Yt, isItdFileError as Z, OPERATIONS as Zt, PinsResult as _, FeedTab as _n, FeatureOperationId as _t, NotificationEvent as a, RateLimitBucket as an, Emitter as at, PublicProfile as b, ItdErrorCode as bn, OperationMetadata as bt, NotificationSettings as c, UserId as cn, ClientConnection as ct, AuthUser as d, AttachmentType as dn, anonymousAuth as dt, operationBucket as en, isItdPhoneVerificationError as et, Author as f, CaptchaChoice as fn, bearerToken as ft, Pin as g, EventChannelStatus as gn, LIBRARY_VERSION as gt, MyProfile as h, CommentSort as hn, STATUS_SERVICE as ht, formatNotificationText as i, DEFAULT_RATE_LIMIT_BUCKET as in, isItdValidationError as it, ItdConflictError as j, UsernameUnavailableReason as jn, RequestContext as jt, ItdAuthError as k, ServiceState as kn, RateLimitOptions as kt, Actor as l, UserRef as ln, AuthIdentity as lt, LastSeen as m, CaptchaType as mn, DEFAULT_BASE_URL as mt, canonicalNotificationType as n, operationRetrySafety as nn, isItdServerError as nt, normalizeNotification as o, IsoDate as on, Listener as ot, FollowResult as p, CaptchaField as pn, tokenProvider as pt, isItdApiError as q, systemClock as qt, isKnownNotificationType as r, BUCKET_LIMITS as rn, isItdStateError as rt, Notification as s, Span as sn, Unsubscribe as st, resolveNotificationUrl as t, operationMethod as tn, isItdRateLimitError as tt, AuthState as u, AccessType as un, AuthProvider as ut, PrivacySettings as v, IncidentKind as vn, OperationAnnotations as vt, UsernameAvailability as w, MessageAccess as wn, ErrorContextHook as wt, SubscriptionState as x, LastSeenUnit as xn, OperationMethod as xt, Profile as y, InteractionType as yn, OperationContract as yt, ItdNotFoundError as z, QueryParams as zt };