@delopay/sdk 0.113.0 → 0.115.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-NY5O6S5X.js → chunk-VH5NCMH6.js} +14 -1
- package/dist/chunk-VH5NCMH6.js.map +1 -0
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +1 -1
- package/dist/internal.cjs +69 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +109 -2
- package/dist/internal.d.ts +109 -2
- package/dist/internal.js +57 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NY5O6S5X.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectResponse, ShopResponse, PaymentResponse, VaultEnvironment, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, PaymentAttemptsListResponse, PaymentStatusHistoryResponse, RefundListResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, ClientAnalyticsRequest, DevicesAnalyticsResponse, GeoAnalyticsResponse, GeoDrillRequest, DrillResponse, DeviceDrillRequest, ScopeDrillRequest, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, PaymentsDeleteResponse, PaymentClientContextListResponse, SettlementStatementListParams, SettlementStatementListResponse, FeeStatementDetail, StatementPdfParams, SettlementOverviewParams, SettlementOverviewResponse, SettlementCurrentParams, SettlementCurrentResponse,
|
|
1
|
+
import { BillingProfileResponse, ProjectResponse, ShopResponse, PaymentResponse, VaultEnvironment, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, PaymentAttemptsListResponse, PaymentStatusHistoryResponse, RefundListResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, ClientAnalyticsRequest, DevicesAnalyticsResponse, GeoAnalyticsResponse, GeoDrillRequest, DrillResponse, DeviceDrillRequest, ScopeDrillRequest, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, PaymentsDeleteResponse, PaymentClientContextListResponse, SettlementStatementListParams, SettlementStatementListResponse, FeeStatementDetail, StatementPdfParams, SettlementOverviewParams, SettlementOverviewResponse, SettlementCurrentParams, SettlementCurrentResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.cjs';
|
|
2
2
|
export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, AddUserRequest, AddUserResponse, Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, AmountFilter, AmountRange, Analytics, AnalyticsChannel, AnalyticsChild, AnalyticsConnectorDay, AnalyticsConnectorSeries, AnalyticsDashboard, AnalyticsDayBucket, AnalyticsGranularity, AnalyticsMethodSlice, AnalyticsOutcome, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyListConstraints, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AttemptStatus, Audit, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, AvailabilityOverrideCreateRequest, AvailabilityOverrideResponse, AvailabilityOverrides, AvailabilityPreviewMethod, AvailabilityPreviewParams, AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BankCodeResponse, BankDebitTypes, BankTransferTypes, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlockedAttempt, BlockedAttemptListParams, BlockedAttemptListResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BuiltInRegionGroupResponse, BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, CancelModeOutcome, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, CardNetworkTypes, CardSpecificFeatures, Cards, ChangePasswordRequest, CheckoutBranding, CheckoutBrandingResponse, CheckoutBrandingUpdate, CheckoutCustomField, CheckoutEventKind, CheckoutSession, CheckoutSessionOptions, CheckoutThemeComparisonSide, CheckoutThemeConversionCaveat, CheckoutThemeConversionCell, CheckoutThemeConversionComparison, CheckoutThemeConversionQuery, CheckoutThemeConversionResponse, CheckoutThemeConversionSegment, CheckoutThemeDenominatorBasis, CheckoutThemeDimension, CheckoutThemeOutput, CheckoutThemeProgram, CheckoutThemeProgramRequest, CheckoutThemeProgramResponse, CheckoutThemeRule, CheckoutThemeSampleVerdict, ClientAnalyticsCaveat, ClientAnalyticsFilters, ClientDrillSortKey, ConditionNode, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCloneRequest, ConnectorCreateRequest, ConnectorFeatureMatrixEntry, ConnectorIntegrationStatus, ConnectorListResponse, ConnectorOwnership, ConnectorResponse, ConnectorRisk, ConnectorSelection, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, ConnectorWebhookSyncResponse, ConnectorWebhookSyncResult, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CurrencyRevenue, CustomFieldCondition, CustomFieldConditionSource, CustomFieldContext, CustomFieldOperator, CustomFieldOption, CustomFieldTranslations, CustomFieldType, CustomFieldVisibility, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DecidePendingOperationRequest, DeleteAccountRequest, DeleteEvidenceRequest, DeleteUserRoleRequest, DelopayAuthenticationError, DelopayConnectorCategory, DelopayError, DelopayLogger, DelopayOptions, DeviceAnalyticsChild, DeviceAnalyticsTotals, DeviceBrowserSlice, DeviceChannelBucket, DeviceClassSlice, DeviceDrillBase, DeviceDrillTarget, DeviceModelSlice, DevicePlatformSlice, DeviceSessionBucket, DisputeEvidenceBlock, DisputeEvidenceRequest, DisputeEvidenceType, DisputeListParams, DisputeOutcomeReporting, DisputeResponse, DisputeStage, DisputeStatus, DrillListControls, DrillPayment, DrillSortKey, DrillSummary, EncodedBranding, EntityType, EpayoutsCatalogEntry, EpayoutsCatalogResponse, EpayoutsLocality, EpayoutsMethod, EpayoutsMethodsResponse, EpayoutsRail, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeatureMatrixResponse, FeatureStatus, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleDefaultPrecedence, FeeRuleInput, FeeSpecInput, FeeStatementSummary, FeeType, Files, FocusedCheckoutUrlParams, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GeoAnalyticsChild, GeoAnalyticsTotals, GeoCitySlice, GeoCountrySlice, GeoLanguageSlice, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, GroupNode, ImpersonateEmployeeRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceAmountState, InvoiceOutcomes, InvoiceStatus, LabelStyle, LayoutStyle, LeafNode, LedgerEntry, LedgerListParams, LedgerResponse, LimitedOperation, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, ListUsersInLineageParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MarginQuality, MerchantAccountCreateRequest, MerchantAccountType, MerchantAuditActorInfo, MerchantAuditActorKind, MerchantAuditImpersonationKind, MerchantAuditLogEntry, MerchantAuditLogListParams, MerchantAuditLogListResponse, MerchantAuditSessionInfo, MerchantConnectorWebhookDetailsUpdate, MerchantOverviewResponse, MerchantOverviewStat, MerchantRisk, MerchantRoutingAlgorithm, MethodSurcharge, MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, NativePaneCapability, NativePaneMethodInfo, NativePaneOpenTarget, NativePaneRail, NativePaneView, NativePaneVisibility, NativePanesCatalogResponse, NativePanesConnectorCatalog, NonPillRadius, OperationLimitOnExceeded, OperationLimitRule, OperationLimitRuleDeleteResponse, OperationLimitRuleListParams, OperationLimitScope, OperationLimitSettings, OperationLimitWindowMode, OperationLimits, OverrideAction, OverrideScope, PANES_MAX, PANE_CATEGORY_KEYS, PANE_ICON_KEYS, Pane, PaneCapability, PaneDisplayDefaults, PaneIssue, PaneIssueCode, PaneMethodInfo, PaneOpenTarget, PaneRail, PaneView, PaneVisibility, PanesCatalogResponse, PanesConnectorCatalog, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentAttemptResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentClientContextEntry, PaymentConfirmRequest, PaymentCreateRequest, PaymentErrorDetails, PaymentExperience, PaymentExperienceTypes, PaymentIdFormatConfig, PaymentIdStyle, PaymentIntentStateMetadata, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListFilterConstraints, PaymentListFilteredResponse, PaymentListOrder, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodAmountLimits, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodDisplayInfo, PaymentMethodListInstallmentAmountDetails, PaymentMethodListInstallmentOption, PaymentMethodListInstallmentPlan, PaymentMethodListIntentData, PaymentMethodListParams, PaymentMethodListResponse, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentStatusHistoryEntityType, PaymentStatusHistoryEvent, PaymentUpdateRequest, PaymentsDeletePolicyResponse, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PayseproMethod, PayseproMethodsResponse, PendingApprovalErrorDetails, PendingOperation, PendingOperationLimitContext, PendingOperationListParams, PendingOperationListResponse, PendingOperationStatus, PendingOperationSummary, PerMethodSurchargeItem, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlanSlice, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProcessorCostBasis, ProcessorCostBucket, ProcessorCostSource, ProcessorSlice, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileDeniedConnectorsResponse, ProfileLogoUploadResponse, ProfileUpdateRequest, ProgramConnectorSelection, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, PublishableKey, RecordCheckoutEventRequest, RecordCheckoutEventResponse, RecoveryCodesResponse, RefundAggregateResponse, RefundCreateRequest, RefundListParams, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCountriesResponse, RegionCreateRequest, RegionResponse, RegionSetCountriesRequest, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, RequiredFieldInfo, ResetPasswordRequest, ResponsePaymentMethodTypes, ResponsePaymentMethodsEnabled, ResumeSubscriptionRequest, ResumeSubscriptionResponse, Risk, RoleConnectorGrant, RoleConnectorGrantEntry, RoutableConnectorChoice, RoutingActivatePayload, RoutingAlgorithmKind, RoutingConfigCreateRequest, RoutingConfigHistoryResponse, RoutingConfigResponse, RoutingConfigUpdateRequest, RoutingConfigVersion, RoutingConnectorCap, RoutingConnectorCaps, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, RoutingHistoryParams, RuleConnectorSelection, STRIPE_FALLBACK_PANE_CATALOG, STRIPE_FALLBACK_PANE_METHODS, STRIPE_NATIVE_PANE_METHODS, ScopeDrillBase, ScopeDrillSortKey, ScopeDrillTarget, Search, SearchGroupResponse, SearchIndex, SearchStatus, SearchTimeRange, Settlement, SettlementBackfillRequest, SettlementBackfillResponse, SettlementBucket, SettlementCostParams, SettlementCostPeriod, SettlementCostResponse, SettlementLine, SettlementLineBase, SettlementLineListParams, SettlementLineListResponse, SettlementLineWithProcessorCost, SettlementLineWithoutProcessorCost, SettlementPayoutStatus, ShopCreateRequest, ShopFeeConfigEntry, ShopFeeConfigParams, ShopFeeConfigResponse, ShopRisk, ShopSettlementOverview, ShopStats, ShopStatsResponse, ShopUpdateRequest, ShopVisibilityResponse, ShopVisibilityUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StatementAdjustment, StatementAdjustmentCreateRequest, StatementAdjustmentListResponse, StatementGenerateRequest, StatementPayoutUpdateRequest, StaticRoutingAlgorithm, StatsPeriod, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, StripeNativePane, StripePaymentMethodDomainResult, StripePaymentMethodDomainStatus, StripePaymentMethodDomainsRegisterRequest, StripePaymentMethodDomainsRegisterResponse, SubscriptionBillingProcessorResponse, SubscriptionBucket, SubscriptionCaveat, SubscriptionChild, SubscriptionDrillBase, SubscriptionDrillSortKey, SubscriptionDrillTarget, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionFilters, SubscriptionInvoice, SubscriptionInvoiceListParams, SubscriptionInvoiceListResponse, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionMovement, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPaymentLink, SubscriptionPaymentLookupRequest, SubscriptionPaymentLookupResponse, SubscriptionPeriodUnit, SubscriptionProcessors, SubscriptionResponse, SubscriptionStatus, SubscriptionTotals, Subscriptions, SummaryPosition, SupportedPaymentMethod, SurchargeDetailsResponse, SurchargeResponse, SurchargeRuleRequest, SurchargeRuleResponse, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThemeBrowserLanguage, ThemeCheckoutChannel, ThemeChoice, ThemeCondition, ThemeDeviceClass, ThemeEnumCondition, ThemeIfStatement, ThemeMetadataCondition, ThemeNumberCondition, ThemeTrafficSource, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TimeToPayBucket, TimeToPayBucketLabel, TimeToPayStats, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateMetadataRequest, UpdateOperationLimitSettingsRequest, UpdateRoleConnectorGrantParams, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UpdateUserRoleRequest, UpsertOperationLimitRuleRequest, UpsertRefundLimitRuleRequest, UpsertSettlementAdjustmentLimitRuleRequest, UpsertSettlementPayoutLimitRuleRequest, UserInLineage, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VaultCheck, VaultCheckId, VaultCheckStatus, VaultCollectSessionResponse, VaultPaymentMethodRequest, VaultPaymentMethodResponse, VaultRouteApplyVerification, VaultRouteChange, VaultRouteChangeKind, VaultRouteFieldChange, VaultRouteIds, VaultRoutePurpose, VaultRouteWarning, VaultRouteWarningCode, VaultRoutesApplyRequest, VaultRoutesApplyResponse, VaultRoutesFingerprint, VaultRoutesPreviewRequest, VaultRoutesPreviewResponse, VaultVerificationResponse, VaultVerifyRequest, VerifyTotpRequest, WCAG_AA_TEXT, WCAG_AA_UI, WebhookDeliveryAttempt, WebhookDeliveryTerminalReason, WebhookDetails, WebhookEvent, WebhookRefundStatus, WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, clonePane, contrastRatio, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, decodePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, defaultPane, emptyPaneCatalog, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, encodePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, offerablePaneMethods, paneCatalogFor, paneDisplayDefaults, paneMethodInfo, paneRailAllowed, paneViewVisibility, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, validatePanes, verticalGapValue, visibleCustomFields } from './index.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -582,6 +582,69 @@ interface AdminUnsuspendRequest {
|
|
|
582
582
|
interface AdminSetTrustedRequest {
|
|
583
583
|
trusted: boolean;
|
|
584
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Admin-only: mark a merchant free (not billed), or put it back on the
|
|
587
|
+
* prepaid model (delopay-backend#378).
|
|
588
|
+
*
|
|
589
|
+
* A union rather than an optional `reason`, on the `SettlementCostPeriod`
|
|
590
|
+
* precedent: `free: true` without a reason can only earn a 412, so that shape
|
|
591
|
+
* must not typecheck. Marking free normalises a billing-caused status — `pending_setup`, `delinquent`, or an
|
|
592
|
+
* `auto_recharge` suspension — to `active`. A sticky `admin` suspension is
|
|
593
|
+
* refused with 412 until lifted explicitly: the flag must never quietly
|
|
594
|
+
* unblock a merchant that was stopped for fraud. `free: false` re-derives the
|
|
595
|
+
* status from the balance the way an unsuspend does.
|
|
596
|
+
*/
|
|
597
|
+
type AdminSetFreeRequest = {
|
|
598
|
+
free: true;
|
|
599
|
+
/** Why the merchant is not billed. Required: the router refuses `free: true` without one (412). */
|
|
600
|
+
reason: string;
|
|
601
|
+
} | {
|
|
602
|
+
free: false;
|
|
603
|
+
/** Ignored when clearing the flag; accepted so a caller can carry one through. */
|
|
604
|
+
reason?: string;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Admin-only: delete a merchant's **entire** ledger (delopay-backend#378).
|
|
608
|
+
* Every live entry is soft-deleted (kept for replay protection), the balance
|
|
609
|
+
* is set to zero and the status re-derived. Refused with 412 while the
|
|
610
|
+
* merchant has shop allocations.
|
|
611
|
+
*/
|
|
612
|
+
interface AdminResetLedgerRequest {
|
|
613
|
+
/** Human-readable reason, required for audit. */
|
|
614
|
+
reason: string;
|
|
615
|
+
}
|
|
616
|
+
interface AdminResetLedgerResponse {
|
|
617
|
+
/** Live entries removed from the ledger. */
|
|
618
|
+
deleted_count: number;
|
|
619
|
+
/** Signed sum of the removed entries' amounts, in the balance currency. */
|
|
620
|
+
deleted_amount: number;
|
|
621
|
+
/** The balance before the reset; after it the balance is always zero. */
|
|
622
|
+
balance_before: number;
|
|
623
|
+
/** The profile as it stands after the reset. */
|
|
624
|
+
profile: BillingProfileResponse;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Admin-only: (re)create a merchant's ledger, optionally seeded with an
|
|
628
|
+
* opening balance (delopay-backend#378). Ensures the billing profile exists
|
|
629
|
+
* (created without the welcome promo credit) and, when `opening_balance` is
|
|
630
|
+
* set, writes one `opening_balance` entry. Refused with 412 while the
|
|
631
|
+
* merchant still has live ledger entries, or a non-zero balance with none.
|
|
632
|
+
* Does not clear the free flag.
|
|
633
|
+
*/
|
|
634
|
+
interface AdminCreateLedgerRequest {
|
|
635
|
+
/** Opening balance in minor units of the balance currency. Omit or `0` for an empty ledger. */
|
|
636
|
+
opening_balance?: number;
|
|
637
|
+
/** ISO-4217 currency for a profile that does not exist yet; must match an existing profile's. */
|
|
638
|
+
balance_currency?: string;
|
|
639
|
+
/** Human-readable reason, required for audit; also the opening entry's description. */
|
|
640
|
+
reason: string;
|
|
641
|
+
}
|
|
642
|
+
interface AdminCreateLedgerResponse {
|
|
643
|
+
/** The opening-balance entry, when one was written. */
|
|
644
|
+
ledger_entry_id?: string | null;
|
|
645
|
+
/** The profile as it stands after the call. */
|
|
646
|
+
profile: BillingProfileResponse;
|
|
647
|
+
}
|
|
585
648
|
interface CardIssuerCreateRequest {
|
|
586
649
|
issuer_name: string;
|
|
587
650
|
}
|
|
@@ -1418,6 +1481,50 @@ declare class PlatformBilling {
|
|
|
1418
1481
|
* @returns The updated billing profile.
|
|
1419
1482
|
*/
|
|
1420
1483
|
setTrusted(merchantId: string, params: AdminSetTrustedRequest): Promise<BillingProfileResponse>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Mark a merchant free (not billed), or put it back on the prepaid model
|
|
1486
|
+
* (delopay-backend#378). While free, no platform fee is deducted, the
|
|
1487
|
+
* payment gate never blocks on billing status, top-ups are refused and
|
|
1488
|
+
* auto-recharge is inert. Marking free needs a `reason` and is refused
|
|
1489
|
+
* (412) while an admin suspension is in force — lift that first.
|
|
1490
|
+
*
|
|
1491
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1492
|
+
*
|
|
1493
|
+
* @param merchantId - The merchant account ID.
|
|
1494
|
+
* @param params - The desired free state and, when marking free, the reason.
|
|
1495
|
+
* @returns The updated billing profile.
|
|
1496
|
+
*/
|
|
1497
|
+
setFree(merchantId: string, params: AdminSetFreeRequest): Promise<BillingProfileResponse>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Delete a merchant's **entire** ledger (delopay-backend#378). Every live
|
|
1500
|
+
* entry is soft-deleted — kept, so a replayed fee deduction or top-up
|
|
1501
|
+
* webhook still no-ops — the balance is set to zero and the status
|
|
1502
|
+
* re-derived (`active` for a free merchant; an active paying merchant
|
|
1503
|
+
* lands in `delinquent`). Refused (412) while the merchant has shop
|
|
1504
|
+
* allocations. Audited.
|
|
1505
|
+
*
|
|
1506
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1507
|
+
*
|
|
1508
|
+
* @param merchantId - The merchant account ID.
|
|
1509
|
+
* @param params - The reason, required for audit.
|
|
1510
|
+
* @returns What was removed and the post-reset profile.
|
|
1511
|
+
*/
|
|
1512
|
+
resetLedger(merchantId: string, params: AdminResetLedgerRequest): Promise<AdminResetLedgerResponse>;
|
|
1513
|
+
/**
|
|
1514
|
+
* (Re)create a merchant's ledger, optionally seeded with an opening balance
|
|
1515
|
+
* (delopay-backend#378). Ensures the billing profile exists (created
|
|
1516
|
+
* without the welcome promo credit) and, when `opening_balance` is set,
|
|
1517
|
+
* writes one `opening_balance` entry through the same atomic helper an
|
|
1518
|
+
* admin credit uses. Refused (412) while live entries or a non-zero balance
|
|
1519
|
+
* remain — reset first. Does not clear the free flag. Audited.
|
|
1520
|
+
*
|
|
1521
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1522
|
+
*
|
|
1523
|
+
* @param merchantId - The merchant account ID.
|
|
1524
|
+
* @param params - Opening balance (minor units), currency for a new profile, and the reason.
|
|
1525
|
+
* @returns The opening entry id (if one was written) and the profile.
|
|
1526
|
+
*/
|
|
1527
|
+
createLedger(merchantId: string, params: AdminCreateLedgerRequest): Promise<AdminCreateLedgerResponse>;
|
|
1421
1528
|
}
|
|
1422
1529
|
|
|
1423
1530
|
/**
|
|
@@ -1510,4 +1617,4 @@ declare class DelopayInternal extends Delopay {
|
|
|
1510
1617
|
constructor(...args: ConstructorParameters<typeof Delopay>);
|
|
1511
1618
|
}
|
|
1512
1619
|
|
|
1513
|
-
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminAttachVaultRequest, type AdminAttachVaultResponse, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminSetTrustedRequest, type AdminShopVaultState, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AdminVaultEntitlementState, type AdminVaultEnvironmentState, type AdminVaultStateResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditActorInfo, type AuditActorKind, type AuditImpersonationKind, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, type AuditSessionInfo, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, ClientAnalyticsRequest, Configs, type ConnectorRestrictionResponse, type ConnectorRestrictionRuleAction, type ConnectorRestrictionRuleResponse, ConnectorRestrictionRules, type ConnectorRestrictionScope, ConnectorRestrictions, type ConnectorVisibility, type CreateConnectorRestrictionRuleRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, DeviceDrillRequest, DevicesAnalyticsResponse, DrillResponse, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, FeeStatementDetail, type FeeTotalBound, GeoAnalyticsResponse, GeoDrillRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LastAdministratorRefusal, type LastAdministratorRoute, type LedgerDayBucket, type LedgerMerchant, type ListConnectorRestrictionRulesQuery, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, PaymentAttemptsListResponse, type PaymentAutoCloseConfigResponse, type PaymentAutoCloseOverrideResponse, PaymentClientContextListResponse, type PaymentPeriodStats, PaymentResponse, PaymentStatusHistoryResponse, PaymentsDeleteResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, type PromoConfigResponse, RefundListResponse, RequestFn, ScopeDrillRequest, SettlementCurrentParams, SettlementCurrentResponse, SettlementOverviewParams, SettlementOverviewResponse, SettlementStatementListParams, SettlementStatementListResponse, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, StatementPdfParams, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, type TransactionDeleteConfigResponse, type TransactionDeleteOverrideResponse, type UpdateConnectorRestrictionRuleRequest, type UpdateLedgerEntryRequest, type UpdatePaymentAutoCloseConfigRequest, type UpdatePaymentAutoCloseOverrideRequest, type UpdatePromoConfigRequest, type UpdateTransactionDeleteConfigRequest, type UpdateTransactionDeleteOverrideRequest, type UpsertConnectorRestrictionRequest, VaultEnvironment };
|
|
1620
|
+
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminAttachVaultRequest, type AdminAttachVaultResponse, type AdminCreateLedgerRequest, type AdminCreateLedgerResponse, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminResetLedgerRequest, type AdminResetLedgerResponse, type AdminSetFreeRequest, type AdminSetTrustedRequest, type AdminShopVaultState, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AdminVaultEntitlementState, type AdminVaultEnvironmentState, type AdminVaultStateResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditActorInfo, type AuditActorKind, type AuditImpersonationKind, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, type AuditSessionInfo, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, ClientAnalyticsRequest, Configs, type ConnectorRestrictionResponse, type ConnectorRestrictionRuleAction, type ConnectorRestrictionRuleResponse, ConnectorRestrictionRules, type ConnectorRestrictionScope, ConnectorRestrictions, type ConnectorVisibility, type CreateConnectorRestrictionRuleRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, DeviceDrillRequest, DevicesAnalyticsResponse, DrillResponse, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, FeeStatementDetail, type FeeTotalBound, GeoAnalyticsResponse, GeoDrillRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LastAdministratorRefusal, type LastAdministratorRoute, type LedgerDayBucket, type LedgerMerchant, type ListConnectorRestrictionRulesQuery, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, PaymentAttemptsListResponse, type PaymentAutoCloseConfigResponse, type PaymentAutoCloseOverrideResponse, PaymentClientContextListResponse, type PaymentPeriodStats, PaymentResponse, PaymentStatusHistoryResponse, PaymentsDeleteResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, type PromoConfigResponse, RefundListResponse, RequestFn, ScopeDrillRequest, SettlementCurrentParams, SettlementCurrentResponse, SettlementOverviewParams, SettlementOverviewResponse, SettlementStatementListParams, SettlementStatementListResponse, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, StatementPdfParams, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, type TransactionDeleteConfigResponse, type TransactionDeleteOverrideResponse, type UpdateConnectorRestrictionRuleRequest, type UpdateLedgerEntryRequest, type UpdatePaymentAutoCloseConfigRequest, type UpdatePaymentAutoCloseOverrideRequest, type UpdatePromoConfigRequest, type UpdateTransactionDeleteConfigRequest, type UpdateTransactionDeleteOverrideRequest, type UpsertConnectorRestrictionRequest, VaultEnvironment };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectResponse, ShopResponse, PaymentResponse, VaultEnvironment, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, PaymentAttemptsListResponse, PaymentStatusHistoryResponse, RefundListResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, ClientAnalyticsRequest, DevicesAnalyticsResponse, GeoAnalyticsResponse, GeoDrillRequest, DrillResponse, DeviceDrillRequest, ScopeDrillRequest, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, PaymentsDeleteResponse, PaymentClientContextListResponse, SettlementStatementListParams, SettlementStatementListResponse, FeeStatementDetail, StatementPdfParams, SettlementOverviewParams, SettlementOverviewResponse, SettlementCurrentParams, SettlementCurrentResponse,
|
|
1
|
+
import { BillingProfileResponse, ProjectResponse, ShopResponse, PaymentResponse, VaultEnvironment, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, PaymentAttemptsListResponse, PaymentStatusHistoryResponse, RefundListResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, ClientAnalyticsRequest, DevicesAnalyticsResponse, GeoAnalyticsResponse, GeoDrillRequest, DrillResponse, DeviceDrillRequest, ScopeDrillRequest, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, PaymentsDeleteResponse, PaymentClientContextListResponse, SettlementStatementListParams, SettlementStatementListResponse, FeeStatementDetail, StatementPdfParams, SettlementOverviewParams, SettlementOverviewResponse, SettlementCurrentParams, SettlementCurrentResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.js';
|
|
2
2
|
export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, AddUserRequest, AddUserResponse, Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, AmountFilter, AmountRange, Analytics, AnalyticsChannel, AnalyticsChild, AnalyticsConnectorDay, AnalyticsConnectorSeries, AnalyticsDashboard, AnalyticsDayBucket, AnalyticsGranularity, AnalyticsMethodSlice, AnalyticsOutcome, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyListConstraints, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AttemptStatus, Audit, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, AvailabilityOverrideCreateRequest, AvailabilityOverrideResponse, AvailabilityOverrides, AvailabilityPreviewMethod, AvailabilityPreviewParams, AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BankCodeResponse, BankDebitTypes, BankTransferTypes, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlockedAttempt, BlockedAttemptListParams, BlockedAttemptListResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BuiltInRegionGroupResponse, BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, CancelModeOutcome, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, CardNetworkTypes, CardSpecificFeatures, Cards, ChangePasswordRequest, CheckoutBranding, CheckoutBrandingResponse, CheckoutBrandingUpdate, CheckoutCustomField, CheckoutEventKind, CheckoutSession, CheckoutSessionOptions, CheckoutThemeComparisonSide, CheckoutThemeConversionCaveat, CheckoutThemeConversionCell, CheckoutThemeConversionComparison, CheckoutThemeConversionQuery, CheckoutThemeConversionResponse, CheckoutThemeConversionSegment, CheckoutThemeDenominatorBasis, CheckoutThemeDimension, CheckoutThemeOutput, CheckoutThemeProgram, CheckoutThemeProgramRequest, CheckoutThemeProgramResponse, CheckoutThemeRule, CheckoutThemeSampleVerdict, ClientAnalyticsCaveat, ClientAnalyticsFilters, ClientDrillSortKey, ConditionNode, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCloneRequest, ConnectorCreateRequest, ConnectorFeatureMatrixEntry, ConnectorIntegrationStatus, ConnectorListResponse, ConnectorOwnership, ConnectorResponse, ConnectorRisk, ConnectorSelection, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, ConnectorWebhookSyncResponse, ConnectorWebhookSyncResult, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CurrencyRevenue, CustomFieldCondition, CustomFieldConditionSource, CustomFieldContext, CustomFieldOperator, CustomFieldOption, CustomFieldTranslations, CustomFieldType, CustomFieldVisibility, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DecidePendingOperationRequest, DeleteAccountRequest, DeleteEvidenceRequest, DeleteUserRoleRequest, DelopayAuthenticationError, DelopayConnectorCategory, DelopayError, DelopayLogger, DelopayOptions, DeviceAnalyticsChild, DeviceAnalyticsTotals, DeviceBrowserSlice, DeviceChannelBucket, DeviceClassSlice, DeviceDrillBase, DeviceDrillTarget, DeviceModelSlice, DevicePlatformSlice, DeviceSessionBucket, DisputeEvidenceBlock, DisputeEvidenceRequest, DisputeEvidenceType, DisputeListParams, DisputeOutcomeReporting, DisputeResponse, DisputeStage, DisputeStatus, DrillListControls, DrillPayment, DrillSortKey, DrillSummary, EncodedBranding, EntityType, EpayoutsCatalogEntry, EpayoutsCatalogResponse, EpayoutsLocality, EpayoutsMethod, EpayoutsMethodsResponse, EpayoutsRail, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeatureMatrixResponse, FeatureStatus, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleDefaultPrecedence, FeeRuleInput, FeeSpecInput, FeeStatementSummary, FeeType, Files, FocusedCheckoutUrlParams, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GeoAnalyticsChild, GeoAnalyticsTotals, GeoCitySlice, GeoCountrySlice, GeoLanguageSlice, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, GroupNode, ImpersonateEmployeeRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceAmountState, InvoiceOutcomes, InvoiceStatus, LabelStyle, LayoutStyle, LeafNode, LedgerEntry, LedgerListParams, LedgerResponse, LimitedOperation, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, ListUsersInLineageParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MarginQuality, MerchantAccountCreateRequest, MerchantAccountType, MerchantAuditActorInfo, MerchantAuditActorKind, MerchantAuditImpersonationKind, MerchantAuditLogEntry, MerchantAuditLogListParams, MerchantAuditLogListResponse, MerchantAuditSessionInfo, MerchantConnectorWebhookDetailsUpdate, MerchantOverviewResponse, MerchantOverviewStat, MerchantRisk, MerchantRoutingAlgorithm, MethodSurcharge, MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, NativePaneCapability, NativePaneMethodInfo, NativePaneOpenTarget, NativePaneRail, NativePaneView, NativePaneVisibility, NativePanesCatalogResponse, NativePanesConnectorCatalog, NonPillRadius, OperationLimitOnExceeded, OperationLimitRule, OperationLimitRuleDeleteResponse, OperationLimitRuleListParams, OperationLimitScope, OperationLimitSettings, OperationLimitWindowMode, OperationLimits, OverrideAction, OverrideScope, PANES_MAX, PANE_CATEGORY_KEYS, PANE_ICON_KEYS, Pane, PaneCapability, PaneDisplayDefaults, PaneIssue, PaneIssueCode, PaneMethodInfo, PaneOpenTarget, PaneRail, PaneView, PaneVisibility, PanesCatalogResponse, PanesConnectorCatalog, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentAttemptResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentClientContextEntry, PaymentConfirmRequest, PaymentCreateRequest, PaymentErrorDetails, PaymentExperience, PaymentExperienceTypes, PaymentIdFormatConfig, PaymentIdStyle, PaymentIntentStateMetadata, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListFilterConstraints, PaymentListFilteredResponse, PaymentListOrder, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodAmountLimits, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodDisplayInfo, PaymentMethodListInstallmentAmountDetails, PaymentMethodListInstallmentOption, PaymentMethodListInstallmentPlan, PaymentMethodListIntentData, PaymentMethodListParams, PaymentMethodListResponse, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentStatusHistoryEntityType, PaymentStatusHistoryEvent, PaymentUpdateRequest, PaymentsDeletePolicyResponse, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PayseproMethod, PayseproMethodsResponse, PendingApprovalErrorDetails, PendingOperation, PendingOperationLimitContext, PendingOperationListParams, PendingOperationListResponse, PendingOperationStatus, PendingOperationSummary, PerMethodSurchargeItem, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlanSlice, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProcessorCostBasis, ProcessorCostBucket, ProcessorCostSource, ProcessorSlice, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileDeniedConnectorsResponse, ProfileLogoUploadResponse, ProfileUpdateRequest, ProgramConnectorSelection, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, PublishableKey, RecordCheckoutEventRequest, RecordCheckoutEventResponse, RecoveryCodesResponse, RefundAggregateResponse, RefundCreateRequest, RefundListParams, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCountriesResponse, RegionCreateRequest, RegionResponse, RegionSetCountriesRequest, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, RequiredFieldInfo, ResetPasswordRequest, ResponsePaymentMethodTypes, ResponsePaymentMethodsEnabled, ResumeSubscriptionRequest, ResumeSubscriptionResponse, Risk, RoleConnectorGrant, RoleConnectorGrantEntry, RoutableConnectorChoice, RoutingActivatePayload, RoutingAlgorithmKind, RoutingConfigCreateRequest, RoutingConfigHistoryResponse, RoutingConfigResponse, RoutingConfigUpdateRequest, RoutingConfigVersion, RoutingConnectorCap, RoutingConnectorCaps, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, RoutingHistoryParams, RuleConnectorSelection, STRIPE_FALLBACK_PANE_CATALOG, STRIPE_FALLBACK_PANE_METHODS, STRIPE_NATIVE_PANE_METHODS, ScopeDrillBase, ScopeDrillSortKey, ScopeDrillTarget, Search, SearchGroupResponse, SearchIndex, SearchStatus, SearchTimeRange, Settlement, SettlementBackfillRequest, SettlementBackfillResponse, SettlementBucket, SettlementCostParams, SettlementCostPeriod, SettlementCostResponse, SettlementLine, SettlementLineBase, SettlementLineListParams, SettlementLineListResponse, SettlementLineWithProcessorCost, SettlementLineWithoutProcessorCost, SettlementPayoutStatus, ShopCreateRequest, ShopFeeConfigEntry, ShopFeeConfigParams, ShopFeeConfigResponse, ShopRisk, ShopSettlementOverview, ShopStats, ShopStatsResponse, ShopUpdateRequest, ShopVisibilityResponse, ShopVisibilityUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StatementAdjustment, StatementAdjustmentCreateRequest, StatementAdjustmentListResponse, StatementGenerateRequest, StatementPayoutUpdateRequest, StaticRoutingAlgorithm, StatsPeriod, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, StripeNativePane, StripePaymentMethodDomainResult, StripePaymentMethodDomainStatus, StripePaymentMethodDomainsRegisterRequest, StripePaymentMethodDomainsRegisterResponse, SubscriptionBillingProcessorResponse, SubscriptionBucket, SubscriptionCaveat, SubscriptionChild, SubscriptionDrillBase, SubscriptionDrillSortKey, SubscriptionDrillTarget, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionFilters, SubscriptionInvoice, SubscriptionInvoiceListParams, SubscriptionInvoiceListResponse, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionMovement, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPaymentLink, SubscriptionPaymentLookupRequest, SubscriptionPaymentLookupResponse, SubscriptionPeriodUnit, SubscriptionProcessors, SubscriptionResponse, SubscriptionStatus, SubscriptionTotals, Subscriptions, SummaryPosition, SupportedPaymentMethod, SurchargeDetailsResponse, SurchargeResponse, SurchargeRuleRequest, SurchargeRuleResponse, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThemeBrowserLanguage, ThemeCheckoutChannel, ThemeChoice, ThemeCondition, ThemeDeviceClass, ThemeEnumCondition, ThemeIfStatement, ThemeMetadataCondition, ThemeNumberCondition, ThemeTrafficSource, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TimeToPayBucket, TimeToPayBucketLabel, TimeToPayStats, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateMetadataRequest, UpdateOperationLimitSettingsRequest, UpdateRoleConnectorGrantParams, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UpdateUserRoleRequest, UpsertOperationLimitRuleRequest, UpsertRefundLimitRuleRequest, UpsertSettlementAdjustmentLimitRuleRequest, UpsertSettlementPayoutLimitRuleRequest, UserInLineage, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VaultCheck, VaultCheckId, VaultCheckStatus, VaultCollectSessionResponse, VaultPaymentMethodRequest, VaultPaymentMethodResponse, VaultRouteApplyVerification, VaultRouteChange, VaultRouteChangeKind, VaultRouteFieldChange, VaultRouteIds, VaultRoutePurpose, VaultRouteWarning, VaultRouteWarningCode, VaultRoutesApplyRequest, VaultRoutesApplyResponse, VaultRoutesFingerprint, VaultRoutesPreviewRequest, VaultRoutesPreviewResponse, VaultVerificationResponse, VaultVerifyRequest, VerifyTotpRequest, WCAG_AA_TEXT, WCAG_AA_UI, WebhookDeliveryAttempt, WebhookDeliveryTerminalReason, WebhookDetails, WebhookEvent, WebhookRefundStatus, WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, clonePane, contrastRatio, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, decodePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, defaultPane, emptyPaneCatalog, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, encodePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, offerablePaneMethods, paneCatalogFor, paneDisplayDefaults, paneMethodInfo, paneRailAllowed, paneViewVisibility, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, validatePanes, verticalGapValue, visibleCustomFields } from './index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -582,6 +582,69 @@ interface AdminUnsuspendRequest {
|
|
|
582
582
|
interface AdminSetTrustedRequest {
|
|
583
583
|
trusted: boolean;
|
|
584
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Admin-only: mark a merchant free (not billed), or put it back on the
|
|
587
|
+
* prepaid model (delopay-backend#378).
|
|
588
|
+
*
|
|
589
|
+
* A union rather than an optional `reason`, on the `SettlementCostPeriod`
|
|
590
|
+
* precedent: `free: true` without a reason can only earn a 412, so that shape
|
|
591
|
+
* must not typecheck. Marking free normalises a billing-caused status — `pending_setup`, `delinquent`, or an
|
|
592
|
+
* `auto_recharge` suspension — to `active`. A sticky `admin` suspension is
|
|
593
|
+
* refused with 412 until lifted explicitly: the flag must never quietly
|
|
594
|
+
* unblock a merchant that was stopped for fraud. `free: false` re-derives the
|
|
595
|
+
* status from the balance the way an unsuspend does.
|
|
596
|
+
*/
|
|
597
|
+
type AdminSetFreeRequest = {
|
|
598
|
+
free: true;
|
|
599
|
+
/** Why the merchant is not billed. Required: the router refuses `free: true` without one (412). */
|
|
600
|
+
reason: string;
|
|
601
|
+
} | {
|
|
602
|
+
free: false;
|
|
603
|
+
/** Ignored when clearing the flag; accepted so a caller can carry one through. */
|
|
604
|
+
reason?: string;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Admin-only: delete a merchant's **entire** ledger (delopay-backend#378).
|
|
608
|
+
* Every live entry is soft-deleted (kept for replay protection), the balance
|
|
609
|
+
* is set to zero and the status re-derived. Refused with 412 while the
|
|
610
|
+
* merchant has shop allocations.
|
|
611
|
+
*/
|
|
612
|
+
interface AdminResetLedgerRequest {
|
|
613
|
+
/** Human-readable reason, required for audit. */
|
|
614
|
+
reason: string;
|
|
615
|
+
}
|
|
616
|
+
interface AdminResetLedgerResponse {
|
|
617
|
+
/** Live entries removed from the ledger. */
|
|
618
|
+
deleted_count: number;
|
|
619
|
+
/** Signed sum of the removed entries' amounts, in the balance currency. */
|
|
620
|
+
deleted_amount: number;
|
|
621
|
+
/** The balance before the reset; after it the balance is always zero. */
|
|
622
|
+
balance_before: number;
|
|
623
|
+
/** The profile as it stands after the reset. */
|
|
624
|
+
profile: BillingProfileResponse;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Admin-only: (re)create a merchant's ledger, optionally seeded with an
|
|
628
|
+
* opening balance (delopay-backend#378). Ensures the billing profile exists
|
|
629
|
+
* (created without the welcome promo credit) and, when `opening_balance` is
|
|
630
|
+
* set, writes one `opening_balance` entry. Refused with 412 while the
|
|
631
|
+
* merchant still has live ledger entries, or a non-zero balance with none.
|
|
632
|
+
* Does not clear the free flag.
|
|
633
|
+
*/
|
|
634
|
+
interface AdminCreateLedgerRequest {
|
|
635
|
+
/** Opening balance in minor units of the balance currency. Omit or `0` for an empty ledger. */
|
|
636
|
+
opening_balance?: number;
|
|
637
|
+
/** ISO-4217 currency for a profile that does not exist yet; must match an existing profile's. */
|
|
638
|
+
balance_currency?: string;
|
|
639
|
+
/** Human-readable reason, required for audit; also the opening entry's description. */
|
|
640
|
+
reason: string;
|
|
641
|
+
}
|
|
642
|
+
interface AdminCreateLedgerResponse {
|
|
643
|
+
/** The opening-balance entry, when one was written. */
|
|
644
|
+
ledger_entry_id?: string | null;
|
|
645
|
+
/** The profile as it stands after the call. */
|
|
646
|
+
profile: BillingProfileResponse;
|
|
647
|
+
}
|
|
585
648
|
interface CardIssuerCreateRequest {
|
|
586
649
|
issuer_name: string;
|
|
587
650
|
}
|
|
@@ -1418,6 +1481,50 @@ declare class PlatformBilling {
|
|
|
1418
1481
|
* @returns The updated billing profile.
|
|
1419
1482
|
*/
|
|
1420
1483
|
setTrusted(merchantId: string, params: AdminSetTrustedRequest): Promise<BillingProfileResponse>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Mark a merchant free (not billed), or put it back on the prepaid model
|
|
1486
|
+
* (delopay-backend#378). While free, no platform fee is deducted, the
|
|
1487
|
+
* payment gate never blocks on billing status, top-ups are refused and
|
|
1488
|
+
* auto-recharge is inert. Marking free needs a `reason` and is refused
|
|
1489
|
+
* (412) while an admin suspension is in force — lift that first.
|
|
1490
|
+
*
|
|
1491
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1492
|
+
*
|
|
1493
|
+
* @param merchantId - The merchant account ID.
|
|
1494
|
+
* @param params - The desired free state and, when marking free, the reason.
|
|
1495
|
+
* @returns The updated billing profile.
|
|
1496
|
+
*/
|
|
1497
|
+
setFree(merchantId: string, params: AdminSetFreeRequest): Promise<BillingProfileResponse>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Delete a merchant's **entire** ledger (delopay-backend#378). Every live
|
|
1500
|
+
* entry is soft-deleted — kept, so a replayed fee deduction or top-up
|
|
1501
|
+
* webhook still no-ops — the balance is set to zero and the status
|
|
1502
|
+
* re-derived (`active` for a free merchant; an active paying merchant
|
|
1503
|
+
* lands in `delinquent`). Refused (412) while the merchant has shop
|
|
1504
|
+
* allocations. Audited.
|
|
1505
|
+
*
|
|
1506
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1507
|
+
*
|
|
1508
|
+
* @param merchantId - The merchant account ID.
|
|
1509
|
+
* @param params - The reason, required for audit.
|
|
1510
|
+
* @returns What was removed and the post-reset profile.
|
|
1511
|
+
*/
|
|
1512
|
+
resetLedger(merchantId: string, params: AdminResetLedgerRequest): Promise<AdminResetLedgerResponse>;
|
|
1513
|
+
/**
|
|
1514
|
+
* (Re)create a merchant's ledger, optionally seeded with an opening balance
|
|
1515
|
+
* (delopay-backend#378). Ensures the billing profile exists (created
|
|
1516
|
+
* without the welcome promo credit) and, when `opening_balance` is set,
|
|
1517
|
+
* writes one `opening_balance` entry through the same atomic helper an
|
|
1518
|
+
* admin credit uses. Refused (412) while live entries or a non-zero balance
|
|
1519
|
+
* remain — reset first. Does not clear the free flag. Audited.
|
|
1520
|
+
*
|
|
1521
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
1522
|
+
*
|
|
1523
|
+
* @param merchantId - The merchant account ID.
|
|
1524
|
+
* @param params - Opening balance (minor units), currency for a new profile, and the reason.
|
|
1525
|
+
* @returns The opening entry id (if one was written) and the profile.
|
|
1526
|
+
*/
|
|
1527
|
+
createLedger(merchantId: string, params: AdminCreateLedgerRequest): Promise<AdminCreateLedgerResponse>;
|
|
1421
1528
|
}
|
|
1422
1529
|
|
|
1423
1530
|
/**
|
|
@@ -1510,4 +1617,4 @@ declare class DelopayInternal extends Delopay {
|
|
|
1510
1617
|
constructor(...args: ConstructorParameters<typeof Delopay>);
|
|
1511
1618
|
}
|
|
1512
1619
|
|
|
1513
|
-
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminAttachVaultRequest, type AdminAttachVaultResponse, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminSetTrustedRequest, type AdminShopVaultState, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AdminVaultEntitlementState, type AdminVaultEnvironmentState, type AdminVaultStateResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditActorInfo, type AuditActorKind, type AuditImpersonationKind, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, type AuditSessionInfo, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, ClientAnalyticsRequest, Configs, type ConnectorRestrictionResponse, type ConnectorRestrictionRuleAction, type ConnectorRestrictionRuleResponse, ConnectorRestrictionRules, type ConnectorRestrictionScope, ConnectorRestrictions, type ConnectorVisibility, type CreateConnectorRestrictionRuleRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, DeviceDrillRequest, DevicesAnalyticsResponse, DrillResponse, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, FeeStatementDetail, type FeeTotalBound, GeoAnalyticsResponse, GeoDrillRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LastAdministratorRefusal, type LastAdministratorRoute, type LedgerDayBucket, type LedgerMerchant, type ListConnectorRestrictionRulesQuery, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, PaymentAttemptsListResponse, type PaymentAutoCloseConfigResponse, type PaymentAutoCloseOverrideResponse, PaymentClientContextListResponse, type PaymentPeriodStats, PaymentResponse, PaymentStatusHistoryResponse, PaymentsDeleteResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, type PromoConfigResponse, RefundListResponse, RequestFn, ScopeDrillRequest, SettlementCurrentParams, SettlementCurrentResponse, SettlementOverviewParams, SettlementOverviewResponse, SettlementStatementListParams, SettlementStatementListResponse, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, StatementPdfParams, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, type TransactionDeleteConfigResponse, type TransactionDeleteOverrideResponse, type UpdateConnectorRestrictionRuleRequest, type UpdateLedgerEntryRequest, type UpdatePaymentAutoCloseConfigRequest, type UpdatePaymentAutoCloseOverrideRequest, type UpdatePromoConfigRequest, type UpdateTransactionDeleteConfigRequest, type UpdateTransactionDeleteOverrideRequest, type UpsertConnectorRestrictionRequest, VaultEnvironment };
|
|
1620
|
+
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminAttachVaultRequest, type AdminAttachVaultResponse, type AdminCreateLedgerRequest, type AdminCreateLedgerResponse, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminResetLedgerRequest, type AdminResetLedgerResponse, type AdminSetFreeRequest, type AdminSetTrustedRequest, type AdminShopVaultState, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AdminVaultEntitlementState, type AdminVaultEnvironmentState, type AdminVaultStateResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditActorInfo, type AuditActorKind, type AuditImpersonationKind, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, type AuditSessionInfo, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, ClientAnalyticsRequest, Configs, type ConnectorRestrictionResponse, type ConnectorRestrictionRuleAction, type ConnectorRestrictionRuleResponse, ConnectorRestrictionRules, type ConnectorRestrictionScope, ConnectorRestrictions, type ConnectorVisibility, type CreateConnectorRestrictionRuleRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, DeviceDrillRequest, DevicesAnalyticsResponse, DrillResponse, FeeRulePreviewRequest, FeeRulePreviewResponse, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, FeeStatementDetail, type FeeTotalBound, GeoAnalyticsResponse, GeoDrillRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LastAdministratorRefusal, type LastAdministratorRoute, type LedgerDayBucket, type LedgerMerchant, type ListConnectorRestrictionRulesQuery, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, PaymentAttemptsListResponse, type PaymentAutoCloseConfigResponse, type PaymentAutoCloseOverrideResponse, PaymentClientContextListResponse, type PaymentPeriodStats, PaymentResponse, PaymentStatusHistoryResponse, PaymentsDeleteResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, type PromoConfigResponse, RefundListResponse, RequestFn, ScopeDrillRequest, SettlementCurrentParams, SettlementCurrentResponse, SettlementOverviewParams, SettlementOverviewResponse, SettlementStatementListParams, SettlementStatementListResponse, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, StatementPdfParams, SubscriptionAnalyticsRequest, SubscriptionAnalyticsResponse, SubscriptionDrillRequest, type TransactionDeleteConfigResponse, type TransactionDeleteOverrideResponse, type UpdateConnectorRestrictionRuleRequest, type UpdateLedgerEntryRequest, type UpdatePaymentAutoCloseConfigRequest, type UpdatePaymentAutoCloseOverrideRequest, type UpdatePromoConfigRequest, type UpdateTransactionDeleteConfigRequest, type UpdateTransactionDeleteOverrideRequest, type UpsertConnectorRestrictionRequest, VaultEnvironment };
|
package/dist/internal.js
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
validatePanes,
|
|
111
111
|
verticalGapValue,
|
|
112
112
|
visibleCustomFields
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-VH5NCMH6.js";
|
|
114
114
|
|
|
115
115
|
// src/internal/resources/admin.ts
|
|
116
116
|
var Admin = class {
|
|
@@ -898,6 +898,62 @@ var PlatformBilling = class {
|
|
|
898
898
|
body: params
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
|
+
/**
|
|
902
|
+
* Mark a merchant free (not billed), or put it back on the prepaid model
|
|
903
|
+
* (delopay-backend#378). While free, no platform fee is deducted, the
|
|
904
|
+
* payment gate never blocks on billing status, top-ups are refused and
|
|
905
|
+
* auto-recharge is inert. Marking free needs a `reason` and is refused
|
|
906
|
+
* (412) while an admin suspension is in force — lift that first.
|
|
907
|
+
*
|
|
908
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
909
|
+
*
|
|
910
|
+
* @param merchantId - The merchant account ID.
|
|
911
|
+
* @param params - The desired free state and, when marking free, the reason.
|
|
912
|
+
* @returns The updated billing profile.
|
|
913
|
+
*/
|
|
914
|
+
async setFree(merchantId, params) {
|
|
915
|
+
return this.request("PATCH", `/billing/${encodeURIComponent(merchantId)}/admin/free`, {
|
|
916
|
+
body: params
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Delete a merchant's **entire** ledger (delopay-backend#378). Every live
|
|
921
|
+
* entry is soft-deleted — kept, so a replayed fee deduction or top-up
|
|
922
|
+
* webhook still no-ops — the balance is set to zero and the status
|
|
923
|
+
* re-derived (`active` for a free merchant; an active paying merchant
|
|
924
|
+
* lands in `delinquent`). Refused (412) while the merchant has shop
|
|
925
|
+
* allocations. Audited.
|
|
926
|
+
*
|
|
927
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
928
|
+
*
|
|
929
|
+
* @param merchantId - The merchant account ID.
|
|
930
|
+
* @param params - The reason, required for audit.
|
|
931
|
+
* @returns What was removed and the post-reset profile.
|
|
932
|
+
*/
|
|
933
|
+
async resetLedger(merchantId, params) {
|
|
934
|
+
return this.request("DELETE", `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {
|
|
935
|
+
body: params
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* (Re)create a merchant's ledger, optionally seeded with an opening balance
|
|
940
|
+
* (delopay-backend#378). Ensures the billing profile exists (created
|
|
941
|
+
* without the welcome promo credit) and, when `opening_balance` is set,
|
|
942
|
+
* writes one `opening_balance` entry through the same atomic helper an
|
|
943
|
+
* admin credit uses. Refused (412) while live entries or a non-zero balance
|
|
944
|
+
* remain — reset first. Does not clear the free flag. Audited.
|
|
945
|
+
*
|
|
946
|
+
* Requires a router with delopay-backend#378; older routers answer `404`.
|
|
947
|
+
*
|
|
948
|
+
* @param merchantId - The merchant account ID.
|
|
949
|
+
* @param params - Opening balance (minor units), currency for a new profile, and the reason.
|
|
950
|
+
* @returns The opening entry id (if one was written) and the profile.
|
|
951
|
+
*/
|
|
952
|
+
async createLedger(merchantId, params) {
|
|
953
|
+
return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/ledger`, {
|
|
954
|
+
body: params
|
|
955
|
+
});
|
|
956
|
+
}
|
|
901
957
|
};
|
|
902
958
|
|
|
903
959
|
// src/internal/resources/platformFees.ts
|