@leaflow/sdk 0.74.3 → 0.75.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.
@@ -336,7 +336,7 @@ export interface paths {
336
336
  put?: never;
337
337
  /**
338
338
  * Create top up
339
- * @description Returns a checkout address. The balance increases when the payment provider confirms the
339
+ * @description Returns a checkout address. The balance increases when the payment gateway confirms the
340
340
  * payment, which may be after this call returns.
341
341
  *
342
342
  * The amount is in the account's currency. A checkout page may present a local currency;
@@ -396,8 +396,8 @@ export interface paths {
396
396
  put?: never;
397
397
  /**
398
398
  * Create payment method setup
399
- * @description Returns what is needed to hand the browser over to the payment provider's own card
400
- * form. Nothing is charged, and the method appears in the list once the provider
399
+ * @description Returns what is needed to hand the browser over to the payment gateway's own card
400
+ * form. Nothing is charged, and the method appears in the list once the gateway
401
401
  * confirms it.
402
402
  *
403
403
  * Card numbers are never sent to or stored by this service.
@@ -467,8 +467,8 @@ export interface paths {
467
467
  * @description Applies the account balance first, then charges the remainder to a payment method. Give
468
468
  * `payment_method_id` to choose one, or omit it to use the default.
469
469
  *
470
- * Returns a checkout address when the provider requires the cardholder to confirm the
471
- * payment; the invoice is marked paid once the provider confirms it.
470
+ * Returns a checkout address when the gateway requires the cardholder to confirm the
471
+ * payment; the invoice is marked paid once the gateway confirms it.
472
472
  *
473
473
  * Calling this on an invoice that is already paid returns the invoice unchanged.
474
474
  */
@@ -495,9 +495,9 @@ export interface paths {
495
495
  *
496
496
  * The balance is not split across the two cases: either it covers the whole total and
497
497
  * everything is settled from it, or it is left untouched and the full total is collected
498
- * through the provider. It is never partly spent against an unpaid remainder.
498
+ * through the gateway. It is never partly spent against an unpaid remainder.
499
499
  *
500
- * When the provider is needed, this returns a checkout address and settles nothing.
500
+ * When the gateway is needed, this returns a checkout address and settles nothing.
501
501
  * Call it again once the payment has landed — the balance then covers the total and the
502
502
  * same call settles everything.
503
503
  *
@@ -1502,18 +1502,6 @@ export interface components {
1502
1502
  /** Format: int64 */
1503
1503
  status: number;
1504
1504
  };
1505
- /**
1506
- * @description Names in other languages, keyed by BCP 47 language tag. Where your locale is absent, use
1507
- * the plain `name`; there is no fallback between related tags.
1508
- */
1509
- Translations: {
1510
- [key: string]: string;
1511
- };
1512
- /**
1513
- * @description A decimal string, in the currency stated alongside it.
1514
- * @example 10.2500000000
1515
- */
1516
- Money: string;
1517
1505
  CatalogProduct: {
1518
1506
  /** Format: uuid */
1519
1507
  id: string;
@@ -1967,15 +1955,15 @@ export interface components {
1967
1955
  */
1968
1956
  remaining_amount?: components["schemas"]["Money"];
1969
1957
  /**
1970
- * @description `pending` until the payment provider confirms. The balance increases on `succeeded`.
1958
+ * @description `pending` until the payment gateway confirms. The balance increases on `succeeded`.
1971
1959
  *
1972
1960
  * A checkout the payer abandoned ends up `failed` too, with `failure_reason` saying
1973
1961
  * so. Nothing was charged in that case.
1974
1962
  * @enum {string}
1975
1963
  */
1976
1964
  status: "pending" | "requires_action" | "succeeded" | "failed";
1977
- /** @description Which payment provider collected it. */
1978
- provider?: string;
1965
+ /** @description Which payment gateway collected it. */
1966
+ payment_gateway?: string;
1979
1967
  /**
1980
1968
  * @description The currency the payer was actually charged in, when the checkout page collected a
1981
1969
  * local one. Absent when it was the same as the account's.
@@ -2010,10 +1998,10 @@ export interface components {
2010
1998
  /**
2011
1999
  * @description In the account's currency, and no finer than that currency's smallest unit:
2012
2000
  * two decimals for most, none for the yen. A finer amount is refused here rather
2013
- * than at the checkout page, where the payer would see the provider's own wording
2001
+ * than at the checkout page, where the payer would see the gateway's own wording
2014
2002
  * instead of an explanation.
2015
2003
  *
2016
- * There is a minimum, which differs by currency. Below it the provider's fee
2004
+ * There is a minimum, which differs by currency. Below it the gateway's fee
2017
2005
  * exceeds the top-up itself, so such a payment costs more to accept than it brings.
2018
2006
  * The minimum in force is returned with the rejection.
2019
2007
  */
@@ -2041,7 +2029,7 @@ export interface components {
2041
2029
  id: string;
2042
2030
  /** Format: int64 */
2043
2031
  billing_account_id: number;
2044
- provider: string;
2032
+ payment_gateway?: string;
2045
2033
  brand?: string;
2046
2034
  last4?: string;
2047
2035
  exp_month?: number | null;
@@ -2061,23 +2049,23 @@ export interface components {
2061
2049
  return_url?: string;
2062
2050
  };
2063
2051
  /**
2064
- * @description What the payment provider's browser library needs in order to collect a card. There is
2052
+ * @description What the payment gateway's browser library needs in order to collect a card. There is
2065
2053
  * no address to redirect to: the form is rendered in the page, and the card goes straight
2066
- * from the browser to the provider.
2054
+ * from the browser to the gateway.
2067
2055
  */
2068
2056
  PaymentMethodSetupResult: {
2069
2057
  /**
2070
- * @description The provider's identifier for this attempt. Use it to tell a reloaded page apart
2058
+ * @description The gateway's identifier for this attempt. Use it to tell a reloaded page apart
2071
2059
  * from a second attempt.
2072
2060
  */
2073
2061
  setup_id: string;
2074
2062
  /**
2075
- * @description Authorises this one attempt with the provider, and nothing else. Pass it to the
2076
- * provider's library; it is not an API credential and grants no access here.
2063
+ * @description Authorises this one attempt with the gateway, and nothing else. Pass it to the
2064
+ * gateway's library; it is not an API credential and grants no access here.
2077
2065
  */
2078
2066
  client_secret: string;
2079
2067
  /**
2080
- * @description The provider's public key to initialise its library with. It differs between test
2068
+ * @description The gateway's public key to initialise its library with. It differs between test
2081
2069
  * and live, so read it from here rather than compiling it in.
2082
2070
  */
2083
2071
  publishable_key: string;
@@ -2085,7 +2073,7 @@ export interface components {
2085
2073
  expires_at?: string;
2086
2074
  };
2087
2075
  /**
2088
- * @description Safe to call again. While an attempt is still with the payment provider, calling this
2076
+ * @description Safe to call again. While an attempt is still with the payment gateway, calling this
2089
2077
  * returns that attempt rather than starting a second one, so a customer who reloads the
2090
2078
  * page is not charged twice.
2091
2079
  *
@@ -2114,7 +2102,7 @@ export interface components {
2114
2102
  order_ids?: string[];
2115
2103
  return_url?: string;
2116
2104
  /**
2117
- * @description Required when the provider is involved, because that is where the money moves. The
2105
+ * @description Required when the gateway is involved, because that is where the money moves. The
2118
2106
  * same key returns the same checkout address instead of opening a second one.
2119
2107
  */
2120
2108
  idempotency_key?: string;
@@ -2124,7 +2112,7 @@ export interface components {
2124
2112
  *
2125
2113
  * `succeeded` — collected in full. Nothing further is owed.
2126
2114
  *
2127
- * `processing` — submitted to the payment provider and awaiting its answer. **Do not
2115
+ * `processing` — submitted to the payment gateway and awaiting its answer. **Do not
2128
2116
  * submit it again**; poll the invoice or order, or wait to be notified. Some methods take
2129
2117
  * minutes and a few take days.
2130
2118
  *
@@ -2134,8 +2122,8 @@ export interface components {
2134
2122
  * `failed` — this attempt did not go through. `failure_reason` says why, and paying again
2135
2123
  * starts a fresh attempt.
2136
2124
  *
2137
- * The provider's own answer is what decides: an attempt is only `succeeded` once the
2138
- * provider says so, never because this call returned.
2125
+ * The gateway's own answer is what decides: an attempt is only `succeeded` once the
2126
+ * gateway says so, never because this call returned.
2139
2127
  * @enum {string}
2140
2128
  */
2141
2129
  PaymentStatus: "succeeded" | "processing" | "requires_action" | "failed";
@@ -2150,7 +2138,7 @@ export interface components {
2150
2138
  amount_paid: components["schemas"]["Money"];
2151
2139
  /**
2152
2140
  * @description What is still outstanding. Zero once the payment succeeds. Unchanged while
2153
- * `processing`: nothing is collected until the provider confirms it.
2141
+ * `processing`: nothing is collected until the gateway confirms it.
2154
2142
  */
2155
2143
  amount_due: components["schemas"]["Money"];
2156
2144
  currency: string;
@@ -2174,7 +2162,7 @@ export interface components {
2174
2162
  retriable?: boolean;
2175
2163
  /**
2176
2164
  * Format: date-time
2177
- * @description The earliest sensible moment to try again. Present when the provider asked for a
2165
+ * @description The earliest sensible moment to try again. Present when the gateway asked for a
2178
2166
  * wait.
2179
2167
  */
2180
2168
  retry_after?: string | null;
@@ -2306,10 +2294,10 @@ export interface components {
2306
2294
  /** Format: uuid */
2307
2295
  order_id?: string | null;
2308
2296
  /**
2309
- * @description `pending` is a payment still with the provider. Only one may be pending against any
2297
+ * @description `pending` is a payment still with the gateway. Only one may be pending against any
2310
2298
  * one invoice or order.
2311
2299
  *
2312
- * `failed` covers a payment the provider refused and one the payer walked away from
2300
+ * `failed` covers a payment the gateway refused and one the payer walked away from
2313
2301
  * alike; `failure_reason` says which. There is no separate cancelled state, because
2314
2302
  * what to do next is the same either way — start a new one.
2315
2303
  * @enum {string}
@@ -2429,10 +2417,10 @@ export interface components {
2429
2417
  * @description Where the cash went.
2430
2418
  * @enum {string}
2431
2419
  */
2432
- destination?: "balance" | "provider";
2420
+ destination?: "balance" | "gateway";
2433
2421
  /**
2434
- * @description `pending` — accepted, not yet sent to the payment provider. `processing` — with the
2435
- * provider and awaiting its answer, which takes days for some methods. Neither is
2422
+ * @description `pending` — accepted, not yet sent to the payment gateway. `processing` — with the
2423
+ * gateway and awaiting its answer, which takes days for some methods. Neither is
2436
2424
  * final, and neither means the money has moved.
2437
2425
  * @enum {string}
2438
2426
  */
@@ -2469,12 +2457,12 @@ export interface components {
2469
2457
  net_amount: components["schemas"]["Money"];
2470
2458
  currency: string;
2471
2459
  /**
2472
- * @description Where the cash part would go. `provider` returns it to the method it was paid
2460
+ * @description Where the cash part would go. `gateway` returns it to the method it was paid
2473
2461
  * with; `balance` credits the account instead, which is the answer whenever the cash
2474
- * came from more than one place or never went through a provider at all.
2462
+ * came from more than one place or never went through a gateway at all.
2475
2463
  * @enum {string}
2476
2464
  */
2477
- destination: "balance" | "provider";
2465
+ destination: "balance" | "gateway";
2478
2466
  /**
2479
2467
  * @description How `refundable_amount` splits by where the money came from. The amounts sum to it.
2480
2468
  *
@@ -3086,6 +3074,36 @@ export interface components {
3086
3074
  id: string;
3087
3075
  lookup_key?: string;
3088
3076
  };
3077
+ /**
3078
+ * @description Text in other languages, keyed by BCP 47 language tag (`zh-Hans`, `en`, `ja`).
3079
+ *
3080
+ * When your locale is absent, use the plain field next to this one. **There is no fallback
3081
+ * chain**: a missing `zh-Hans` does not fall back to `zh`.
3082
+ *
3083
+ * Resolving server-side by `Accept-Language` is deliberately not done — the public catalogue is
3084
+ * cached and served from a CDN, and one cache serves every language only if the response does
3085
+ * not depend on the request's language.
3086
+ * @example {
3087
+ * "ja": "クラウドサーバー",
3088
+ * "fr": "Serveur cloud"
3089
+ * }
3090
+ */
3091
+ Translations: {
3092
+ [key: string]: string;
3093
+ };
3094
+ /**
3095
+ * @description A decimal string, in the currency stated alongside it.
3096
+ *
3097
+ * **The currency is not part of this type.** It is carried by a `currency` field next to the
3098
+ * amount, or by the account the amount belongs to. Reading an amount without that field is
3099
+ * reading a number with no unit.
3100
+ *
3101
+ * It is a string rather than a JSON number because a JSON number is a float in most parsers,
3102
+ * and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
3103
+ * through a float.
3104
+ * @example 10.2500000000
3105
+ */
3106
+ Money: string;
3089
3107
  };
3090
3108
  responses: {
3091
3109
  /** @description Unchanged since the `ETag` that was sent. No body. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.74.3",
3
+ "version": "0.75.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {