@leaflow/sdk 0.0.0-dev.232.g18ca775 → 0.0.0-dev.234.gce19274

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.
@@ -105,6 +105,22 @@ export type CreateCancellationRequestBody = NonNullable<operations["create-cance
105
105
  export type GetCancellationRequestResult = operations["get-cancellation-request"]["responses"][200]["content"]["application/json"];
106
106
  /** The success response body of `POST /account/v1/cancellation-requests/{cancellationRequestId}/cancel`. */
107
107
  export type CancelCancellationRequestResult = operations["cancel-cancellation-request"]["responses"][200]["content"]["application/json"];
108
+ /** The success response body of `POST /account/v1/cancellations/preview`. */
109
+ export type CreateCancellationPreviewResult = operations["create-cancellation-preview"]["responses"][200]["content"]["application/json"];
110
+ /** The request body of `POST /account/v1/cancellations/preview`. */
111
+ export type CreateCancellationPreviewBody = NonNullable<operations["create-cancellation-preview"]["requestBody"]>["content"]["application/json"];
112
+ /** The success response body of `POST /account/v1/cancellations`. */
113
+ export type CreateCancellationResult = operations["create-cancellation"]["responses"][200]["content"]["application/json"];
114
+ /** The request body of `POST /account/v1/cancellations`. */
115
+ export type CreateCancellationBody = NonNullable<operations["create-cancellation"]["requestBody"]>["content"]["application/json"];
116
+ /** The success response body of `GET /account/v1/cancellations`. */
117
+ export type ListCancellationsResult = operations["list-cancellations"]["responses"][200]["content"]["application/json"];
118
+ /** The query parameters of `GET /account/v1/cancellations`. */
119
+ export type ListCancellationsQuery = operations["list-cancellations"]["parameters"]["query"];
120
+ /** The success response body of `GET /account/v1/cancellations/{cancellationId}`. */
121
+ export type GetCancellationResult = operations["get-cancellation"]["responses"][200]["content"]["application/json"];
122
+ /** The success response body of `POST /account/v1/cancellations/{cancellationId}/withdraw`. */
123
+ export type WithdrawCancellationResult = operations["withdraw-cancellation"]["responses"][200]["content"]["application/json"];
108
124
  /** The success response body of `GET /account/v1/subscriptions/{subscriptionId}/renewal-prices`. */
109
125
  export type ListRenewalPricesResult = operations["list-renewal-prices"]["responses"][200]["content"]["application/json"];
110
126
  /** The success response body of `POST /account/v1/subscriptions/{subscriptionId}/renew`. */
@@ -694,7 +694,10 @@ export interface paths {
694
694
  };
695
695
  /**
696
696
  * Preview cancellation
697
+ * @deprecated
697
698
  * @description Reads confirmed terms and paid-period value without recording a request or locking a refund amount.
699
+ *
700
+ * Use create-cancellation-preview, which previews the subscriptions released together.
698
701
  */
699
702
  get: operations["preview-cancellation"];
700
703
  put?: never;
@@ -718,7 +721,10 @@ export interface paths {
718
721
  put?: never;
719
722
  /**
720
723
  * Request subscription cancellation
724
+ * @deprecated
721
725
  * @description Ends the whole subscription under confirmed terms. The request does not itself stop service; actual end is confirmed by the owning service. Refund processing is separate.
726
+ *
727
+ * Use create-cancellation, which ends the subscriptions released together and checks the refund.
722
728
  */
723
729
  post: operations["create-cancellation-request"];
724
730
  delete?: never;
@@ -736,7 +742,11 @@ export interface paths {
736
742
  };
737
743
  cookie?: never;
738
744
  };
739
- /** Get cancellation request */
745
+ /**
746
+ * Get cancellation request
747
+ * @deprecated
748
+ * @description Use get-cancellation.
749
+ */
740
750
  get: operations["get-cancellation-request"];
741
751
  put?: never;
742
752
  post?: never;
@@ -759,7 +769,10 @@ export interface paths {
759
769
  put?: never;
760
770
  /**
761
771
  * Cancel a cancellation request
772
+ * @deprecated
762
773
  * @description Allowed only before release starts. Does not resume a previously suspended subscription.
774
+ *
775
+ * Use withdraw-cancellation, which withdraws the whole cancellation.
763
776
  */
764
777
  post: operations["cancel-cancellation-request"];
765
778
  delete?: never;
@@ -768,6 +781,136 @@ export interface paths {
768
781
  patch?: never;
769
782
  trace?: never;
770
783
  };
784
+ "/account/v1/cancellations/preview": {
785
+ parameters: {
786
+ query?: never;
787
+ header?: never;
788
+ path?: never;
789
+ cookie?: never;
790
+ };
791
+ get?: never;
792
+ put?: never;
793
+ /**
794
+ * Preview a cancellation
795
+ * @description What canceling these subscriptions together would return, computed now under the refund terms
796
+ * agreed when each was bought. This request does not create a resource: nothing is recorded or
797
+ * reserved.
798
+ *
799
+ * It is refused with the same errors as creating the cancellation, except that the amount is not
800
+ * checked. Give the returned `proration_date` and `refundable_amount` when creating it.
801
+ */
802
+ post: operations["create-cancellation-preview"];
803
+ delete?: never;
804
+ options?: never;
805
+ head?: never;
806
+ patch?: never;
807
+ trace?: never;
808
+ };
809
+ "/account/v1/cancellations": {
810
+ parameters: {
811
+ query?: never;
812
+ header?: never;
813
+ path?: never;
814
+ cookie?: never;
815
+ };
816
+ /**
817
+ * List cancellations
818
+ * @description Newest first. Filter by `subscription_id` and `status=open` to find the cancellation now under way for a subscription.
819
+ */
820
+ get: operations["list-cancellations"];
821
+ put?: never;
822
+ /**
823
+ * Cancel subscriptions
824
+ * @description Ends a set of subscriptions of one service together, at one time. Deleting a resource that a
825
+ * subscription pays for is an `immediate` cancellation of every subscription released with it,
826
+ * such as a server with the disks deleted along with it, or an address with its bandwidth.
827
+ *
828
+ * The service that provides the resources releases them: at once for `immediate`, or at
829
+ * `scheduled_at`, the end of the paid term, for `period_end`. When release is confirmed, the
830
+ * unused value is returned the way it was paid, under the refund terms agreed when each
831
+ * subscription was bought. For `immediate` the refund is computed as of `proration_date`, so the
832
+ * amount confirmed here is the amount returned: prepaid service used while the resources are
833
+ * being released is not deducted from it. Usage of a postpaid subscription is charged until its
834
+ * resources are released, as usual.
835
+ *
836
+ * `mode` must be allowed for every subscription. Postpaid and one-time subscriptions end only
837
+ * `immediate`. A prepaid subscription ends `period_end` while its paid term lasts, and
838
+ * `immediate` unless its termination terms allow only the end of the paid term and that term has
839
+ * not ended yet. For `period_end` the paid terms of all the subscriptions must end at the same
840
+ * time.
841
+ *
842
+ * Refused with:
843
+ * - 400 `BILLING_CANCELLATION_INVALID` when `subscription_ids` or `proration_date` is not
844
+ * acceptable (`meta.field`), or the subscriptions do not all belong to one service, project,
845
+ * account and currency;
846
+ * - 409 `BILLING_CANCELLATION_CONFLICT` when a subscription has not started or has ended;
847
+ * - 422 `BILLING_CANCELLATION_MODE_FIXED` when `mode` is not allowed for a subscription, and
848
+ * `BILLING_CANCELLATION_TERMS_UNSET` when a prepaid subscription has no termination terms;
849
+ * both carry `meta.subscription_id`;
850
+ * - 409 `BILLING_CANCELLATION_SCHEDULES_DIFFER` when, for `period_end`, the paid terms end at
851
+ * different times;
852
+ * - 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being canceled
853
+ * (`meta.cancellation_id`) or reclaimed (`meta.job_id`);
854
+ * - 409 `BILLING_ORDER_PAYMENT_IN_FLIGHT` while an online payment for a renewal of one of them
855
+ * is in progress;
856
+ * - 422 `BILLING_CANCELLATION_UNSUPPORTED` when the service cannot yet be canceled here;
857
+ * - 409 `BILLING_CANCELLATION_REFUND_CHANGED` when the refund is no longer
858
+ * `expected_refundable_amount`; preview again.
859
+ *
860
+ * Sending the same request again, for the same subscriptions, mode and amount while that
861
+ * cancellation is still open, returns it with 200 rather than creating another. Renewal orders
862
+ * still waiting for payment are canceled along with it.
863
+ */
864
+ post: operations["create-cancellation"];
865
+ delete?: never;
866
+ options?: never;
867
+ head?: never;
868
+ patch?: never;
869
+ trace?: never;
870
+ };
871
+ "/account/v1/cancellations/{cancellationId}": {
872
+ parameters: {
873
+ query?: never;
874
+ header?: never;
875
+ path: {
876
+ cancellationId: components["parameters"]["CancellationId"];
877
+ };
878
+ cookie?: never;
879
+ };
880
+ /** Get a cancellation */
881
+ get: operations["get-cancellation"];
882
+ put?: never;
883
+ post?: never;
884
+ delete?: never;
885
+ options?: never;
886
+ head?: never;
887
+ patch?: never;
888
+ trace?: never;
889
+ };
890
+ "/account/v1/cancellations/{cancellationId}/withdraw": {
891
+ parameters: {
892
+ query?: never;
893
+ header?: never;
894
+ path: {
895
+ cancellationId: components["parameters"]["CancellationId"];
896
+ };
897
+ cookie?: never;
898
+ };
899
+ get?: never;
900
+ put?: never;
901
+ /**
902
+ * Withdraw a cancellation
903
+ * @description Withdraws the whole cancellation while none of its resources has begun to be released; the
904
+ * subscriptions continue as before. After that it is refused with 409
905
+ * `BILLING_CANCELLATION_CONFLICT`. Withdrawing one that is already withdrawn returns it unchanged.
906
+ */
907
+ post: operations["withdraw-cancellation"];
908
+ delete?: never;
909
+ options?: never;
910
+ head?: never;
911
+ patch?: never;
912
+ trace?: never;
913
+ };
771
914
  "/account/v1/subscriptions/{subscriptionId}/renewal-prices": {
772
915
  parameters: {
773
916
  query?: never;
@@ -1053,6 +1196,157 @@ export interface components {
1053
1196
  * @enum {string}
1054
1197
  */
1055
1198
  RefundPolicy: "none" | "prorated";
1199
+ CancellationPreviewRequest: {
1200
+ /** @description The subscriptions to end together, all of one service. Every subscription released with a resource must be included. */
1201
+ subscription_ids: string[];
1202
+ mode: components["schemas"]["TerminationPolicy"];
1203
+ };
1204
+ /**
1205
+ * @description What the cancellation would return, subscription by subscription and in total, as of now.
1206
+ *
1207
+ * - `unused_amount`: before tax, the value of the paid service still unused, whatever the refund
1208
+ * terms say.
1209
+ * - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
1210
+ * `refund_amount` plus `credit_amount`.
1211
+ * - `refund_amount`: the part returned to the balance or to the payment method.
1212
+ * - `credit_amount`: the part restored to the credit grants that paid.
1213
+ * - `tax_amount`: the tax included in `refundable_amount`.
1214
+ * - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
1215
+ *
1216
+ * Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
1217
+ */
1218
+ CancellationRefundPreview: {
1219
+ mode: components["schemas"]["TerminationPolicy"];
1220
+ /**
1221
+ * Format: date-time
1222
+ * @description For `period_end`, when release begins, the end of the paid terms.
1223
+ */
1224
+ scheduled_at?: string;
1225
+ /**
1226
+ * Format: date-time
1227
+ * @description For `immediate`, the second the refund is computed as of. Give it when creating the cancellation.
1228
+ */
1229
+ proration_date?: string;
1230
+ currency: string;
1231
+ unused_amount: components["schemas"]["Money"];
1232
+ refundable_amount: components["schemas"]["Money"];
1233
+ refund_amount: components["schemas"]["Money"];
1234
+ credit_amount: components["schemas"]["Money"];
1235
+ tax_amount: components["schemas"]["Money"];
1236
+ forfeited_amount: components["schemas"]["Money"];
1237
+ items: components["schemas"]["CancellationRefundPreviewItem"][];
1238
+ };
1239
+ /** @description One subscription of the preview. The amounts mean what they mean in the preview. */
1240
+ CancellationRefundPreviewItem: {
1241
+ /** Format: uuid */
1242
+ subscription_id: string;
1243
+ /** Format: uuid */
1244
+ plan_id: string;
1245
+ plan_name: string;
1246
+ /** @description The project and its current name, for display. Absent for a purchase at account level, and when the project details cannot be read at the moment. */
1247
+ project?: components["schemas"]["NamedIdentity"] | null;
1248
+ /** @enum {string} */
1249
+ billing_type: "postpaid" | "prepaid" | "one_time";
1250
+ unused_amount: components["schemas"]["Money"];
1251
+ refundable_amount: components["schemas"]["Money"];
1252
+ refund_amount: components["schemas"]["Money"];
1253
+ credit_amount: components["schemas"]["Money"];
1254
+ tax_amount: components["schemas"]["Money"];
1255
+ forfeited_amount: components["schemas"]["Money"];
1256
+ };
1257
+ CancellationCreate: {
1258
+ /** @description As in the preview. */
1259
+ subscription_ids: string[];
1260
+ mode: components["schemas"]["TerminationPolicy"];
1261
+ /**
1262
+ * Format: date-time
1263
+ * @description For `immediate`, the `proration_date` of the preview: a whole second, not in the future and
1264
+ * at most ten minutes old. The refund is computed as of it. Now when omitted.
1265
+ */
1266
+ proration_date?: string;
1267
+ /** @description The `refundable_amount` of the preview. The cancellation is refused when the refund differs. */
1268
+ expected_refundable_amount: string;
1269
+ /** @description A note from the account holder. It is kept with the cancellation and not shown elsewhere. */
1270
+ reason?: string;
1271
+ };
1272
+ /**
1273
+ * @description One cancellation of a set of subscriptions of one service, released together at one time.
1274
+ *
1275
+ * - `requested`: `immediate`, release has not begun.
1276
+ * - `scheduled`: `period_end`, waiting for `scheduled_at`.
1277
+ * - `releasing`: release has begun; it can no longer be withdrawn.
1278
+ * - `completed`: every subscription has ended and its refund has been made.
1279
+ * - `canceled`: withdrawn before release began; the subscriptions continue.
1280
+ * - `failed`: the service could not carry it out, for the reason in `failure_code`; the
1281
+ * subscriptions continue and can be canceled again.
1282
+ */
1283
+ Cancellation: {
1284
+ /** Format: uuid */
1285
+ id: string;
1286
+ /** @enum {string} */
1287
+ status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
1288
+ mode: components["schemas"]["TerminationPolicy"];
1289
+ /** Format: date-time */
1290
+ scheduled_at?: string;
1291
+ /**
1292
+ * Format: date-time
1293
+ * @description For `immediate`, the second the refund is computed as of.
1294
+ */
1295
+ proration_date?: string;
1296
+ /**
1297
+ * @description Who asked for it. `project_deletion` means the project was deleted.
1298
+ * @enum {string}
1299
+ */
1300
+ origin: "customer" | "operator" | "project_deletion";
1301
+ currency: string;
1302
+ /** @description The refund confirmed when it was created. Absent when the platform created it. */
1303
+ expected_refundable_amount?: components["schemas"]["Money"];
1304
+ /**
1305
+ * @description Present with `failed`. A code of the service that provides the resources, such as a disk
1306
+ * that can only be released with its server. Clients map it to their own wording.
1307
+ */
1308
+ failure_code?: string;
1309
+ /** Format: date-time */
1310
+ requested_at: string;
1311
+ /** Format: date-time */
1312
+ completed_at?: string;
1313
+ /** Format: date-time */
1314
+ canceled_at?: string;
1315
+ items: components["schemas"]["CancellationItem"][];
1316
+ };
1317
+ /** @description One subscription of the cancellation. */
1318
+ CancellationItem: {
1319
+ /**
1320
+ * Format: uuid
1321
+ * @description The cancellation request of this subscription, the same as `Subscription.cancellation_request.id`.
1322
+ */
1323
+ id: string;
1324
+ /** Format: uuid */
1325
+ subscription_id: string;
1326
+ /** Format: uuid */
1327
+ plan_id: string;
1328
+ plan_name: string;
1329
+ /** @enum {string} */
1330
+ status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
1331
+ /** Format: date-time */
1332
+ release_started_at?: string;
1333
+ /**
1334
+ * Format: date-time
1335
+ * @description When the service ended, as confirmed by the service that provides it.
1336
+ */
1337
+ effective_at?: string;
1338
+ /** @description Present with `completed`. The part of the refund returned to the account balance. */
1339
+ balance_amount?: components["schemas"]["Money"];
1340
+ /** @description Present with `completed`. The part restored to the credit grants that paid. */
1341
+ credit_amount?: components["schemas"]["Money"];
1342
+ /** @description Present with `completed`. The part returned to the payment method it was paid with. */
1343
+ gateway_amount?: components["schemas"]["Money"];
1344
+ };
1345
+ CancellationList: {
1346
+ items: components["schemas"]["Cancellation"][];
1347
+ /** Format: int64 */
1348
+ total_count?: number;
1349
+ };
1056
1350
  CancellationPreview: {
1057
1351
  /** Format: uuid */
1058
1352
  subscription_id: string;
@@ -1071,6 +1365,11 @@ export interface components {
1071
1365
  /** @description A cancellation request for the original purchase. scheduled_at is the intended time; effective_at is the confirmed end of service. The request alone does not stop metering or issue a refund. */
1072
1366
  CancellationRequest: {
1073
1367
  reason?: string;
1368
+ /**
1369
+ * Format: uuid
1370
+ * @description The cancellation this request belongs to, with the other subscriptions released together.
1371
+ */
1372
+ cancellation_id?: string;
1074
1373
  /** Format: uuid */
1075
1374
  id: string;
1076
1375
  /** Format: uuid */
@@ -1950,7 +2249,7 @@ export interface components {
1950
2249
  * - `provisioning_failed`: the purchase could not be delivered.
1951
2250
  * - `order_expired`: the order expired after part of it had been paid.
1952
2251
  * - `order_canceled`: the account holder canceled the order after part of it had been paid.
1953
- * - `change_canceled`: a scheduled change was withdrawn after it had been paid.
2252
+ * - `change_canceled`: a scheduled change was withdrawn after part of it had been paid.
1954
2253
  * - `change_expired`: a scheduled change could not take effect before its time passed.
1955
2254
  * - `subscription_canceled`: the subscription was canceled and its unused value returned under
1956
2255
  * its refund terms.
@@ -2677,6 +2976,7 @@ export interface components {
2677
2976
  ProjectId: string;
2678
2977
  InvoiceId: string;
2679
2978
  OrderId: string;
2979
+ CancellationId: string;
2680
2980
  CancellationRequestId: string;
2681
2981
  SubscriptionId: string;
2682
2982
  PaymentMethodId: string;
@@ -3678,6 +3978,143 @@ export interface operations {
3678
3978
  default: components["responses"]["Error"];
3679
3979
  };
3680
3980
  };
3981
+ "create-cancellation-preview": {
3982
+ parameters: {
3983
+ query?: never;
3984
+ header?: never;
3985
+ path?: never;
3986
+ cookie?: never;
3987
+ };
3988
+ requestBody: {
3989
+ content: {
3990
+ "application/json": components["schemas"]["CancellationPreviewRequest"];
3991
+ };
3992
+ };
3993
+ responses: {
3994
+ /** @description OK */
3995
+ 200: {
3996
+ headers: {
3997
+ [name: string]: unknown;
3998
+ };
3999
+ content: {
4000
+ "application/json": components["schemas"]["CancellationRefundPreview"];
4001
+ };
4002
+ };
4003
+ default: components["responses"]["Error"];
4004
+ };
4005
+ };
4006
+ "list-cancellations": {
4007
+ parameters: {
4008
+ query?: {
4009
+ /** @description 1-based page number; the first page when omitted. */
4010
+ page?: components["parameters"]["Page"];
4011
+ /** @description How many per page, 100 at most. */
4012
+ page_size?: components["parameters"]["PageSize"];
4013
+ /** @description Restrict to one of your accounts. All of them when omitted. */
4014
+ billing_account_id?: components["parameters"]["AccountIdQuery"];
4015
+ /** @description Only cancellations that include this subscription. */
4016
+ subscription_id?: string;
4017
+ /** @description Only cancellations in this status. `open` means requested, scheduled or releasing. */
4018
+ status?: "open" | "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
4019
+ };
4020
+ header?: never;
4021
+ path?: never;
4022
+ cookie?: never;
4023
+ };
4024
+ requestBody?: never;
4025
+ responses: {
4026
+ /** @description OK */
4027
+ 200: {
4028
+ headers: {
4029
+ [name: string]: unknown;
4030
+ };
4031
+ content: {
4032
+ "application/json": components["schemas"]["CancellationList"];
4033
+ };
4034
+ };
4035
+ default: components["responses"]["Error"];
4036
+ };
4037
+ };
4038
+ "create-cancellation": {
4039
+ parameters: {
4040
+ query?: never;
4041
+ header?: never;
4042
+ path?: never;
4043
+ cookie?: never;
4044
+ };
4045
+ requestBody: {
4046
+ content: {
4047
+ "application/json": components["schemas"]["CancellationCreate"];
4048
+ };
4049
+ };
4050
+ responses: {
4051
+ /** @description The same cancellation, already open */
4052
+ 200: {
4053
+ headers: {
4054
+ [name: string]: unknown;
4055
+ };
4056
+ content: {
4057
+ "application/json": components["schemas"]["Cancellation"];
4058
+ };
4059
+ };
4060
+ /** @description Created */
4061
+ 201: {
4062
+ headers: {
4063
+ [name: string]: unknown;
4064
+ };
4065
+ content: {
4066
+ "application/json": components["schemas"]["Cancellation"];
4067
+ };
4068
+ };
4069
+ default: components["responses"]["Error"];
4070
+ };
4071
+ };
4072
+ "get-cancellation": {
4073
+ parameters: {
4074
+ query?: never;
4075
+ header?: never;
4076
+ path: {
4077
+ cancellationId: components["parameters"]["CancellationId"];
4078
+ };
4079
+ cookie?: never;
4080
+ };
4081
+ requestBody?: never;
4082
+ responses: {
4083
+ /** @description OK */
4084
+ 200: {
4085
+ headers: {
4086
+ [name: string]: unknown;
4087
+ };
4088
+ content: {
4089
+ "application/json": components["schemas"]["Cancellation"];
4090
+ };
4091
+ };
4092
+ default: components["responses"]["Error"];
4093
+ };
4094
+ };
4095
+ "withdraw-cancellation": {
4096
+ parameters: {
4097
+ query?: never;
4098
+ header?: never;
4099
+ path: {
4100
+ cancellationId: components["parameters"]["CancellationId"];
4101
+ };
4102
+ cookie?: never;
4103
+ };
4104
+ requestBody?: never;
4105
+ responses: {
4106
+ /** @description OK */
4107
+ 200: {
4108
+ headers: {
4109
+ [name: string]: unknown;
4110
+ };
4111
+ content: {
4112
+ "application/json": components["schemas"]["Cancellation"];
4113
+ };
4114
+ };
4115
+ default: components["responses"]["Error"];
4116
+ };
4117
+ };
3681
4118
  "list-renewal-prices": {
3682
4119
  parameters: {
3683
4120
  query?: never;
@@ -19,6 +19,22 @@ export type ListProjectSubscriptionsQuery = operations["list-project-subscriptio
19
19
  export type SetProjectAutoRenewResult = operations["set-project-auto-renew"]["responses"][200]["content"]["application/json"];
20
20
  /** The request body of `PUT /api/v1/projects/{projectId}/subscriptions/{subscriptionId}/auto-renew`. */
21
21
  export type SetProjectAutoRenewBody = NonNullable<operations["set-project-auto-renew"]["requestBody"]>["content"]["application/json"];
22
+ /** The success response body of `POST /api/v1/projects/{projectId}/cancellations/preview`. */
23
+ export type CreateProjectCancellationPreviewResult = operations["create-project-cancellation-preview"]["responses"][200]["content"]["application/json"];
24
+ /** The request body of `POST /api/v1/projects/{projectId}/cancellations/preview`. */
25
+ export type CreateProjectCancellationPreviewBody = NonNullable<operations["create-project-cancellation-preview"]["requestBody"]>["content"]["application/json"];
26
+ /** The success response body of `POST /api/v1/projects/{projectId}/cancellations`. */
27
+ export type CreateProjectCancellationResult = operations["create-project-cancellation"]["responses"][200]["content"]["application/json"];
28
+ /** The request body of `POST /api/v1/projects/{projectId}/cancellations`. */
29
+ export type CreateProjectCancellationBody = NonNullable<operations["create-project-cancellation"]["requestBody"]>["content"]["application/json"];
30
+ /** The success response body of `GET /api/v1/projects/{projectId}/cancellations`. */
31
+ export type ListProjectCancellationsResult = operations["list-project-cancellations"]["responses"][200]["content"]["application/json"];
32
+ /** The query parameters of `GET /api/v1/projects/{projectId}/cancellations`. */
33
+ export type ListProjectCancellationsQuery = operations["list-project-cancellations"]["parameters"]["query"];
34
+ /** The success response body of `GET /api/v1/projects/{projectId}/cancellations/{cancellationId}`. */
35
+ export type GetProjectCancellationResult = operations["get-project-cancellation"]["responses"][200]["content"]["application/json"];
36
+ /** The success response body of `POST /api/v1/projects/{projectId}/cancellations/{cancellationId}/withdraw`. */
37
+ export type WithdrawProjectCancellationResult = operations["withdraw-project-cancellation"]["responses"][200]["content"]["application/json"];
22
38
  /** The success response body of `GET /api/v1/projects/{projectId}/orders`. */
23
39
  export type ListProjectOrdersResult = operations["list-project-orders"]["responses"][200]["content"]["application/json"];
24
40
  /** The query parameters of `GET /api/v1/projects/{projectId}/orders`. */
@@ -121,6 +121,142 @@ export interface paths {
121
121
  patch?: never;
122
122
  trace?: never;
123
123
  };
124
+ "/api/v1/projects/{projectId}/cancellations/preview": {
125
+ parameters: {
126
+ query?: never;
127
+ header?: never;
128
+ path: {
129
+ projectId: components["parameters"]["ProjectId"];
130
+ };
131
+ cookie?: never;
132
+ };
133
+ get?: never;
134
+ put?: never;
135
+ /**
136
+ * Preview a cancellation
137
+ * @description What canceling these subscriptions together would return, computed now under the refund terms
138
+ * agreed when each was bought. This request does not create a resource: nothing is recorded or
139
+ * reserved.
140
+ *
141
+ * It is refused with the same errors as creating the cancellation, except that the amount is not
142
+ * checked. Give the returned `proration_date` and `refundable_amount` when creating it.
143
+ */
144
+ post: operations["create-project-cancellation-preview"];
145
+ delete?: never;
146
+ options?: never;
147
+ head?: never;
148
+ patch?: never;
149
+ trace?: never;
150
+ };
151
+ "/api/v1/projects/{projectId}/cancellations": {
152
+ parameters: {
153
+ query?: never;
154
+ header?: never;
155
+ path: {
156
+ projectId: components["parameters"]["ProjectId"];
157
+ };
158
+ cookie?: never;
159
+ };
160
+ /**
161
+ * List cancellations
162
+ * @description Newest first. Filter by `subscription_id` and `status=open` to find the cancellation now under way for a subscription.
163
+ */
164
+ get: operations["list-project-cancellations"];
165
+ put?: never;
166
+ /**
167
+ * Cancel subscriptions
168
+ * @description Ends a set of subscriptions of one service together, at one time. Deleting a resource that a
169
+ * subscription pays for is an `immediate` cancellation of every subscription released with it,
170
+ * such as a server with the disks deleted along with it, or an address with its bandwidth.
171
+ *
172
+ * The service that provides the resources releases them: at once for `immediate`, or at
173
+ * `scheduled_at`, the end of the paid term, for `period_end`. When release is confirmed, the
174
+ * unused value is returned the way it was paid, under the refund terms agreed when each
175
+ * subscription was bought. For `immediate` the refund is computed as of `proration_date`, so the
176
+ * amount confirmed here is the amount returned: prepaid service used while the resources are
177
+ * being released is not deducted from it. Usage of a postpaid subscription is charged until its
178
+ * resources are released, as usual.
179
+ *
180
+ * `mode` must be allowed for every subscription. Postpaid and one-time subscriptions end only
181
+ * `immediate`. A prepaid subscription ends `period_end` while its paid term lasts, and
182
+ * `immediate` unless its termination terms allow only the end of the paid term and that term has
183
+ * not ended yet. For `period_end` the paid terms of all the subscriptions must end at the same
184
+ * time.
185
+ *
186
+ * Refused with:
187
+ * - 400 `BILLING_CANCELLATION_INVALID` when `subscription_ids` or `proration_date` is not
188
+ * acceptable (`meta.field`), or the subscriptions do not all belong to one service, project,
189
+ * account and currency;
190
+ * - 409 `BILLING_CANCELLATION_CONFLICT` when a subscription has not started or has ended;
191
+ * - 422 `BILLING_CANCELLATION_MODE_FIXED` when `mode` is not allowed for a subscription, and
192
+ * `BILLING_CANCELLATION_TERMS_UNSET` when a prepaid subscription has no termination terms;
193
+ * both carry `meta.subscription_id`;
194
+ * - 409 `BILLING_CANCELLATION_SCHEDULES_DIFFER` when, for `period_end`, the paid terms end at
195
+ * different times;
196
+ * - 409 `BILLING_SUBSCRIPTION_OPERATION_PENDING` when a subscription is already being canceled
197
+ * (`meta.cancellation_id`) or reclaimed (`meta.job_id`);
198
+ * - 409 `BILLING_ORDER_PAYMENT_IN_FLIGHT` while an online payment for a renewal of one of them
199
+ * is in progress;
200
+ * - 422 `BILLING_CANCELLATION_UNSUPPORTED` when the service cannot yet be canceled here;
201
+ * - 409 `BILLING_CANCELLATION_REFUND_CHANGED` when the refund is no longer
202
+ * `expected_refundable_amount`; preview again.
203
+ *
204
+ * Sending the same request again, for the same subscriptions, mode and amount while that
205
+ * cancellation is still open, returns it with 200 rather than creating another. Renewal orders
206
+ * still waiting for payment are canceled along with it.
207
+ */
208
+ post: operations["create-project-cancellation"];
209
+ delete?: never;
210
+ options?: never;
211
+ head?: never;
212
+ patch?: never;
213
+ trace?: never;
214
+ };
215
+ "/api/v1/projects/{projectId}/cancellations/{cancellationId}": {
216
+ parameters: {
217
+ query?: never;
218
+ header?: never;
219
+ path: {
220
+ projectId: components["parameters"]["ProjectId"];
221
+ cancellationId: components["parameters"]["CancellationId"];
222
+ };
223
+ cookie?: never;
224
+ };
225
+ /** Get a cancellation */
226
+ get: operations["get-project-cancellation"];
227
+ put?: never;
228
+ post?: never;
229
+ delete?: never;
230
+ options?: never;
231
+ head?: never;
232
+ patch?: never;
233
+ trace?: never;
234
+ };
235
+ "/api/v1/projects/{projectId}/cancellations/{cancellationId}/withdraw": {
236
+ parameters: {
237
+ query?: never;
238
+ header?: never;
239
+ path: {
240
+ projectId: components["parameters"]["ProjectId"];
241
+ cancellationId: components["parameters"]["CancellationId"];
242
+ };
243
+ cookie?: never;
244
+ };
245
+ get?: never;
246
+ put?: never;
247
+ /**
248
+ * Withdraw a cancellation
249
+ * @description Withdraws the whole cancellation while none of its resources has begun to be released; the
250
+ * subscriptions continue as before. After that it is refused with 409
251
+ * `BILLING_CANCELLATION_CONFLICT`. Withdrawing one that is already withdrawn returns it unchanged.
252
+ */
253
+ post: operations["withdraw-project-cancellation"];
254
+ delete?: never;
255
+ options?: never;
256
+ head?: never;
257
+ patch?: never;
258
+ trace?: never;
259
+ };
124
260
  "/api/v1/projects/{projectId}/orders": {
125
261
  parameters: {
126
262
  query?: never;
@@ -303,9 +439,165 @@ export interface components {
303
439
  * @enum {string}
304
440
  */
305
441
  RefundPolicy: "none" | "prorated";
442
+ CancellationPreviewRequest: {
443
+ /** @description The subscriptions to end together, all of one service. Every subscription released with a resource must be included. */
444
+ subscription_ids: string[];
445
+ mode: components["schemas"]["TerminationPolicy"];
446
+ };
447
+ /**
448
+ * @description What the cancellation would return, subscription by subscription and in total, as of now.
449
+ *
450
+ * - `unused_amount`: before tax, the value of the paid service still unused, whatever the refund
451
+ * terms say.
452
+ * - `refundable_amount`: what is returned the way it was paid, including the tax paid on it;
453
+ * `refund_amount` plus `credit_amount`.
454
+ * - `refund_amount`: the part returned to the balance or to the payment method.
455
+ * - `credit_amount`: the part restored to the credit grants that paid.
456
+ * - `tax_amount`: the tax included in `refundable_amount`.
457
+ * - `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.
458
+ *
459
+ * Postpaid and one-time subscriptions show zero; usage until release is charged as usual.
460
+ */
461
+ CancellationRefundPreview: {
462
+ mode: components["schemas"]["TerminationPolicy"];
463
+ /**
464
+ * Format: date-time
465
+ * @description For `period_end`, when release begins, the end of the paid terms.
466
+ */
467
+ scheduled_at?: string;
468
+ /**
469
+ * Format: date-time
470
+ * @description For `immediate`, the second the refund is computed as of. Give it when creating the cancellation.
471
+ */
472
+ proration_date?: string;
473
+ currency: string;
474
+ unused_amount: components["schemas"]["Money"];
475
+ refundable_amount: components["schemas"]["Money"];
476
+ refund_amount: components["schemas"]["Money"];
477
+ credit_amount: components["schemas"]["Money"];
478
+ tax_amount: components["schemas"]["Money"];
479
+ forfeited_amount: components["schemas"]["Money"];
480
+ items: components["schemas"]["CancellationRefundPreviewItem"][];
481
+ };
482
+ /** @description One subscription of the preview. The amounts mean what they mean in the preview. */
483
+ CancellationRefundPreviewItem: {
484
+ /** Format: uuid */
485
+ subscription_id: string;
486
+ /** Format: uuid */
487
+ plan_id: string;
488
+ plan_name: string;
489
+ /** @description The project and its current name, for display. Absent for a purchase at account level, and when the project details cannot be read at the moment. */
490
+ project?: components["schemas"]["NamedIdentity"] | null;
491
+ /** @enum {string} */
492
+ billing_type: "postpaid" | "prepaid" | "one_time";
493
+ unused_amount: components["schemas"]["Money"];
494
+ refundable_amount: components["schemas"]["Money"];
495
+ refund_amount: components["schemas"]["Money"];
496
+ credit_amount: components["schemas"]["Money"];
497
+ tax_amount: components["schemas"]["Money"];
498
+ forfeited_amount: components["schemas"]["Money"];
499
+ };
500
+ CancellationCreate: {
501
+ /** @description As in the preview. */
502
+ subscription_ids: string[];
503
+ mode: components["schemas"]["TerminationPolicy"];
504
+ /**
505
+ * Format: date-time
506
+ * @description For `immediate`, the `proration_date` of the preview: a whole second, not in the future and
507
+ * at most ten minutes old. The refund is computed as of it. Now when omitted.
508
+ */
509
+ proration_date?: string;
510
+ /** @description The `refundable_amount` of the preview. The cancellation is refused when the refund differs. */
511
+ expected_refundable_amount: string;
512
+ /** @description A note from the account holder. It is kept with the cancellation and not shown elsewhere. */
513
+ reason?: string;
514
+ };
515
+ /**
516
+ * @description One cancellation of a set of subscriptions of one service, released together at one time.
517
+ *
518
+ * - `requested`: `immediate`, release has not begun.
519
+ * - `scheduled`: `period_end`, waiting for `scheduled_at`.
520
+ * - `releasing`: release has begun; it can no longer be withdrawn.
521
+ * - `completed`: every subscription has ended and its refund has been made.
522
+ * - `canceled`: withdrawn before release began; the subscriptions continue.
523
+ * - `failed`: the service could not carry it out, for the reason in `failure_code`; the
524
+ * subscriptions continue and can be canceled again.
525
+ */
526
+ Cancellation: {
527
+ /** Format: uuid */
528
+ id: string;
529
+ /** @enum {string} */
530
+ status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
531
+ mode: components["schemas"]["TerminationPolicy"];
532
+ /** Format: date-time */
533
+ scheduled_at?: string;
534
+ /**
535
+ * Format: date-time
536
+ * @description For `immediate`, the second the refund is computed as of.
537
+ */
538
+ proration_date?: string;
539
+ /**
540
+ * @description Who asked for it. `project_deletion` means the project was deleted.
541
+ * @enum {string}
542
+ */
543
+ origin: "customer" | "operator" | "project_deletion";
544
+ currency: string;
545
+ /** @description The refund confirmed when it was created. Absent when the platform created it. */
546
+ expected_refundable_amount?: components["schemas"]["Money"];
547
+ /**
548
+ * @description Present with `failed`. A code of the service that provides the resources, such as a disk
549
+ * that can only be released with its server. Clients map it to their own wording.
550
+ */
551
+ failure_code?: string;
552
+ /** Format: date-time */
553
+ requested_at: string;
554
+ /** Format: date-time */
555
+ completed_at?: string;
556
+ /** Format: date-time */
557
+ canceled_at?: string;
558
+ items: components["schemas"]["CancellationItem"][];
559
+ };
560
+ /** @description One subscription of the cancellation. */
561
+ CancellationItem: {
562
+ /**
563
+ * Format: uuid
564
+ * @description The cancellation request of this subscription, the same as `Subscription.cancellation_request.id`.
565
+ */
566
+ id: string;
567
+ /** Format: uuid */
568
+ subscription_id: string;
569
+ /** Format: uuid */
570
+ plan_id: string;
571
+ plan_name: string;
572
+ /** @enum {string} */
573
+ status: "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
574
+ /** Format: date-time */
575
+ release_started_at?: string;
576
+ /**
577
+ * Format: date-time
578
+ * @description When the service ended, as confirmed by the service that provides it.
579
+ */
580
+ effective_at?: string;
581
+ /** @description Present with `completed`. The part of the refund returned to the account balance. */
582
+ balance_amount?: components["schemas"]["Money"];
583
+ /** @description Present with `completed`. The part restored to the credit grants that paid. */
584
+ credit_amount?: components["schemas"]["Money"];
585
+ /** @description Present with `completed`. The part returned to the payment method it was paid with. */
586
+ gateway_amount?: components["schemas"]["Money"];
587
+ };
588
+ CancellationList: {
589
+ items: components["schemas"]["Cancellation"][];
590
+ /** Format: int64 */
591
+ total_count?: number;
592
+ };
306
593
  /** @description A cancellation request for the original purchase. scheduled_at is the intended time; effective_at is the confirmed end of service. The request alone does not stop metering or issue a refund. */
307
594
  CancellationRequest: {
308
595
  reason?: string;
596
+ /**
597
+ * Format: uuid
598
+ * @description The cancellation this request belongs to, with the other subscriptions released together.
599
+ */
600
+ cancellation_id?: string;
309
601
  /** Format: uuid */
310
602
  id: string;
311
603
  /** Format: uuid */
@@ -1063,6 +1355,7 @@ export interface components {
1063
1355
  };
1064
1356
  };
1065
1357
  parameters: {
1358
+ CancellationId: string;
1066
1359
  /** @description 1-based page number; the first page when omitted. */
1067
1360
  Page: number;
1068
1361
  /** @description How many per page, 100 at most. */
@@ -1238,6 +1531,149 @@ export interface operations {
1238
1531
  default: components["responses"]["Error"];
1239
1532
  };
1240
1533
  };
1534
+ "create-project-cancellation-preview": {
1535
+ parameters: {
1536
+ query?: never;
1537
+ header?: never;
1538
+ path: {
1539
+ projectId: components["parameters"]["ProjectId"];
1540
+ };
1541
+ cookie?: never;
1542
+ };
1543
+ requestBody: {
1544
+ content: {
1545
+ "application/json": components["schemas"]["CancellationPreviewRequest"];
1546
+ };
1547
+ };
1548
+ responses: {
1549
+ /** @description OK */
1550
+ 200: {
1551
+ headers: {
1552
+ [name: string]: unknown;
1553
+ };
1554
+ content: {
1555
+ "application/json": components["schemas"]["CancellationRefundPreview"];
1556
+ };
1557
+ };
1558
+ default: components["responses"]["Error"];
1559
+ };
1560
+ };
1561
+ "list-project-cancellations": {
1562
+ parameters: {
1563
+ query?: {
1564
+ /** @description 1-based page number; the first page when omitted. */
1565
+ page?: components["parameters"]["Page"];
1566
+ /** @description How many per page, 100 at most. */
1567
+ page_size?: components["parameters"]["PageSize"];
1568
+ /** @description Only cancellations that include this subscription. */
1569
+ subscription_id?: string;
1570
+ /** @description Only cancellations in this status. `open` means requested, scheduled or releasing. */
1571
+ status?: "open" | "requested" | "scheduled" | "releasing" | "completed" | "canceled" | "failed";
1572
+ };
1573
+ header?: never;
1574
+ path: {
1575
+ projectId: components["parameters"]["ProjectId"];
1576
+ };
1577
+ cookie?: never;
1578
+ };
1579
+ requestBody?: never;
1580
+ responses: {
1581
+ /** @description OK */
1582
+ 200: {
1583
+ headers: {
1584
+ [name: string]: unknown;
1585
+ };
1586
+ content: {
1587
+ "application/json": components["schemas"]["CancellationList"];
1588
+ };
1589
+ };
1590
+ default: components["responses"]["Error"];
1591
+ };
1592
+ };
1593
+ "create-project-cancellation": {
1594
+ parameters: {
1595
+ query?: never;
1596
+ header?: never;
1597
+ path: {
1598
+ projectId: components["parameters"]["ProjectId"];
1599
+ };
1600
+ cookie?: never;
1601
+ };
1602
+ requestBody: {
1603
+ content: {
1604
+ "application/json": components["schemas"]["CancellationCreate"];
1605
+ };
1606
+ };
1607
+ responses: {
1608
+ /** @description The same cancellation, already open */
1609
+ 200: {
1610
+ headers: {
1611
+ [name: string]: unknown;
1612
+ };
1613
+ content: {
1614
+ "application/json": components["schemas"]["Cancellation"];
1615
+ };
1616
+ };
1617
+ /** @description Created */
1618
+ 201: {
1619
+ headers: {
1620
+ [name: string]: unknown;
1621
+ };
1622
+ content: {
1623
+ "application/json": components["schemas"]["Cancellation"];
1624
+ };
1625
+ };
1626
+ default: components["responses"]["Error"];
1627
+ };
1628
+ };
1629
+ "get-project-cancellation": {
1630
+ parameters: {
1631
+ query?: never;
1632
+ header?: never;
1633
+ path: {
1634
+ projectId: components["parameters"]["ProjectId"];
1635
+ cancellationId: components["parameters"]["CancellationId"];
1636
+ };
1637
+ cookie?: never;
1638
+ };
1639
+ requestBody?: never;
1640
+ responses: {
1641
+ /** @description OK */
1642
+ 200: {
1643
+ headers: {
1644
+ [name: string]: unknown;
1645
+ };
1646
+ content: {
1647
+ "application/json": components["schemas"]["Cancellation"];
1648
+ };
1649
+ };
1650
+ default: components["responses"]["Error"];
1651
+ };
1652
+ };
1653
+ "withdraw-project-cancellation": {
1654
+ parameters: {
1655
+ query?: never;
1656
+ header?: never;
1657
+ path: {
1658
+ projectId: components["parameters"]["ProjectId"];
1659
+ cancellationId: components["parameters"]["CancellationId"];
1660
+ };
1661
+ cookie?: never;
1662
+ };
1663
+ requestBody?: never;
1664
+ responses: {
1665
+ /** @description OK */
1666
+ 200: {
1667
+ headers: {
1668
+ [name: string]: unknown;
1669
+ };
1670
+ content: {
1671
+ "application/json": components["schemas"]["Cancellation"];
1672
+ };
1673
+ };
1674
+ default: components["responses"]["Error"];
1675
+ };
1676
+ };
1241
1677
  "list-project-orders": {
1242
1678
  parameters: {
1243
1679
  query?: {
@@ -46,7 +46,7 @@ export interface paths {
46
46
  * Delete a backup
47
47
  * @description Independent of the source disk: deletion succeeds whether or not that disk still exists.
48
48
  *
49
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the backup, including a pay-as-you-go subscription. `meta.resource_id` names the backup. It is released when its subscription ends.
49
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the backup, including a pay-as-you-go subscription. `meta.resource_id` names the backup. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
50
50
  */
51
51
  delete: operations["delete-backup"];
52
52
  options?: never;
@@ -240,7 +240,7 @@ export interface paths {
240
240
  * Delete a disk
241
241
  * @description Deletion is rejected while the disk is attached, or while snapshots created from it still exist.
242
242
  *
243
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the disk, including a pay-as-you-go subscription. `meta.resource_id` names the disk. It is released when its subscription ends.
243
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the disk, including a pay-as-you-go subscription. `meta.resource_id` names the disk. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
244
244
  */
245
245
  delete: operations["delete-disk"];
246
246
  options?: never;
@@ -342,7 +342,7 @@ export interface paths {
342
342
  * Release a floating IP
343
343
  * @description Releases the floating IP after unbinding it. Completion is reported by the returned task.
344
344
  *
345
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the address or for its bandwidth, including a pay-as-you-go subscription. `meta.resource_id` names the floating IP. It is released when its subscriptions end.
345
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the address or for its bandwidth, including a pay-as-you-go subscription. `meta.resource_id` names the floating IP. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
346
346
  */
347
347
  delete: operations["release-floating-ip"];
348
348
  options?: never;
@@ -443,7 +443,7 @@ export interface paths {
443
443
  *
444
444
  * An instance being captured as a private image cannot be released. Wait for the capture to finish, or delete that image first.
445
445
  *
446
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the instance, or for a disk that is deleted with it, including a pay-as-you-go subscription. `meta.resource_id` names that resource. It is released when its subscription ends.
446
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the instance, or for a disk that is deleted with it, including a pay-as-you-go subscription. `meta.resource_id` names that resource. The instance is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
447
447
  */
448
448
  delete: operations["delete-instance"];
449
449
  options?: never;
@@ -955,7 +955,7 @@ export interface paths {
955
955
  *
956
956
  * An image whose capture has not finished can be deleted; the capture is aborted.
957
957
  *
958
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the image, including a pay-as-you-go subscription. `meta.resource_id` names the image. It is released when its subscription ends.
958
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the image, including a pay-as-you-go subscription. `meta.resource_id` names the image. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
959
959
  */
960
960
  delete: operations["delete-private-image"];
961
961
  options?: never;
@@ -1256,7 +1256,7 @@ export interface paths {
1256
1256
  post?: never;
1257
1257
  /**
1258
1258
  * Delete a snapshot
1259
- * @description Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the snapshot, including a pay-as-you-go subscription. `meta.resource_id` names the snapshot. It is released when its subscription ends.
1259
+ * @description Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the snapshot, including a pay-as-you-go subscription. `meta.resource_id` names the snapshot. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
1260
1260
  */
1261
1261
  delete: operations["delete-snapshot"];
1262
1262
  options?: never;
@@ -1451,6 +1451,8 @@ export interface components {
1451
1451
  price_id: string | null;
1452
1452
  /** Format: uuid */
1453
1453
  subscription_item_id: string | null;
1454
+ /** @description The subscriptions a cancellation through Billing has to cover to release this backup: its own. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
1455
+ release_subscription_ids: string[];
1454
1456
  /** @enum {string|null} */
1455
1457
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1456
1458
  task: components["schemas"]["Task"] | null;
@@ -1533,6 +1535,8 @@ export interface components {
1533
1535
  price_id: string | null;
1534
1536
  /** Format: uuid */
1535
1537
  subscription_item_id: string | null;
1538
+ /** @description The subscriptions a cancellation through Billing has to cover to release this disk: its own and those of its snapshots. A system disk is released only with its instance, so for a system disk the list is that of the instance. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
1539
+ release_subscription_ids: string[];
1536
1540
  /** @enum {string|null} */
1537
1541
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1538
1542
  task: components["schemas"]["Task"] | null;
@@ -1765,6 +1769,8 @@ export interface components {
1765
1769
  price_id: string | null;
1766
1770
  /** Format: uuid */
1767
1771
  subscription_item_id: string | null;
1772
+ /** @description The subscriptions a cancellation through Billing has to cover to release this address: the subscriptions of the address and of its bandwidth. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
1773
+ release_subscription_ids: string[];
1768
1774
  /** @enum {string|null} */
1769
1775
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1770
1776
  task: components["schemas"]["Task"] | null;
@@ -1891,6 +1897,8 @@ export interface components {
1891
1897
  price_id: string | null;
1892
1898
  /** Format: uuid */
1893
1899
  subscription_item_id: string | null;
1900
+ /** @description The subscriptions a cancellation through Billing has to cover to release this instance: its own, those of the disks deleted with it, and those of the snapshots of those disks. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
1901
+ release_subscription_ids: string[];
1894
1902
  /** @enum {string|null} */
1895
1903
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1896
1904
  /**
@@ -2187,6 +2195,8 @@ export interface components {
2187
2195
  price_id: string | null;
2188
2196
  /** Format: uuid */
2189
2197
  subscription_item_id: string | null;
2198
+ /** @description The subscriptions a cancellation through Billing has to cover to release this private image: its own. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
2199
+ release_subscription_ids: string[];
2190
2200
  /** @enum {string|null} */
2191
2201
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2192
2202
  task: components["schemas"]["Task"] | null;
@@ -2406,6 +2416,8 @@ export interface components {
2406
2416
  price_id: string | null;
2407
2417
  /** Format: uuid */
2408
2418
  subscription_item_id: string | null;
2419
+ /** @description The subscriptions a cancellation through Billing has to cover to release this snapshot: its own. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
2420
+ release_subscription_ids: string[];
2409
2421
  /** @enum {string|null} */
2410
2422
  access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2411
2423
  task: components["schemas"]["Task"] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.0.0-dev.232.g18ca775",
3
+ "version": "0.0.0-dev.234.gce19274",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {