@delopay/sdk 0.19.1 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QGQR2OBR.js → chunk-4FTI5GO7.js} +21 -1
- package/dist/chunk-4FTI5GO7.js.map +1 -0
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +74 -1
- package/dist/index.d.ts +74 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +20 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-QGQR2OBR.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1358,6 +1358,66 @@ interface Terminate2faQueryParams {
|
|
|
1358
1358
|
*/
|
|
1359
1359
|
skip_two_factor_auth?: boolean;
|
|
1360
1360
|
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Optional query for `GET /user/me/login-activity`. Backend clamps `limit`
|
|
1363
|
+
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1364
|
+
*/
|
|
1365
|
+
interface LoginHistoryParams {
|
|
1366
|
+
limit?: number;
|
|
1367
|
+
offset?: number;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* One row from the authenticated user's login history.
|
|
1371
|
+
*
|
|
1372
|
+
* `event_type` enumerates the signin attempt outcome — current values:
|
|
1373
|
+
* `signin_success`, `signin_failure`, `signup_success`, `sso_success`,
|
|
1374
|
+
* `sso_failure`, `totp_success`, `totp_failure`, `recovery_code_success`,
|
|
1375
|
+
* `recovery_code_failure`, `magic_link_success`. Stored as a string so
|
|
1376
|
+
* older rows stay readable when the enum grows.
|
|
1377
|
+
*
|
|
1378
|
+
* `failure_reason` is set on failure rows. Current values:
|
|
1379
|
+
* `user_not_found`, `invalid_credentials`, `totp_invalid`,
|
|
1380
|
+
* `totp_max_attempts`, `recovery_code_invalid`, `not_in_admin_org`,
|
|
1381
|
+
* `rate_limited`, `other`.
|
|
1382
|
+
*
|
|
1383
|
+
* `auth_method` tells the dashboard how the attempt authenticated:
|
|
1384
|
+
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1385
|
+
*
|
|
1386
|
+
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1387
|
+
* by an offline MaxMind GeoLite2-City lookup at signin time. They stay
|
|
1388
|
+
* `null` for private/loopback IPs, when the lookup misses, or when the
|
|
1389
|
+
* GeoIP service is disabled in backend config.
|
|
1390
|
+
*/
|
|
1391
|
+
interface LoginHistoryEntry {
|
|
1392
|
+
id: string;
|
|
1393
|
+
event_type: string;
|
|
1394
|
+
failure_reason: string | null;
|
|
1395
|
+
auth_method: string;
|
|
1396
|
+
ip_address: string | null;
|
|
1397
|
+
user_agent: string | null;
|
|
1398
|
+
country_code: string | null;
|
|
1399
|
+
city: string | null;
|
|
1400
|
+
latitude: number | null;
|
|
1401
|
+
longitude: number | null;
|
|
1402
|
+
/** ISO-8601 timestamp the row was inserted (signin attempt time). */
|
|
1403
|
+
created_at: string;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1407
|
+
* unpaginated row count for client-side page-count calculation.
|
|
1408
|
+
*
|
|
1409
|
+
* When the authenticated user is a Delopay admin currently impersonating
|
|
1410
|
+
* a non-admin merchant via `switch_merchant_for_user_in_org`, the backend
|
|
1411
|
+
* returns `entries: []` and `total_count: 0` so the admin's IP / geo
|
|
1412
|
+
* doesn't render inside the merchant dashboard. The admin can still see
|
|
1413
|
+
* their real activity by switching back to the admin organization.
|
|
1414
|
+
*/
|
|
1415
|
+
interface LoginHistoryResponse {
|
|
1416
|
+
entries: LoginHistoryEntry[];
|
|
1417
|
+
total_count: number;
|
|
1418
|
+
offset: number;
|
|
1419
|
+
limit: number;
|
|
1420
|
+
}
|
|
1361
1421
|
/** Optional query params for `GET /user/role/list/invite`. */
|
|
1362
1422
|
interface ListInvitableRolesParams {
|
|
1363
1423
|
/**
|
|
@@ -2950,6 +3010,19 @@ declare class Users {
|
|
|
2950
3010
|
signUp(params: SignUpRequest | SignUpWithMerchantRequest): Promise<AuthResponse>;
|
|
2951
3011
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
2952
3012
|
signOut(): Promise<Record<string, unknown>>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Paginated login history for the authenticated user — IP, User-Agent,
|
|
3015
|
+
* country / city / lat-lon (when GeoIP is enabled in backend), success
|
|
3016
|
+
* and failure events with their reasons. Strictly scoped to the JWT
|
|
3017
|
+
* subject; a user can only see their own activity.
|
|
3018
|
+
*
|
|
3019
|
+
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3020
|
+
*
|
|
3021
|
+
* The backend returns an empty page when a Delopay admin is impersonating
|
|
3022
|
+
* a non-admin merchant, so the admin's metadata never renders inside the
|
|
3023
|
+
* merchant dashboard.
|
|
3024
|
+
*/
|
|
3025
|
+
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
2953
3026
|
getDetails(): Promise<UserResponse>;
|
|
2954
3027
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
2955
3028
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3675,4 +3748,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
3675
3748
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
3676
3749
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
3677
3750
|
|
|
3678
|
-
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type GatewayConnectRequest, type GatewayResponse, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateUserDetailsRequest, type UserResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
3751
|
+
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type GatewayConnectRequest, type GatewayResponse, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateUserDetailsRequest, type UserResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1358,6 +1358,66 @@ interface Terminate2faQueryParams {
|
|
|
1358
1358
|
*/
|
|
1359
1359
|
skip_two_factor_auth?: boolean;
|
|
1360
1360
|
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Optional query for `GET /user/me/login-activity`. Backend clamps `limit`
|
|
1363
|
+
* to `1..=200` (default 25) and floors `offset` at 0 (default 0).
|
|
1364
|
+
*/
|
|
1365
|
+
interface LoginHistoryParams {
|
|
1366
|
+
limit?: number;
|
|
1367
|
+
offset?: number;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* One row from the authenticated user's login history.
|
|
1371
|
+
*
|
|
1372
|
+
* `event_type` enumerates the signin attempt outcome — current values:
|
|
1373
|
+
* `signin_success`, `signin_failure`, `signup_success`, `sso_success`,
|
|
1374
|
+
* `sso_failure`, `totp_success`, `totp_failure`, `recovery_code_success`,
|
|
1375
|
+
* `recovery_code_failure`, `magic_link_success`. Stored as a string so
|
|
1376
|
+
* older rows stay readable when the enum grows.
|
|
1377
|
+
*
|
|
1378
|
+
* `failure_reason` is set on failure rows. Current values:
|
|
1379
|
+
* `user_not_found`, `invalid_credentials`, `totp_invalid`,
|
|
1380
|
+
* `totp_max_attempts`, `recovery_code_invalid`, `not_in_admin_org`,
|
|
1381
|
+
* `rate_limited`, `other`.
|
|
1382
|
+
*
|
|
1383
|
+
* `auth_method` tells the dashboard how the attempt authenticated:
|
|
1384
|
+
* `password`, `magic_link`, `sso_oidc`, `totp`, `recovery_code`.
|
|
1385
|
+
*
|
|
1386
|
+
* Geo fields (`country_code`, `city`, `latitude`, `longitude`) are populated
|
|
1387
|
+
* by an offline MaxMind GeoLite2-City lookup at signin time. They stay
|
|
1388
|
+
* `null` for private/loopback IPs, when the lookup misses, or when the
|
|
1389
|
+
* GeoIP service is disabled in backend config.
|
|
1390
|
+
*/
|
|
1391
|
+
interface LoginHistoryEntry {
|
|
1392
|
+
id: string;
|
|
1393
|
+
event_type: string;
|
|
1394
|
+
failure_reason: string | null;
|
|
1395
|
+
auth_method: string;
|
|
1396
|
+
ip_address: string | null;
|
|
1397
|
+
user_agent: string | null;
|
|
1398
|
+
country_code: string | null;
|
|
1399
|
+
city: string | null;
|
|
1400
|
+
latitude: number | null;
|
|
1401
|
+
longitude: number | null;
|
|
1402
|
+
/** ISO-8601 timestamp the row was inserted (signin attempt time). */
|
|
1403
|
+
created_at: string;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Response shape for `GET /user/me/login-activity`. `total_count` is the
|
|
1407
|
+
* unpaginated row count for client-side page-count calculation.
|
|
1408
|
+
*
|
|
1409
|
+
* When the authenticated user is a Delopay admin currently impersonating
|
|
1410
|
+
* a non-admin merchant via `switch_merchant_for_user_in_org`, the backend
|
|
1411
|
+
* returns `entries: []` and `total_count: 0` so the admin's IP / geo
|
|
1412
|
+
* doesn't render inside the merchant dashboard. The admin can still see
|
|
1413
|
+
* their real activity by switching back to the admin organization.
|
|
1414
|
+
*/
|
|
1415
|
+
interface LoginHistoryResponse {
|
|
1416
|
+
entries: LoginHistoryEntry[];
|
|
1417
|
+
total_count: number;
|
|
1418
|
+
offset: number;
|
|
1419
|
+
limit: number;
|
|
1420
|
+
}
|
|
1361
1421
|
/** Optional query params for `GET /user/role/list/invite`. */
|
|
1362
1422
|
interface ListInvitableRolesParams {
|
|
1363
1423
|
/**
|
|
@@ -2950,6 +3010,19 @@ declare class Users {
|
|
|
2950
3010
|
signUp(params: SignUpRequest | SignUpWithMerchantRequest): Promise<AuthResponse>;
|
|
2951
3011
|
signIn(params: SignInRequest): Promise<AuthResponse>;
|
|
2952
3012
|
signOut(): Promise<Record<string, unknown>>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Paginated login history for the authenticated user — IP, User-Agent,
|
|
3015
|
+
* country / city / lat-lon (when GeoIP is enabled in backend), success
|
|
3016
|
+
* and failure events with their reasons. Strictly scoped to the JWT
|
|
3017
|
+
* subject; a user can only see their own activity.
|
|
3018
|
+
*
|
|
3019
|
+
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
3020
|
+
*
|
|
3021
|
+
* The backend returns an empty page when a Delopay admin is impersonating
|
|
3022
|
+
* a non-admin merchant, so the admin's metadata never renders inside the
|
|
3023
|
+
* merchant dashboard.
|
|
3024
|
+
*/
|
|
3025
|
+
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
2953
3026
|
getDetails(): Promise<UserResponse>;
|
|
2954
3027
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
2955
3028
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3675,4 +3748,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
3675
3748
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
3676
3749
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
3677
3750
|
|
|
3678
|
-
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type GatewayConnectRequest, type GatewayResponse, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateUserDetailsRequest, type UserResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
3751
|
+
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type GatewayConnectRequest, type GatewayResponse, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateUserDetailsRequest, type UserResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -1958,6 +1958,26 @@ var Users = class {
|
|
|
1958
1958
|
async signOut() {
|
|
1959
1959
|
return this.request("POST", "/user/signout");
|
|
1960
1960
|
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Paginated login history for the authenticated user — IP, User-Agent,
|
|
1963
|
+
* country / city / lat-lon (when GeoIP is enabled in backend), success
|
|
1964
|
+
* and failure events with their reasons. Strictly scoped to the JWT
|
|
1965
|
+
* subject; a user can only see their own activity.
|
|
1966
|
+
*
|
|
1967
|
+
* `GET /user/me/login-activity`. Requires a logged-in JWT.
|
|
1968
|
+
*
|
|
1969
|
+
* The backend returns an empty page when a Delopay admin is impersonating
|
|
1970
|
+
* a non-admin merchant, so the admin's metadata never renders inside the
|
|
1971
|
+
* merchant dashboard.
|
|
1972
|
+
*/
|
|
1973
|
+
async listLoginActivity(params) {
|
|
1974
|
+
if (params === void 0) {
|
|
1975
|
+
return this.request("GET", "/user/me/login-activity");
|
|
1976
|
+
}
|
|
1977
|
+
return this.request("GET", "/user/me/login-activity", {
|
|
1978
|
+
query: params
|
|
1979
|
+
});
|
|
1980
|
+
}
|
|
1961
1981
|
async getDetails() {
|
|
1962
1982
|
return this.request("GET", "/user");
|
|
1963
1983
|
}
|