woodsportal-client-sdk 4.0.8-dev.3 → 4.0.8-dev.4

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.
@@ -834,4 +834,4 @@ declare function buildErrorDescription({ errorMessage, detailedMessage, fallback
834
834
  errorCode?: string;
835
835
  }): string;
836
836
 
837
- export { setAccessToken as $, totpEnrollStart as A, totpEnrollVerify as B, totpDisable as C, phoneUnverify as D, backupCodesRegenerate as E, mfaOptOut as F, webauthnRegisterOptions as G, webauthnRegisterVerify as H, webauthnAuthOptions as I, webauthnAuthVerify as J, listWebauthnCredentials as K, deleteWebauthnCredential as L, passkeyLoginOptions as M, passkeyLoginVerify as N, getSecurityOverview as O, getSecurityLoginActivity as P, getSecuritySessions as Q, revokeSecuritySession as R, revokeOtherSecuritySessions as S, getLoginBootstrap as T, getSsoDetails as U, generateSsoUrl as V, ssoCallback as W, getRefreshToken as X, refreshSession as Y, getAuthRefreshToken as Z, getAccessToken as _, logout as a, getHttpErrorMessage as a$, clearAccessToken as a0, isAuthenticated as a1, isAuthenticateApp as a2, isAccessTokenExpired as a3, isExpiresAccessToken as a4, hasRefreshSession as a5, hasValidAccessToken as a6, didLastRefreshFail as a7, isSessionRefreshExhausted as a8, isRefreshInFlight as a9, type LoginHistoryRow as aA, type LoginResponseData as aB, type MfaBootRecoveryResult as aC, type MfaEnrollmentStatus as aD, type MfaMethod as aE, type MfaMethodOption as aF, type MfaPendingAccessToken as aG, type MfaPortalScopeContext as aH, type MfaStorageLane as aI, type PaginationResponse as aJ, type ResolveApiErrorDisplayOptions as aK, type ResolvedApiErrorDisplay as aL, SERVICE_UNAVAILABLE_MESSAGE as aM, type SecurityOverview as aN, SessionRefreshDeferredError as aO, SessionRefreshFailedError as aP, type StoredAuthError as aQ, type TwoFaVerificationRequest as aR, type UnauthorizedPageCopy as aS, WOODSPORTAL_API_ACTIVE_ERROR_CODES as aT, type WoodsportalRequestConfig as aU, buildErrorDescription as aV, classifyHttpError as aW, clearMfaPendingAccessToken as aX, getApiErrorFromUnknown as aY, getFieldErrors as aZ, getFormErrors as a_, resetSessionAuthState as aa, clearSessionRefreshExhaustedState as ab, hydrateSessionRefreshState as ac, type SessionContractInput as ad, API_ERROR_CATEGORY_FALLBACK as ae, API_ERROR_DISPLAY_CONFIG as af, type ActiveSession as ag, type ApiErrorDisplayConfig as ah, type ApiErrorPayload as ai, type ApiErrorVariant as aj, type AuthErrorAction as ak, AuthErrorCode as al, type AuthErrorCodeValue as am, type AuthFunnelState as an, type AuthInterceptorPolicyConfig as ao, type AuthPolicyRoutes as ap, type AuthRouteAction as aq, type EditorPreviewMockHandler as ar, type EditorPreviewMockResult as as, type HttpClientConfig as at, type HttpErrorKind as au, type HydrateMfaPendingAccessTokenInput as av, type LoginBootstrapMfaPolicy as aw, type LoginBootstrapPortal as ax, type LoginBootstrapResponse as ay, type LoginBootstrapSsoProvider as az, registerExistingUser as b, getUnauthorizedPageCopy as b0, hasAuthenticatedAccess as b1, hasValidAccess as b2, hydrateMfaPendingAccessToken as b3, initializeHttpClient as b4, isFullyAuthenticated as b5, isMfaPendingAccessSession as b6, isMfaPendingSession as b7, isOptionalAuthFailureUrl as b8, isServiceUnavailableError as b9, type TotpEnrollVerifyRequest as bA, type TotpDisableRequest as bB, type PhoneUnverifyRequest as bC, type BackupCodesRegenerateRequest as bD, type MfaBackupCodesResponse as bE, type MfaOptOutRequest as bF, type WebAuthnVerifyRequest as bG, type PasskeyLoginOptionsRequest as bH, type PasskeyLoginVerifyRequest as bI, type SecurityOverviewQuery as bJ, type SecurityLoginActivityQuery as bK, type SecuritySessionsQuery as bL, type RevokeSecuritySessionPayload as bM, type LogLevel as bN, type StorageKeyConfig as bO, configureStorageKeys as bP, getStorageKeys as bQ, resetStorageKeysForTests as bR, isSessionProbeUrl as ba, isSessionRefreshDeferredError as bb, isSessionRefreshFailedError as bc, parseApiErrorPayload as bd, persistAuthError as be, readMfaPendingAccessToken as bf, readPersistedAuthError as bg, recoverMfaGateOnBoot as bh, resolveApiErrorDisplay as bi, resolveAuthErrorAction as bj, resolveAuthRouteAction as bk, setEditorPreviewMockHandler as bl, setSessionLifecycleListener as bm, startVisibilityRefreshScheduler as bn, stopVisibilityRefreshScheduler as bo, storeMfaPendingAccessToken as bp, type ApiContentVariant as bq, type ApiErrorSeverity as br, type LoggerConfig as bs, type MfaOtpSendRequest as bt, type MfaPendingPasskeyOptionsRequest as bu, type MfaPendingPasskeyVerifyRequest as bv, type MfaStatusQuery as bw, type MfaPreferenceRequest as bx, type PhoneVerifyStartRequest as by, type PhoneVerifyConfirmRequest as bz, clientSession as c, verifyForgotPasswordOtp as d, resetPassword as e, forgetPassword as f, resetPasswordVerifyToken as g, handoff as h, verifyEmailResend as i, resendEmail as j, changePassword as k, login as l, me as m, profile as n, profileUpdate as o, preLogin as p, verifyOtp as q, register as r, sendMfaOtp as s, pendingPasskeyOptions as t, pendingPasskeyVerify as u, verifyEmail as v, getMfaStatus as w, setMfaPreferences as x, startPhoneVerify as y, confirmPhoneVerify as z };
837
+ export { setAccessToken as $, totpEnrollStart as A, totpEnrollVerify as B, totpDisable as C, phoneUnverify as D, backupCodesRegenerate as E, mfaOptOut as F, webauthnRegisterOptions as G, webauthnRegisterVerify as H, webauthnAuthOptions as I, webauthnAuthVerify as J, listWebauthnCredentials as K, deleteWebauthnCredential as L, passkeyLoginOptions as M, passkeyLoginVerify as N, getSecurityOverview as O, getSecurityLoginActivity as P, getSecuritySessions as Q, revokeSecuritySession as R, revokeOtherSecuritySessions as S, getLoginBootstrap as T, getSsoDetails as U, generateSsoUrl as V, ssoCallback as W, getRefreshToken as X, refreshSession as Y, getAuthRefreshToken as Z, getAccessToken as _, logout as a, getHttpErrorMessage as a$, clearAccessToken as a0, isAuthenticated as a1, isAuthenticateApp as a2, isAccessTokenExpired as a3, isExpiresAccessToken as a4, hasRefreshSession as a5, hasValidAccessToken as a6, didLastRefreshFail as a7, isSessionRefreshExhausted as a8, isRefreshInFlight as a9, type LoginHistoryRow as aA, type LoginResponseData as aB, type MfaBootRecoveryResult as aC, type MfaEnrollmentStatus as aD, type MfaMethod as aE, type MfaMethodOption as aF, type MfaPendingAccessToken as aG, type MfaPortalScopeContext as aH, type MfaStorageLane as aI, type PaginationResponse as aJ, type ResolveApiErrorDisplayOptions as aK, type ResolvedApiErrorDisplay as aL, SERVICE_UNAVAILABLE_MESSAGE as aM, type SecurityOverview as aN, SessionRefreshDeferredError as aO, SessionRefreshFailedError as aP, type StoredAuthError as aQ, type TwoFaVerificationRequest as aR, type UnauthorizedPageCopy as aS, WOODSPORTAL_API_ACTIVE_ERROR_CODES as aT, type WoodsportalRequestConfig as aU, buildErrorDescription as aV, classifyHttpError as aW, clearMfaPendingAccessToken as aX, getApiErrorFromUnknown as aY, getFieldErrors as aZ, getFormErrors as a_, resetSessionAuthState as aa, clearSessionRefreshExhaustedState as ab, hydrateSessionRefreshState as ac, type SessionContractInput as ad, API_ERROR_CATEGORY_FALLBACK as ae, API_ERROR_DISPLAY_CONFIG as af, type ActiveSession as ag, type ApiErrorDisplayConfig as ah, type ApiErrorPayload as ai, type ApiErrorVariant as aj, type AuthErrorAction as ak, AuthErrorCode as al, type AuthErrorCodeValue as am, type AuthFunnelState as an, type AuthInterceptorPolicyConfig as ao, type AuthPolicyRoutes as ap, type AuthRouteAction as aq, type EditorPreviewMockHandler as ar, type EditorPreviewMockResult as as, type HttpClientConfig as at, type HttpErrorKind as au, type HydrateMfaPendingAccessTokenInput as av, type LoginBootstrapMfaPolicy as aw, type LoginBootstrapPortal as ax, type LoginBootstrapResponse as ay, type LoginBootstrapSsoProvider as az, registerExistingUser as b, getUnauthorizedPageCopy as b0, hasAuthenticatedAccess as b1, hasValidAccess as b2, hydrateMfaPendingAccessToken as b3, initializeHttpClient as b4, isFullyAuthenticated as b5, isMfaPendingAccessSession as b6, isMfaPendingSession as b7, isOptionalAuthFailureUrl as b8, isServiceUnavailableError as b9, type TotpEnrollVerifyRequest as bA, type TotpDisableRequest as bB, type PhoneUnverifyRequest as bC, type BackupCodesRegenerateRequest as bD, type MfaBackupCodesResponse as bE, type MfaOptOutRequest as bF, type WebAuthnVerifyRequest as bG, type PasskeyLoginOptionsRequest as bH, type PasskeyLoginVerifyRequest as bI, type SecurityOverviewQuery as bJ, type SecurityLoginActivityQuery as bK, type SecuritySessionsQuery as bL, type RevokeSecuritySessionPayload as bM, type LogLevel as bN, type LogMeta as bO, type StorageKeyConfig as bP, configureStorageKeys as bQ, getStorageKeys as bR, resetStorageKeysForTests as bS, isSessionProbeUrl as ba, isSessionRefreshDeferredError as bb, isSessionRefreshFailedError as bc, parseApiErrorPayload as bd, persistAuthError as be, readMfaPendingAccessToken as bf, readPersistedAuthError as bg, recoverMfaGateOnBoot as bh, resolveApiErrorDisplay as bi, resolveAuthErrorAction as bj, resolveAuthRouteAction as bk, setEditorPreviewMockHandler as bl, setSessionLifecycleListener as bm, startVisibilityRefreshScheduler as bn, stopVisibilityRefreshScheduler as bo, storeMfaPendingAccessToken as bp, type ApiContentVariant as bq, type ApiErrorSeverity as br, type LoggerConfig as bs, type MfaOtpSendRequest as bt, type MfaPendingPasskeyOptionsRequest as bu, type MfaPendingPasskeyVerifyRequest as bv, type MfaStatusQuery as bw, type MfaPreferenceRequest as bx, type PhoneVerifyStartRequest as by, type PhoneVerifyConfirmRequest as bz, clientSession as c, verifyForgotPasswordOtp as d, resetPassword as e, forgetPassword as f, resetPasswordVerifyToken as g, handoff as h, verifyEmailResend as i, resendEmail as j, changePassword as k, login as l, me as m, profile as n, profileUpdate as o, preLogin as p, verifyOtp as q, register as r, sendMfaOtp as s, pendingPasskeyOptions as t, pendingPasskeyVerify as u, verifyEmail as v, getMfaStatus as w, setMfaPreferences as x, startPhoneVerify as y, confirmPhoneVerify as z };
@@ -1,5 +1,5 @@
1
- import { p as preLogin, l as login, c as clientSession, h as handoff, a as logout, r as register, v as verifyEmail, b as registerExistingUser, f as forgetPassword, d as verifyForgotPasswordOtp, e as resetPassword, g as resetPasswordVerifyToken, i as verifyEmailResend, j as resendEmail, k as changePassword, m as me, n as profile, o as profileUpdate, q as verifyOtp, s as sendMfaOtp, t as pendingPasskeyOptions, u as pendingPasskeyVerify, w as getMfaStatus, x as setMfaPreferences, y as startPhoneVerify, z as confirmPhoneVerify, A as totpEnrollStart, B as totpEnrollVerify, C as totpDisable, D as phoneUnverify, E as backupCodesRegenerate, F as mfaOptOut, G as webauthnRegisterOptions, H as webauthnRegisterVerify, I as webauthnAuthOptions, J as webauthnAuthVerify, K as listWebauthnCredentials, L as deleteWebauthnCredential, M as passkeyLoginOptions, N as passkeyLoginVerify, O as getSecurityOverview, P as getSecurityLoginActivity, Q as getSecuritySessions, R as revokeSecuritySession, S as revokeOtherSecuritySessions, T as getLoginBootstrap, U as getSsoDetails, V as generateSsoUrl, W as ssoCallback, X as getRefreshToken, Y as refreshSession, Z as getAuthRefreshToken, _ as getAccessToken, $ as setAccessToken, a0 as clearAccessToken, a1 as isAuthenticated, a2 as isAuthenticateApp, a3 as isAccessTokenExpired, a4 as isExpiresAccessToken, a5 as hasRefreshSession, a6 as hasValidAccessToken, a7 as didLastRefreshFail, a8 as isSessionRefreshExhausted, a9 as isRefreshInFlight, aa as resetSessionAuthState, ab as clearSessionRefreshExhaustedState, ac as hydrateSessionRefreshState, ad as SessionContractInput } from '../build-error-description-DME5DFxq.js';
2
- export { ae as API_ERROR_CATEGORY_FALLBACK, af as API_ERROR_DISPLAY_CONFIG, ag as ActiveSession, ah as ApiErrorDisplayConfig, ai as ApiErrorPayload, aj as ApiErrorVariant, ak as AuthErrorAction, al as AuthErrorCode, am as AuthErrorCodeValue, an as AuthFunnelState, ao as AuthInterceptorPolicyConfig, ap as AuthPolicyRoutes, aq as AuthRouteAction, ar as EditorPreviewMockHandler, as as EditorPreviewMockResult, at as HttpClientConfig, au as HttpErrorKind, av as HydrateMfaPendingAccessTokenInput, aw as LoginBootstrapMfaPolicy, ax as LoginBootstrapPortal, ay as LoginBootstrapResponse, az as LoginBootstrapSsoProvider, aA as LoginHistoryRow, aB as LoginResponseData, aC as MfaBootRecoveryResult, aD as MfaEnrollmentStatus, aE as MfaMethod, aF as MfaMethodOption, aG as MfaPendingAccessToken, aH as MfaPortalScopeContext, aI as MfaStorageLane, aJ as PaginationResponse, aK as ResolveApiErrorDisplayOptions, aL as ResolvedApiErrorDisplay, aM as SERVICE_UNAVAILABLE_MESSAGE, aN as SecurityOverview, aO as SessionRefreshDeferredError, aP as SessionRefreshFailedError, aQ as StoredAuthError, aR as TwoFaVerificationRequest, aS as UnauthorizedPageCopy, aT as WOODSPORTAL_API_ACTIVE_ERROR_CODES, aU as WoodsportalRequestConfig, aV as buildErrorDescription, aW as classifyHttpError, aX as clearMfaPendingAccessToken, aY as getApiErrorFromUnknown, aZ as getFieldErrors, a_ as getFormErrors, a$ as getHttpErrorMessage, b0 as getUnauthorizedPageCopy, b1 as hasAuthenticatedAccess, b2 as hasValidAccess, b3 as hydrateMfaPendingAccessToken, b4 as initializeHttpClient, b5 as isFullyAuthenticated, b6 as isMfaPendingAccessSession, b7 as isMfaPendingSession, b8 as isOptionalAuthFailureUrl, b9 as isServiceUnavailableError, ba as isSessionProbeUrl, bb as isSessionRefreshDeferredError, bc as isSessionRefreshFailedError, bd as parseApiErrorPayload, be as persistAuthError, bf as readMfaPendingAccessToken, bg as readPersistedAuthError, bh as recoverMfaGateOnBoot, bi as resolveApiErrorDisplay, bj as resolveAuthErrorAction, bk as resolveAuthRouteAction, bl as setEditorPreviewMockHandler, bm as setSessionLifecycleListener, bn as startVisibilityRefreshScheduler, bo as stopVisibilityRefreshScheduler, bp as storeMfaPendingAccessToken } from '../build-error-description-DME5DFxq.js';
1
+ import { p as preLogin, l as login, c as clientSession, h as handoff, a as logout, r as register, v as verifyEmail, b as registerExistingUser, f as forgetPassword, d as verifyForgotPasswordOtp, e as resetPassword, g as resetPasswordVerifyToken, i as verifyEmailResend, j as resendEmail, k as changePassword, m as me, n as profile, o as profileUpdate, q as verifyOtp, s as sendMfaOtp, t as pendingPasskeyOptions, u as pendingPasskeyVerify, w as getMfaStatus, x as setMfaPreferences, y as startPhoneVerify, z as confirmPhoneVerify, A as totpEnrollStart, B as totpEnrollVerify, C as totpDisable, D as phoneUnverify, E as backupCodesRegenerate, F as mfaOptOut, G as webauthnRegisterOptions, H as webauthnRegisterVerify, I as webauthnAuthOptions, J as webauthnAuthVerify, K as listWebauthnCredentials, L as deleteWebauthnCredential, M as passkeyLoginOptions, N as passkeyLoginVerify, O as getSecurityOverview, P as getSecurityLoginActivity, Q as getSecuritySessions, R as revokeSecuritySession, S as revokeOtherSecuritySessions, T as getLoginBootstrap, U as getSsoDetails, V as generateSsoUrl, W as ssoCallback, X as getRefreshToken, Y as refreshSession, Z as getAuthRefreshToken, _ as getAccessToken, $ as setAccessToken, a0 as clearAccessToken, a1 as isAuthenticated, a2 as isAuthenticateApp, a3 as isAccessTokenExpired, a4 as isExpiresAccessToken, a5 as hasRefreshSession, a6 as hasValidAccessToken, a7 as didLastRefreshFail, a8 as isSessionRefreshExhausted, a9 as isRefreshInFlight, aa as resetSessionAuthState, ab as clearSessionRefreshExhaustedState, ac as hydrateSessionRefreshState, ad as SessionContractInput } from '../build-error-description-CZ4lztT8.js';
2
+ export { ae as API_ERROR_CATEGORY_FALLBACK, af as API_ERROR_DISPLAY_CONFIG, ag as ActiveSession, ah as ApiErrorDisplayConfig, ai as ApiErrorPayload, aj as ApiErrorVariant, ak as AuthErrorAction, al as AuthErrorCode, am as AuthErrorCodeValue, an as AuthFunnelState, ao as AuthInterceptorPolicyConfig, ap as AuthPolicyRoutes, aq as AuthRouteAction, ar as EditorPreviewMockHandler, as as EditorPreviewMockResult, at as HttpClientConfig, au as HttpErrorKind, av as HydrateMfaPendingAccessTokenInput, aw as LoginBootstrapMfaPolicy, ax as LoginBootstrapPortal, ay as LoginBootstrapResponse, az as LoginBootstrapSsoProvider, aA as LoginHistoryRow, aB as LoginResponseData, aC as MfaBootRecoveryResult, aD as MfaEnrollmentStatus, aE as MfaMethod, aF as MfaMethodOption, aG as MfaPendingAccessToken, aH as MfaPortalScopeContext, aI as MfaStorageLane, aJ as PaginationResponse, aK as ResolveApiErrorDisplayOptions, aL as ResolvedApiErrorDisplay, aM as SERVICE_UNAVAILABLE_MESSAGE, aN as SecurityOverview, aO as SessionRefreshDeferredError, aP as SessionRefreshFailedError, aQ as StoredAuthError, aR as TwoFaVerificationRequest, aS as UnauthorizedPageCopy, aT as WOODSPORTAL_API_ACTIVE_ERROR_CODES, aU as WoodsportalRequestConfig, aV as buildErrorDescription, aW as classifyHttpError, aX as clearMfaPendingAccessToken, aY as getApiErrorFromUnknown, aZ as getFieldErrors, a_ as getFormErrors, a$ as getHttpErrorMessage, b0 as getUnauthorizedPageCopy, b1 as hasAuthenticatedAccess, b2 as hasValidAccess, b3 as hydrateMfaPendingAccessToken, b4 as initializeHttpClient, b5 as isFullyAuthenticated, b6 as isMfaPendingAccessSession, b7 as isMfaPendingSession, b8 as isOptionalAuthFailureUrl, b9 as isServiceUnavailableError, ba as isSessionProbeUrl, bb as isSessionRefreshDeferredError, bc as isSessionRefreshFailedError, bd as parseApiErrorPayload, be as persistAuthError, bf as readMfaPendingAccessToken, bg as readPersistedAuthError, bh as recoverMfaGateOnBoot, bi as resolveApiErrorDisplay, bj as resolveAuthErrorAction, bk as resolveAuthRouteAction, bl as setEditorPreviewMockHandler, bm as setSessionLifecycleListener, bn as startVisibilityRefreshScheduler, bo as stopVisibilityRefreshScheduler, bp as storeMfaPendingAccessToken } from '../build-error-description-CZ4lztT8.js';
3
3
  export { C as ChangePasswordPayload, F as ForgetPasswordPayload, L as LoginPayload, P as PreLoginPayload, R as ResetPasswordPayload, a as ResetPasswordVerifyTokenPayload, V as VerifyEmailPayload } from '../index-B-IGDI9L.js';
