@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/index.d.cts
CHANGED
|
@@ -1145,8 +1145,6 @@ interface MerchantOverviewStat {
|
|
|
1145
1145
|
interface MerchantOverviewResponse {
|
|
1146
1146
|
total_shops: MerchantOverviewStat;
|
|
1147
1147
|
active_shops: MerchantOverviewStat;
|
|
1148
|
-
total_revenue: MerchantOverviewStat;
|
|
1149
|
-
total_orders: MerchantOverviewStat;
|
|
1150
1148
|
}
|
|
1151
1149
|
interface ApiKeyCreateRequest {
|
|
1152
1150
|
name: string;
|
|
@@ -2280,6 +2278,91 @@ interface ParentGroupInfo {
|
|
|
2280
2278
|
resources: string[];
|
|
2281
2279
|
scopes: PermissionScope[];
|
|
2282
2280
|
}
|
|
2281
|
+
/**
|
|
2282
|
+
* Query for the scoped analytics endpoint. The optional ids select the drill
|
|
2283
|
+
* level. For the merchant dashboard (`analytics.scope`) `merchant_id` is
|
|
2284
|
+
* ignored — the server pins the scope to the authenticated merchant — so only
|
|
2285
|
+
* `project_id` / `shop_id` (drill) and the window/section fields are honoured.
|
|
2286
|
+
*/
|
|
2287
|
+
interface AnalyticsScopeRequest {
|
|
2288
|
+
/** Trailing days for a rolling window ending now. Default 7, capped at 90. */
|
|
2289
|
+
days?: number | null;
|
|
2290
|
+
/** Naive ISO 8601 datetime for the window start (custom range; span ≤ 90 days). */
|
|
2291
|
+
start_date?: string | null;
|
|
2292
|
+
/** Naive ISO 8601 datetime for the inclusive last day. Defaults to now. */
|
|
2293
|
+
end_date?: string | null;
|
|
2294
|
+
/** Scope to a single merchant. Ignored (server-pinned) on `analytics.scope`. */
|
|
2295
|
+
merchant_id?: string | null;
|
|
2296
|
+
/** Scope to one project's shops. */
|
|
2297
|
+
project_id?: string | null;
|
|
2298
|
+
/** Scope to a single shop; wins over project_id. */
|
|
2299
|
+
shop_id?: string | null;
|
|
2300
|
+
/**
|
|
2301
|
+
* Comma-separated selector for which response blocks the server computes, so
|
|
2302
|
+
* a standalone widget (e.g. a pinned card) skips the query/fold work it
|
|
2303
|
+
* doesn't need. Tokens: `series` (current daily series — KPI values + chart),
|
|
2304
|
+
* `previous` (the equal-length prior window — period-over-period deltas),
|
|
2305
|
+
* `connectors` (processor donut) and `children` (breakdown table + merchant
|
|
2306
|
+
* donut). Omit for the full dashboard (all blocks). Unrequested blocks come
|
|
2307
|
+
* back as empty arrays.
|
|
2308
|
+
*/
|
|
2309
|
+
sections?: string | null;
|
|
2310
|
+
}
|
|
2311
|
+
/** One day of aggregated payment activity. Volumes are in USD major units. */
|
|
2312
|
+
interface AnalyticsDayBucket {
|
|
2313
|
+
tx: number;
|
|
2314
|
+
success: number;
|
|
2315
|
+
vol: number;
|
|
2316
|
+
refunds: number;
|
|
2317
|
+
refund_vol: number;
|
|
2318
|
+
failed_tx: number;
|
|
2319
|
+
processing_tx: number;
|
|
2320
|
+
action_tx: number;
|
|
2321
|
+
failed_vol: number;
|
|
2322
|
+
processing_vol: number;
|
|
2323
|
+
action_vol: number;
|
|
2324
|
+
}
|
|
2325
|
+
/** One day of a processor's volume, split by outcome (major units). */
|
|
2326
|
+
interface AnalyticsConnectorDay {
|
|
2327
|
+
success: number;
|
|
2328
|
+
failed: number;
|
|
2329
|
+
open: number;
|
|
2330
|
+
}
|
|
2331
|
+
/** One processor's daily, status-split volume series over the window. */
|
|
2332
|
+
interface AnalyticsConnectorSeries {
|
|
2333
|
+
name: string;
|
|
2334
|
+
days: AnalyticsConnectorDay[];
|
|
2335
|
+
}
|
|
2336
|
+
/** A direct child of the current scope (merchant / project / shop). */
|
|
2337
|
+
interface AnalyticsChild {
|
|
2338
|
+
id: string;
|
|
2339
|
+
name: string;
|
|
2340
|
+
/** "merchant" | "project" | "shop". */
|
|
2341
|
+
type: string;
|
|
2342
|
+
badge: string;
|
|
2343
|
+
/** Owning merchant name (for grouping the merchant donut). */
|
|
2344
|
+
merchant: string;
|
|
2345
|
+
/** Aggregate of the child's activity over the current window (USD). */
|
|
2346
|
+
totals: AnalyticsDayBucket;
|
|
2347
|
+
}
|
|
2348
|
+
/**
|
|
2349
|
+
* One drill level of the analytics dashboard: the scope's own daily series +
|
|
2350
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
2351
|
+
* toggles apply client-side; only a drill fetches the next level.
|
|
2352
|
+
* `end_date` is the inclusive last day as an ISO date (`YYYY-MM-DD`).
|
|
2353
|
+
*/
|
|
2354
|
+
interface AnalyticsScopeResponse {
|
|
2355
|
+
currency: string;
|
|
2356
|
+
days: number;
|
|
2357
|
+
end_date: string;
|
|
2358
|
+
/** "root" | "merchant" | "project" | "shop". */
|
|
2359
|
+
level: string;
|
|
2360
|
+
series: AnalyticsDayBucket[];
|
|
2361
|
+
/** Equal-length previous window (for period-over-period deltas + comparison). */
|
|
2362
|
+
previous_series: AnalyticsDayBucket[];
|
|
2363
|
+
connectors: AnalyticsConnectorSeries[];
|
|
2364
|
+
children: AnalyticsChild[];
|
|
2365
|
+
}
|
|
2283
2366
|
|
|
2284
2367
|
/** Create and manage API keys for a merchant account. */
|
|
2285
2368
|
declare class ApiKeys {
|
|
@@ -3737,31 +3820,19 @@ declare class Verification {
|
|
|
3737
3820
|
getApplePayVerifiedDomains(params: Record<string, string>): Promise<ApplePayVerifiedDomainsResponse>;
|
|
3738
3821
|
}
|
|
3739
3822
|
|
|
3740
|
-
type AnalyticsScope = 'merchant' | 'org' | 'profile';
|
|
3741
|
-
declare class AnalyticsDomain {
|
|
3742
|
-
private readonly request;
|
|
3743
|
-
private readonly domain;
|
|
3744
|
-
constructor(request: RequestFn, domain: string);
|
|
3745
|
-
/** Get metrics. `POST /analytics/metrics/{domain}` */
|
|
3746
|
-
metrics(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3747
|
-
/** Get filters. `POST /analytics/filters/{domain}` */
|
|
3748
|
-
filters(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3749
|
-
/** Generate report. `POST /analytics/report/{domain}` */
|
|
3750
|
-
report(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3751
|
-
/** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
|
|
3752
|
-
sankey(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3753
|
-
}
|
|
3754
3823
|
declare class Analytics {
|
|
3755
3824
|
private readonly request;
|
|
3756
|
-
readonly payments: AnalyticsDomain;
|
|
3757
|
-
readonly refunds: AnalyticsDomain;
|
|
3758
|
-
readonly disputes: AnalyticsDomain;
|
|
3759
|
-
readonly authEvents: AnalyticsDomain;
|
|
3760
|
-
readonly sdkEvents: AnalyticsDomain;
|
|
3761
|
-
readonly frm: AnalyticsDomain;
|
|
3762
|
-
readonly apiEvents: AnalyticsDomain;
|
|
3763
|
-
readonly routing: AnalyticsDomain;
|
|
3764
3825
|
constructor(request: RequestFn);
|
|
3826
|
+
/**
|
|
3827
|
+
* Scoped, drill-level analytics dashboard for the authenticated merchant
|
|
3828
|
+
* (the same engine as the admin portal, pinned server-side to your own
|
|
3829
|
+
* merchant). The server ignores `merchant_id` — it always scopes to your
|
|
3830
|
+
* merchant, and to your single shop for profile-scoped users — so pass only
|
|
3831
|
+
* `project_id` / `shop_id` to drill and the window / `sections` fields.
|
|
3832
|
+
* Returns one drill level: the scope's daily series + previous window,
|
|
3833
|
+
* processor mix and direct children. `GET /analytics/scope`
|
|
3834
|
+
*/
|
|
3835
|
+
scope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse>;
|
|
3765
3836
|
/** Global search. `POST /analytics/search` */
|
|
3766
3837
|
search(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3767
3838
|
/** Domain-specific search. `POST /analytics/search/{domain}` */
|
|
@@ -4443,4 +4514,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
4443
4514
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
4444
4515
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
4445
4516
|
|
|
4446
|
-
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
4517
|
+
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1145,8 +1145,6 @@ interface MerchantOverviewStat {
|
|
|
1145
1145
|
interface MerchantOverviewResponse {
|
|
1146
1146
|
total_shops: MerchantOverviewStat;
|
|
1147
1147
|
active_shops: MerchantOverviewStat;
|
|
1148
|
-
total_revenue: MerchantOverviewStat;
|
|
1149
|
-
total_orders: MerchantOverviewStat;
|
|
1150
1148
|
}
|
|
1151
1149
|
interface ApiKeyCreateRequest {
|
|
1152
1150
|
name: string;
|
|
@@ -2280,6 +2278,91 @@ interface ParentGroupInfo {
|
|
|
2280
2278
|
resources: string[];
|
|
2281
2279
|
scopes: PermissionScope[];
|
|
2282
2280
|
}
|
|
2281
|
+
/**
|
|
2282
|
+
* Query for the scoped analytics endpoint. The optional ids select the drill
|
|
2283
|
+
* level. For the merchant dashboard (`analytics.scope`) `merchant_id` is
|
|
2284
|
+
* ignored — the server pins the scope to the authenticated merchant — so only
|
|
2285
|
+
* `project_id` / `shop_id` (drill) and the window/section fields are honoured.
|
|
2286
|
+
*/
|
|
2287
|
+
interface AnalyticsScopeRequest {
|
|
2288
|
+
/** Trailing days for a rolling window ending now. Default 7, capped at 90. */
|
|
2289
|
+
days?: number | null;
|
|
2290
|
+
/** Naive ISO 8601 datetime for the window start (custom range; span ≤ 90 days). */
|
|
2291
|
+
start_date?: string | null;
|
|
2292
|
+
/** Naive ISO 8601 datetime for the inclusive last day. Defaults to now. */
|
|
2293
|
+
end_date?: string | null;
|
|
2294
|
+
/** Scope to a single merchant. Ignored (server-pinned) on `analytics.scope`. */
|
|
2295
|
+
merchant_id?: string | null;
|
|
2296
|
+
/** Scope to one project's shops. */
|
|
2297
|
+
project_id?: string | null;
|
|
2298
|
+
/** Scope to a single shop; wins over project_id. */
|
|
2299
|
+
shop_id?: string | null;
|
|
2300
|
+
/**
|
|
2301
|
+
* Comma-separated selector for which response blocks the server computes, so
|
|
2302
|
+
* a standalone widget (e.g. a pinned card) skips the query/fold work it
|
|
2303
|
+
* doesn't need. Tokens: `series` (current daily series — KPI values + chart),
|
|
2304
|
+
* `previous` (the equal-length prior window — period-over-period deltas),
|
|
2305
|
+
* `connectors` (processor donut) and `children` (breakdown table + merchant
|
|
2306
|
+
* donut). Omit for the full dashboard (all blocks). Unrequested blocks come
|
|
2307
|
+
* back as empty arrays.
|
|
2308
|
+
*/
|
|
2309
|
+
sections?: string | null;
|
|
2310
|
+
}
|
|
2311
|
+
/** One day of aggregated payment activity. Volumes are in USD major units. */
|
|
2312
|
+
interface AnalyticsDayBucket {
|
|
2313
|
+
tx: number;
|
|
2314
|
+
success: number;
|
|
2315
|
+
vol: number;
|
|
2316
|
+
refunds: number;
|
|
2317
|
+
refund_vol: number;
|
|
2318
|
+
failed_tx: number;
|
|
2319
|
+
processing_tx: number;
|
|
2320
|
+
action_tx: number;
|
|
2321
|
+
failed_vol: number;
|
|
2322
|
+
processing_vol: number;
|
|
2323
|
+
action_vol: number;
|
|
2324
|
+
}
|
|
2325
|
+
/** One day of a processor's volume, split by outcome (major units). */
|
|
2326
|
+
interface AnalyticsConnectorDay {
|
|
2327
|
+
success: number;
|
|
2328
|
+
failed: number;
|
|
2329
|
+
open: number;
|
|
2330
|
+
}
|
|
2331
|
+
/** One processor's daily, status-split volume series over the window. */
|
|
2332
|
+
interface AnalyticsConnectorSeries {
|
|
2333
|
+
name: string;
|
|
2334
|
+
days: AnalyticsConnectorDay[];
|
|
2335
|
+
}
|
|
2336
|
+
/** A direct child of the current scope (merchant / project / shop). */
|
|
2337
|
+
interface AnalyticsChild {
|
|
2338
|
+
id: string;
|
|
2339
|
+
name: string;
|
|
2340
|
+
/** "merchant" | "project" | "shop". */
|
|
2341
|
+
type: string;
|
|
2342
|
+
badge: string;
|
|
2343
|
+
/** Owning merchant name (for grouping the merchant donut). */
|
|
2344
|
+
merchant: string;
|
|
2345
|
+
/** Aggregate of the child's activity over the current window (USD). */
|
|
2346
|
+
totals: AnalyticsDayBucket;
|
|
2347
|
+
}
|
|
2348
|
+
/**
|
|
2349
|
+
* One drill level of the analytics dashboard: the scope's own daily series +
|
|
2350
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
2351
|
+
* toggles apply client-side; only a drill fetches the next level.
|
|
2352
|
+
* `end_date` is the inclusive last day as an ISO date (`YYYY-MM-DD`).
|
|
2353
|
+
*/
|
|
2354
|
+
interface AnalyticsScopeResponse {
|
|
2355
|
+
currency: string;
|
|
2356
|
+
days: number;
|
|
2357
|
+
end_date: string;
|
|
2358
|
+
/** "root" | "merchant" | "project" | "shop". */
|
|
2359
|
+
level: string;
|
|
2360
|
+
series: AnalyticsDayBucket[];
|
|
2361
|
+
/** Equal-length previous window (for period-over-period deltas + comparison). */
|
|
2362
|
+
previous_series: AnalyticsDayBucket[];
|
|
2363
|
+
connectors: AnalyticsConnectorSeries[];
|
|
2364
|
+
children: AnalyticsChild[];
|
|
2365
|
+
}
|
|
2283
2366
|
|
|
2284
2367
|
/** Create and manage API keys for a merchant account. */
|
|
2285
2368
|
declare class ApiKeys {
|
|
@@ -3737,31 +3820,19 @@ declare class Verification {
|
|
|
3737
3820
|
getApplePayVerifiedDomains(params: Record<string, string>): Promise<ApplePayVerifiedDomainsResponse>;
|
|
3738
3821
|
}
|
|
3739
3822
|
|
|
3740
|
-
type AnalyticsScope = 'merchant' | 'org' | 'profile';
|
|
3741
|
-
declare class AnalyticsDomain {
|
|
3742
|
-
private readonly request;
|
|
3743
|
-
private readonly domain;
|
|
3744
|
-
constructor(request: RequestFn, domain: string);
|
|
3745
|
-
/** Get metrics. `POST /analytics/metrics/{domain}` */
|
|
3746
|
-
metrics(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3747
|
-
/** Get filters. `POST /analytics/filters/{domain}` */
|
|
3748
|
-
filters(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3749
|
-
/** Generate report. `POST /analytics/report/{domain}` */
|
|
3750
|
-
report(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3751
|
-
/** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
|
|
3752
|
-
sankey(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3753
|
-
}
|
|
3754
3823
|
declare class Analytics {
|
|
3755
3824
|
private readonly request;
|
|
3756
|
-
readonly payments: AnalyticsDomain;
|
|
3757
|
-
readonly refunds: AnalyticsDomain;
|
|
3758
|
-
readonly disputes: AnalyticsDomain;
|
|
3759
|
-
readonly authEvents: AnalyticsDomain;
|
|
3760
|
-
readonly sdkEvents: AnalyticsDomain;
|
|
3761
|
-
readonly frm: AnalyticsDomain;
|
|
3762
|
-
readonly apiEvents: AnalyticsDomain;
|
|
3763
|
-
readonly routing: AnalyticsDomain;
|
|
3764
3825
|
constructor(request: RequestFn);
|
|
3826
|
+
/**
|
|
3827
|
+
* Scoped, drill-level analytics dashboard for the authenticated merchant
|
|
3828
|
+
* (the same engine as the admin portal, pinned server-side to your own
|
|
3829
|
+
* merchant). The server ignores `merchant_id` — it always scopes to your
|
|
3830
|
+
* merchant, and to your single shop for profile-scoped users — so pass only
|
|
3831
|
+
* `project_id` / `shop_id` to drill and the window / `sections` fields.
|
|
3832
|
+
* Returns one drill level: the scope's daily series + previous window,
|
|
3833
|
+
* processor mix and direct children. `GET /analytics/scope`
|
|
3834
|
+
*/
|
|
3835
|
+
scope(params?: AnalyticsScopeRequest): Promise<AnalyticsScopeResponse>;
|
|
3765
3836
|
/** Global search. `POST /analytics/search` */
|
|
3766
3837
|
search(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3767
3838
|
/** Domain-specific search. `POST /analytics/search/{domain}` */
|
|
@@ -4443,4 +4514,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
4443
4514
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
4444
4515
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
4445
4516
|
|
|
4446
|
-
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
4517
|
+
export { type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type NonPillRadius, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, logoDimensions, parseImportedBranding, radiusValue, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -2435,51 +2435,23 @@ var Webhooks = {
|
|
|
2435
2435
|
};
|
|
2436
2436
|
|
|
2437
2437
|
// src/resources/analytics.ts
|
|
2438
|
-
var AnalyticsDomain = class {
|
|
2439
|
-
constructor(request, domain) {
|
|
2440
|
-
this.request = request;
|
|
2441
|
-
this.domain = domain;
|
|
2442
|
-
}
|
|
2443
|
-
/** Get metrics. `POST /analytics/metrics/{domain}` */
|
|
2444
|
-
async metrics(params, scope) {
|
|
2445
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2446
|
-
return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}`, {
|
|
2447
|
-
body: [params]
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
/** Get filters. `POST /analytics/filters/{domain}` */
|
|
2451
|
-
async filters(params, scope) {
|
|
2452
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2453
|
-
return this.request("POST", `${prefix}/filters/${encodeURIComponent(this.domain)}`, {
|
|
2454
|
-
body: params
|
|
2455
|
-
});
|
|
2456
|
-
}
|
|
2457
|
-
/** Generate report. `POST /analytics/report/{domain}` */
|
|
2458
|
-
async report(params, scope) {
|
|
2459
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2460
|
-
return this.request("POST", `${prefix}/report/${encodeURIComponent(this.domain)}`, {
|
|
2461
|
-
body: params
|
|
2462
|
-
});
|
|
2463
|
-
}
|
|
2464
|
-
/** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
|
|
2465
|
-
async sankey(params, scope) {
|
|
2466
|
-
const prefix = scope ? `/analytics/${scope}` : "/analytics";
|
|
2467
|
-
return this.request("POST", `${prefix}/metrics/${encodeURIComponent(this.domain)}/sankey`, {
|
|
2468
|
-
body: params
|
|
2469
|
-
});
|
|
2470
|
-
}
|
|
2471
|
-
};
|
|
2472
2438
|
var Analytics = class {
|
|
2473
2439
|
constructor(request) {
|
|
2474
2440
|
this.request = request;
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Scoped, drill-level analytics dashboard for the authenticated merchant
|
|
2444
|
+
* (the same engine as the admin portal, pinned server-side to your own
|
|
2445
|
+
* merchant). The server ignores `merchant_id` — it always scopes to your
|
|
2446
|
+
* merchant, and to your single shop for profile-scoped users — so pass only
|
|
2447
|
+
* `project_id` / `shop_id` to drill and the window / `sections` fields.
|
|
2448
|
+
* Returns one drill level: the scope's daily series + previous window,
|
|
2449
|
+
* processor mix and direct children. `GET /analytics/scope`
|
|
2450
|
+
*/
|
|
2451
|
+
async scope(params) {
|
|
2452
|
+
return this.request("GET", "/analytics/scope", {
|
|
2453
|
+
query: params
|
|
2454
|
+
});
|
|
2483
2455
|
}
|
|
2484
2456
|
/** Global search. `POST /analytics/search` */
|
|
2485
2457
|
async search(params) {
|
|
@@ -3908,6 +3880,27 @@ var AdminPortal = class {
|
|
|
3908
3880
|
query: params
|
|
3909
3881
|
});
|
|
3910
3882
|
}
|
|
3883
|
+
/**
|
|
3884
|
+
* One drill level of the analytics dashboard: the scope's daily series +
|
|
3885
|
+
* processor mix and its direct children's series. Range / metric / donut
|
|
3886
|
+
* toggles apply client-side; only a drill (passing merchant_id / project_id
|
|
3887
|
+
* / shop_id) fetches the next level.
|
|
3888
|
+
*/
|
|
3889
|
+
async analyticsScope(params) {
|
|
3890
|
+
return this.request("GET", "/admin-portal/analytics/scope", {
|
|
3891
|
+
query: params
|
|
3892
|
+
});
|
|
3893
|
+
}
|
|
3894
|
+
/**
|
|
3895
|
+
* Platform billing dashboard: total balance across all ledger accounts (+
|
|
3896
|
+
* the net change), top-ups, fees collected, and the day-by-day ledger flow.
|
|
3897
|
+
* All amounts are in USD minor units.
|
|
3898
|
+
*/
|
|
3899
|
+
async ledgerAnalytics(params) {
|
|
3900
|
+
return this.request("GET", "/admin-portal/ledger-analytics", {
|
|
3901
|
+
query: params
|
|
3902
|
+
});
|
|
3903
|
+
}
|
|
3911
3904
|
/**
|
|
3912
3905
|
* Retrieve a merchant account via the admin portal. Unlike
|
|
3913
3906
|
* `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
|