@delopay/sdk 0.36.0 → 0.38.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-ZS7ALFE7.js → chunk-IQKFNKHU.js} +15 -43
- package/dist/{chunk-ZS7ALFE7.js.map → chunk-IQKFNKHU.js.map} +1 -1
- package/dist/index.cjs +14 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -25
- package/dist/index.d.ts +96 -25
- package/dist/index.js +1 -1
- package/dist/internal.cjs +35 -42
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +136 -13
- package/dist/internal.d.ts +136 -13
- package/dist/internal.js +22 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -16
package/dist/internal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProjectResponse, ShopResponse, PaymentResponse, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, BillingProfileResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.cjs';
|
|
2
|
-
export { Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, Analytics, AnalyticsDashboard, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, Cards, ChangePasswordRequest, CheckoutBranding, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCreateRequest, ConnectorListResponse, ConnectorResponse, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DeleteAccountRequest, DelopayAuthenticationError, DelopayError, DelopayLogger, DelopayOptions, DisputeEvidenceRequest, DisputeListParams, DisputeResponse, DisputeStage, DisputeStatus, EncodedBranding, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleInput, FeeSpecInput, FeeType, Files, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceStatus, LabelStyle, LayoutStyle, LedgerEntry, LedgerListParams, LedgerResponse, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MerchantAccountCreateRequest, MerchantAccountType, MerchantOverviewResponse, MerchantOverviewStat, MerchantRoutingAlgorithm, NonPillRadius, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentConfirmRequest, PaymentCreateRequest, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodListParams, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentUpdateRequest, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileLogoUploadResponse, ProfileUpdateRequest, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, RecoveryCodesResponse, RefundCreateRequest, RefundListParams, RefundListResponse, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCreateRequest, RegionResponse, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, ResetPasswordRequest, ResumeSubscriptionRequest, ResumeSubscriptionResponse, RoutableConnectorChoice, RoutingActivatePayload, RoutingConfigCreateRequest, RoutingConfigResponse, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, Search, SearchGroupResponse, SearchIndex, SearchStatus, ShopCreateRequest, ShopStats, ShopUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StaticRoutingAlgorithm, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionInvoice, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPeriodUnit, SubscriptionResponse, SubscriptionStatus, Subscriptions, SummaryPosition, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VerifyTotpRequest, WebhookDeliveryAttempt, WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue } from './index.cjs';
|
|
1
|
+
import { ProjectResponse, ShopResponse, PaymentResponse, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, AnalyticsScopeRequest, AnalyticsScopeResponse, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, BillingProfileResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.cjs';
|
|
2
|
+
export { Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, Analytics, AnalyticsChild, AnalyticsConnectorDay, AnalyticsConnectorSeries, AnalyticsDashboard, AnalyticsDayBucket, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, Cards, ChangePasswordRequest, CheckoutBranding, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCreateRequest, ConnectorListResponse, ConnectorResponse, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DeleteAccountRequest, DelopayAuthenticationError, DelopayError, DelopayLogger, DelopayOptions, DisputeEvidenceRequest, DisputeListParams, DisputeResponse, DisputeStage, DisputeStatus, EncodedBranding, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleInput, FeeSpecInput, FeeType, Files, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceStatus, LabelStyle, LayoutStyle, LedgerEntry, LedgerListParams, LedgerResponse, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MerchantAccountCreateRequest, MerchantAccountType, MerchantOverviewResponse, MerchantOverviewStat, MerchantRoutingAlgorithm, NonPillRadius, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentConfirmRequest, PaymentCreateRequest, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodListParams, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentUpdateRequest, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileLogoUploadResponse, ProfileUpdateRequest, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, RecoveryCodesResponse, RefundCreateRequest, RefundListParams, RefundListResponse, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCreateRequest, RegionResponse, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, ResetPasswordRequest, ResumeSubscriptionRequest, ResumeSubscriptionResponse, RoutableConnectorChoice, RoutingActivatePayload, RoutingConfigCreateRequest, RoutingConfigResponse, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, Search, SearchGroupResponse, SearchIndex, SearchStatus, ShopCreateRequest, ShopStats, ShopUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StaticRoutingAlgorithm, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionInvoice, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPeriodUnit, SubscriptionResponse, SubscriptionStatus, Subscriptions, SummaryPosition, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VerifyTotpRequest, WebhookDeliveryAttempt, WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue } from './index.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Internal-only type surface. Exposed via `'@delopay/sdk/internal'` only.
|
|
@@ -152,8 +152,6 @@ interface AdminCustomerDetail {
|
|
|
152
152
|
customer_id: string;
|
|
153
153
|
organization_id: string;
|
|
154
154
|
employee_count: number;
|
|
155
|
-
total_transactions: number;
|
|
156
|
-
total_volume: number;
|
|
157
155
|
created_at: string;
|
|
158
156
|
customer_name?: string | null;
|
|
159
157
|
projects: ProjectResponse[];
|
|
@@ -197,22 +195,128 @@ interface PlatformAnalyticsResponse {
|
|
|
197
195
|
period_end: string;
|
|
198
196
|
}
|
|
199
197
|
interface PaymentAnalyticsRequest {
|
|
198
|
+
/** Rolling window in days. Ignored when start_date is provided. */
|
|
200
199
|
period?: number | null;
|
|
200
|
+
/** Naive ISO 8601 datetime (e.g. 2026-06-01T00:00:00). Takes precedence over period. */
|
|
201
|
+
start_date?: string | null;
|
|
202
|
+
/** Naive ISO 8601 datetime. Defaults to now when only start_date is set. */
|
|
203
|
+
end_date?: string | null;
|
|
204
|
+
/** Limit stats to a single customer/merchant. Omitted = platform-wide. */
|
|
205
|
+
merchant_id?: string | null;
|
|
206
|
+
/** Limit stats to the shops of one project. Requires merchant_id. */
|
|
207
|
+
project_id?: string | null;
|
|
208
|
+
/** Limit stats to a single shop. Requires merchant_id; wins over project_id. */
|
|
209
|
+
shop_id?: string | null;
|
|
201
210
|
currency?: string | null;
|
|
202
211
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The four independent payment measures for one reporting window. Derived
|
|
214
|
+
* figures (success rate, averages, period-over-period deltas) are computed
|
|
215
|
+
* by the consumer.
|
|
216
|
+
*/
|
|
217
|
+
interface PaymentPeriodStats {
|
|
218
|
+
/** Sum of all payment intent amounts, in major units. */
|
|
219
|
+
total_volume: number;
|
|
220
|
+
/** Sum of succeeded payment intent amounts, in major units. */
|
|
221
|
+
successful_volume: number;
|
|
222
|
+
/** Count of all payment intents. */
|
|
223
|
+
transactions: number;
|
|
224
|
+
/** Count of succeeded payment intents. */
|
|
225
|
+
successful_transactions: number;
|
|
226
|
+
/** Count of successful refunds created in the window. */
|
|
227
|
+
refunds: number;
|
|
228
|
+
/** Sum of successful refund amounts created in the window, in major units. */
|
|
229
|
+
refund_volume: number;
|
|
207
230
|
}
|
|
208
231
|
interface PaymentAnalyticsResponse {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
232
|
+
/** Base measures for the requested window. */
|
|
233
|
+
current: PaymentPeriodStats;
|
|
234
|
+
/** Base measures for the equal-length window immediately before it. */
|
|
235
|
+
previous: PaymentPeriodStats;
|
|
213
236
|
currency: string;
|
|
214
237
|
period_days: number;
|
|
215
238
|
}
|
|
239
|
+
|
|
240
|
+
/** Query for the platform ledger-analytics endpoint. */
|
|
241
|
+
interface AdminLedgerAnalyticsRequest {
|
|
242
|
+
/** Trailing days for a rolling window. Default 30, capped at 90. */
|
|
243
|
+
days?: number | null;
|
|
244
|
+
/** Naive ISO 8601 datetime for the window start (custom range; span ≤ 90 days). */
|
|
245
|
+
start_date?: string | null;
|
|
246
|
+
/** Naive ISO 8601 datetime for the inclusive last day. Defaults to now. */
|
|
247
|
+
end_date?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Comma-separated selector for which response blocks the server computes, so
|
|
250
|
+
* a pinned card fetches only what it renders. Tokens: `summary` (total
|
|
251
|
+
* balance, net change, account-status counts, the `current` aggregate +
|
|
252
|
+
* `previous` window), `series` (the day-by-day flow) and `merchants` (the
|
|
253
|
+
* biggest-top-ups donut — the only block paying the per-merchant
|
|
254
|
+
* name-resolution cost). Omit for all blocks. Unrequested blocks come back
|
|
255
|
+
* empty / zero.
|
|
256
|
+
*/
|
|
257
|
+
sections?: string | null;
|
|
258
|
+
}
|
|
259
|
+
/** One day of platform-wide ledger movement, in USD minor units. */
|
|
260
|
+
interface LedgerDayBucket {
|
|
261
|
+
/** Balance merchants added by paying in (topup_credit), positive. */
|
|
262
|
+
topup_amount: number;
|
|
263
|
+
topup_count: number;
|
|
264
|
+
/** Platform fees collected (fee_debit + merchant_fee_debit), positive. */
|
|
265
|
+
fee_amount: number;
|
|
266
|
+
fee_count: number;
|
|
267
|
+
/** Other credits (admin_credit + promo_credit), positive. */
|
|
268
|
+
credit_amount: number;
|
|
269
|
+
credit_count: number;
|
|
270
|
+
/** Other debits (admin_debit), positive. */
|
|
271
|
+
debit_amount: number;
|
|
272
|
+
debit_count: number;
|
|
273
|
+
/** Net of every entry that day (signed) — the day's platform balance change. */
|
|
274
|
+
net_amount: number;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Platform ledger-analytics response. All money is in USD minor units
|
|
278
|
+
* (`currency`). `series` is the current window day by day; `previous` is the
|
|
279
|
+
* equal-length prior window aggregated, for deltas.
|
|
280
|
+
*/
|
|
281
|
+
interface AdminLedgerAnalyticsResponse {
|
|
282
|
+
currency: string;
|
|
283
|
+
days: number;
|
|
284
|
+
end_date: string;
|
|
285
|
+
/** Sum of every billing account's current balance (USD minor). */
|
|
286
|
+
total_balance: number;
|
|
287
|
+
/** Net balance change over the window (USD minor) = balance now − at start. */
|
|
288
|
+
net_change: number;
|
|
289
|
+
accounts_total: number;
|
|
290
|
+
accounts_active: number;
|
|
291
|
+
accounts_delinquent: number;
|
|
292
|
+
accounts_suspended: number;
|
|
293
|
+
/**
|
|
294
|
+
* The current window aggregated into a single bucket (the sum of `series`),
|
|
295
|
+
* so a totals-only card (e.g. fee revenue) reads `current.fee_amount` without
|
|
296
|
+
* iterating `series`. Part of the `summary` section.
|
|
297
|
+
*/
|
|
298
|
+
current: LedgerDayBucket;
|
|
299
|
+
series: LedgerDayBucket[];
|
|
300
|
+
/**
|
|
301
|
+
* The previous period day by day, same length as `series`, for the over-time
|
|
302
|
+
* period-over-period overlay (e.g. "top-ups over time"). Empty unless the
|
|
303
|
+
* `series` section is requested.
|
|
304
|
+
*/
|
|
305
|
+
previous_series: LedgerDayBucket[];
|
|
306
|
+
previous: LedgerDayBucket;
|
|
307
|
+
/** Merchants with the largest top-up totals this window (USD minor), capped. */
|
|
308
|
+
top_merchants: LedgerMerchant[];
|
|
309
|
+
/** Combined top-ups of merchants beyond the cap (USD minor). */
|
|
310
|
+
other_merchants_topup: number;
|
|
311
|
+
/** How many merchants fell into `other_merchants_topup`. */
|
|
312
|
+
other_merchants_count: number;
|
|
313
|
+
}
|
|
314
|
+
/** One merchant's top-up total over the window (USD minor). */
|
|
315
|
+
interface LedgerMerchant {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
topup_amount: number;
|
|
319
|
+
}
|
|
216
320
|
interface AuditLogListParams {
|
|
217
321
|
user_id?: string | null;
|
|
218
322
|
merchant_id?: string | null;
|
|
@@ -360,6 +464,11 @@ interface UpsertConnectorRestrictionRequest {
|
|
|
360
464
|
* when `visibility === 'beta'`; ignored for `'public'` /
|
|
361
465
|
* `'disabled'` (collapsed to an empty array). */
|
|
362
466
|
allowed_merchant_ids: string[];
|
|
467
|
+
/** Merchant IDs blocked from attaching this connector. A DENY
|
|
468
|
+
* override that beats both `visibility` (even `'public'`) and
|
|
469
|
+
* `allowed_merchant_ids` — a denied merchant is always rejected.
|
|
470
|
+
* Honored for every visibility mode. */
|
|
471
|
+
denied_merchant_ids?: string[];
|
|
363
472
|
/** Optional audit note (e.g. `"beta access — Marcel"`). */
|
|
364
473
|
reason?: string | null;
|
|
365
474
|
}
|
|
@@ -367,6 +476,7 @@ interface ConnectorRestrictionResponse {
|
|
|
367
476
|
connector_name: string;
|
|
368
477
|
visibility: ConnectorVisibility;
|
|
369
478
|
allowed_merchant_ids: string[];
|
|
479
|
+
denied_merchant_ids: string[];
|
|
370
480
|
reason: string | null;
|
|
371
481
|
/** ISO 8601 datetime. */
|
|
372
482
|
created_at: string;
|
|
@@ -407,6 +517,19 @@ declare class AdminPortal {
|
|
|
407
517
|
analytics(params: AdminAnalyticsRequest): Promise<PlatformAnalyticsResponse>;
|
|
408
518
|
overviewStats(): Promise<OverviewStatsResponse>;
|
|
409
519
|
paymentAnalytics(params: PaymentAnalyticsRequest): Promise<PaymentAnalyticsResponse>;
|
|
520
|
+
/**
|
|
521
|
+
* One drill level of the analytics dashboard: the scope's daily series +
|
|
522
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
523
|
+
* toggles apply client-side; only a drill (passing merchant_id / project_id
|
|
524
|
+
* / shop_id) fetches the next level.
|
|
525
|
+
*/
|
|
526
|
+
analyticsScope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse>;
|
|
527
|
+
/**
|
|
528
|
+
* Platform billing dashboard: total balance across all ledger accounts (+
|
|
529
|
+
* the net change), top-ups, fees collected, and the day-by-day ledger flow.
|
|
530
|
+
* All amounts are in USD minor units.
|
|
531
|
+
*/
|
|
532
|
+
ledgerAnalytics(params?: AdminLedgerAnalyticsRequest): Promise<AdminLedgerAnalyticsResponse>;
|
|
410
533
|
/**
|
|
411
534
|
* Retrieve a merchant account via the admin portal. Unlike
|
|
412
535
|
* `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
|
|
@@ -655,4 +778,4 @@ declare class DelopayInternal extends Delopay {
|
|
|
655
778
|
constructor(...args: ConstructorParameters<typeof Delopay>);
|
|
656
779
|
}
|
|
657
780
|
|
|
658
|
-
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, AdminPortal, type AdminSetTrustedRequest, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, Configs, type ConnectorRestrictionResponse, ConnectorRestrictions, type ConnectorVisibility, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse,
|
|
781
|
+
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminSetTrustedRequest, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, Configs, type ConnectorRestrictionResponse, ConnectorRestrictions, type ConnectorVisibility, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LedgerDayBucket, type LedgerMerchant, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentPeriodStats, PaymentResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, RequestFn, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, type UpsertConnectorRestrictionRequest };
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProjectResponse, ShopResponse, PaymentResponse, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, BillingProfileResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.js';
|
|
2
|
-
export { Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, Analytics, AnalyticsDashboard, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, Cards, ChangePasswordRequest, CheckoutBranding, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCreateRequest, ConnectorListResponse, ConnectorResponse, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DeleteAccountRequest, DelopayAuthenticationError, DelopayError, DelopayLogger, DelopayOptions, DisputeEvidenceRequest, DisputeListParams, DisputeResponse, DisputeStage, DisputeStatus, EncodedBranding, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleInput, FeeSpecInput, FeeType, Files, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceStatus, LabelStyle, LayoutStyle, LedgerEntry, LedgerListParams, LedgerResponse, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MerchantAccountCreateRequest, MerchantAccountType, MerchantOverviewResponse, MerchantOverviewStat, MerchantRoutingAlgorithm, NonPillRadius, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentConfirmRequest, PaymentCreateRequest, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodListParams, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentUpdateRequest, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileLogoUploadResponse, ProfileUpdateRequest, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, RecoveryCodesResponse, RefundCreateRequest, RefundListParams, RefundListResponse, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCreateRequest, RegionResponse, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, ResetPasswordRequest, ResumeSubscriptionRequest, ResumeSubscriptionResponse, RoutableConnectorChoice, RoutingActivatePayload, RoutingConfigCreateRequest, RoutingConfigResponse, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, Search, SearchGroupResponse, SearchIndex, SearchStatus, ShopCreateRequest, ShopStats, ShopUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StaticRoutingAlgorithm, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionInvoice, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPeriodUnit, SubscriptionResponse, SubscriptionStatus, Subscriptions, SummaryPosition, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VerifyTotpRequest, WebhookDeliveryAttempt, WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue } from './index.js';
|
|
1
|
+
import { ProjectResponse, ShopResponse, PaymentResponse, RequestFn, AuthResponse, SignUpWithMerchantIdRequest, AnalyticsScopeRequest, AnalyticsScopeResponse, MerchantAccountResponse, MerchantAccountUpdateRequest, ProfileResponse, BillingProfileResponse, PlatformFeeRuleInput, PlatformFeeRuleRecord, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Delopay } from './index.js';
|
|
2
|
+
export { Address, AddressDetails, AllocationListResponse, AllocationResponse, AllocationTransferRequest, AllocationTransferResponse, Analytics, AnalyticsChild, AnalyticsConnectorDay, AnalyticsConnectorSeries, AnalyticsDashboard, AnalyticsDayBucket, ApiKeyCreateRequest, ApiKeyCreateResponse, ApiKeyExpiration, ApiKeyResponse, ApiKeyRevokeResponse, ApiKeyUpdateRequest, ApplePayVerificationRequest, ApplePayVerificationResponse, ApplePayVerifiedDomainsResponse, AuthenticationCreateRequest, AuthenticationResponse, AuthenticationStatus, AuthenticationType, AutoRechargeConfig, AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, BillingCompleteSetupRequest, BillingSetupRequest, BillingSetupResponse, BlocklistAddRequest, BlocklistDataKind, BlocklistResponse, BrandingExport, BrandingSource, BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, CancelSubscriptionRequest, CancelSubscriptionResponse, CaptureMethod, CardDetail, CardDetailFromLocker, Cards, ChangePasswordRequest, CheckoutBranding, ConfirmSubscriptionPaymentDetails, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse, Connector, ConnectorCreateRequest, ConnectorListResponse, ConnectorResponse, ConnectorType, ConnectorUpdateRequest, ConnectorVolumeSplit, ConnectorWebhookEntry, ConnectorWebhookEventType, ConnectorWebhookListResponse, ConnectorWebhookRegisterRequest, ConnectorWebhookRegisterResponse, CornerRadius, CreateAndConfirmSubscriptionRequest, CreateSubscriptionPaymentDetails, CreateSubscriptionRequest, Currency, CustomerCreateRequest, CustomerListParams, CustomerPaymentMethodsListParams, CustomerPaymentMethodsListResponse, CustomerResponse, CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, DeleteAccountRequest, DelopayAuthenticationError, DelopayError, DelopayLogger, DelopayOptions, DisputeEvidenceRequest, DisputeListParams, DisputeResponse, DisputeStage, DisputeStatus, EncodedBranding, EphemeralKeyCreateRequest, EphemeralKeyCreateResponse, EuclidComparison, EuclidComparisonType, EuclidIfStatement, EuclidValue, EventClass, EventDeliveryAttemptResponse, EventDetailResponse, EventListParams, EventListResponse, EventResponse, EventType, Export, FeatureMatrix, FeeOwner, FeeProgramBuilder, FeeRuleConditions, FeeRuleInput, FeeSpecInput, FeeType, Files, FontFamily, FontWeight, Forex, ForgotPasswordRequest, FromEmailRequest, FutureUsage, GatewayConnectRequest, GatewayResponse, GetSubscriptionItemsParams, GetSubscriptionItemsResponse, GlobalSearchRequest, IntentStatus, InviteUsersRequest, InviteUsersResponse, InvoiceStatus, LabelStyle, LayoutStyle, LedgerEntry, LedgerListParams, LedgerResponse, LinkedRoutingConfigRetrieveResponse, ListInvitableRolesParams, LoginHistoryEntry, LoginHistoryParams, LoginHistoryResponse, LogoShape, LogoSize, MandateListParams, MandateResponse, MandateRevokedResponse, MandateStatus, MandateType, MerchantAccountCreateRequest, MerchantAccountType, MerchantOverviewResponse, MerchantOverviewStat, MerchantRoutingAlgorithm, NonPillRadius, ParentGroup, ParentGroupInfo, PauseSubscriptionRequest, PauseSubscriptionResponse, PaymentCancelRequest, PaymentCaptureRequest, PaymentConfirmRequest, PaymentCreateRequest, PaymentLayout, PaymentLinkBackgroundImageConfig, PaymentLinkConfigRequest, PaymentLinkListParams, PaymentLinkListResponse, PaymentLinkResponse, PaymentLinkTransactionDetails, PaymentListParams, PaymentListResponse, PaymentMethod, PaymentMethodCreateRequest, PaymentMethodDeleteResponse, PaymentMethodListParams, PaymentMethodResponse, PaymentMethodType, PaymentMethodUpdateRequest, PaymentRetrieveOptions, PaymentUpdateRequest, PayoutCreateRequest, PayoutListParams, PayoutListResponse, PayoutResponse, PayoutStatus, PayoutType, PayoutUpdateRequest, PermissionScope, PhoneDetails, PhoneOtpRequest, PhoneOtpResponse, PhoneOtpVerifyRequest, PhoneOtpVerifyResponse, PlatformFeeKind, PlatformFeeOutput, PlatformFeeProgram, PlatformFeeRule, PlatformFeeRuleOutput, PlatformFeeRuleRequest, PollStatus, PollStatusResponse, ProfileAcquirerCreateRequest, ProfileAcquirerResponse, ProfileAcquirerUpdateRequest, ProfileCreateRequest, ProfileDefaultRoutingConfig, ProfileLogoUploadResponse, ProfileUpdateRequest, ProjectCreateRequest, ProjectStats, ProjectStatsResponse, ProjectUpdateRequest, RecoveryCodesResponse, RefundCreateRequest, RefundListParams, RefundListResponse, RefundResponse, RefundStatus, RefundType, RefundUpdateRequest, RegionCreateRequest, RegionResponse, RegionUpdateRequest, Regions, RelayRequest, RelayResponse, RelayStatus, RelayType, RequestExtras, RequestOptions, ResetPasswordRequest, ResumeSubscriptionRequest, ResumeSubscriptionResponse, RoutableConnectorChoice, RoutingActivatePayload, RoutingConfigCreateRequest, RoutingConfigResponse, RoutingDeactivateRequest, RoutingDictionary, RoutingDictionaryRecord, Search, SearchGroupResponse, SearchIndex, SearchStatus, ShopCreateRequest, ShopStats, ShopUpdateRequest, SignInRequest, SignUpRequest, SignUpWithMerchantRequest, SizeScale, SpacingScale, StaticRoutingAlgorithm, StripeConnectAccountRequest, StripeConnectAccountResponse, StripeConnectLinkRequest, StripeConnectLinkResponse, SubscriptionEstimateParams, SubscriptionEstimateResponse, SubscriptionInvoice, SubscriptionItem, SubscriptionItemPrice, SubscriptionItemType, SubscriptionLineItem, SubscriptionListParams, SubscriptionPaymentData, SubscriptionPaymentDetails, SubscriptionPeriodUnit, SubscriptionResponse, SubscriptionStatus, Subscriptions, SummaryPosition, SurfaceStyle, SwitchMerchantRequest, SwitchProfileRequest, Terminate2faQueryParams, ThreeDSDecision, ThreeDsRuleExecuteRequest, ThreeDsRuleResponse, TierSummary, TokenPurpose, TokenResponse, TopupRequest, TopupResponse, TotpResponse, TransactionType, TrustBadge, UpdateSubscriptionRequest, UpdateUserDetailsRequest, UserResponse, UserSessionEntry, UserSessionListResponse, UserSessionRevokeResponse, VerifyTotpRequest, WebhookDeliveryAttempt, WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue } from './index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Internal-only type surface. Exposed via `'@delopay/sdk/internal'` only.
|
|
@@ -152,8 +152,6 @@ interface AdminCustomerDetail {
|
|
|
152
152
|
customer_id: string;
|
|
153
153
|
organization_id: string;
|
|
154
154
|
employee_count: number;
|
|
155
|
-
total_transactions: number;
|
|
156
|
-
total_volume: number;
|
|
157
155
|
created_at: string;
|
|
158
156
|
customer_name?: string | null;
|
|
159
157
|
projects: ProjectResponse[];
|
|
@@ -197,22 +195,128 @@ interface PlatformAnalyticsResponse {
|
|
|
197
195
|
period_end: string;
|
|
198
196
|
}
|
|
199
197
|
interface PaymentAnalyticsRequest {
|
|
198
|
+
/** Rolling window in days. Ignored when start_date is provided. */
|
|
200
199
|
period?: number | null;
|
|
200
|
+
/** Naive ISO 8601 datetime (e.g. 2026-06-01T00:00:00). Takes precedence over period. */
|
|
201
|
+
start_date?: string | null;
|
|
202
|
+
/** Naive ISO 8601 datetime. Defaults to now when only start_date is set. */
|
|
203
|
+
end_date?: string | null;
|
|
204
|
+
/** Limit stats to a single customer/merchant. Omitted = platform-wide. */
|
|
205
|
+
merchant_id?: string | null;
|
|
206
|
+
/** Limit stats to the shops of one project. Requires merchant_id. */
|
|
207
|
+
project_id?: string | null;
|
|
208
|
+
/** Limit stats to a single shop. Requires merchant_id; wins over project_id. */
|
|
209
|
+
shop_id?: string | null;
|
|
201
210
|
currency?: string | null;
|
|
202
211
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The four independent payment measures for one reporting window. Derived
|
|
214
|
+
* figures (success rate, averages, period-over-period deltas) are computed
|
|
215
|
+
* by the consumer.
|
|
216
|
+
*/
|
|
217
|
+
interface PaymentPeriodStats {
|
|
218
|
+
/** Sum of all payment intent amounts, in major units. */
|
|
219
|
+
total_volume: number;
|
|
220
|
+
/** Sum of succeeded payment intent amounts, in major units. */
|
|
221
|
+
successful_volume: number;
|
|
222
|
+
/** Count of all payment intents. */
|
|
223
|
+
transactions: number;
|
|
224
|
+
/** Count of succeeded payment intents. */
|
|
225
|
+
successful_transactions: number;
|
|
226
|
+
/** Count of successful refunds created in the window. */
|
|
227
|
+
refunds: number;
|
|
228
|
+
/** Sum of successful refund amounts created in the window, in major units. */
|
|
229
|
+
refund_volume: number;
|
|
207
230
|
}
|
|
208
231
|
interface PaymentAnalyticsResponse {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
232
|
+
/** Base measures for the requested window. */
|
|
233
|
+
current: PaymentPeriodStats;
|
|
234
|
+
/** Base measures for the equal-length window immediately before it. */
|
|
235
|
+
previous: PaymentPeriodStats;
|
|
213
236
|
currency: string;
|
|
214
237
|
period_days: number;
|
|
215
238
|
}
|
|
239
|
+
|
|
240
|
+
/** Query for the platform ledger-analytics endpoint. */
|
|
241
|
+
interface AdminLedgerAnalyticsRequest {
|
|
242
|
+
/** Trailing days for a rolling window. Default 30, capped at 90. */
|
|
243
|
+
days?: number | null;
|
|
244
|
+
/** Naive ISO 8601 datetime for the window start (custom range; span ≤ 90 days). */
|
|
245
|
+
start_date?: string | null;
|
|
246
|
+
/** Naive ISO 8601 datetime for the inclusive last day. Defaults to now. */
|
|
247
|
+
end_date?: string | null;
|
|
248
|
+
/**
|
|
249
|
+
* Comma-separated selector for which response blocks the server computes, so
|
|
250
|
+
* a pinned card fetches only what it renders. Tokens: `summary` (total
|
|
251
|
+
* balance, net change, account-status counts, the `current` aggregate +
|
|
252
|
+
* `previous` window), `series` (the day-by-day flow) and `merchants` (the
|
|
253
|
+
* biggest-top-ups donut — the only block paying the per-merchant
|
|
254
|
+
* name-resolution cost). Omit for all blocks. Unrequested blocks come back
|
|
255
|
+
* empty / zero.
|
|
256
|
+
*/
|
|
257
|
+
sections?: string | null;
|
|
258
|
+
}
|
|
259
|
+
/** One day of platform-wide ledger movement, in USD minor units. */
|
|
260
|
+
interface LedgerDayBucket {
|
|
261
|
+
/** Balance merchants added by paying in (topup_credit), positive. */
|
|
262
|
+
topup_amount: number;
|
|
263
|
+
topup_count: number;
|
|
264
|
+
/** Platform fees collected (fee_debit + merchant_fee_debit), positive. */
|
|
265
|
+
fee_amount: number;
|
|
266
|
+
fee_count: number;
|
|
267
|
+
/** Other credits (admin_credit + promo_credit), positive. */
|
|
268
|
+
credit_amount: number;
|
|
269
|
+
credit_count: number;
|
|
270
|
+
/** Other debits (admin_debit), positive. */
|
|
271
|
+
debit_amount: number;
|
|
272
|
+
debit_count: number;
|
|
273
|
+
/** Net of every entry that day (signed) — the day's platform balance change. */
|
|
274
|
+
net_amount: number;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Platform ledger-analytics response. All money is in USD minor units
|
|
278
|
+
* (`currency`). `series` is the current window day by day; `previous` is the
|
|
279
|
+
* equal-length prior window aggregated, for deltas.
|
|
280
|
+
*/
|
|
281
|
+
interface AdminLedgerAnalyticsResponse {
|
|
282
|
+
currency: string;
|
|
283
|
+
days: number;
|
|
284
|
+
end_date: string;
|
|
285
|
+
/** Sum of every billing account's current balance (USD minor). */
|
|
286
|
+
total_balance: number;
|
|
287
|
+
/** Net balance change over the window (USD minor) = balance now − at start. */
|
|
288
|
+
net_change: number;
|
|
289
|
+
accounts_total: number;
|
|
290
|
+
accounts_active: number;
|
|
291
|
+
accounts_delinquent: number;
|
|
292
|
+
accounts_suspended: number;
|
|
293
|
+
/**
|
|
294
|
+
* The current window aggregated into a single bucket (the sum of `series`),
|
|
295
|
+
* so a totals-only card (e.g. fee revenue) reads `current.fee_amount` without
|
|
296
|
+
* iterating `series`. Part of the `summary` section.
|
|
297
|
+
*/
|
|
298
|
+
current: LedgerDayBucket;
|
|
299
|
+
series: LedgerDayBucket[];
|
|
300
|
+
/**
|
|
301
|
+
* The previous period day by day, same length as `series`, for the over-time
|
|
302
|
+
* period-over-period overlay (e.g. "top-ups over time"). Empty unless the
|
|
303
|
+
* `series` section is requested.
|
|
304
|
+
*/
|
|
305
|
+
previous_series: LedgerDayBucket[];
|
|
306
|
+
previous: LedgerDayBucket;
|
|
307
|
+
/** Merchants with the largest top-up totals this window (USD minor), capped. */
|
|
308
|
+
top_merchants: LedgerMerchant[];
|
|
309
|
+
/** Combined top-ups of merchants beyond the cap (USD minor). */
|
|
310
|
+
other_merchants_topup: number;
|
|
311
|
+
/** How many merchants fell into `other_merchants_topup`. */
|
|
312
|
+
other_merchants_count: number;
|
|
313
|
+
}
|
|
314
|
+
/** One merchant's top-up total over the window (USD minor). */
|
|
315
|
+
interface LedgerMerchant {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
topup_amount: number;
|
|
319
|
+
}
|
|
216
320
|
interface AuditLogListParams {
|
|
217
321
|
user_id?: string | null;
|
|
218
322
|
merchant_id?: string | null;
|
|
@@ -360,6 +464,11 @@ interface UpsertConnectorRestrictionRequest {
|
|
|
360
464
|
* when `visibility === 'beta'`; ignored for `'public'` /
|
|
361
465
|
* `'disabled'` (collapsed to an empty array). */
|
|
362
466
|
allowed_merchant_ids: string[];
|
|
467
|
+
/** Merchant IDs blocked from attaching this connector. A DENY
|
|
468
|
+
* override that beats both `visibility` (even `'public'`) and
|
|
469
|
+
* `allowed_merchant_ids` — a denied merchant is always rejected.
|
|
470
|
+
* Honored for every visibility mode. */
|
|
471
|
+
denied_merchant_ids?: string[];
|
|
363
472
|
/** Optional audit note (e.g. `"beta access — Marcel"`). */
|
|
364
473
|
reason?: string | null;
|
|
365
474
|
}
|
|
@@ -367,6 +476,7 @@ interface ConnectorRestrictionResponse {
|
|
|
367
476
|
connector_name: string;
|
|
368
477
|
visibility: ConnectorVisibility;
|
|
369
478
|
allowed_merchant_ids: string[];
|
|
479
|
+
denied_merchant_ids: string[];
|
|
370
480
|
reason: string | null;
|
|
371
481
|
/** ISO 8601 datetime. */
|
|
372
482
|
created_at: string;
|
|
@@ -407,6 +517,19 @@ declare class AdminPortal {
|
|
|
407
517
|
analytics(params: AdminAnalyticsRequest): Promise<PlatformAnalyticsResponse>;
|
|
408
518
|
overviewStats(): Promise<OverviewStatsResponse>;
|
|
409
519
|
paymentAnalytics(params: PaymentAnalyticsRequest): Promise<PaymentAnalyticsResponse>;
|
|
520
|
+
/**
|
|
521
|
+
* One drill level of the analytics dashboard: the scope's daily series +
|
|
522
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
523
|
+
* toggles apply client-side; only a drill (passing merchant_id / project_id
|
|
524
|
+
* / shop_id) fetches the next level.
|
|
525
|
+
*/
|
|
526
|
+
analyticsScope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse>;
|
|
527
|
+
/**
|
|
528
|
+
* Platform billing dashboard: total balance across all ledger accounts (+
|
|
529
|
+
* the net change), top-ups, fees collected, and the day-by-day ledger flow.
|
|
530
|
+
* All amounts are in USD minor units.
|
|
531
|
+
*/
|
|
532
|
+
ledgerAnalytics(params?: AdminLedgerAnalyticsRequest): Promise<AdminLedgerAnalyticsResponse>;
|
|
410
533
|
/**
|
|
411
534
|
* Retrieve a merchant account via the admin portal. Unlike
|
|
412
535
|
* `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
|
|
@@ -655,4 +778,4 @@ declare class DelopayInternal extends Delopay {
|
|
|
655
778
|
constructor(...args: ConstructorParameters<typeof Delopay>);
|
|
656
779
|
}
|
|
657
780
|
|
|
658
|
-
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, AdminPortal, type AdminSetTrustedRequest, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, Configs, type ConnectorRestrictionResponse, ConnectorRestrictions, type ConnectorVisibility, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse,
|
|
781
|
+
export { Admin, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCreateUserForMerchantRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminLedgerAnalyticsRequest, type AdminLedgerAnalyticsResponse, AdminPortal, type AdminSetTrustedRequest, type AdminSignInRequest, type AdminSuspendRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AdminUnsuspendRequest, type AdminUpdateUserRequest, type AdminUserResponse, AnalyticsScopeRequest, AnalyticsScopeResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, AuditLogs, AuthResponse, type AuthorizeResponse, BillingProfileResponse, Cache, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, CardIssuers, Configs, type ConnectorRestrictionResponse, ConnectorRestrictions, type ConnectorVisibility, type CreateInternalUserRequest, type CreateTenantUserRequest, type CustomerSummary, type CustomerUser, Delopay, DelopayInternal, FeeScheduleCreateRequest, FeeScheduleResponse, FeeScheduleUpdateRequest, Gsm, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type LedgerDayBucket, type LedgerMerchant, MerchantAccountResponse, MerchantAccountUpdateRequest, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentPeriodStats, PaymentResponse, type PlatformAnalyticsResponse, PlatformBilling, PlatformFeeRuleInput, PlatformFeeRuleRecord, PlatformFees, ProfileResponse, ProjectResponse, RequestFn, ShopResponse, SignUpWithMerchantIdRequest, type SignupToggleRequest, type SignupToggleResponse, type UpsertConnectorRestrictionRequest };
|
package/dist/internal.js
CHANGED
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
shadowFor,
|
|
44
44
|
surfacePadValue,
|
|
45
45
|
verticalGapValue
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-IQKFNKHU.js";
|
|
47
47
|
|
|
48
48
|
// src/internal/resources/admin.ts
|
|
49
49
|
var Admin = class {
|
|
@@ -116,6 +116,27 @@ var AdminPortal = class {
|
|
|
116
116
|
query: params
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* One drill level of the analytics dashboard: the scope's daily series +
|
|
121
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
122
|
+
* toggles apply client-side; only a drill (passing merchant_id / project_id
|
|
123
|
+
* / shop_id) fetches the next level.
|
|
124
|
+
*/
|
|
125
|
+
async analyticsScope(params) {
|
|
126
|
+
return this.request("GET", "/admin-portal/analytics/scope", {
|
|
127
|
+
query: params
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Platform billing dashboard: total balance across all ledger accounts (+
|
|
132
|
+
* the net change), top-ups, fees collected, and the day-by-day ledger flow.
|
|
133
|
+
* All amounts are in USD minor units.
|
|
134
|
+
*/
|
|
135
|
+
async ledgerAnalytics(params) {
|
|
136
|
+
return this.request("GET", "/admin-portal/ledger-analytics", {
|
|
137
|
+
query: params
|
|
138
|
+
});
|
|
139
|
+
}
|
|
119
140
|
/**
|
|
120
141
|
* Retrieve a merchant account via the admin portal. Unlike
|
|
121
142
|
* `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
|