4
4
  import 'axios';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { T as TableUiState, a as TableState, U as UserState, N as NoteState, E as EmailState, S as SyncState } from './use-sync-DpazhM4d.js';
2
2
  import { l as list, a as list$1, b as list$2, s as sideBarList, f as form, o as objectFormOptions, d as details, u as update, c as create, e as createExisting, r as removeExisting, g as list$3, h as create$1, i as update$1, j as list$4, k as create$2, m as update$2, n as list$5, p as details$1, q as download, t as addFolder, v as addFile, w as imageUpload, x as attachmentUpload, y as purge, z as purgeStatus, E as CachePurgeTarget, D as CachePurgeRequest, A as CachePurgeListQuery, F as CachePurgeView, G as CreateCachePurgeJobOptions, L as PurgeResult, H as CrmCachePurgeOptions } from './pipeline-ui-COO9b3x2.js';
3
3
  export { C as CachePurgeDomain, B as CachePurgeMode, I as HUBSPOT_DEALS_OBJECT_TYPE_ID, J as HUBSPOT_TICKETS_OBJECT_TYPE_ID, P as PIPELINE_BOARD_OBJECT_TYPE_IDS, K as PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, M as isPipelineBoardObjectType, N as isPipelineBoardObjectTypeId, O as shouldShowPipelineSelector, Q as supportsBoardView } from './pipeline-ui-COO9b3x2.js';
4
- import { p as preLogin, l as login, c as clientSession, h as handoff, a as logout, r as register, v as verifyEmail, b as registerExistingUser, f as forgetPassword, d as verifyForgotPasswordOtp, e as resetPassword, g as resetPasswordVerifyToken, i as verifyEmailResend, j as resendEmail, k as changePassword, m as me, n as profile, o as profileUpdate, q as verifyOtp, s as sendMfaOtp, t as pendingPasskeyOptions, u as pendingPasskeyVerify, w as getMfaStatus, x as setMfaPreferences, y as startPhoneVerify, z as confirmPhoneVerify, A as totpEnrollStart, B as totpEnrollVerify, C as totpDisable, D as phoneUnverify, E as backupCodesRegenerate, F as mfaOptOut, G as webauthnRegisterOptions, H as webauthnRegisterVerify, I as webauthnAuthOptions, J as webauthnAuthVerify, K as listWebauthnCredentials, L as deleteWebauthnCredential, M as passkeyLoginOptions, N as passkeyLoginVerify, O as getSecurityOverview, P as getSecurityLoginActivity, Q as getSecuritySessions, R as revokeSecuritySession, S as revokeOtherSecuritySessions, T as getLoginBootstrap, U as getSsoDetails, V as generateSsoUrl, W as ssoCallback, X as getRefreshToken, Y as refreshSession, Z as getAuthRefreshToken, _ as getAccessToken, $ as setAccessToken, a0 as clearAccessToken, a1 as isAuthenticated, a2 as isAuthenticateApp, a3 as isAccessTokenExpired, a4 as isExpiresAccessToken, a5 as hasRefreshSession, a6 as hasValidAccessToken, a7 as didLastRefreshFail, a8 as isSessionRefreshExhausted, a9 as isRefreshInFlight, aa as resetSessionAuthState, ab as clearSessionRefreshExhaustedState, ac as hydrateSessionRefreshState, ad as SessionContractInput, at as HttpClientConfig, aL as ResolvedApiErrorDisplay, bq as ApiContentVariant, br as ApiErrorSeverity, aK as ResolveApiErrorDisplayOptions, bs as LoggerConfig, aR as TwoFaVerificationRequest, bt as MfaOtpSendRequest, bu as MfaPendingPasskeyOptionsRequest, bv as MfaPendingPasskeyVerifyRequest, bw as MfaStatusQuery, bx as MfaPreferenceRequest, by as PhoneVerifyStartRequest, bz as PhoneVerifyConfirmRequest, bA as TotpEnrollVerifyRequest, bB as TotpDisableRequest, bC as PhoneUnverifyRequest, bD as BackupCodesRegenerateRequest, bE as MfaBackupCodesResponse, bF as MfaOptOutRequest, bG as WebAuthnVerifyRequest, bH as PasskeyLoginOptionsRequest, bI as PasskeyLoginVerifyRequest, bJ as SecurityOverviewQuery, bK as SecurityLoginActivityQuery, bL as SecuritySessionsQuery, bM as RevokeSecuritySessionPayload } from './build-error-description-DME5DFxq.js';
5
- export { ae as API_ERROR_CATEGORY_FALLBACK, af as API_ERROR_DISPLAY_CONFIG, ag as ActiveSession, ah as ApiErrorDisplayConfig, ai as ApiErrorPayload, aj as ApiErrorVariant, ak as AuthErrorAction, al as AuthErrorCode, am as AuthErrorCodeValue, an as AuthFunnelState, ao as AuthInterceptorPolicyConfig, ap as AuthPolicyRoutes, aq as AuthRouteAction, au as HttpErrorKind, av as HydrateMfaPendingAccessTokenInput, bN as LogLevel, aA as LoginHistoryRow, aB as LoginResponseData, aC as MfaBootRecoveryResult, aD as MfaEnrollmentStatus, aE as MfaMethod, aF as MfaMethodOption, aG as MfaPendingAccessToken, aH as MfaPortalScopeContext, aI as MfaStorageLane, aJ as PaginationResponse, aM as SERVICE_UNAVAILABLE_MESSAGE, aN as SecurityOverview, aO as SessionRefreshDeferredError, aP as SessionRefreshFailedError, bO as StorageKeyConfig, aQ as StoredAuthError, aS as UnauthorizedPageCopy, aT as WOODSPORTAL_API_ACTIVE_ERROR_CODES, aU as WoodsportalRequestConfig, aV as buildErrorDescription, aW as classifyHttpError, aX as clearMfaPendingAccessToken, bP as configureStorageKeys, aY as getApiErrorFromUnknown, aZ as getFieldErrors, a_ as getFormErrors, a$ as getHttpErrorMessage, bQ as getStorageKeys, b0 as getUnauthorizedPageCopy, b1 as hasAuthenticatedAccess, b2 as hasValidAccess, b3 as hydrateMfaPendingAccessToken, b4 as initializeHttpClient, b5 as isFullyAuthenticated, b6 as isMfaPendingAccessSession, b7 as isMfaPendingSession, b8 as isOptionalAuthFailureUrl, b9 as isServiceUnavailableError, ba as isSessionProbeUrl, bb as isSessionRefreshDeferredError, bc as isSessionRefreshFailedError, bd as parseApiErrorPayload, be as persistAuthError, bf as readMfaPendingAccessToken, bg as readPersistedAuthError, bh as recoverMfaGateOnBoot, bR as resetStorageKeysForTests, bi as resolveApiErrorDisplay, bj as resolveAuthErrorAction, bk as resolveAuthRouteAction, bm as setSessionLifecycleListener, bn as startVisibilityRefreshScheduler, bo as stopVisibilityRefreshScheduler, bp as storeMfaPendingAccessToken } from './build-error-description-DME5DFxq.js';
4
+ import { p as preLogin, l as login, c as clientSession, h as handoff, a as logout, r as register, v as verifyEmail, b as registerExistingUser, f as forgetPassword, d as verifyForgotPasswordOtp, e as resetPassword, g as resetPasswordVerifyToken, i as verifyEmailResend, j as resendEmail, k as changePassword, m as me, n as profile, o as profileUpdate, q as verifyOtp, s as sendMfaOtp, t as pendingPasskeyOptions, u as pendingPasskeyVerify, w as getMfaStatus, x as setMfaPreferences, y as startPhoneVerify, z as confirmPhoneVerify, A as totpEnrollStart, B as totpEnrollVerify, C as totpDisable, D as phoneUnverify, E as backupCodesRegenerate, F as mfaOptOut, G as webauthnRegisterOptions, H as webauthnRegisterVerify, I as webauthnAuthOptions, J as webauthnAuthVerify, K as listWebauthnCredentials, L as deleteWebauthnCredential, M as passkeyLoginOptions, N as passkeyLoginVerify, O as getSecurityOverview, P as getSecurityLoginActivity, Q as getSecuritySessions, R as revokeSecuritySession, S as revokeOtherSecuritySessions, T as getLoginBootstrap, U as getSsoDetails, V as generateSsoUrl, W as ssoCallback, X as getRefreshToken, Y as refreshSession, Z as getAuthRefreshToken, _ as getAccessToken, $ as setAccessToken, a0 as clearAccessToken, a1 as isAuthenticated, a2 as isAuthenticateApp, a3 as isAccessTokenExpired, a4 as isExpiresAccessToken, a5 as hasRefreshSession, a6 as hasValidAccessToken, a7 as didLastRefreshFail, a8 as isSessionRefreshExhausted, a9 as isRefreshInFlight, aa as resetSessionAuthState, ab as clearSessionRefreshExhaustedState, ac as hydrateSessionRefreshState, ad as SessionContractInput, at as HttpClientConfig, aL as ResolvedApiErrorDisplay, bq as ApiContentVariant, br as ApiErrorSeverity, aK as ResolveApiErrorDisplayOptions, bs as LoggerConfig, aR as TwoFaVerificationRequest, bt as MfaOtpSendRequest, bu as MfaPendingPasskeyOptionsRequest, bv as MfaPendingPasskeyVerifyRequest, bw as MfaStatusQuery, bx as MfaPreferenceRequest, by as PhoneVerifyStartRequest, bz as PhoneVerifyConfirmRequest, bA as TotpEnrollVerifyRequest, bB as TotpDisableRequest, bC as PhoneUnverifyRequest, bD as BackupCodesRegenerateRequest, bE as MfaBackupCodesResponse, bF as MfaOptOutRequest, bG as WebAuthnVerifyRequest, bH as PasskeyLoginOptionsRequest, bI as PasskeyLoginVerifyRequest, bJ as SecurityOverviewQuery, bK as SecurityLoginActivityQuery, bL as SecuritySessionsQuery, bM as RevokeSecuritySessionPayload } from './build-error-description-CZ4lztT8.js';
5
+ export { ae as API_ERROR_CATEGORY_FALLBACK, af as API_ERROR_DISPLAY_CONFIG, ag as ActiveSession, ah as ApiErrorDisplayConfig, ai as ApiErrorPayload, aj as ApiErrorVariant, ak as AuthErrorAction, al as AuthErrorCode, am as AuthErrorCodeValue, an as AuthFunnelState, ao as AuthInterceptorPolicyConfig, ap as AuthPolicyRoutes, aq as AuthRouteAction, au as HttpErrorKind, av as HydrateMfaPendingAccessTokenInput, bN as LogLevel, bO as LogMeta, aA as LoginHistoryRow, aB as LoginResponseData, aC as MfaBootRecoveryResult, aD as MfaEnrollmentStatus, aE as MfaMethod, aF as MfaMethodOption, aG as MfaPendingAccessToken, aH as MfaPortalScopeContext, aI as MfaStorageLane, aJ as PaginationResponse, aM as SERVICE_UNAVAILABLE_MESSAGE, aN as SecurityOverview, aO as SessionRefreshDeferredError, aP as SessionRefreshFailedError, bP as StorageKeyConfig, aQ as StoredAuthError, aS as UnauthorizedPageCopy, aT as WOODSPORTAL_API_ACTIVE_ERROR_CODES, aU as WoodsportalRequestConfig, aV as buildErrorDescription, aW as classifyHttpError, aX as clearMfaPendingAccessToken, bQ as configureStorageKeys, aY as getApiErrorFromUnknown, aZ as getFieldErrors, a_ as getFormErrors, a$ as getHttpErrorMessage, bR as getStorageKeys, b0 as getUnauthorizedPageCopy, b1 as hasAuthenticatedAccess, b2 as hasValidAccess, b3 as hydrateMfaPendingAccessToken, b4 as initializeHttpClient, b5 as isFullyAuthenticated, b6 as isMfaPendingAccessSession, b7 as isMfaPendingSession, b8 as isOptionalAuthFailureUrl, b9 as isServiceUnavailableError, ba as isSessionProbeUrl, bb as isSessionRefreshDeferredError, bc as isSessionRefreshFailedError, bd as parseApiErrorPayload, be as persistAuthError, bf as readMfaPendingAccessToken, bg as readPersistedAuthError, bh as recoverMfaGateOnBoot, bS as resetStorageKeysForTests, bi as resolveApiErrorDisplay, bj as resolveAuthErrorAction, bk as resolveAuthRouteAction, bm as setSessionLifecycleListener, bn as startVisibilityRefreshScheduler, bo as stopVisibilityRefreshScheduler, bp as storeMfaPendingAccessToken } from './build-error-description-CZ4lztT8.js';
6
6
  import { P as PreLoginPayload, L as LoginPayload, V as VerifyEmailPayload, a as ResetPasswordVerifyTokenPayload, R as ResetPasswordPayload, F as ForgetPasswordPayload, b as ForgetPasswordOtpVerifyPayload, C as ChangePasswordPayload } from './index-B-IGDI9L.js';
