itd-api 0.13.0 → 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 (65) hide show
  1. package/dist/events/index.cjs +4 -4
  2. package/dist/events/index.d.cts +2 -2
  3. package/dist/events/index.d.ts +2 -2
  4. package/dist/events/index.js +4 -4
  5. package/dist/index.cjs +74 -31
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +32 -14
  8. package/dist/index.d.ts +32 -14
  9. package/dist/index.js +74 -31
  10. package/dist/index.js.map +1 -1
  11. package/dist/node/index.cjs +5 -5
  12. package/dist/node/index.js +5 -5
  13. package/dist/rest/index.cjs +5 -5
  14. package/dist/rest/index.d.cts +2 -2
  15. package/dist/rest/index.d.ts +2 -2
  16. package/dist/rest/index.js +5 -5
  17. package/dist/shared/{events-B6uqXOSs.d.cts → events-Bip3qvCc.d.cts} +1 -1
  18. package/dist/shared/{events-D_aMNrPd.d.ts → events-DF1elRzZ.d.ts} +1 -1
  19. package/dist/shared/{events-C_MgYlXR.js → events-DRbBDq9p.js} +4 -4
  20. package/dist/shared/{events-C_MgYlXR.js.map → events-DRbBDq9p.js.map} +1 -1
  21. package/dist/shared/{events-DV1i1t6J.cjs → events-DcxmyPTX.cjs} +4 -4
  22. package/dist/shared/{events-DV1i1t6J.cjs.map → events-DcxmyPTX.cjs.map} +1 -1
  23. package/dist/shared/{key-value-store-PnZE_DFC.js → key-value-store-BwXlaoD4.js} +2 -2
  24. package/dist/shared/{key-value-store-PnZE_DFC.js.map → key-value-store-BwXlaoD4.js.map} +1 -1
  25. package/dist/shared/{key-value-store-6DHm_iNW.cjs → key-value-store-CmnIjuE4.cjs} +2 -2
  26. package/dist/shared/{key-value-store-6DHm_iNW.cjs.map → key-value-store-CmnIjuE4.cjs.map} +1 -1
  27. package/dist/shared/{multi-storage-DM0skcSO.js → multi-storage-DffEAzdc.js} +5 -5
  28. package/dist/shared/{multi-storage-DM0skcSO.js.map → multi-storage-DffEAzdc.js.map} +1 -1
  29. package/dist/shared/{multi-storage-DnonVBfO.cjs → multi-storage-Dp5x6OOl.cjs} +5 -5
  30. package/dist/shared/{multi-storage-DnonVBfO.cjs.map → multi-storage-Dp5x6OOl.cjs.map} +1 -1
  31. package/dist/shared/{options-bS27r_gR.js → options-Ddyc5qec.js} +3 -3
  32. package/dist/shared/{options-bS27r_gR.js.map → options-Ddyc5qec.js.map} +1 -1
  33. package/dist/shared/{options-SvAWOaqT.cjs → options-DsmQRyx4.cjs} +3 -3
  34. package/dist/shared/{options-SvAWOaqT.cjs.map → options-DsmQRyx4.cjs.map} +1 -1
  35. package/dist/shared/{redact-C4b2NzdB.js → redact-BCmucE19.js} +2 -2
  36. package/dist/shared/{redact-C4b2NzdB.js.map → redact-BCmucE19.js.map} +1 -1
  37. package/dist/shared/{redact-DDGkv8KF.cjs → redact-BuXRKC1G.cjs} +2 -2
  38. package/dist/shared/{redact-DDGkv8KF.cjs.map → redact-BuXRKC1G.cjs.map} +1 -1
  39. package/dist/shared/{render-eOxYgdoA.d.ts → render-Bvv1V5Tp.d.ts} +3 -1
  40. package/dist/shared/{render-0-JJPOwb.cjs → render-C1lmsu1i.cjs} +6 -6
  41. package/dist/shared/{render-0-JJPOwb.cjs.map → render-C1lmsu1i.cjs.map} +1 -1
  42. package/dist/shared/{render-CYVOc_IW.d.cts → render-D83t9ckd.d.cts} +1 -1
  43. package/dist/shared/{render-CF49aBO8.js → render-DJKZqv9O.js} +6 -6
  44. package/dist/shared/{render-CF49aBO8.js.map → render-DJKZqv9O.js.map} +1 -1
  45. package/dist/shared/{storage-B6OkSi38.js → storage-Bc4lWtSj.js} +3 -3
  46. package/dist/shared/{storage-B6OkSi38.js.map → storage-Bc4lWtSj.js.map} +1 -1
  47. package/dist/shared/{storage-CezF2Mvz.cjs → storage-e2xYL6ro.cjs} +3 -3
  48. package/dist/shared/{storage-CezF2Mvz.cjs.map → storage-e2xYL6ro.cjs.map} +1 -1
  49. package/dist/shared/{url-DOfjru6L.cjs → url-CXRaoR_w.cjs} +18 -5
  50. package/dist/shared/url-CXRaoR_w.cjs.map +1 -0
  51. package/dist/shared/{url-DL5Mip4L.d.ts → url-V4bCae35.d.ts} +14 -1
  52. package/dist/shared/{url-CPKhcxf1.js → url-aw_NZdVY.js} +18 -5
  53. package/dist/shared/url-aw_NZdVY.js.map +1 -0
  54. package/dist/shared/{url-DCqxoxGX.d.cts → url-n_h2pvHA.d.cts} +16 -1
  55. package/dist/shared/{validate-CfxCK1BC.cjs → validate-BHKy_YMv.cjs} +4 -1
  56. package/dist/shared/validate-BHKy_YMv.cjs.map +1 -0
  57. package/dist/shared/{validate-B5l_vLKD.js → validate-BQzL_oJ4.js} +4 -1
  58. package/dist/shared/validate-BQzL_oJ4.js.map +1 -0
  59. package/dist/web/index.cjs +3 -3
  60. package/dist/web/index.js +3 -3
  61. package/package.json +1 -1
  62. package/dist/shared/url-CPKhcxf1.js.map +0 -1
  63. package/dist/shared/url-DOfjru6L.cjs.map +0 -1
  64. package/dist/shared/validate-B5l_vLKD.js.map +0 -1
  65. package/dist/shared/validate-CfxCK1BC.cjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_url = require("../shared/url-DOfjru6L.cjs");
