@delopay/sdk 0.20.1 → 0.21.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-4FTI5GO7.js → chunk-EPZVT7EJ.js} +30 -1
- package/dist/chunk-EPZVT7EJ.js.map +1 -0
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +29 -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-4FTI5GO7.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1418,6 +1418,42 @@ interface LoginHistoryResponse {
|
|
|
1418
1418
|
offset: number;
|
|
1419
1419
|
limit: number;
|
|
1420
1420
|
}
|
|
1421
|
+
/**
|
|
1422
|
+
* One row from `GET /user/me/sessions`.
|
|
1423
|
+
*
|
|
1424
|
+
* A session is one minted login JWT. `id` is also the JWT's `jti`. The
|
|
1425
|
+
* row is mutable: `last_seen_at` is updated as the session makes API
|
|
1426
|
+
* calls (debounced to one DB write per 5 min), and `revoked_at` is set
|
|
1427
|
+
* when the user disconnects this session from the dashboard.
|
|
1428
|
+
*
|
|
1429
|
+
* `auth_method` enumerates the signin method that produced the session.
|
|
1430
|
+
* Today only `password` issues sessions; SSO / TOTP / recovery will follow.
|
|
1431
|
+
*
|
|
1432
|
+
* `is_current` is `true` for the row corresponding to the JWT used to
|
|
1433
|
+
* make the listing request — the dashboard renders a "This device" tag
|
|
1434
|
+
* and asks for confirmation before letting the user disconnect it.
|
|
1435
|
+
*/
|
|
1436
|
+
interface UserSessionEntry {
|
|
1437
|
+
id: string;
|
|
1438
|
+
auth_method: string;
|
|
1439
|
+
ip_address: string | null;
|
|
1440
|
+
user_agent: string | null;
|
|
1441
|
+
country_code: string | null;
|
|
1442
|
+
city: string | null;
|
|
1443
|
+
/** ISO-8601 timestamp the session was created (signin time). */
|
|
1444
|
+
created_at: string;
|
|
1445
|
+
/** ISO-8601 timestamp of the most recent observed API call on this session. */
|
|
1446
|
+
last_seen_at: string;
|
|
1447
|
+
/** ISO-8601 timestamp at which the session JWT exp lapses. */
|
|
1448
|
+
expires_at: string;
|
|
1449
|
+
is_current: boolean;
|
|
1450
|
+
}
|
|
1451
|
+
interface UserSessionListResponse {
|
|
1452
|
+
sessions: UserSessionEntry[];
|
|
1453
|
+
}
|
|
1454
|
+
interface UserSessionRevokeResponse {
|
|
1455
|
+
revoked: boolean;
|
|
1456
|
+
}
|
|
1421
1457
|
/** Optional query params for `GET /user/role/list/invite`. */
|
|
1422
1458
|
interface ListInvitableRolesParams {
|
|
1423
1459
|
/**
|
|
@@ -3023,6 +3059,31 @@ declare class Users {
|
|
|
3023
3059
|
* merchant dashboard.
|
|
3024
3060
|
*/
|
|
3025
3061
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3062
|
+
/**
|
|
3063
|
+
* List the authenticated user's currently-active dashboard sessions
|
|
3064
|
+
* (one row per minted login JWT that hasn't been revoked or expired).
|
|
3065
|
+
*
|
|
3066
|
+
* The row matching the JWT making this call has `is_current: true`,
|
|
3067
|
+
* which is what lets the dashboard render a "This device" tag.
|
|
3068
|
+
*
|
|
3069
|
+
* `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty
|
|
3070
|
+
* list when a Delopay admin is impersonating a non-admin merchant
|
|
3071
|
+
* (same guard as `listLoginActivity`).
|
|
3072
|
+
*/
|
|
3073
|
+
listActiveSessions(): Promise<UserSessionListResponse>;
|
|
3074
|
+
/**
|
|
3075
|
+
* Disconnect one of the authenticated user's sessions. The matching
|
|
3076
|
+
* JWT is rejected on its next request — fast-path via Redis, fall back
|
|
3077
|
+
* to the persistent `revoked_at` column.
|
|
3078
|
+
*
|
|
3079
|
+
* Idempotent: revoking an already-revoked or unknown id returns 404,
|
|
3080
|
+
* which the caller can treat as success for retry purposes. Revoking
|
|
3081
|
+
* a session id that belongs to a different user also returns 404 —
|
|
3082
|
+
* the response intentionally doesn't leak whether the id exists.
|
|
3083
|
+
*
|
|
3084
|
+
* `POST /user/me/sessions/{sessionId}/revoke`.
|
|
3085
|
+
*/
|
|
3086
|
+
revokeSession(sessionId: string): Promise<UserSessionRevokeResponse>;
|
|
3026
3087
|
getDetails(): Promise<UserResponse>;
|
|
3027
3088
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3028
3089
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3748,4 +3809,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
3748
3809
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
3749
3810
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
3750
3811
|
|
|
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 };
|
|
3812
|
+
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 UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, 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
|
@@ -1418,6 +1418,42 @@ interface LoginHistoryResponse {
|
|
|
1418
1418
|
offset: number;
|
|
1419
1419
|
limit: number;
|
|
1420
1420
|
}
|
|
1421
|
+
/**
|
|
1422
|
+
* One row from `GET /user/me/sessions`.
|
|
1423
|
+
*
|
|
1424
|
+
* A session is one minted login JWT. `id` is also the JWT's `jti`. The
|
|
1425
|
+
* row is mutable: `last_seen_at` is updated as the session makes API
|
|
1426
|
+
* calls (debounced to one DB write per 5 min), and `revoked_at` is set
|
|
1427
|
+
* when the user disconnects this session from the dashboard.
|
|
1428
|
+
*
|
|
1429
|
+
* `auth_method` enumerates the signin method that produced the session.
|
|
1430
|
+
* Today only `password` issues sessions; SSO / TOTP / recovery will follow.
|
|
1431
|
+
*
|
|
1432
|
+
* `is_current` is `true` for the row corresponding to the JWT used to
|
|
1433
|
+
* make the listing request — the dashboard renders a "This device" tag
|
|
1434
|
+
* and asks for confirmation before letting the user disconnect it.
|
|
1435
|
+
*/
|
|
1436
|
+
interface UserSessionEntry {
|
|
1437
|
+
id: string;
|
|
1438
|
+
auth_method: string;
|
|
1439
|
+
ip_address: string | null;
|
|
1440
|
+
user_agent: string | null;
|
|
1441
|
+
country_code: string | null;
|
|
1442
|
+
city: string | null;
|
|
1443
|
+
/** ISO-8601 timestamp the session was created (signin time). */
|
|
1444
|
+
created_at: string;
|
|
1445
|
+
/** ISO-8601 timestamp of the most recent observed API call on this session. */
|
|
1446
|
+
last_seen_at: string;
|
|
1447
|
+
/** ISO-8601 timestamp at which the session JWT exp lapses. */
|
|
1448
|
+
expires_at: string;
|
|
1449
|
+
is_current: boolean;
|
|
1450
|
+
}
|
|
1451
|
+
interface UserSessionListResponse {
|
|
1452
|
+
sessions: UserSessionEntry[];
|
|
1453
|
+
}
|
|
1454
|
+
interface UserSessionRevokeResponse {
|
|
1455
|
+
revoked: boolean;
|
|
1456
|
+
}
|
|
1421
1457
|
/** Optional query params for `GET /user/role/list/invite`. */
|
|
1422
1458
|
interface ListInvitableRolesParams {
|
|
1423
1459
|
/**
|
|
@@ -3023,6 +3059,31 @@ declare class Users {
|
|
|
3023
3059
|
* merchant dashboard.
|
|
3024
3060
|
*/
|
|
3025
3061
|
listLoginActivity(params?: LoginHistoryParams): Promise<LoginHistoryResponse>;
|
|
3062
|
+
/**
|
|
3063
|
+
* List the authenticated user's currently-active dashboard sessions
|
|
3064
|
+
* (one row per minted login JWT that hasn't been revoked or expired).
|
|
3065
|
+
*
|
|
3066
|
+
* The row matching the JWT making this call has `is_current: true`,
|
|
3067
|
+
* which is what lets the dashboard render a "This device" tag.
|
|
3068
|
+
*
|
|
3069
|
+
* `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty
|
|
3070
|
+
* list when a Delopay admin is impersonating a non-admin merchant
|
|
3071
|
+
* (same guard as `listLoginActivity`).
|
|
3072
|
+
*/
|
|
3073
|
+
listActiveSessions(): Promise<UserSessionListResponse>;
|
|
3074
|
+
/**
|
|
3075
|
+
* Disconnect one of the authenticated user's sessions. The matching
|
|
3076
|
+
* JWT is rejected on its next request — fast-path via Redis, fall back
|
|
3077
|
+
* to the persistent `revoked_at` column.
|
|
3078
|
+
*
|
|
3079
|
+
* Idempotent: revoking an already-revoked or unknown id returns 404,
|
|
3080
|
+
* which the caller can treat as success for retry purposes. Revoking
|
|
3081
|
+
* a session id that belongs to a different user also returns 404 —
|
|
3082
|
+
* the response intentionally doesn't leak whether the id exists.
|
|
3083
|
+
*
|
|
3084
|
+
* `POST /user/me/sessions/{sessionId}/revoke`.
|
|
3085
|
+
*/
|
|
3086
|
+
revokeSession(sessionId: string): Promise<UserSessionRevokeResponse>;
|
|
3026
3087
|
getDetails(): Promise<UserResponse>;
|
|
3027
3088
|
update(params: UpdateUserDetailsRequest): Promise<UserResponse>;
|
|
3028
3089
|
changePassword(params: ChangePasswordRequest): Promise<UserResponse>;
|
|
@@ -3748,4 +3809,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
3748
3809
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
3749
3810
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
3750
3811
|
|
|
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 };
|
|
3812
|
+
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 UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, 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
|
@@ -1978,6 +1978,35 @@ var Users = class {
|
|
|
1978
1978
|
query: params
|
|
1979
1979
|
});
|
|
1980
1980
|
}
|
|
1981
|
+
/**
|
|
1982
|
+
* List the authenticated user's currently-active dashboard sessions
|
|
1983
|
+
* (one row per minted login JWT that hasn't been revoked or expired).
|
|
1984
|
+
*
|
|
1985
|
+
* The row matching the JWT making this call has `is_current: true`,
|
|
1986
|
+
* which is what lets the dashboard render a "This device" tag.
|
|
1987
|
+
*
|
|
1988
|
+
* `GET /user/me/sessions`. Requires a logged-in JWT. Returns an empty
|
|
1989
|
+
* list when a Delopay admin is impersonating a non-admin merchant
|
|
1990
|
+
* (same guard as `listLoginActivity`).
|
|
1991
|
+
*/
|
|
1992
|
+
async listActiveSessions() {
|
|
1993
|
+
return this.request("GET", "/user/me/sessions");
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Disconnect one of the authenticated user's sessions. The matching
|
|
1997
|
+
* JWT is rejected on its next request — fast-path via Redis, fall back
|
|
1998
|
+
* to the persistent `revoked_at` column.
|
|
1999
|
+
*
|
|
2000
|
+
* Idempotent: revoking an already-revoked or unknown id returns 404,
|
|
2001
|
+
* which the caller can treat as success for retry purposes. Revoking
|
|
2002
|
+
* a session id that belongs to a different user also returns 404 —
|
|
2003
|
+
* the response intentionally doesn't leak whether the id exists.
|
|
2004
|
+
*
|
|
2005
|
+
* `POST /user/me/sessions/{sessionId}/revoke`.
|
|
2006
|
+
*/
|
|
2007
|
+
async revokeSession(sessionId) {
|
|
2008
|
+
return this.request("POST", `/user/me/sessions/${encodeURIComponent(sessionId)}/revoke`);
|
|
2009
|
+
}
|
|
1981
2010
|
async getDetails() {
|
|
1982
2011
|
return this.request("GET", "/user");
|
|
1983
2012
|
}
|