7
7
  export { c as Config, M as MutationOptions } from './index-B-IGDI9L.js';
8
8
  import 'axios';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main/features/accounts/client/accounts-client.ts","../src/main/api/nested-accounts-api.ts","../src/main/features/mobile/client/mobile-navigation-client.ts","../src/main/api/nested-mobile-api.ts","../src/main/api/compose-api.ts","../src/main/core/utils/datetime.ts","../src/main/core/http/mobile-client-config.ts","../src/main/index.ts"],"names":["storage","actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC1B,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAc,QAAQ,CAAA;AAAA,EACzD,WAAA,EAAa,CAAC,KAAA,KAAkB,UAAA,CAAW,IAAI,aAAA,CAAc,OAAA,EAAS,EAAE,KAAA,EAAO;AACnF,CAAA;;;ACFO,IAAM,WAAA,GAAc;AAAA,EACvB,cAAc,cAAA,CAAe,YAAA;AAAA,EAC7B,aAAa,cAAA,CAAe;AAChC,CAAA;;;ACJO,IAAM,sBAAA,GAAyB;AAAA,EAClC,aAAA,EAAe,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC9F,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC7F,aAAA,EAAe,CAAC,OAAA,KAAqB,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EA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O,YAAA,EAAc,SAAS,cAAA,EAAe;AAAA,EACxD,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,WAAYC,QAAA,EAAsB;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,EAAY,SAASA,QAAAA,EAAa;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA;AACvC","file":"index.js","sourcesContent":["import { API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const accountsClient = {\n listHubspots: () => HttpClient.get(API_ENDPOINTS.HUBSPOTS),\n listPortals: (hubId: number) => HttpClient.get(API_ENDPOINTS.PORTALS, { hubId })\n}\n","import { accountsClient } from '../features/accounts/client/accounts-client'\n\n/** Client account listing (hubspots / portals) for mobile and multi-account flows. */\nexport const accountsApi = {\n listHubspots: accountsClient.listHubspots,\n listPortals: accountsClient.listPortals\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const mobileNavigationClient = {\n getNavigation: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION })),\n getAppConfig: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_APP_CONFIG })),\n putNavigation: (payload: unknown) => HttpClient.put(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION }), payload),\n importFromWebMenu: (payload: unknown) => HttpClient.post(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION_IMPORT_WEB_MENU }), payload)\n}\n","import { mobileNavigationClient } from '../features/mobile/client/mobile-navigation-client'\n\n/** Mobile-specific API surface (navigation config, etc.). */\nexport const mobileApi = {\n getNavigation: mobileNavigationClient.getNavigation,\n getAppConfig: mobileNavigationClient.getAppConfig,\n putNavigation: mobileNavigationClient.putNavigation,\n importFromWebMenu: mobileNavigationClient.importFromWebMenu\n}\n","import { authApi } from './nested-auth-api'\nimport { crmApi } from './nested-crm-api'\nimport { navigationApi } from './navigation-api'\nimport { accountsApi } from './nested-accounts-api'\nimport { mobileApi } from './nested-mobile-api'\n\n/** Public API — nested domains only (SDK 4.0). */\nexport const api = {\n auth: authApi,\n crm: crmApi,\n navigation: navigationApi,\n accounts: accountsApi,\n mobile: mobileApi\n}\n","/** HubSpot portal default; override when portal timezone is available from config. */\nexport const DEFAULT_HUBSPOT_TIMEZONE = 'Asia/Kolkata'\n\n/**\n * Detect the runtime/browser IANA timezone (e.g. `Asia/Kolkata`).\n * Falls back to the WoodsPortal default timezone when unavailable.\n */\nexport function getCurrentTimeZone(): string {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_HUBSPOT_TIMEZONE\n } catch {\n return DEFAULT_HUBSPOT_TIMEZONE\n }\n}\n\n/**\n * Coerce HubSpot-style timestamps (ms string/number) to epoch milliseconds.\n */\nexport function normalizeToTimestamp(value: unknown): number | null {\n if (value == null || value === '') return null\n\n if (typeof value === 'number') {\n return value > 100_000_000_000 ? value : null\n }\n\n if (typeof value === 'string' && /^\\d+$/.test(value)) {\n const n = Number(value)\n return n > 100_000_000_000 ? n : null\n }\n\n if (typeof value === 'string' || value instanceof Date) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date.getTime()\n }\n\n return null\n}\n\n/**\n * GMT offset label aligned with HubSpot activity timeline (e.g. `GMT+5:30`).\n */\nexport function formatGmtOffset(timeZone: string = getCurrentTimeZone(), date: Date = new Date()): string {\n const raw = new Intl.DateTimeFormat('en-US', {\n timeZone,\n timeZoneName: 'longOffset'\n })\n .formatToParts(date)\n .find((part) => part.type === 'timeZoneName')?.value\n\n if (!raw) return ''\n\n // Intl may emit GMT+05:30; HubSpot uses GMT+5:30.\n return raw.replace(/GMT([+-])0(\\d)(?=:)/, 'GMT$1$2')\n}\n\nexport type HubSpotActivityDateTimeParts = {\n date: string\n time: string\n gmtOffset: string\n /** Full HubSpot-style label, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`. */\n formatted: string\n}\n\n/**\n * Format a HubSpot epoch-ms timestamp like the CRM activity timeline.\n */\nexport function formatHubSpotActivityDateTimeParts(timestamp: unknown, timeZone: string = getCurrentTimeZone()): HubSpotActivityDateTimeParts | null {\n const ms = normalizeToTimestamp(timestamp)\n if (ms == null) return null\n\n const date = new Date(ms)\n const datePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n }).format(date)\n const timePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n }).format(date)\n const gmtOffset = formatGmtOffset(timeZone, date)\n\n return {\n date: datePart,\n time: timePart,\n gmtOffset,\n formatted: `${datePart} at ${timePart} ${gmtOffset}`.trim()\n }\n}\n\n/**\n * @returns HubSpot activity string, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`, or empty string.\n */\nexport function formatHubSpotActivityDateTime(timestamp: unknown, timeZone: string = getCurrentTimeZone()): string {\n return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? ''\n}\n","import type { SessionStorageAdapter } from '../storage/session-storage-adapter'\nimport { registerSessionStorageAdapter } from '../storage/session-storage-registry'\nimport { setClientType } from './client-type'\nimport { initializeHttpClient, type HttpClientConfig } from './http-client'\nimport { hydrateSessionRefreshState } from './token-store'\nimport { hydrateMfaPendingAccessToken } from '../auth/mfa-pending-token-storage'\nimport { storAccessToken } from './token-store'\nimport { hydrateUserStoreFromSession } from '../../state/crm/use-user'\n\nexport type MobileClientConfig = HttpClientConfig & {\n storage: SessionStorageAdapter\n}\n\n/**\n * Configure the SDK for native/mobile hosts: pluggable storage, client type `mobile`,\n * and `X-Client-Type: mobile` on all HTTP requests.\n */\nexport function initializeMobileClient({ storage, ...httpConfig }: MobileClientConfig): void {\n registerSessionStorageAdapter(storage)\n setClientType('mobile')\n hydrateSessionRefreshState()\n void hydrateMfaPendingAccessToken({\n lane: 'c',\n setAccessToken: (token, expiresIn) => {\n storAccessToken(token, expiresIn)\n }\n })\n hydrateUserStoreFromSession()\n initializeHttpClient({\n ...httpConfig,\n headers: {\n 'X-Client-Type': 'mobile',\n ...httpConfig.headers\n }\n })\n}\n","/**\n * WoodsPortal client SDK — public entry module.\n *\n * Configure HTTP once with {@link initializeHttpClient} in production, then use\n * {@link api}, {@link store}, and {@link api.navigation}.\n */\nimport { api } from './api/compose-api'\nimport {\n tableStore,\n tableActions,\n tableUiStore,\n tableUiActions,\n userStore,\n userActions,\n noteStore,\n noteActions,\n emailStore,\n emailActions,\n syncStore,\n syncActions\n} from './state'\nimport { storage } from './core/utils/localStorage'\n\nexport {\n DEFAULT_HUBSPOT_TIMEZONE,\n getCurrentTimeZone,\n formatGmtOffset,\n formatHubSpotActivityDateTime,\n formatHubSpotActivityDateTimeParts,\n normalizeToTimestamp\n} from './core/utils/datetime'\nexport type { HubSpotActivityDateTimeParts } from './core/utils/datetime'\nexport {\n purgeCrmObjectDataCache,\n purgeCrmListCache,\n purgeCrmListCacheAfterCrmWrite,\n purgeCrmDetailAndListAfterCrmWrite,\n purgeCrmRecordCache,\n purgeEngagementCaches,\n purgeEngagementCachesAfterCrmWrite,\n purgeCrmCombined,\n buildCachePurgeRequest,\n buildCrmListPurgeTarget,\n buildCrmSinglePurgeTarget,\n buildEngagementPurgeTarget,\n buildPortalConfigPurgeTarget,\n buildUserSessionPurgeTarget,\n mergePurgeTargets,\n createCachePurgeJob,\n extractHubspotRecordIdFromWriteResponse,\n extractEngagementItemIdFromWriteResponse,\n resolveCrmListPurgeQuery,\n toCachePurgeListQuery\n} from './core/utils/cache'\nexport type { CrmCachePurgeOptions } from './core/types/cache-purge'\nexport type {\n CachePurgeRequest,\n CachePurgeTarget,\n CachePurgeListQuery,\n CachePurgeView,\n CachePurgeDomain,\n CachePurgeMode,\n PurgeResult,\n CreateCachePurgeJobOptions\n} from './core/types/cache-purge'\n\n/** Axios setup, error helpers, and {@link HttpClientConfig}. */\nexport { initializeHttpClient, getFormErrors, getFieldErrors } from './core/http/http-client'\nexport type { HttpClientConfig, StorageKeyConfig } from './core/http/http-client'\nexport { initializeMobileClient } from './core/http/mobile-client-config'\nexport type { MobileClientConfig } from './core/http/mobile-client-config'\nexport type { SessionStorageAdapter } from './core/storage/session-storage-adapter'\nexport { getClientType } from './core/http/client-type'\n\n/** Shared auth contract (client + admin consistency). */\nexport {\n AuthErrorCode,\n parseApiErrorPayload,\n getUnauthorizedPageCopy,\n resolveAuthErrorAction,\n isOptionalAuthFailureUrl,\n isSessionProbeUrl,\n persistAuthError,\n readPersistedAuthError,\n hasValidAccess,\n isFullyAuthenticated,\n isMfaPendingSession,\n hasAuthenticatedAccess,\n recoverMfaGateOnBoot,\n startVisibilityRefreshScheduler,\n stopVisibilityRefreshScheduler,\n resolveAuthRouteAction,\n storeMfaPendingAccessToken,\n readMfaPendingAccessToken,\n clearMfaPendingAccessToken,\n hydrateMfaPendingAccessToken,\n isMfaPendingAccessSession\n} from './core/auth/index.js'\nexport type {\n ApiErrorPayload,\n StoredAuthError,\n AuthErrorCodeValue,\n UnauthorizedPageCopy,\n AuthErrorAction,\n AuthPolicyRoutes,\n AuthInterceptorPolicyConfig,\n WoodsportalRequestConfig,\n SessionContractInput,\n MfaBootRecoveryResult,\n AuthRouteAction,\n AuthFunnelState,\n MfaStorageLane,\n MfaPendingAccessToken,\n HydrateMfaPendingAccessTokenInput\n} from './core/auth/index.js'\nexport { classifyHttpError, getHttpErrorMessage, isServiceUnavailableError, SERVICE_UNAVAILABLE_MESSAGE } from './core/http/http-errors'\nexport type { HttpErrorKind } from './core/http/http-errors'\nexport {\n SessionRefreshDeferredError,\n SessionRefreshFailedError,\n isSessionRefreshDeferredError,\n isSessionRefreshFailedError\n} from './core/http/session-refresh-errors'\n\nexport {\n API_ERROR_DISPLAY_CONFIG,\n API_ERROR_CATEGORY_FALLBACK,\n WOODSPORTAL_API_ACTIVE_ERROR_CODES,\n buildErrorDescription,\n getApiErrorFromUnknown,\n resolveApiErrorDisplay,\n resolveApiContentState,\n isExpectedApiError\n} from './core/errors/index.js'\nexport type {\n ApiErrorVariant,\n ApiContentVariant,\n ApiErrorSeverity,\n ApiErrorDisplayConfig,\n ResolvedApiErrorDisplay,\n ResolvedApiContentState,\n ResolveApiErrorDisplayOptions\n} from './core/errors/index.js'\n\nexport { configureLogger } from './core/logging/logger'\nexport type { LogLevel, LoggerConfig } from './core/logging/logger-types'\n\nexport { Client } from './core/http/client-assembler'\nexport { config as hubContext, setConfig as setHubContext } from './core/utils/hub-context'\n\nexport { WP_STORAGE_KEYS, WP_UI_THEME, wpClientIframeRefreshKey, wpClientIframeRefreshExpKey } from './core/utils/wp-storage-keys'\nexport {\n migrateLegacyStorageKeys,\n getClientAuthCookieNamesToClear,\n clearClientSessionStorageKeys,\n clearClientIframeRefreshLocalKeys,\n clearStaleIframeRefreshForOtherHubs\n} from './core/utils/storage-migration'\nexport { clearClientAuthCookies } from './core/utils/cookie'\nexport { clearClientSdkSession, resetSessionStores } from './core/http/session-teardown'\nexport { setSessionLifecycleListener } from './core/http/token-store'\nexport { signalSessionChanged, installCrossTabSessionListener, applyCrossTabSessionRevocation } from './core/http/cross-tab-session'\nexport { configureStorageKeys, getStorageKeys, resetStorageKeysForTests } from './core/utils/storage-keys'\n\nexport {\n HUBSPOT_DEALS_OBJECT_TYPE_ID,\n HUBSPOT_TICKETS_OBJECT_TYPE_ID,\n PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS,\n PIPELINE_BOARD_OBJECT_TYPE_IDS,\n isPipelineBoardObjectTypeId\n} from './core/constants/hubspot-object-type-ids'\nexport { isPipelineBoardObjectType, supportsBoardView, shouldShowPipelineSelector } from './core/constants/pipeline-ui'\n\nexport type {\n Config,\n MutationOptions,\n PreLoginPayload,\n LoginPayload,\n VerifyEmailPayload,\n ResetPasswordVerifyTokenPayload,\n ResetPasswordPayload,\n ForgetPasswordPayload,\n ChangePasswordPayload,\n MfaMethod,\n MfaMethodOption,\n MfaPortalScopeContext,\n LoginResponseData,\n TwoFaVerificationRequest,\n MfaEnrollmentStatus,\n SecurityOverview,\n LoginHistoryRow,\n ActiveSession,\n PaginationResponse\n} from './core/types'\n\nexport { api }\n\n/** Storage helpers and CRM stores. */\nexport const store = {\n storage,\n tableUi: { store: tableUiStore, actions: tableUiActions },\n table: { store: tableStore, actions: tableActions },\n user: { store: userStore, actions: userActions },\n note: { store: noteStore, actions: noteActions },\n email: { store: emailStore, actions: emailActions },\n sync: { store: syncStore, actions: syncActions }\n}\n"]}
1
+ {"version":3,"sources":["../src/main/features/accounts/client/accounts-client.ts","../src/main/api/nested-accounts-api.ts","../src/main/features/mobile/client/mobile-navigation-client.ts","../src/main/api/nested-mobile-api.ts","../src/main/api/compose-api.ts","../src/main/core/utils/datetime.ts","../src/main/core/http/mobile-client-config.ts","../src/main/index.ts"],"names":["storage","actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC1B,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAc,QAAQ,CAAA;AAAA,EACzD,WAAA,EAAa,CAAC,KAAA,KAAkB,UAAA,CAAW,IAAI,aAAA,CAAc,OAAA,EAAS,EAAE,KAAA,EAAO;AACnF,CAAA;;;ACFO,IAAM,WAAA,GAAc;AAAA,EACvB,cAAc,cAAA,CAAe,YAAA;AAAA,EAC7B,aAAa,cAAA,CAAe;AAChC,CAAA;;;ACJO,IAAM,sBAAA,GAAyB;AAAA,EAClC,aAAA,EAAe,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC9F,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,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AA,MACL,eAAA,EAAiB,QAAA;AAAA,MACjB,GAAG,UAAA,CAAW;AAAA;AAClB,GACH,CAAA;AACL;;;ACmKO,IAAM,KAAA,GAAQ;AAAA,EACjB,OAAA;AAAA,EACA,OAAA,EAAS,EAAE,KAAA,EAAO,YAAA,EAAc,SAAS,cAAA,EAAe;AAAA,EACxD,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,WAAYC,QAAA,EAAsB;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,EAAY,SAASA,QAAAA,EAAa;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA;AACvC","file":"index.js","sourcesContent":["import { API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const accountsClient = {\n listHubspots: () => HttpClient.get(API_ENDPOINTS.HUBSPOTS),\n listPortals: (hubId: number) => HttpClient.get(API_ENDPOINTS.PORTALS, { hubId })\n}\n","import { accountsClient } from '../features/accounts/client/accounts-client'\n\n/** Client account listing (hubspots / portals) for mobile and multi-account flows. */\nexport const accountsApi = {\n listHubspots: accountsClient.listHubspots,\n listPortals: accountsClient.listPortals\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const mobileNavigationClient = {\n getNavigation: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION })),\n getAppConfig: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_APP_CONFIG })),\n putNavigation: (payload: unknown) => HttpClient.put(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION }), payload),\n importFromWebMenu: (payload: unknown) => HttpClient.post(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION_IMPORT_WEB_MENU }), payload)\n}\n","import { mobileNavigationClient } from '../features/mobile/client/mobile-navigation-client'\n\n/** Mobile-specific API surface (navigation config, etc.). */\nexport const mobileApi = {\n getNavigation: mobileNavigationClient.getNavigation,\n getAppConfig: mobileNavigationClient.getAppConfig,\n putNavigation: mobileNavigationClient.putNavigation,\n importFromWebMenu: mobileNavigationClient.importFromWebMenu\n}\n","import { authApi } from './nested-auth-api'\nimport { crmApi } from './nested-crm-api'\nimport { navigationApi } from './navigation-api'\nimport { accountsApi } from './nested-accounts-api'\nimport { mobileApi } from './nested-mobile-api'\n\n/** Public API — nested domains only (SDK 4.0). */\nexport const api = {\n auth: authApi,\n crm: crmApi,\n navigation: navigationApi,\n accounts: accountsApi,\n mobile: mobileApi\n}\n","/** HubSpot portal default; override when portal timezone is available from config. */\nexport const DEFAULT_HUBSPOT_TIMEZONE = 'Asia/Kolkata'\n\n/**\n * Detect the runtime/browser IANA timezone (e.g. `Asia/Kolkata`).\n * Falls back to the WoodsPortal default timezone when unavailable.\n */\nexport function getCurrentTimeZone(): string {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_HUBSPOT_TIMEZONE\n } catch {\n return DEFAULT_HUBSPOT_TIMEZONE\n }\n}\n\n/**\n * Coerce HubSpot-style timestamps (ms string/number) to epoch milliseconds.\n */\nexport function normalizeToTimestamp(value: unknown): number | null {\n if (value == null || value === '') return null\n\n if (typeof value === 'number') {\n return value > 100_000_000_000 ? value : null\n }\n\n if (typeof value === 'string' && /^\\d+$/.test(value)) {\n const n = Number(value)\n return n > 100_000_000_000 ? n : null\n }\n\n if (typeof value === 'string' || value instanceof Date) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date.getTime()\n }\n\n return null\n}\n\n/**\n * GMT offset label aligned with HubSpot activity timeline (e.g. `GMT+5:30`).\n */\nexport function formatGmtOffset(timeZone: string = getCurrentTimeZone(), date: Date = new Date()): string {\n const raw = new Intl.DateTimeFormat('en-US', {\n timeZone,\n timeZoneName: 'longOffset'\n })\n .formatToParts(date)\n .find((part) => part.type === 'timeZoneName')?.value\n\n if (!raw) return ''\n\n // Intl may emit GMT+05:30; HubSpot uses GMT+5:30.\n return raw.replace(/GMT([+-])0(\\d)(?=:)/, 'GMT$1$2')\n}\n\nexport type HubSpotActivityDateTimeParts = {\n date: string\n time: string\n gmtOffset: string\n /** Full HubSpot-style label, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`. */\n formatted: string\n}\n\n/**\n * Format a HubSpot epoch-ms timestamp like the CRM activity timeline.\n */\nexport function formatHubSpotActivityDateTimeParts(timestamp: unknown, timeZone: string = getCurrentTimeZone()): HubSpotActivityDateTimeParts | null {\n const ms = normalizeToTimestamp(timestamp)\n if (ms == null) return null\n\n const date = new Date(ms)\n const datePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n }).format(date)\n const timePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n }).format(date)\n const gmtOffset = formatGmtOffset(timeZone, date)\n\n return {\n date: datePart,\n time: timePart,\n gmtOffset,\n formatted: `${datePart} at ${timePart} ${gmtOffset}`.trim()\n }\n}\n\n/**\n * @returns HubSpot activity string, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`, or empty string.\n */\nexport function formatHubSpotActivityDateTime(timestamp: unknown, timeZone: string = getCurrentTimeZone()): string {\n return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? ''\n}\n","import type { SessionStorageAdapter } from '../storage/session-storage-adapter'\nimport { registerSessionStorageAdapter } from '../storage/session-storage-registry'\nimport { setClientType } from './client-type'\nimport { initializeHttpClient, type HttpClientConfig } from './http-client'\nimport { hydrateSessionRefreshState } from './token-store'\nimport { hydrateMfaPendingAccessToken } from '../auth/mfa-pending-token-storage'\nimport { storAccessToken } from './token-store'\nimport { hydrateUserStoreFromSession } from '../../state/crm/use-user'\n\nexport type MobileClientConfig = HttpClientConfig & {\n storage: SessionStorageAdapter\n}\n\n/**\n * Configure the SDK for native/mobile hosts: pluggable storage, client type `mobile`,\n * and `X-Client-Type: mobile` on all HTTP requests.\n */\nexport function initializeMobileClient({ storage, ...httpConfig }: MobileClientConfig): void {\n registerSessionStorageAdapter(storage)\n setClientType('mobile')\n hydrateSessionRefreshState()\n void hydrateMfaPendingAccessToken({\n lane: 'c',\n setAccessToken: (token, expiresIn) => {\n storAccessToken(token, expiresIn)\n }\n })\n hydrateUserStoreFromSession()\n initializeHttpClient({\n ...httpConfig,\n headers: {\n 'X-Client-Type': 'mobile',\n ...httpConfig.headers\n }\n })\n}\n","/**\n * WoodsPortal client SDK — public entry module.\n *\n * Configure HTTP once with {@link initializeHttpClient} in production, then use\n * {@link api}, {@link store}, and {@link api.navigation}.\n */\nimport { api } from './api/compose-api'\nimport {\n tableStore,\n tableActions,\n tableUiStore,\n tableUiActions,\n userStore,\n userActions,\n noteStore,\n noteActions,\n emailStore,\n emailActions,\n syncStore,\n syncActions\n} from './state'\nimport { storage } from './core/utils/localStorage'\n\nexport {\n DEFAULT_HUBSPOT_TIMEZONE,\n getCurrentTimeZone,\n formatGmtOffset,\n formatHubSpotActivityDateTime,\n formatHubSpotActivityDateTimeParts,\n normalizeToTimestamp\n} from './core/utils/datetime'\nexport type { HubSpotActivityDateTimeParts } from './core/utils/datetime'\nexport {\n purgeCrmObjectDataCache,\n purgeCrmListCache,\n purgeCrmListCacheAfterCrmWrite,\n purgeCrmDetailAndListAfterCrmWrite,\n purgeCrmRecordCache,\n purgeEngagementCaches,\n purgeEngagementCachesAfterCrmWrite,\n purgeCrmCombined,\n buildCachePurgeRequest,\n buildCrmListPurgeTarget,\n buildCrmSinglePurgeTarget,\n buildEngagementPurgeTarget,\n buildPortalConfigPurgeTarget,\n buildUserSessionPurgeTarget,\n mergePurgeTargets,\n createCachePurgeJob,\n extractHubspotRecordIdFromWriteResponse,\n extractEngagementItemIdFromWriteResponse,\n resolveCrmListPurgeQuery,\n toCachePurgeListQuery\n} from './core/utils/cache'\nexport type { CrmCachePurgeOptions } from './core/types/cache-purge'\nexport type {\n CachePurgeRequest,\n CachePurgeTarget,\n CachePurgeListQuery,\n CachePurgeView,\n CachePurgeDomain,\n CachePurgeMode,\n PurgeResult,\n CreateCachePurgeJobOptions\n} from './core/types/cache-purge'\n\n/** Axios setup, error helpers, and {@link HttpClientConfig}. */\nexport { initializeHttpClient, getFormErrors, getFieldErrors } from './core/http/http-client'\nexport type { HttpClientConfig, StorageKeyConfig } from './core/http/http-client'\nexport { initializeMobileClient } from './core/http/mobile-client-config'\nexport type { MobileClientConfig } from './core/http/mobile-client-config'\nexport type { SessionStorageAdapter } from './core/storage/session-storage-adapter'\nexport { getClientType } from './core/http/client-type'\n\n/** Shared auth contract (client + admin consistency). */\nexport {\n AuthErrorCode,\n parseApiErrorPayload,\n getUnauthorizedPageCopy,\n resolveAuthErrorAction,\n isOptionalAuthFailureUrl,\n isSessionProbeUrl,\n persistAuthError,\n readPersistedAuthError,\n hasValidAccess,\n isFullyAuthenticated,\n isMfaPendingSession,\n hasAuthenticatedAccess,\n recoverMfaGateOnBoot,\n startVisibilityRefreshScheduler,\n stopVisibilityRefreshScheduler,\n resolveAuthRouteAction,\n storeMfaPendingAccessToken,\n readMfaPendingAccessToken,\n clearMfaPendingAccessToken,\n hydrateMfaPendingAccessToken,\n isMfaPendingAccessSession\n} from './core/auth/index.js'\nexport type {\n ApiErrorPayload,\n StoredAuthError,\n AuthErrorCodeValue,\n UnauthorizedPageCopy,\n AuthErrorAction,\n AuthPolicyRoutes,\n AuthInterceptorPolicyConfig,\n WoodsportalRequestConfig,\n SessionContractInput,\n MfaBootRecoveryResult,\n AuthRouteAction,\n AuthFunnelState,\n MfaStorageLane,\n MfaPendingAccessToken,\n HydrateMfaPendingAccessTokenInput\n} from './core/auth/index.js'\nexport { classifyHttpError, getHttpErrorMessage, isServiceUnavailableError, SERVICE_UNAVAILABLE_MESSAGE } from './core/http/http-errors'\nexport type { HttpErrorKind } from './core/http/http-errors'\nexport {\n SessionRefreshDeferredError,\n SessionRefreshFailedError,\n isSessionRefreshDeferredError,\n isSessionRefreshFailedError\n} from './core/http/session-refresh-errors'\n\nexport {\n API_ERROR_DISPLAY_CONFIG,\n API_ERROR_CATEGORY_FALLBACK,\n WOODSPORTAL_API_ACTIVE_ERROR_CODES,\n buildErrorDescription,\n getApiErrorFromUnknown,\n resolveApiErrorDisplay,\n resolveApiContentState,\n isExpectedApiError\n} from './core/errors/index.js'\nexport type {\n ApiErrorVariant,\n ApiContentVariant,\n ApiErrorSeverity,\n ApiErrorDisplayConfig,\n ResolvedApiErrorDisplay,\n ResolvedApiContentState,\n ResolveApiErrorDisplayOptions\n} from './core/errors/index.js'\n\nexport { configureLogger } from './core/logging/logger'\nexport type { LogLevel, LogMeta, LoggerConfig } from './core/logging/logger-types'\n\nexport { Client } from './core/http/client-assembler'\nexport { config as hubContext, setConfig as setHubContext } from './core/utils/hub-context'\n\nexport { WP_STORAGE_KEYS, WP_UI_THEME, wpClientIframeRefreshKey, wpClientIframeRefreshExpKey } from './core/utils/wp-storage-keys'\nexport {\n migrateLegacyStorageKeys,\n getClientAuthCookieNamesToClear,\n clearClientSessionStorageKeys,\n clearClientIframeRefreshLocalKeys,\n clearStaleIframeRefreshForOtherHubs\n} from './core/utils/storage-migration'\nexport { clearClientAuthCookies } from './core/utils/cookie'\nexport { clearClientSdkSession, resetSessionStores } from './core/http/session-teardown'\nexport { setSessionLifecycleListener } from './core/http/token-store'\nexport { signalSessionChanged, installCrossTabSessionListener, applyCrossTabSessionRevocation } from './core/http/cross-tab-session'\nexport { configureStorageKeys, getStorageKeys, resetStorageKeysForTests } from './core/utils/storage-keys'\n\nexport {\n HUBSPOT_DEALS_OBJECT_TYPE_ID,\n HUBSPOT_TICKETS_OBJECT_TYPE_ID,\n PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS,\n PIPELINE_BOARD_OBJECT_TYPE_IDS,\n isPipelineBoardObjectTypeId\n} from './core/constants/hubspot-object-type-ids'\nexport { isPipelineBoardObjectType, supportsBoardView, shouldShowPipelineSelector } from './core/constants/pipeline-ui'\n\nexport type {\n Config,\n MutationOptions,\n PreLoginPayload,\n LoginPayload,\n VerifyEmailPayload,\n ResetPasswordVerifyTokenPayload,\n ResetPasswordPayload,\n ForgetPasswordPayload,\n ChangePasswordPayload,\n MfaMethod,\n MfaMethodOption,\n MfaPortalScopeContext,\n LoginResponseData,\n TwoFaVerificationRequest,\n MfaEnrollmentStatus,\n SecurityOverview,\n LoginHistoryRow,\n ActiveSession,\n PaginationResponse\n} from './core/types'\n\nexport { api }\n\n/** Storage helpers and CRM stores. */\nexport const store = {\n storage,\n tableUi: { store: tableUiStore, actions: tableUiActions },\n table: { store: tableStore, actions: tableActions },\n user: { store: userStore, actions: userActions },\n note: { store: noteStore, actions: noteActions },\n email: { store: emailStore, actions: emailActions },\n sync: { store: syncStore, actions: syncActions }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "woodsportal-client-sdk",
3
- "version": "4.0.8-dev.3",
3
+ "version": "4.0.8-dev.4",
4
4
  "description": "Official TypeScript/JavaScript SDK for WoodsPortal API - Authentication, user management, pipelines, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",