3
- const require_validate = require("../shared/validate-CfxCK1BC.cjs");
4
- const require_redact = require("../shared/redact-DDGkv8KF.cjs");
5
- const require_events = require("../shared/events-DV1i1t6J.cjs");
2
+ const require_url = require("../shared/url-CXRaoR_w.cjs");
3
+ const require_validate = require("../shared/validate-BHKy_YMv.cjs");
4
+ const require_redact = require("../shared/redact-BuXRKC1G.cjs");
5
+ const require_events = require("../shared/events-DcxmyPTX.cjs");
6
6
  exports.DEFAULT_BASE_URL = require_url.DEFAULT_BASE_URL;
7
7
  exports.EventChannel = require_events.EventChannel;
8
8
  exports.EventChannelStatus = require_url.EventChannelStatus;
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { A as isItdError, An as ClientConnection, At as Loose, B as normalizeNotification, C as ItdStateError, Ct as EventChannelStatus, D as isItdApiError, E as TimeoutBudget, F as isItdRateLimitError, Fn as Unsubscribe, H as NotificationSettings, In as LogLevel, L as isItdStateError, Ln as Logger, Mn as systemClock, Mt as NotificationType, O as isItdAuthError, Pn as Listener, R as isItdValidationError, S as ItdServerError, T as ItdValidationError, V as Notification, _ as ItdForbiddenError, a as ItdAbortError, at as AuthIdentity, c as ItdApiErrorKind, ct as bearerToken, f as ItdError, ft as LIBRARY_VERSION, i as formatNotificationText, jn as ItdClock, kn as RuntimeMode, l as ItdAuthError, ln as ClientHooks, lt as tokenProvider, n as canonicalNotificationType, o as ItdApiError, ot as AuthProvider, p as ItdErrorKind, r as isKnownNotificationType, st as anonymousAuth, t as resolveNotificationUrl, u as ItdConfigError, ut as DEFAULT_BASE_URL, v as ItdNetworkError, w as ItdTimeoutError, wn as RuntimeOptions, x as ItdRateLimitError, y as ItdNotFoundError, z as NotificationEvent } from "../shared/url-DCqxoxGX.cjs";
7
- import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as WebSocketTransportOptions, a as EventMiddlewareGroup, b as NotificationEventsOptions, c as EventRouteSelector, d as NotificationEventsClientOptions, et as EventTransportFrame, f as createNotificationEventsClient, g as WebSocketTransport, h as WebSocketOpenFailureClassifier, i as EventFilter, j as EventMiddleware, k as ReconnectOptions, l as EventRouter, m as WebSocketLike, n as EventErrorBoundary, o as EventMiddlewareLike, p as WebSocketImplementationOptions, q as NotificationUpdateOfType, r as EventErrorContext, s as EventRouteTable, t as EventComposer, tt as UnauthorizedStreamError, u as NotificationEventsClient, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-B6uqXOSs.cjs";
6
+ import { A as isItdError, An as ClientConnection, At as Loose, B as normalizeNotification, C as ItdStateError, Ct as EventChannelStatus, D as isItdApiError, E as TimeoutBudget, F as isItdRateLimitError, Fn as Unsubscribe, H as NotificationSettings, In as LogLevel, L as isItdStateError, Ln as Logger, Mn as systemClock, Mt as NotificationType, O as isItdAuthError, Pn as Listener, R as isItdValidationError, S as ItdServerError, T as ItdValidationError, V as Notification, _ as ItdForbiddenError, a as ItdAbortError, at as AuthIdentity, c as ItdApiErrorKind, ct as bearerToken, f as ItdError, ft as LIBRARY_VERSION, i as formatNotificationText, jn as ItdClock, kn as RuntimeMode, l as ItdAuthError, ln as ClientHooks, lt as tokenProvider, n as canonicalNotificationType, o as ItdApiError, ot as AuthProvider, p as ItdErrorKind, r as isKnownNotificationType, st as anonymousAuth, t as resolveNotificationUrl, u as ItdConfigError, ut as DEFAULT_BASE_URL, v as ItdNetworkError, w as ItdTimeoutError, wn as RuntimeOptions, x as ItdRateLimitError, y as ItdNotFoundError, z as NotificationEvent } from "../shared/url-n_h2pvHA.cjs";
7
+ import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as WebSocketTransportOptions, a as EventMiddlewareGroup, b as NotificationEventsOptions, c as EventRouteSelector, d as NotificationEventsClientOptions, et as EventTransportFrame, f as createNotificationEventsClient, g as WebSocketTransport, h as WebSocketOpenFailureClassifier, i as EventFilter, j as EventMiddleware, k as ReconnectOptions, l as EventRouter, m as WebSocketLike, n as EventErrorBoundary, o as EventMiddlewareLike, p as WebSocketImplementationOptions, q as NotificationUpdateOfType, r as EventErrorContext, s as EventRouteTable, t as EventComposer, tt as UnauthorizedStreamError, u as NotificationEventsClient, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-Bip3qvCc.cjs";
8
8
  export { type AuthIdentity, type AuthProvider, type ClientConnection, type ClientHooks, DEFAULT_BASE_URL, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, type ItdClock, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, type Listener, LogLevel, type Logger, type Loose, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type ReconnectOptions, RuntimeMode, type RuntimeOptions, TimeoutBudget, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- import { A as ItdConfigError, Cn as Loose, Ct as ClientHooks, E as ItdApiError, G as ItdValidationError, Gt as Logger, H as ItdServerError, J as isItdAuthError, K as TimeoutBudget, Kt as ItdClock, L as ItdForbiddenError, M as ItdError, N as ItdErrorKind, O as ItdApiErrorKind, R as ItdNetworkError, Rt as RuntimeOptions, T as ItdAbortError, Tn as NotificationType, U as ItdStateError, Ut as RuntimeMode, V as ItdRateLimitError, W as ItdTimeoutError, Wt as LogLevel, X as isItdError, a as NotificationEvent, c as NotificationSettings, ct as ClientConnection, dt as anonymousAuth, ft as bearerToken, gn as EventChannelStatus, gt as LIBRARY_VERSION, i as formatNotificationText, it as isItdValidationError, k as ItdAuthError, lt as AuthIdentity, mt as DEFAULT_BASE_URL, n as canonicalNotificationType, o as normalizeNotification, ot as Listener, pt as tokenProvider, q as isItdApiError, qt as systemClock, r as isKnownNotificationType, rt as isItdStateError, s as Notification, st as Unsubscribe, t as resolveNotificationUrl, tt as isItdRateLimitError, ut as AuthProvider, z as ItdNotFoundError } from "../shared/url-DL5Mip4L.js";
7
- import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-D_aMNrPd.js";
6
+ import { A as ItdConfigError, Cn as Loose, Ct as ClientHooks, E as ItdApiError, G as ItdValidationError, Gt as Logger, H as ItdServerError, J as isItdAuthError, K as TimeoutBudget, Kt as ItdClock, L as ItdForbiddenError, M as ItdError, N as ItdErrorKind, O as ItdApiErrorKind, R as ItdNetworkError, Rt as RuntimeOptions, T as ItdAbortError, Tn as NotificationType, U as ItdStateError, Ut as RuntimeMode, V as ItdRateLimitError, W as ItdTimeoutError, Wt as LogLevel, X as isItdError, a as NotificationEvent, c as NotificationSettings, ct as ClientConnection, dt as anonymousAuth, ft as bearerToken, gn as EventChannelStatus, gt as LIBRARY_VERSION, i as formatNotificationText, it as isItdValidationError, k as ItdAuthError, lt as AuthIdentity, mt as DEFAULT_BASE_URL, n as canonicalNotificationType, o as normalizeNotification, ot as Listener, pt as tokenProvider, q as isItdApiError, qt as systemClock, r as isKnownNotificationType, rt as isItdStateError, s as Notification, st as Unsubscribe, t as resolveNotificationUrl, tt as isItdRateLimitError, ut as AuthProvider, z as ItdNotFoundError } from "../shared/url-V4bCae35.js";
7
+ import { $ as EventTransportContext, A as EventHandler, B as NotificationEventContext, C as EventChannelDeps, D as EventSession, E as EventEnqueueOptions, F as EventSequentializer, G as NotificationOfType, H as NotificationEventOfType, I as EventTypeGuard, J as NotificationUpdateOrigin, K as NotificationUpdate, L as runEventMiddleware, M as EventMiddlewareObject, N as EventNext, O as EventSyncReason, P as EventPredicate, Q as EventTransport, R as EventContext, S as EventChannel, T as EventChannelOptions, U as NotificationEventSelector, V as NotificationEventFilter, W as NotificationEventsUpdate, X as UnknownNotificationUpdate, Y as NotificationUpdateType, Z as UnreadCountUpdate, _ as createNotificationEventsClient, a as WebSocketTransportOptions, b as NotificationEventsOptions, c as EventErrorContext, d as EventMiddlewareLike, et as EventTransportFrame, f as EventRouteTable, g as NotificationEventsClientOptions, h as NotificationEventsClient, i as WebSocketTransport, j as EventMiddleware, k as ReconnectOptions, l as EventFilter, m as EventRouter, n as WebSocketLike, o as EventComposer, p as EventRouteSelector, q as NotificationUpdateOfType, r as WebSocketOpenFailureClassifier, s as EventErrorBoundary, t as WebSocketImplementationOptions, tt as UnauthorizedStreamError, u as EventMiddlewareGroup, v as NotificationEvents, w as EventChannelEvents, x as NotificationEventsTransport, y as NotificationEventsMap, z as NotificationContext } from "../shared/events-DF1elRzZ.js";
8
8
  export { type AuthIdentity, type AuthProvider, type ClientConnection, type ClientHooks, DEFAULT_BASE_URL, EventChannel, type EventChannelDeps, type EventChannelEvents, type EventChannelOptions, EventChannelStatus, EventComposer, type EventContext, type EventEnqueueOptions, type EventErrorBoundary, type EventErrorContext, type EventFilter, type EventHandler, type EventMiddleware, type EventMiddlewareGroup, type EventMiddlewareLike, type EventMiddlewareObject, type EventNext, type EventPredicate, type EventRouteSelector, type EventRouteTable, EventRouter, type EventSequentializer, type EventSession, type EventSyncReason, type EventTransport, type EventTransportContext, type EventTransportFrame, type EventTypeGuard, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, type ItdClock, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, type Listener, LogLevel, type Logger, type Loose, type Notification, type NotificationContext, type NotificationEvent, type NotificationEventContext, type NotificationEventFilter, type NotificationEventOfType, type NotificationEventSelector, NotificationEvents, NotificationEventsClient, type NotificationEventsClientOptions, type NotificationEventsMap, type NotificationEventsOptions, NotificationEventsTransport, type NotificationEventsUpdate, type NotificationOfType, type NotificationSettings, NotificationType, type NotificationUpdate, type NotificationUpdateOfType, NotificationUpdateOrigin, NotificationUpdateType, type ReconnectOptions, RuntimeMode, type RuntimeOptions, TimeoutBudget, UnauthorizedStreamError, type UnknownNotificationUpdate, type UnreadCountUpdate, type Unsubscribe, type WebSocketImplementationOptions, type WebSocketLike, type WebSocketOpenFailureClassifier, WebSocketTransport, type WebSocketTransportOptions, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
@@ -1,5 +1,5 @@
1
- import { D as NotificationType, _t as systemClock, a as tokenProvider, c as normalizeNotification, d as canonicalNotificationType, f as isKnownNotificationType, i as bearerToken, mt as LIBRARY_VERSION, n as formatNotificationText, r as anonymousAuth, t as resolveNotificationUrl, ut as DEFAULT_BASE_URL, y as EventChannelStatus } from "../shared/url-CPKhcxf1.js";
2
- import { C as ItdValidationError, E as isItdAuthError, F as isItdStateError, I as isItdValidationError, N as isItdRateLimitError, O as isItdError, S as ItdTimeoutError, T as isItdApiError, _ as ItdNotFoundError, a as ItdAbortError, b as ItdServerError, c as ItdAuthError, d as ItdError, f as ItdErrorKind, g as ItdNetworkError, h as ItdForbiddenError, l as ItdConfigError, o as ItdApiError, s as ItdApiErrorKind, w as TimeoutBudget, x as ItdStateError, y as ItdRateLimitError } from "../shared/validate-B5l_vLKD.js";
3
- import { E as LogLevel, v as RuntimeMode } from "../shared/redact-C4b2NzdB.js";
4
- import { a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, m as EventChannel, n as EventRouter, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer } from "../shared/events-C_MgYlXR.js";
1
+ import { D as NotificationType, _t as systemClock, a as tokenProvider, c as normalizeNotification, d as canonicalNotificationType, f as isKnownNotificationType, i as bearerToken, mt as LIBRARY_VERSION, n as formatNotificationText, r as anonymousAuth, t as resolveNotificationUrl, ut as DEFAULT_BASE_URL, y as EventChannelStatus } from "../shared/url-aw_NZdVY.js";
2
+ import { C as ItdValidationError, E as isItdAuthError, F as isItdStateError, I as isItdValidationError, N as isItdRateLimitError, O as isItdError, S as ItdTimeoutError, T as isItdApiError, _ as ItdNotFoundError, a as ItdAbortError, b as ItdServerError, c as ItdAuthError, d as ItdError, f as ItdErrorKind, g as ItdNetworkError, h as ItdForbiddenError, l as ItdConfigError, o as ItdApiError, s as ItdApiErrorKind, w as TimeoutBudget, x as ItdStateError, y as ItdRateLimitError } from "../shared/validate-BQzL_oJ4.js";
3
+ import { E as LogLevel, v as RuntimeMode } from "../shared/redact-BCmucE19.js";
4
+ import { a as WebSocketTransport, c as NotificationEventsTransport, d as NotificationUpdateOrigin, f as NotificationUpdateType, g as runEventMiddleware, h as UnauthorizedStreamError, i as createNotificationEventsClient, m as EventChannel, n as EventRouter, r as NotificationEventsClient, s as NotificationEvents, t as EventComposer } from "../shared/events-DRbBDq9p.js";
5
5
  export { DEFAULT_BASE_URL, EventChannel, EventChannelStatus, EventComposer, EventRouter, ItdAbortError, ItdApiError, ItdApiErrorKind, ItdAuthError, ItdConfigError, ItdError, ItdErrorKind, ItdForbiddenError, ItdNetworkError, ItdNotFoundError, ItdRateLimitError, ItdServerError, ItdStateError, ItdTimeoutError, ItdValidationError, LIBRARY_VERSION, LogLevel, NotificationEvents, NotificationEventsClient, NotificationEventsTransport, NotificationType, NotificationUpdateOrigin, NotificationUpdateType, RuntimeMode, TimeoutBudget, UnauthorizedStreamError, WebSocketTransport, anonymousAuth, bearerToken, canonicalNotificationType, createNotificationEventsClient, formatNotificationText, isItdApiError, isItdAuthError, isItdError, isItdRateLimitError, isItdStateError, isItdValidationError, isKnownNotificationType, normalizeNotification, resolveNotificationUrl, runEventMiddleware, systemClock, tokenProvider };
package/dist/index.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_url = require("./shared/url-DOfjru6L.cjs");
3
- const require_validate = require("./shared/validate-CfxCK1BC.cjs");
4
- const require_render = require("./shared/render-0-JJPOwb.cjs");
5
- const require_events = require("./shared/events-DV1i1t6J.cjs");
6
- const require_redact = require("./shared/redact-DDGkv8KF.cjs");
7
- const require_storage = require("./shared/storage-CezF2Mvz.cjs");
8
- const require_multi_storage = require("./shared/multi-storage-DnonVBfO.cjs");
9
- const require_options = require("./shared/options-SvAWOaqT.cjs");
10
- const require_key_value_store = require("./shared/key-value-store-6DHm_iNW.cjs");
2
+ const require_url = require("./shared/url-CXRaoR_w.cjs");
3
+ const require_validate = require("./shared/validate-BHKy_YMv.cjs");
4
+ const require_render = require("./shared/render-C1lmsu1i.cjs");
5
+ const require_events = require("./shared/events-DcxmyPTX.cjs");
6
+ const require_redact = require("./shared/redact-BuXRKC1G.cjs");
7
+ const require_storage = require("./shared/storage-e2xYL6ro.cjs");
8
+ const require_multi_storage = require("./shared/multi-storage-Dp5x6OOl.cjs");
9
+ const require_options = require("./shared/options-DsmQRyx4.cjs");
10
+ const require_key_value_store = require("./shared/key-value-store-CmnIjuE4.cjs");
11
11
  // src/notifications-api.ts
12
12
  var ClientNotifications = class extends require_render.NotificationsResource {
13
13
  #createEvents;
@@ -38,16 +38,10 @@ const ACCOUNT_CHANGES_CANCEL_PENDING = require_url.voidOperation("account.change
38
38
  // src/resources/account/request.ts
39
39
  /** Выполняет запрос настройки способов входа с текущей авторизацией. */
40
40
  function requestAccount(http, operation, path, body, options) {
41
- const reverse = path.startsWith("/phone/reverse/");
42
41
  return http.execute(operation, {
43
42
  ...options,
44
43
  path: `/api/v1/auth${path}`,
45
- body,
46
- headers: {
47
- ...options.headers,
48
- ...operation.method === "POST" ? { "X-ITD-Phone-Reverse": "1" } : {},
49
- ...reverse ? { "X-ITD-Reverse-Attempts": "1" } : {}
50
- }
44
+ body
51
45
  });
52
46
  }
53
47
  // src/resources/account/changes.ts
@@ -272,6 +266,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
272
266
  *
273
267
  * Передайте номер в международном формате с `+`. Если токен капчи не передан
274
268
  * в вызов, SDK использует настроенный источник капчи.
269
+ * Для исходящего звонка передайте `method: PhoneVerificationMethod.Reverse`.
275
270
  *
276
271
  * @returns параметры доставки и `flowToken` для {@link verifyAttach}
277
272
  *
@@ -287,7 +282,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
287
282
  /**
288
283
  * Запрашивает подтверждение нового номера для смены.
289
284
  *
290
- * Формат номера и источник капчи такие же, как у {@link attach}.
285
+ * Формат номера, источник капчи и выбор способа подтверждения такие же, как у {@link attach}.
291
286
  *
292
287
  * @returns параметры доставки и `flowToken` для {@link verifyChange}
293
288
  */
@@ -300,7 +295,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
300
295
  * Передайте номер и `flowToken` из {@link attach}.
301
296
  */
302
297
  verifyAttach(input, options = {}) {
303
- return requestAccount(this.http, ACCOUNT_VERIFY_ATTACH, "/verify-otp", input, options);
298
+ return this.#request(ACCOUNT_VERIFY_ATTACH, "/verify-otp", input, options);
304
299
  }
305
300
  /**
306
301
  * Подтверждает код нового номера, запрошенный через {@link startChange}.
@@ -308,7 +303,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
308
303
  * @returns `changeToken` и способы завершить смену через `itd.account.changes`
309
304
  */
310
305
  verifyChange(input, options = {}) {
311
- return requestAccount(this.http, ACCOUNT_VERIFY_CHANGE, "/verify-otp", input, options);
306
+ return this.#request(ACCOUNT_VERIFY_CHANGE, "/verify-otp", input, options);
312
307
  }
313
308
  /**
314
309
  * Повторно запрашивает код для того же номера. Передайте `flowToken` из первого запроса.
@@ -316,7 +311,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
316
311
  * @returns актуальные канал, длину кода и паузу до повтора в секундах
317
312
  */
318
313
  resendOtp(input, options = {}) {
319
- return requestAccount(this.http, ACCOUNT_PHONE_RESEND_OTP, "/resend-otp", input, options);
314
+ return this.#request(ACCOUNT_PHONE_RESEND_OTP, "/resend-otp", input, options);
320
315
  }
321
316
  /** Синхронизирует привязанный номер с профилем. */
322
317
  sync(options = {}) {
@@ -324,7 +319,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
324
319
  }
325
320
  /** Возвращает доступность исходящего звонка для привязки или смены номера. */
326
321
  reverseOptions(input, options = {}) {
327
- return requestAccount(this.http, ACCOUNT_PHONE_REVERSE_OPTIONS, "/phone/reverse/options", input, options);
322
+ return this.#request(ACCOUNT_PHONE_REVERSE_OPTIONS, "/phone/reverse/options", input, options);
328
323
  }
329
324
  /**
330
325
  * Подготавливает номер, на который должен позвонить пользователь.
@@ -332,7 +327,7 @@ var AccountPhoneResource = class extends require_render.BaseResource {
332
327
  * @returns состояние попытки, номер для звонка и срок действия в секундах
333
328
  */
334
329
  reverseStart(input, options = {}) {
335
- return requestAccount(this.http, ACCOUNT_PHONE_REVERSE_START, "/phone/reverse/start", input, options);
330
+ return this.#request(ACCOUNT_PHONE_REVERSE_START, "/phone/reverse/start", input, options);
336
331
  }
337
332
  /**
338
333
  * Читает состояние исходящего звонка.
@@ -341,28 +336,46 @@ var AccountPhoneResource = class extends require_render.BaseResource {
341
336
  * или {@link reverseChangeComplete} при смене номера.
342
337
  */
343
338
  reverseStatus(input, options = {}) {
344
- return requestAccount(this.http, ACCOUNT_PHONE_REVERSE_STATUS, "/phone/reverse/status", input, options);
339
+ return this.#request(ACCOUNT_PHONE_REVERSE_STATUS, "/phone/reverse/status", input, options);
345
340
  }
346
341
  /** Завершает привязку номера после исходящего звонка. */
347
342
  reverseAttachComplete(input, options = {}) {
348
- return requestAccount(this.http, ACCOUNT_PHONE_REVERSE_ATTACH_COMPLETE, "/phone/reverse/complete", input, options);
343
+ return this.#request(ACCOUNT_PHONE_REVERSE_ATTACH_COMPLETE, "/phone/reverse/complete", input, options);
349
344
  }
350
345
  /** Подтверждает новый номер звонком и возвращает варианты завершения смены. */
351
346
  reverseChangeComplete(input, options = {}) {
352
- return requestAccount(this.http, ACCOUNT_PHONE_REVERSE_CHANGE_COMPLETE, "/phone/reverse/complete", input, options);
347
+ return this.#request(ACCOUNT_PHONE_REVERSE_CHANGE_COMPLETE, "/phone/reverse/complete", input, options);
353
348
  }
354
349
  /** Запускает проверку номера, если за время получения капчи сессия не сменилась. */
355
- async #start(operation, path, { phone, captcha }, options) {
350
+ async #start(operation, path, { phone, captcha, method }, options) {
356
351
  const revision = this.#auth.revision();
357
352
  const proof = await this.#auth.captchaToken(captcha);
358
353
  if (this.#auth.revision() !== revision) throw new require_validate.ItdStateError("Сессия сменилась во время получения капчи. Начните проверку номера заново.");
359
- return requestAccount(this.http, operation, path, {
354
+ return this.#request(operation, path, {
360
355
  phone,
361
356
  captcha: proof ? {
362
357
  provider: proof.type,
363
358
  token: proof.token
364
359
  } : void 0
365
- }, options);
360
+ }, {
361
+ ...options,
362
+ headers: {
363
+ ...options.headers,
364
+ ...method === PhoneVerificationMethod.Reverse ? { "X-ITD-Phone-Method": PhoneVerificationMethod.Reverse } : {}
365
+ }
366
+ });
367
+ }
368
+ /** Объявляет поддержку исходящего звонка и срока действия проверки номера. */
369
+ #request(operation, path, body, options) {
370
+ return requestAccount(this.http, operation, path, body, {
371
+ ...options,
372
+ headers: {
373
+ ...options.headers,
374
+ "X-ITD-Phone-Reverse": "1",
375
+ "X-ITD-Flow-Expiry": "1",
376
+ ...path.startsWith("/phone/reverse/") ? { "X-ITD-Reverse-Attempts": "1" } : {}
377
+ }
378
+ });
366
379
  }
367
380
  };
