@delopay/sdk 0.69.0 → 0.70.0
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-XIRQPEI6.js → chunk-ASCCS4NN.js} +21 -11
- package/dist/chunk-ASCCS4NN.js.map +1 -0
- package/dist/index.cjs +20 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -15
- package/dist/index.d.ts +72 -15
- package/dist/index.js +1 -1
- package/dist/internal.cjs +20 -10
- 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 +16 -17
- package/dist/chunk-XIRQPEI6.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -256,6 +256,17 @@ interface PaymentCancelRequest {
|
|
|
256
256
|
* `'requires_customer_action'`, use `next_action` to redirect or render
|
|
257
257
|
* additional authentication steps.
|
|
258
258
|
*/
|
|
259
|
+
/**
|
|
260
|
+
* Refund/dispute magnitudes tracked on the payment intent (minor units).
|
|
261
|
+
* A payment's `status` never changes when it is refunded or disputed — this
|
|
262
|
+
* object is where that state is visible.
|
|
263
|
+
*/
|
|
264
|
+
interface PaymentIntentStateMetadata {
|
|
265
|
+
/** Sum of succeeded refunds against this payment, in minor units. */
|
|
266
|
+
total_refunded_amount?: number | null;
|
|
267
|
+
/** Sum of open/lost disputed amounts against this payment, in minor units. */
|
|
268
|
+
total_disputed_amount?: number | null;
|
|
269
|
+
}
|
|
259
270
|
interface PaymentResponse {
|
|
260
271
|
/** Unique payment intent ID. */
|
|
261
272
|
payment_id: string;
|
|
@@ -283,6 +294,8 @@ interface PaymentResponse {
|
|
|
283
294
|
shipping_cost?: number | null;
|
|
284
295
|
/** Actual captured amount, in minor units. Present after capture. */
|
|
285
296
|
amount_received?: number | null;
|
|
297
|
+
/** Refunded/disputed totals; the payment `status` itself never reflects them. */
|
|
298
|
+
state_metadata?: PaymentIntentStateMetadata | null;
|
|
286
299
|
/** Capture method used. */
|
|
287
300
|
capture_method?: CaptureMethod | null;
|
|
288
301
|
/** Authentication type used (3DS or none). */
|
|
@@ -513,9 +526,19 @@ interface RefundCreateRequest {
|
|
|
513
526
|
metadata?: Record<string, unknown> | null;
|
|
514
527
|
}
|
|
515
528
|
interface RefundUpdateRequest {
|
|
529
|
+
/** Omit to leave the reason unchanged; send an explicit `null` to clear it. */
|
|
516
530
|
reason?: string | null;
|
|
517
531
|
metadata?: Record<string, unknown> | null;
|
|
518
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Response of `GET /refunds/aggregate`. NOTE: keyed by the backend's internal
|
|
535
|
+
* refund-status enum (`success`, `failure`, `transaction_failure`, `pending`,
|
|
536
|
+
* `manual_review`) — NOT the collapsed `RefundStatus` values
|
|
537
|
+
* (`succeeded`/`failed`/`pending`/`review`) that refund rows carry.
|
|
538
|
+
*/
|
|
539
|
+
interface RefundAggregateResponse {
|
|
540
|
+
status_with_count: Partial<Record<'success' | 'failure' | 'transaction_failure' | 'pending' | 'manual_review', number>>;
|
|
541
|
+
}
|
|
519
542
|
/** A Delopay refund returned by the API. */
|
|
520
543
|
interface RefundResponse {
|
|
521
544
|
/** Unique refund ID. */
|
|
@@ -774,7 +797,6 @@ interface DisputeListParams {
|
|
|
774
797
|
}
|
|
775
798
|
interface DisputeEvidenceRequest {
|
|
776
799
|
cancel_dispute?: boolean | null;
|
|
777
|
-
customer_email_body?: string | null;
|
|
778
800
|
customer_email_address?: string | null;
|
|
779
801
|
customer_name?: string | null;
|
|
780
802
|
customer_signature?: string | null;
|
|
@@ -799,10 +821,37 @@ interface DisputeEvidenceRequest {
|
|
|
799
821
|
cancellation_rebuttal?: string | null;
|
|
800
822
|
customer_communication?: string | null;
|
|
801
823
|
customer_purchase_ip?: string | null;
|
|
802
|
-
|
|
824
|
+
/**
|
|
825
|
+
* File id of the document showing the disputed charge and the alleged
|
|
826
|
+
* duplicate are distinct transactions. This is the field Stripe calls
|
|
827
|
+
* `duplicate_charge_documentation`.
|
|
828
|
+
*/
|
|
829
|
+
invoice_showing_distinct_transactions?: string | null;
|
|
830
|
+
/** File id of the recurring-transaction agreement (subscription disputes). */
|
|
831
|
+
recurring_transaction_agreement?: string | null;
|
|
832
|
+
/** Explanation of why the disputed charge is not a duplicate. */
|
|
803
833
|
duplicate_charge_explanation?: string | null;
|
|
834
|
+
/** Transaction id of the prior charge the disputed one allegedly duplicates. */
|
|
804
835
|
duplicate_charge_id?: string | null;
|
|
805
836
|
}
|
|
837
|
+
/** Backend evidence-type identifiers, serde snake_case (e.g. `receipt`,
|
|
838
|
+
* `invoice_showing_distinct_transactions`). Used for delete + retrieval. */
|
|
839
|
+
type DisputeEvidenceType = 'cancellation_policy' | 'customer_communication' | 'customer_signature' | 'receipt' | 'refund_policy' | 'service_documentation' | 'shipping_documentation' | 'invoice_showing_distinct_transactions' | 'recurring_transaction_agreement' | 'uncategorized_file';
|
|
840
|
+
/**
|
|
841
|
+
* One stored file-evidence entry, as `GET /disputes/evidence/{id}` returns
|
|
842
|
+
* it. The endpoint reports FILE evidence only — text evidence (customer
|
|
843
|
+
* name, product description, …) is not retrievable once submitted.
|
|
844
|
+
*/
|
|
845
|
+
interface DisputeEvidenceBlock {
|
|
846
|
+
evidence_type: DisputeEvidenceType;
|
|
847
|
+
file_metadata_response: {
|
|
848
|
+
file_id: string;
|
|
849
|
+
file_name?: string | null;
|
|
850
|
+
file_size?: number;
|
|
851
|
+
file_type?: string;
|
|
852
|
+
available?: boolean;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
806
855
|
interface MandateResponse {
|
|
807
856
|
mandate_id: string;
|
|
808
857
|
status: MandateStatus;
|
|
@@ -3514,12 +3563,16 @@ declare class Disputes {
|
|
|
3514
3563
|
*/
|
|
3515
3564
|
attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
3516
3565
|
/**
|
|
3517
|
-
* Retrieve previously
|
|
3566
|
+
* Retrieve previously stored evidence for a dispute.
|
|
3567
|
+
*
|
|
3568
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
3569
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
3570
|
+
* text evidence is not retrievable once submitted.
|
|
3518
3571
|
*
|
|
3519
3572
|
* @param disputeId - The dispute ID.
|
|
3520
|
-
* @returns The
|
|
3573
|
+
* @returns The stored file-evidence blocks.
|
|
3521
3574
|
*/
|
|
3522
|
-
retrieveEvidence(disputeId: string): Promise<
|
|
3575
|
+
retrieveEvidence(disputeId: string): Promise<DisputeEvidenceBlock[]>;
|
|
3523
3576
|
/**
|
|
3524
3577
|
* Delete submitted evidence for a dispute.
|
|
3525
3578
|
*
|
|
@@ -3538,15 +3591,19 @@ declare class Disputes {
|
|
|
3538
3591
|
/** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */
|
|
3539
3592
|
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3540
3593
|
/**
|
|
3541
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
3542
|
-
* `GET /disputes/{
|
|
3594
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
3595
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
3596
|
+
*
|
|
3597
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
3598
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
3599
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
3600
|
+
* before returning it.
|
|
3543
3601
|
*
|
|
3544
|
-
* Note:
|
|
3545
|
-
*
|
|
3546
|
-
*
|
|
3547
|
-
* path were silently hitting 404s.
|
|
3602
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
3603
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
3604
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
3548
3605
|
*/
|
|
3549
|
-
fetchFromConnector(
|
|
3606
|
+
fetchFromConnector(disputeId: string): Promise<DisputeResponse>;
|
|
3550
3607
|
}
|
|
3551
3608
|
|
|
3552
3609
|
/**
|
|
@@ -4259,9 +4316,9 @@ declare class Refunds {
|
|
|
4259
4316
|
/** Get refund filter options. `GET /refunds/filter` */
|
|
4260
4317
|
getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
4261
4318
|
/** Get refund aggregates. `GET /refunds/aggregate` */
|
|
4262
|
-
aggregate(params?: Record<string, string | number | undefined>): Promise<
|
|
4319
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4263
4320
|
/** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */
|
|
4264
|
-
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<
|
|
4321
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4265
4322
|
/** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */
|
|
4266
4323
|
manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse>;
|
|
4267
4324
|
}
|
|
@@ -5743,4 +5800,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5743
5800
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5744
5801
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5745
5802
|
|
|
5746
|
-
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, 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 MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, 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 PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, 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 RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, 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 UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5803
|
+
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, 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 MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, 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 PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, 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 UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -256,6 +256,17 @@ interface PaymentCancelRequest {
|
|
|
256
256
|
* `'requires_customer_action'`, use `next_action` to redirect or render
|
|
257
257
|
* additional authentication steps.
|
|
258
258
|
*/
|
|
259
|
+
/**
|
|
260
|
+
* Refund/dispute magnitudes tracked on the payment intent (minor units).
|
|
261
|
+
* A payment's `status` never changes when it is refunded or disputed — this
|
|
262
|
+
* object is where that state is visible.
|
|
263
|
+
*/
|
|
264
|
+
interface PaymentIntentStateMetadata {
|
|
265
|
+
/** Sum of succeeded refunds against this payment, in minor units. */
|
|
266
|
+
total_refunded_amount?: number | null;
|
|
267
|
+
/** Sum of open/lost disputed amounts against this payment, in minor units. */
|
|
268
|
+
total_disputed_amount?: number | null;
|
|
269
|
+
}
|
|
259
270
|
interface PaymentResponse {
|
|
260
271
|
/** Unique payment intent ID. */
|
|
261
272
|
payment_id: string;
|
|
@@ -283,6 +294,8 @@ interface PaymentResponse {
|
|
|
283
294
|
shipping_cost?: number | null;
|
|
284
295
|
/** Actual captured amount, in minor units. Present after capture. */
|
|
285
296
|
amount_received?: number | null;
|
|
297
|
+
/** Refunded/disputed totals; the payment `status` itself never reflects them. */
|
|
298
|
+
state_metadata?: PaymentIntentStateMetadata | null;
|
|
286
299
|
/** Capture method used. */
|
|
287
300
|
capture_method?: CaptureMethod | null;
|
|
288
301
|
/** Authentication type used (3DS or none). */
|
|
@@ -513,9 +526,19 @@ interface RefundCreateRequest {
|
|
|
513
526
|
metadata?: Record<string, unknown> | null;
|
|
514
527
|
}
|
|
515
528
|
interface RefundUpdateRequest {
|
|
529
|
+
/** Omit to leave the reason unchanged; send an explicit `null` to clear it. */
|
|
516
530
|
reason?: string | null;
|
|
517
531
|
metadata?: Record<string, unknown> | null;
|
|
518
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Response of `GET /refunds/aggregate`. NOTE: keyed by the backend's internal
|
|
535
|
+
* refund-status enum (`success`, `failure`, `transaction_failure`, `pending`,
|
|
536
|
+
* `manual_review`) — NOT the collapsed `RefundStatus` values
|
|
537
|
+
* (`succeeded`/`failed`/`pending`/`review`) that refund rows carry.
|
|
538
|
+
*/
|
|
539
|
+
interface RefundAggregateResponse {
|
|
540
|
+
status_with_count: Partial<Record<'success' | 'failure' | 'transaction_failure' | 'pending' | 'manual_review', number>>;
|
|
541
|
+
}
|
|
519
542
|
/** A Delopay refund returned by the API. */
|
|
520
543
|
interface RefundResponse {
|
|
521
544
|
/** Unique refund ID. */
|
|
@@ -774,7 +797,6 @@ interface DisputeListParams {
|
|
|
774
797
|
}
|
|
775
798
|
interface DisputeEvidenceRequest {
|
|
776
799
|
cancel_dispute?: boolean | null;
|
|
777
|
-
customer_email_body?: string | null;
|
|
778
800
|
customer_email_address?: string | null;
|
|
779
801
|
customer_name?: string | null;
|
|
780
802
|
customer_signature?: string | null;
|
|
@@ -799,10 +821,37 @@ interface DisputeEvidenceRequest {
|
|
|
799
821
|
cancellation_rebuttal?: string | null;
|
|
800
822
|
customer_communication?: string | null;
|
|
801
823
|
customer_purchase_ip?: string | null;
|
|
802
|
-
|
|
824
|
+
/**
|
|
825
|
+
* File id of the document showing the disputed charge and the alleged
|
|
826
|
+
* duplicate are distinct transactions. This is the field Stripe calls
|
|
827
|
+
* `duplicate_charge_documentation`.
|
|
828
|
+
*/
|
|
829
|
+
invoice_showing_distinct_transactions?: string | null;
|
|
830
|
+
/** File id of the recurring-transaction agreement (subscription disputes). */
|
|
831
|
+
recurring_transaction_agreement?: string | null;
|
|
832
|
+
/** Explanation of why the disputed charge is not a duplicate. */
|
|
803
833
|
duplicate_charge_explanation?: string | null;
|
|
834
|
+
/** Transaction id of the prior charge the disputed one allegedly duplicates. */
|
|
804
835
|
duplicate_charge_id?: string | null;
|
|
805
836
|
}
|
|
837
|
+
/** Backend evidence-type identifiers, serde snake_case (e.g. `receipt`,
|
|
838
|
+
* `invoice_showing_distinct_transactions`). Used for delete + retrieval. */
|
|
839
|
+
type DisputeEvidenceType = 'cancellation_policy' | 'customer_communication' | 'customer_signature' | 'receipt' | 'refund_policy' | 'service_documentation' | 'shipping_documentation' | 'invoice_showing_distinct_transactions' | 'recurring_transaction_agreement' | 'uncategorized_file';
|
|
840
|
+
/**
|
|
841
|
+
* One stored file-evidence entry, as `GET /disputes/evidence/{id}` returns
|
|
842
|
+
* it. The endpoint reports FILE evidence only — text evidence (customer
|
|
843
|
+
* name, product description, …) is not retrievable once submitted.
|
|
844
|
+
*/
|
|
845
|
+
interface DisputeEvidenceBlock {
|
|
846
|
+
evidence_type: DisputeEvidenceType;
|
|
847
|
+
file_metadata_response: {
|
|
848
|
+
file_id: string;
|
|
849
|
+
file_name?: string | null;
|
|
850
|
+
file_size?: number;
|
|
851
|
+
file_type?: string;
|
|
852
|
+
available?: boolean;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
806
855
|
interface MandateResponse {
|
|
807
856
|
mandate_id: string;
|
|
808
857
|
status: MandateStatus;
|
|
@@ -3514,12 +3563,16 @@ declare class Disputes {
|
|
|
3514
3563
|
*/
|
|
3515
3564
|
attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
3516
3565
|
/**
|
|
3517
|
-
* Retrieve previously
|
|
3566
|
+
* Retrieve previously stored evidence for a dispute.
|
|
3567
|
+
*
|
|
3568
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
3569
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
3570
|
+
* text evidence is not retrievable once submitted.
|
|
3518
3571
|
*
|
|
3519
3572
|
* @param disputeId - The dispute ID.
|
|
3520
|
-
* @returns The
|
|
3573
|
+
* @returns The stored file-evidence blocks.
|
|
3521
3574
|
*/
|
|
3522
|
-
retrieveEvidence(disputeId: string): Promise<
|
|
3575
|
+
retrieveEvidence(disputeId: string): Promise<DisputeEvidenceBlock[]>;
|
|
3523
3576
|
/**
|
|
3524
3577
|
* Delete submitted evidence for a dispute.
|
|
3525
3578
|
*
|
|
@@ -3538,15 +3591,19 @@ declare class Disputes {
|
|
|
3538
3591
|
/** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */
|
|
3539
3592
|
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3540
3593
|
/**
|
|
3541
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
3542
|
-
* `GET /disputes/{
|
|
3594
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
3595
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
3596
|
+
*
|
|
3597
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
3598
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
3599
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
3600
|
+
* before returning it.
|
|
3543
3601
|
*
|
|
3544
|
-
* Note:
|
|
3545
|
-
*
|
|
3546
|
-
*
|
|
3547
|
-
* path were silently hitting 404s.
|
|
3602
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
3603
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
3604
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
3548
3605
|
*/
|
|
3549
|
-
fetchFromConnector(
|
|
3606
|
+
fetchFromConnector(disputeId: string): Promise<DisputeResponse>;
|
|
3550
3607
|
}
|
|
3551
3608
|
|
|
3552
3609
|
/**
|
|
@@ -4259,9 +4316,9 @@ declare class Refunds {
|
|
|
4259
4316
|
/** Get refund filter options. `GET /refunds/filter` */
|
|
4260
4317
|
getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
4261
4318
|
/** Get refund aggregates. `GET /refunds/aggregate` */
|
|
4262
|
-
aggregate(params?: Record<string, string | number | undefined>): Promise<
|
|
4319
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4263
4320
|
/** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */
|
|
4264
|
-
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<
|
|
4321
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4265
4322
|
/** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */
|
|
4266
4323
|
manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse>;
|
|
4267
4324
|
}
|
|
@@ -5743,4 +5800,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5743
5800
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5744
5801
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5745
5802
|
|
|
5746
|
-
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, 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 MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, 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 PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, 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 RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, 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 UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5803
|
+
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, 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 MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, 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 PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, 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 UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -747,10 +747,14 @@ var Disputes = class {
|
|
|
747
747
|
return this.request("PUT", "/disputes/evidence", { body: params });
|
|
748
748
|
}
|
|
749
749
|
/**
|
|
750
|
-
* Retrieve previously
|
|
750
|
+
* Retrieve previously stored evidence for a dispute.
|
|
751
|
+
*
|
|
752
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
753
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
754
|
+
* text evidence is not retrievable once submitted.
|
|
751
755
|
*
|
|
752
756
|
* @param disputeId - The dispute ID.
|
|
753
|
-
* @returns The
|
|
757
|
+
* @returns The stored file-evidence blocks.
|
|
754
758
|
*/
|
|
755
759
|
async retrieveEvidence(disputeId) {
|
|
756
760
|
return this.request("GET", `/disputes/evidence/${encodeURIComponent(disputeId)}`);
|
|
@@ -788,16 +792,22 @@ var Disputes = class {
|
|
|
788
792
|
return this.request("GET", "/disputes/profile/aggregate", { query: params });
|
|
789
793
|
}
|
|
790
794
|
/**
|
|
791
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
792
|
-
* `GET /disputes/{
|
|
795
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
796
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
797
|
+
*
|
|
798
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
799
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
800
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
801
|
+
* before returning it.
|
|
793
802
|
*
|
|
794
|
-
* Note:
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
* path were silently hitting 404s.
|
|
803
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
804
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
805
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
798
806
|
*/
|
|
799
|
-
async fetchFromConnector(
|
|
800
|
-
return this.request("GET", `/disputes/${encodeURIComponent(
|
|
807
|
+
async fetchFromConnector(disputeId) {
|
|
808
|
+
return this.request("GET", `/disputes/${encodeURIComponent(disputeId)}`, {
|
|
809
|
+
query: { force_sync: "true" }
|
|
810
|
+
});
|
|
801
811
|
}
|
|
802
812
|
};
|
|
803
813
|
|