@leaflow/sdk 0.0.0-dev.224.g2e0d1be → 0.0.0-dev.228.g03b4230
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.
|
@@ -83,6 +83,8 @@ export type ListCreditGrantsResult = operations["list-credit-grants"]["responses
|
|
|
83
83
|
export type ListCreditGrantsQuery = operations["list-credit-grants"]["parameters"]["query"];
|
|
84
84
|
/** The success response body of `GET /account/v1/refunds`. */
|
|
85
85
|
export type ListRefundsResult = operations["list-refunds"]["responses"][200]["content"]["application/json"];
|
|
86
|
+
/** The query parameters of `GET /account/v1/refunds`. */
|
|
87
|
+
export type ListRefundsQuery = operations["list-refunds"]["parameters"]["query"];
|
|
86
88
|
/** The success response body of `GET /account/v1/usage-charges`. */
|
|
87
89
|
export type ListUsageChargesResult = operations["list-usage-charges"]["responses"][200]["content"]["application/json"];
|
|
88
90
|
/** The query parameters of `GET /account/v1/usage-charges`. */
|
|
@@ -607,7 +607,10 @@ export interface paths {
|
|
|
607
607
|
path?: never;
|
|
608
608
|
cookie?: never;
|
|
609
609
|
};
|
|
610
|
-
/**
|
|
610
|
+
/**
|
|
611
|
+
* List refunds
|
|
612
|
+
* @description Newest first.
|
|
613
|
+
*/
|
|
611
614
|
get: operations["list-refunds"];
|
|
612
615
|
put?: never;
|
|
613
616
|
post?: never;
|
|
@@ -1771,11 +1774,23 @@ export interface components {
|
|
|
1771
1774
|
invoice_id?: string;
|
|
1772
1775
|
/** Format: uuid */
|
|
1773
1776
|
transaction_id?: string;
|
|
1774
|
-
/**
|
|
1777
|
+
/**
|
|
1778
|
+
* Format: uuid
|
|
1779
|
+
* @description The credit grant that paid, or for a refund, the credit grant restored.
|
|
1780
|
+
*/
|
|
1775
1781
|
credit_grant_id?: string;
|
|
1776
1782
|
credit_grant?: components["schemas"]["ObjectIdentity"];
|
|
1777
1783
|
/** Format: uuid */
|
|
1778
1784
|
refund_id?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* @description Present on refunds. Where this part of the refund goes.
|
|
1787
|
+
*
|
|
1788
|
+
* - `balance`: back to the account balance.
|
|
1789
|
+
* - `credit`: back to the credit grant that paid, which keeps its original expiry.
|
|
1790
|
+
* - `gateway`: back to the payment method it was paid with.
|
|
1791
|
+
* @enum {string}
|
|
1792
|
+
*/
|
|
1793
|
+
refund_destination?: "balance" | "credit" | "gateway";
|
|
1779
1794
|
/**
|
|
1780
1795
|
* @description `failed` means the operation did not succeed; for a gateway payment, that the gateway declined
|
|
1781
1796
|
* it. `canceled` means a gateway payment was withdrawn without collecting money. After either,
|
|
@@ -1803,9 +1818,17 @@ export interface components {
|
|
|
1803
1818
|
/** Format: int64 */
|
|
1804
1819
|
billing_account_id?: number;
|
|
1805
1820
|
type: components["schemas"]["TransactionType"];
|
|
1806
|
-
/**
|
|
1821
|
+
/**
|
|
1822
|
+
* @description Signed by type: positive for `topup` and `payment`, negative for `refund` and `payout`.
|
|
1823
|
+
* An `adjustment` is positive when it adds to the balance and negative when it takes from
|
|
1824
|
+
* it. For the other types the sign does not tell the effect on the balance: a payment from
|
|
1825
|
+
* the balance lowers it, while a payment by gateway or by credit leaves it unchanged.
|
|
1826
|
+
*/
|
|
1807
1827
|
amount: components["schemas"]["Money"];
|
|
1808
|
-
/**
|
|
1828
|
+
/**
|
|
1829
|
+
* @description How much of this transaction is still available in the balance. Only top-ups, positive
|
|
1830
|
+
* adjustments and gateway payments later returned to the balance can be non-zero.
|
|
1831
|
+
*/
|
|
1809
1832
|
remaining_amount: components["schemas"]["Money"];
|
|
1810
1833
|
currency: string;
|
|
1811
1834
|
reason?: string;
|
|
@@ -1854,28 +1877,71 @@ export interface components {
|
|
|
1854
1877
|
billing_account_id?: number;
|
|
1855
1878
|
/** Format: uuid */
|
|
1856
1879
|
invoice_id?: string | null;
|
|
1857
|
-
/**
|
|
1880
|
+
/**
|
|
1881
|
+
* Format: uuid
|
|
1882
|
+
* @description The order the refund belongs to: the order that caused it, such as a downgrade, otherwise
|
|
1883
|
+
* the order of the refunded invoice. Null for refunds of top-ups and of usage invoices.
|
|
1884
|
+
*/
|
|
1858
1885
|
order_id?: string | null;
|
|
1886
|
+
/** @description The whole refund. Equals balance_amount plus credit_amount plus gateway_amount. */
|
|
1859
1887
|
amount: components["schemas"]["Money"];
|
|
1888
|
+
/** @description The part returned to the account balance. */
|
|
1889
|
+
balance_amount: components["schemas"]["Money"];
|
|
1890
|
+
/** @description The part restored to the credit grants that paid for it. */
|
|
1891
|
+
credit_amount: components["schemas"]["Money"];
|
|
1892
|
+
/** @description The part returned to the payment method it was paid with. */
|
|
1893
|
+
gateway_amount: components["schemas"]["Money"];
|
|
1860
1894
|
/** @description What has actually been returned. */
|
|
1861
1895
|
settled_amount?: components["schemas"]["Money"];
|
|
1862
1896
|
currency: string;
|
|
1863
1897
|
/**
|
|
1864
|
-
* @
|
|
1898
|
+
* @deprecated
|
|
1899
|
+
* @description Use balance_amount, credit_amount and gateway_amount, which also show a refund split between several destinations.
|
|
1865
1900
|
* @enum {string}
|
|
1866
1901
|
*/
|
|
1867
1902
|
destination?: "balance" | "gateway";
|
|
1868
1903
|
/**
|
|
1869
|
-
* @description Summary of the
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1904
|
+
* @description Summary of the parts in `transactions`.
|
|
1905
|
+
*
|
|
1906
|
+
* - `pending`: nothing has been returned yet, and at least one part is in progress.
|
|
1907
|
+
* - `processing`: some parts have been returned, and at least one is still in progress.
|
|
1908
|
+
* - `succeeded`: every part has been returned.
|
|
1909
|
+
* - `failed`: no part is in progress and at least one has failed. What was returned is in
|
|
1910
|
+
* settled_amount.
|
|
1911
|
+
*
|
|
1912
|
+
* Returns to the balance and to credit grants complete shortly after the refund is made; a
|
|
1913
|
+
* return to a payment method completes when the gateway confirms it.
|
|
1872
1914
|
* @enum {string}
|
|
1873
1915
|
*/
|
|
1874
1916
|
status: "pending" | "processing" | "succeeded" | "failed";
|
|
1875
|
-
|
|
1917
|
+
/**
|
|
1918
|
+
* Format: date-time
|
|
1919
|
+
* @description When the last part was returned. Present with `succeeded`.
|
|
1920
|
+
*/
|
|
1921
|
+
settled_at?: string;
|
|
1922
|
+
reason: components["schemas"]["RefundReason"];
|
|
1876
1923
|
/** Format: date-time */
|
|
1877
1924
|
created_at: string;
|
|
1878
1925
|
};
|
|
1926
|
+
/**
|
|
1927
|
+
* @description Why the refund was made. Clients map the code to their own wording. More codes may be added;
|
|
1928
|
+
* treat an unknown code as a refund without a stated reason.
|
|
1929
|
+
*
|
|
1930
|
+
* - `provisioning_failed`: the purchase could not be delivered.
|
|
1931
|
+
* - `order_expired`: the order expired after part of it had been paid.
|
|
1932
|
+
* - `order_canceled`: the account holder canceled the order after part of it had been paid.
|
|
1933
|
+
* - `change_canceled`: a scheduled change was withdrawn after it had been paid.
|
|
1934
|
+
* - `change_expired`: a scheduled change could not take effect before its time passed.
|
|
1935
|
+
* - `subscription_canceled`: the subscription was canceled and its unused value returned under
|
|
1936
|
+
* its refund terms.
|
|
1937
|
+
* - `future_period_canceled`: a renewal that had not started yet was withdrawn.
|
|
1938
|
+
* - `downgrade_difference`: the unused value above the new price after a downgrade.
|
|
1939
|
+
* - `usage_true_up`: usage priced again over the whole month cost less than was charged.
|
|
1940
|
+
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
1941
|
+
* - `operator`: made by the platform operator.
|
|
1942
|
+
* @enum {string}
|
|
1943
|
+
*/
|
|
1944
|
+
RefundReason: "provisioning_failed" | "order_expired" | "order_canceled" | "change_canceled" | "change_expired" | "subscription_canceled" | "future_period_canceled" | "downgrade_difference" | "usage_true_up" | "payment_not_applied" | "operator";
|
|
1879
1945
|
RefundList: {
|
|
1880
1946
|
items: components["schemas"]["Refund"][];
|
|
1881
1947
|
/** Format: int64 */
|
|
@@ -3380,6 +3446,14 @@ export interface operations {
|
|
|
3380
3446
|
page_size?: components["parameters"]["PageSize"];
|
|
3381
3447
|
/** @description Restrict to one of your accounts. All of them when omitted. */
|
|
3382
3448
|
billing_account_id?: components["parameters"]["AccountIdQuery"];
|
|
3449
|
+
/** @description Only the refunds of this invoice. */
|
|
3450
|
+
invoice_id?: string;
|
|
3451
|
+
/**
|
|
3452
|
+
* @description Only the refunds that belong to this order: those of its invoice, such as the refund of a
|
|
3453
|
+
* purchase that could not be delivered, and those it caused on an earlier invoice, such as
|
|
3454
|
+
* the difference returned after a downgrade.
|
|
3455
|
+
*/
|
|
3456
|
+
order_id?: string;
|
|
3383
3457
|
};
|
|
3384
3458
|
header?: never;
|
|
3385
3459
|
path?: never;
|
|
@@ -133,10 +133,6 @@ export type RebuildInstanceBody = NonNullable<operations["rebuild-instance"]["re
|
|
|
133
133
|
export type ResizeInstanceResult = operations["resize-instance"]["responses"][202]["content"]["application/json"];
|
|
134
134
|
/** The request body of `POST /api/v1/instances/{instanceId}/resize`. */
|
|
135
135
|
export type ResizeInstanceBody = NonNullable<operations["resize-instance"]["requestBody"]>["content"]["application/json"];
|
|
136
|
-
/** The success response body of `POST /api/v1/instances/{instanceId}/resize/confirm`. */
|
|
137
|
-
export type ConfirmInstanceResizeResult = operations["confirm-instance-resize"]["responses"][202]["content"]["application/json"];
|
|
138
|
-
/** The success response body of `POST /api/v1/instances/{instanceId}/resize/revert`. */
|
|
139
|
-
export type RevertInstanceResizeResult = operations["revert-instance-resize"]["responses"][202]["content"]["application/json"];
|
|
140
136
|
/** The success response body of `POST /api/v1/instances/{instanceId}/start`. */
|
|
141
137
|
export type StartInstanceResult = operations["start-instance"]["responses"][202]["content"]["application/json"];
|
|
142
138
|
/** The request body of `POST /api/v1/instances/{instanceId}/start`. */
|
|
@@ -696,53 +696,11 @@ export interface paths {
|
|
|
696
696
|
* Resize an instance
|
|
697
697
|
* @description Creates a Billing change order, including for metered pricing. The price must belong to the Billing Plan of the target instance type; applicable contract pricing is resolved by Billing. The resize is applied after the order's invoice is paid, or without waiting when the order has no immediate invoice. Do not submit a new purchase after paying, and reuse the original idempotency key after an uncertain response.
|
|
698
698
|
*
|
|
699
|
-
*
|
|
700
|
-
*/
|
|
701
|
-
post: operations["resize-instance"];
|
|
702
|
-
delete?: never;
|
|
703
|
-
options?: never;
|
|
704
|
-
head?: never;
|
|
705
|
-
patch?: never;
|
|
706
|
-
trace?: never;
|
|
707
|
-
};
|
|
708
|
-
"/api/v1/instances/{instanceId}/resize/confirm": {
|
|
709
|
-
parameters: {
|
|
710
|
-
query?: never;
|
|
711
|
-
header?: never;
|
|
712
|
-
path?: never;
|
|
713
|
-
cookie?: never;
|
|
714
|
-
};
|
|
715
|
-
get?: never;
|
|
716
|
-
put?: never;
|
|
717
|
-
/**
|
|
718
|
-
* Confirm a resize
|
|
719
|
-
* @description Releases the resources held by the previous size. `pending_instance_type_id` becomes the type in effect and is billed from then on.
|
|
699
|
+
* The new instance type takes effect, and is billed from then on, when the returned task succeeds. A completed resize is final and cannot be reverted; to return to the previous type, submit another resize.
|
|
720
700
|
*
|
|
721
701
|
* Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
|
|
722
702
|
*/
|
|
723
|
-
post: operations["
|
|
724
|
-
delete?: never;
|
|
725
|
-
options?: never;
|
|
726
|
-
head?: never;
|
|
727
|
-
patch?: never;
|
|
728
|
-
trace?: never;
|
|
729
|
-
};
|
|
730
|
-
"/api/v1/instances/{instanceId}/resize/revert": {
|
|
731
|
-
parameters: {
|
|
732
|
-
query?: never;
|
|
733
|
-
header?: never;
|
|
734
|
-
path?: never;
|
|
735
|
-
cookie?: never;
|
|
736
|
-
};
|
|
737
|
-
get?: never;
|
|
738
|
-
put?: never;
|
|
739
|
-
/**
|
|
740
|
-
* Revert a resize
|
|
741
|
-
* @description The instance returns to its previous size, `pending_instance_type_id` is discarded, and billing is unaffected by the resize.
|
|
742
|
-
*
|
|
743
|
-
* Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
|
|
744
|
-
*/
|
|
745
|
-
post: operations["revert-instance-resize"];
|
|
703
|
+
post: operations["resize-instance"];
|
|
746
704
|
delete?: never;
|
|
747
705
|
options?: never;
|
|
748
706
|
head?: never;
|
|
@@ -1959,7 +1917,7 @@ export interface components {
|
|
|
1959
1917
|
/** Format: uuid */
|
|
1960
1918
|
region_id: string;
|
|
1961
1919
|
/** @enum {string} */
|
|
1962
|
-
status: "pending" | "building" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "
|
|
1920
|
+
status: "pending" | "building" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "deleting" | "deleted" | "error" | "unknown";
|
|
1963
1921
|
/** Format: uuid */
|
|
1964
1922
|
subnet_id: string | null;
|
|
1965
1923
|
/** Format: date-time */
|
|
@@ -4205,92 +4163,6 @@ export interface operations {
|
|
|
4205
4163
|
};
|
|
4206
4164
|
};
|
|
4207
4165
|
};
|
|
4208
|
-
"confirm-instance-resize": {
|
|
4209
|
-
parameters: {
|
|
4210
|
-
query?: never;
|
|
4211
|
-
header: {
|
|
4212
|
-
/** @description Reuse the same key for retries of the same action. A different request with the same key is rejected. */
|
|
4213
|
-
"Idempotency-Key": string;
|
|
4214
|
-
};
|
|
4215
|
-
path: {
|
|
4216
|
-
instanceId: string;
|
|
4217
|
-
};
|
|
4218
|
-
cookie?: never;
|
|
4219
|
-
};
|
|
4220
|
-
requestBody?: never;
|
|
4221
|
-
responses: {
|
|
4222
|
-
/** @description The action was accepted. Wait for the returned task to finish. */
|
|
4223
|
-
202: {
|
|
4224
|
-
headers: {
|
|
4225
|
-
[name: string]: unknown;
|
|
4226
|
-
};
|
|
4227
|
-
content: {
|
|
4228
|
-
"application/json": components["schemas"]["Task"];
|
|
4229
|
-
};
|
|
4230
|
-
};
|
|
4231
|
-
/** @description The idempotency key was already used with different parameters in this scope. */
|
|
4232
|
-
409: {
|
|
4233
|
-
headers: {
|
|
4234
|
-
[name: string]: unknown;
|
|
4235
|
-
};
|
|
4236
|
-
content: {
|
|
4237
|
-
"application/json": components["schemas"]["Error"];
|
|
4238
|
-
};
|
|
4239
|
-
};
|
|
4240
|
-
/** @description Error */
|
|
4241
|
-
default: {
|
|
4242
|
-
headers: {
|
|
4243
|
-
[name: string]: unknown;
|
|
4244
|
-
};
|
|
4245
|
-
content: {
|
|
4246
|
-
"application/json": components["schemas"]["Error"];
|
|
4247
|
-
};
|
|
4248
|
-
};
|
|
4249
|
-
};
|
|
4250
|
-
};
|
|
4251
|
-
"revert-instance-resize": {
|
|
4252
|
-
parameters: {
|
|
4253
|
-
query?: never;
|
|
4254
|
-
header: {
|
|
4255
|
-
/** @description Reuse the same key for retries of the same action. A different request with the same key is rejected. */
|
|
4256
|
-
"Idempotency-Key": string;
|
|
4257
|
-
};
|
|
4258
|
-
path: {
|
|
4259
|
-
instanceId: string;
|
|
4260
|
-
};
|
|
4261
|
-
cookie?: never;
|
|
4262
|
-
};
|
|
4263
|
-
requestBody?: never;
|
|
4264
|
-
responses: {
|
|
4265
|
-
/** @description The action was accepted. Wait for the returned task to finish. */
|
|
4266
|
-
202: {
|
|
4267
|
-
headers: {
|
|
4268
|
-
[name: string]: unknown;
|
|
4269
|
-
};
|
|
4270
|
-
content: {
|
|
4271
|
-
"application/json": components["schemas"]["Task"];
|
|
4272
|
-
};
|
|
4273
|
-
};
|
|
4274
|
-
/** @description The idempotency key was already used with different parameters in this scope. */
|
|
4275
|
-
409: {
|
|
4276
|
-
headers: {
|
|
4277
|
-
[name: string]: unknown;
|
|
4278
|
-
};
|
|
4279
|
-
content: {
|
|
4280
|
-
"application/json": components["schemas"]["Error"];
|
|
4281
|
-
};
|
|
4282
|
-
};
|
|
4283
|
-
/** @description Error */
|
|
4284
|
-
default: {
|
|
4285
|
-
headers: {
|
|
4286
|
-
[name: string]: unknown;
|
|
4287
|
-
};
|
|
4288
|
-
content: {
|
|
4289
|
-
"application/json": components["schemas"]["Error"];
|
|
4290
|
-
};
|
|
4291
|
-
};
|
|
4292
|
-
};
|
|
4293
|
-
};
|
|
4294
4166
|
"start-instance": {
|
|
4295
4167
|
parameters: {
|
|
4296
4168
|
query?: never;
|