368
381
  // src/resources/account.ts
@@ -1597,6 +1610,10 @@ function readAccessToken(body) {
1597
1610
  const AUTH_PHONE_CONFIG = require_url.passthroughOperation("auth.phone.config");
1598
1611
  const AUTH_PHONE_CONSENT = require_url.passthroughOperation("auth.phone.consent");
1599
1612
  const AUTH_PHONE_START = require_url.defineBuiltInOperation("auth.phone.start", readPhoneStart);
1613
+ const AUTH_PHONE_RESUME = require_url.defineBuiltInOperation("auth.phone.resume", (body) => ({
1614
+ ...readPhoneDelivery(body),
1615
+ expiresIn: body.expiresIn
1616
+ }));
1600
1617
  const AUTH_PHONE_VERIFY = require_url.defineBuiltInOperation("auth.phone.verify", readLoginResult);
1601
1618
  const AUTH_PHONE_PASSWORD = require_url.defineBuiltInOperation("auth.phone.password", readAccessToken);
1602
1619
  const AUTH_PHONE_RESET_PASSWORD = require_url.defineBuiltInOperation("auth.phone.resetPassword", readAccessToken);
@@ -1613,7 +1630,7 @@ var PhoneAuthResource = class extends require_render.BaseResource {
1613
1630
  super(http);
1614
1631
  this.#auth = deps.auth;
1615
1632
  }
1616
- /** Разрешённые регионы и примеры номеров. */
1633
+ /** Разрешённые регионы, примеры номеров и доступные способы подтверждения. */
1617
1634
  config(options = {}) {
1618
1635
  return this.#request(AUTH_PHONE_CONFIG, "/phone/config", void 0, options);
1619
1636
  }
@@ -1654,6 +1671,29 @@ var PhoneAuthResource = class extends require_render.BaseResource {
1654
1671
  });
