@delopay/sdk 0.35.1 → 0.37.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/README.md +30 -0
- package/dist/{chunk-45OPT3EW.js → chunk-IQKFNKHU.js} +126 -43
- package/dist/chunk-IQKFNKHU.js.map +1 -0
- package/dist/index.cjs +127 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +303 -25
- package/dist/index.d.ts +303 -25
- package/dist/index.js +5 -1
- package/dist/internal.cjs +174 -42
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +151 -13
- package/dist/internal.d.ts +151 -13
- package/dist/internal.js +52 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -16
- package/dist/chunk-45OPT3EW.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1009,6 +1009,103 @@ interface FeeScheduleResponse {
|
|
|
1009
1009
|
max_fee_amount?: number | null;
|
|
1010
1010
|
description?: string | null;
|
|
1011
1011
|
}
|
|
1012
|
+
/** Euclid comparison operator. */
|
|
1013
|
+
type EuclidComparisonType = 'equal' | 'not_equal' | 'less_than' | 'less_than_equal' | 'greater_than' | 'greater_than_equal';
|
|
1014
|
+
/** A tagged Euclid value. Enum conditions use `enum_variant`; amount uses `number`. */
|
|
1015
|
+
type EuclidValue = {
|
|
1016
|
+
type: 'number';
|
|
1017
|
+
value: number;
|
|
1018
|
+
} | {
|
|
1019
|
+
type: 'enum_variant';
|
|
1020
|
+
value: string;
|
|
1021
|
+
} | {
|
|
1022
|
+
type: 'str_value';
|
|
1023
|
+
value: string;
|
|
1024
|
+
} | {
|
|
1025
|
+
type: 'number_array';
|
|
1026
|
+
value: number[];
|
|
1027
|
+
} | {
|
|
1028
|
+
type: 'enum_variant_array';
|
|
1029
|
+
value: string[];
|
|
1030
|
+
} | {
|
|
1031
|
+
type: 'metadata_variant';
|
|
1032
|
+
value: {
|
|
1033
|
+
key: string;
|
|
1034
|
+
value: string;
|
|
1035
|
+
};
|
|
1036
|
+
} | {
|
|
1037
|
+
type: 'number_comparison_array';
|
|
1038
|
+
value: {
|
|
1039
|
+
comparisonType: EuclidComparisonType;
|
|
1040
|
+
number: number;
|
|
1041
|
+
}[];
|
|
1042
|
+
};
|
|
1043
|
+
/**
|
|
1044
|
+
* A single condition. `lhs` is a backend dimension key — e.g. `payment_method`,
|
|
1045
|
+
* `connector`, `currency`, `card_network`, `amount`, or a payment-method-type key
|
|
1046
|
+
* (`crypto`, `wallet`, `bank_redirect`, …). camelCase on the wire.
|
|
1047
|
+
*/
|
|
1048
|
+
interface EuclidComparison {
|
|
1049
|
+
lhs: string;
|
|
1050
|
+
comparison: EuclidComparisonType;
|
|
1051
|
+
value: EuclidValue;
|
|
1052
|
+
metadata: Record<string, unknown>;
|
|
1053
|
+
}
|
|
1054
|
+
/** An IF block; all comparisons in `condition` are ANDed. camelCase on the wire. */
|
|
1055
|
+
interface EuclidIfStatement {
|
|
1056
|
+
condition: EuclidComparison[];
|
|
1057
|
+
nested?: EuclidIfStatement[] | null;
|
|
1058
|
+
}
|
|
1059
|
+
/** How a matched rule prices the transaction. snake_case on the wire. */
|
|
1060
|
+
type PlatformFeeKind = 'percentage' | 'flat' | 'combined';
|
|
1061
|
+
interface PlatformFeeOutput {
|
|
1062
|
+
fee_type: PlatformFeeKind;
|
|
1063
|
+
/** Percentage fee, e.g. `2.5` means 2.5%. */
|
|
1064
|
+
percentage_fee?: number | null;
|
|
1065
|
+
/** Flat fee in minor units. */
|
|
1066
|
+
flat_fee_amount?: number | null;
|
|
1067
|
+
flat_fee_currency?: string | null;
|
|
1068
|
+
min_fee_amount?: number | null;
|
|
1069
|
+
max_fee_amount?: number | null;
|
|
1070
|
+
}
|
|
1071
|
+
/** The Euclid program output `O`: a matched branch may set a concrete `fee`. */
|
|
1072
|
+
interface PlatformFeeRuleOutput {
|
|
1073
|
+
fee?: PlatformFeeOutput | null;
|
|
1074
|
+
}
|
|
1075
|
+
/** A single fee rule (`Rule<PlatformFeeRules>`). camelCase on the wire. */
|
|
1076
|
+
interface PlatformFeeRule {
|
|
1077
|
+
name: string;
|
|
1078
|
+
connectorSelection: PlatformFeeRuleOutput;
|
|
1079
|
+
statements: EuclidIfStatement[];
|
|
1080
|
+
}
|
|
1081
|
+
/** The fee-rule program (`Program<PlatformFeeRules>`). camelCase on the wire. */
|
|
1082
|
+
interface PlatformFeeProgram {
|
|
1083
|
+
defaultSelection: PlatformFeeRuleOutput;
|
|
1084
|
+
rules: PlatformFeeRule[];
|
|
1085
|
+
/** Required on the wire — send `{}` when empty. */
|
|
1086
|
+
metadata: Record<string, unknown>;
|
|
1087
|
+
}
|
|
1088
|
+
/** Full request body. `fee_owner` is injected by the SDK per surface. */
|
|
1089
|
+
interface PlatformFeeRuleRequest {
|
|
1090
|
+
algorithm: PlatformFeeProgram;
|
|
1091
|
+
name?: string | null;
|
|
1092
|
+
profile_id?: string | null;
|
|
1093
|
+
fee_owner: FeeOwner;
|
|
1094
|
+
/** RFC3339 timestamp; defaults to now server-side. */
|
|
1095
|
+
valid_from?: string | null;
|
|
1096
|
+
/** RFC3339 timestamp; open-ended when unset. */
|
|
1097
|
+
valid_until?: string | null;
|
|
1098
|
+
}
|
|
1099
|
+
/** User-facing input; the resource method adds `fee_owner`. */
|
|
1100
|
+
type PlatformFeeRuleInput = Omit<PlatformFeeRuleRequest, 'fee_owner'>;
|
|
1101
|
+
/** The stored program. `created_at`/`modified_at` are unix-second integers. */
|
|
1102
|
+
interface PlatformFeeRuleRecord {
|
|
1103
|
+
name: string;
|
|
1104
|
+
fee_owner: FeeOwner;
|
|
1105
|
+
algorithm: PlatformFeeProgram;
|
|
1106
|
+
created_at: number;
|
|
1107
|
+
modified_at: number;
|
|
1108
|
+
}
|
|
1012
1109
|
interface ProjectCreateRequest {
|
|
1013
1110
|
project_name: string;
|
|
1014
1111
|
description?: string | null;
|
|
@@ -1048,8 +1145,6 @@ interface MerchantOverviewStat {
|
|
|
1048
1145
|
interface MerchantOverviewResponse {
|
|
1049
1146
|
total_shops: MerchantOverviewStat;
|
|
1050
1147
|
active_shops: MerchantOverviewStat;
|
|
1051
|
-
total_revenue: MerchantOverviewStat;
|
|
1052
|
-
total_orders: MerchantOverviewStat;
|
|
1053
1148
|
}
|
|
1054
1149
|
interface ApiKeyCreateRequest {
|
|
1055
1150
|
name: string;
|
|
@@ -2183,6 +2278,91 @@ interface ParentGroupInfo {
|
|
|
2183
2278
|
resources: string[];
|
|
2184
2279
|
scopes: PermissionScope[];
|
|
2185
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
|
+
}
|
|
2186
2366
|
|
|
2187
2367
|
/** Create and manage API keys for a merchant account. */
|
|
2188
2368
|
declare class ApiKeys {
|
|
@@ -2579,9 +2759,15 @@ declare class Events {
|
|
|
2579
2759
|
* specific shop (via `shop_id`). Merchants can CRUD their own fee
|
|
2580
2760
|
* overrides; platform-wide fee programs are administered by Delopay and
|
|
2581
2761
|
* not exposed here.
|
|
2762
|
+
*
|
|
2763
|
+
* `fees.rules` manages the merchant-owned Euclid fee-rule program (a single
|
|
2764
|
+
* active program per merchant), which takes precedence over the flat schedules
|
|
2765
|
+
* above. Build the program with the `feeProgram()` helper.
|
|
2582
2766
|
*/
|
|
2583
2767
|
declare class Fees {
|
|
2584
2768
|
private readonly request;
|
|
2769
|
+
/** Merchant-owned Euclid fee-rule program (`/merchant-fees/rules`). */
|
|
2770
|
+
readonly rules: FeeRulesManager;
|
|
2585
2771
|
constructor(request: RequestFn);
|
|
2586
2772
|
/**
|
|
2587
2773
|
* Create a merchant-scoped fee schedule (optionally per-shop).
|
|
@@ -2610,6 +2796,35 @@ declare class Fees {
|
|
|
2610
2796
|
*/
|
|
2611
2797
|
delete(feeId: string): Promise<FeeScheduleResponse>;
|
|
2612
2798
|
}
|
|
2799
|
+
/**
|
|
2800
|
+
* Manages a merchant's single active Euclid fee-rule program. Build the
|
|
2801
|
+
* `algorithm` with `feeProgram()`. The SDK injects `fee_owner: 'merchant'`.
|
|
2802
|
+
*/
|
|
2803
|
+
declare class FeeRulesManager {
|
|
2804
|
+
private readonly request;
|
|
2805
|
+
constructor(request: RequestFn);
|
|
2806
|
+
/**
|
|
2807
|
+
* Create or replace the merchant's fee-rule program (a new active version;
|
|
2808
|
+
* the previous version is deactivated server-side).
|
|
2809
|
+
*
|
|
2810
|
+
* @param params - The program plus optional name / shop scope / validity window.
|
|
2811
|
+
* @param merchantId - The merchant account ID.
|
|
2812
|
+
*/
|
|
2813
|
+
upsert(params: PlatformFeeRuleInput, merchantId: string): Promise<PlatformFeeRuleRecord>;
|
|
2814
|
+
/**
|
|
2815
|
+
* Retrieve the merchant's active fee-rule program, or `null` if none.
|
|
2816
|
+
*
|
|
2817
|
+
* @param merchantId - The merchant account ID.
|
|
2818
|
+
*/
|
|
2819
|
+
retrieve(merchantId: string): Promise<PlatformFeeRuleRecord | null>;
|
|
2820
|
+
/**
|
|
2821
|
+
* Deactivate the merchant's active fee-rule program (falls back to the flat
|
|
2822
|
+
* fee schedules / volume tier). Idempotent.
|
|
2823
|
+
*
|
|
2824
|
+
* @param merchantId - The merchant account ID.
|
|
2825
|
+
*/
|
|
2826
|
+
delete(merchantId: string): Promise<void>;
|
|
2827
|
+
}
|
|
2613
2828
|
|
|
2614
2829
|
/** View and revoke recurring payment mandates. */
|
|
2615
2830
|
declare class Mandates {
|
|
@@ -3605,31 +3820,19 @@ declare class Verification {
|
|
|
3605
3820
|
getApplePayVerifiedDomains(params: Record<string, string>): Promise<ApplePayVerifiedDomainsResponse>;
|
|
3606
3821
|
}
|
|
3607
3822
|
|
|
3608
|
-
type AnalyticsScope = 'merchant' | 'org' | 'profile';
|
|
3609
|
-
declare class AnalyticsDomain {
|
|
3610
|
-
private readonly request;
|
|
3611
|
-
private readonly domain;
|
|
3612
|
-
constructor(request: RequestFn, domain: string);
|
|
3613
|
-
/** Get metrics. `POST /analytics/metrics/{domain}` */
|
|
3614
|
-
metrics(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3615
|
-
/** Get filters. `POST /analytics/filters/{domain}` */
|
|
3616
|
-
filters(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3617
|
-
/** Generate report. `POST /analytics/report/{domain}` */
|
|
3618
|
-
report(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3619
|
-
/** Sankey chart data. `POST /analytics/metrics/{domain}/sankey` */
|
|
3620
|
-
sankey(params: Record<string, unknown>, scope?: AnalyticsScope): Promise<Record<string, unknown>>;
|
|
3621
|
-
}
|
|
3622
3823
|
declare class Analytics {
|
|
3623
3824
|
private readonly request;
|
|
3624
|
-
readonly payments: AnalyticsDomain;
|
|
3625
|
-
readonly refunds: AnalyticsDomain;
|
|
3626
|
-
readonly disputes: AnalyticsDomain;
|
|
3627
|
-
readonly authEvents: AnalyticsDomain;
|
|
3628
|
-
readonly sdkEvents: AnalyticsDomain;
|
|
3629
|
-
readonly frm: AnalyticsDomain;
|
|
3630
|
-
readonly apiEvents: AnalyticsDomain;
|
|
3631
|
-
readonly routing: AnalyticsDomain;
|
|
3632
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>;
|
|
3633
3836
|
/** Global search. `POST /analytics/search` */
|
|
3634
3837
|
search(params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
3635
3838
|
/** Domain-specific search. `POST /analytics/search/{domain}` */
|
|
@@ -4098,6 +4301,81 @@ declare const Webhooks: {
|
|
|
4098
4301
|
verify(rawBody: string | Uint8Array, signatureHeader: string, secret: string): Promise<WebhookEvent>;
|
|
4099
4302
|
};
|
|
4100
4303
|
|
|
4304
|
+
/**
|
|
4305
|
+
* How a rule (or the default) prices a transaction. `fee_type` is inferred:
|
|
4306
|
+
* percentage-only → `percentage`, flat-only → `flat`, both → `combined`.
|
|
4307
|
+
*/
|
|
4308
|
+
interface FeeSpecInput {
|
|
4309
|
+
/** Percentage fee, e.g. `2.5` means 2.5%. */
|
|
4310
|
+
percentage?: number;
|
|
4311
|
+
/** Flat fee in minor units. */
|
|
4312
|
+
flat?: number;
|
|
4313
|
+
/** ISO 4217 currency for the flat fee. */
|
|
4314
|
+
flatCurrency?: string;
|
|
4315
|
+
/** Clamp floor in minor units. */
|
|
4316
|
+
min?: number;
|
|
4317
|
+
/** Clamp ceiling in minor units. */
|
|
4318
|
+
max?: number;
|
|
4319
|
+
}
|
|
4320
|
+
/**
|
|
4321
|
+
* Friendly conditions for a rule. Every provided key becomes one condition and
|
|
4322
|
+
* they are ANDed together. For dimensions not covered here (payment-method-type
|
|
4323
|
+
* keys like `crypto`/`wallet`, metadata, value arrays) use `rawConditions`.
|
|
4324
|
+
*/
|
|
4325
|
+
interface FeeRuleConditions {
|
|
4326
|
+
paymentMethod?: PaymentMethod;
|
|
4327
|
+
connector?: Connector;
|
|
4328
|
+
currency?: Currency;
|
|
4329
|
+
cardNetwork?: string;
|
|
4330
|
+
/** `amount == n` (minor units). */
|
|
4331
|
+
amountEquals?: number;
|
|
4332
|
+
/** `amount > n` (minor units). */
|
|
4333
|
+
amountGreaterThan?: number;
|
|
4334
|
+
/** `amount < n` (minor units). */
|
|
4335
|
+
amountLessThan?: number;
|
|
4336
|
+
}
|
|
4337
|
+
interface FeeRuleInput {
|
|
4338
|
+
name: string;
|
|
4339
|
+
/** Friendly conditions (ANDed). Omit for an always-matching rule (prefer `otherwise`). */
|
|
4340
|
+
when?: FeeRuleConditions;
|
|
4341
|
+
/** Extra raw conditions ANDed in, for dimensions `when` does not cover. */
|
|
4342
|
+
rawConditions?: EuclidComparison[];
|
|
4343
|
+
fee: FeeSpecInput;
|
|
4344
|
+
}
|
|
4345
|
+
/**
|
|
4346
|
+
* Fluent builder for a platform fee-rule program. Emits the exact Euclid wire
|
|
4347
|
+
* shape (camelCase tree, tagged values, `metadata: {}` everywhere) so callers
|
|
4348
|
+
* never hand-write the AST. Rules are evaluated in order; the first match wins,
|
|
4349
|
+
* else `otherwise` (the default selection).
|
|
4350
|
+
*
|
|
4351
|
+
* @example
|
|
4352
|
+
* ```ts
|
|
4353
|
+
* const algorithm = feeProgram()
|
|
4354
|
+
* .rule({ name: 'crypto', when: { paymentMethod: 'crypto' }, fee: { percentage: 1.0 } })
|
|
4355
|
+
* .rule({
|
|
4356
|
+
* name: 'card_on_cryptomus',
|
|
4357
|
+
* when: { paymentMethod: 'card', connector: 'cryptomus' },
|
|
4358
|
+
* fee: { percentage: 2.0 },
|
|
4359
|
+
* })
|
|
4360
|
+
* .otherwise({ percentage: 3.0 })
|
|
4361
|
+
* .build();
|
|
4362
|
+
*
|
|
4363
|
+
* await delopay.fees.rules.upsert({ algorithm }, merchantId);
|
|
4364
|
+
* ```
|
|
4365
|
+
*/
|
|
4366
|
+
declare class FeeProgramBuilder {
|
|
4367
|
+
private readonly rules;
|
|
4368
|
+
private defaultFee;
|
|
4369
|
+
/** Append a rule. Provided `when`/`rawConditions` are ANDed. */
|
|
4370
|
+
rule(input: FeeRuleInput): this;
|
|
4371
|
+
/** Set the default selection (applied when no rule matches). */
|
|
4372
|
+
otherwise(fee: FeeSpecInput): this;
|
|
4373
|
+
/** Produce the wire-ready program. */
|
|
4374
|
+
build(): PlatformFeeProgram;
|
|
4375
|
+
}
|
|
4376
|
+
/** Start building a platform fee-rule program. See {@link FeeProgramBuilder}. */
|
|
4377
|
+
declare function feeProgram(): FeeProgramBuilder;
|
|
4378
|
+
|
|
4101
4379
|
type CornerRadius = 'square' | 'small' | 'medium' | 'large' | 'pill';
|
|
4102
4380
|
type NonPillRadius = Exclude<CornerRadius, 'pill'>;
|
|
4103
4381
|
type SpacingScale = 'compact' | 'comfortable' | 'spacious';
|
|
@@ -4236,4 +4514,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
4236
4514
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
4237
4515
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
4238
4516
|
|
|
4239
|
-
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 EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type 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 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, 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 };
|