1655
1672
  }
1656
1673
  /**
1674
+ * Возобновляет незавершённую проверку номера.
1675
+ *
1676
+ * Передайте номер и `flowToken` из {@link start}. Для следующих шагов используйте тот же
1677
+ * токен и параметры доставки из ответа.
1678
+ */
1679
+ resume({ phone, flowToken }, options = {}) {
1680
+ return this.http.execute(AUTH_PHONE_RESUME, {
1681
+ ...options,
1682
+ path: "/api/v1/auth/phone/resume",
1683
+ body: {
1684
+ phone,
1685
+ flowToken
1686
+ },
1687
+ redirect: "error",
1688
+ skipAuth: true,
1689
+ skipAuthRefresh: true,
1690
+ headers: {
1691
+ ...options.headers,
1692
+ "X-ITD-Phone-Resume": "1"
1693
+ }
1694
+ });
1695
+ }
1696
+ /**
1657
1697
  * Подтверждает код без email и пароля.
1658
1698
  *
1659
1699
  * При accessToken сохраняет новую сессию; при step: 'password' возвращает секрет
@@ -1724,7 +1764,7 @@ var PhoneAuthResource = class extends require_render.BaseResource {
1724
1764
  }
1725
1765
  /**
1726
1766
  * Выполняет телефонный запрос без Bearer/refresh через общий pipeline.
1727
- * X-ITD-Phone-Reverse объявляет поддержку обратного звонка и требуется для reverse-операций.
1767
+ * X-ITD-Phone-Reverse объявляет поддержку исходящего звонка, в том числе при запросе кода.
1728
1768
  */
1729
1769
  #request(operation, path, body, options, cookies) {
1730
1770
  return this.http.execute(operation, {
@@ -1736,7 +1776,10 @@ var PhoneAuthResource = class extends require_render.BaseResource {
1736
1776
  skipAuthRefresh: true,
1737
1777
  headers: {
1738
1778
  ...options.headers,
1739
- ...operation.method === "POST" ? { "X-ITD-Phone-Reverse": "1" } : {},
1779
+ ...operation.method === "POST" ? {
1780
+ "X-ITD-Phone-Reverse": "1",
1781
+ "X-ITD-Flow-Expiry": "1"
1782
+ } : {},
1740
1783
  ...path.startsWith("/phone/reverse/") ? { "X-ITD-Reverse-Attempts": "1" } : {}
1741
1784
  }
1742
1785
  });