@leaflow/sdk 0.103.0 → 0.105.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.
@@ -1737,6 +1737,8 @@ export interface components {
1737
1737
  CreditGroup: {
1738
1738
  /** @description What the credit in this group may pay for. No restrictions means anything on the account. */
1739
1739
  applies_to: components["schemas"]["Applicability"];
1740
+ /** @description Restricted to your first purchase of anything it applies to. */
1741
+ first_purchase_only?: boolean;
1740
1742
  amount: components["schemas"]["Money"];
1741
1743
  };
1742
1744
  ProjectBillingInfo: {
@@ -2300,6 +2302,8 @@ export interface components {
2300
2302
  currency: string;
2301
2303
  /** @description What this credit may pay for. No restrictions means anything on the account. */
2302
2304
  applies_to: components["schemas"]["Applicability"];
2305
+ /** @description Restricted to your first purchase of anything it applies to. */
2306
+ first_purchase_only?: boolean;
2303
2307
  /** @enum {string} */
2304
2308
  status: "active" | "depleted" | "expired" | "voided";
2305
2309
  /** Format: date-time */
@@ -2821,6 +2825,8 @@ export interface components {
2821
2825
  * including setup fees and traffic.
2822
2826
  */
2823
2827
  applies_to: components["schemas"]["Applicability"];
2828
+ /** @description Restricted to your first purchase of anything it applies to. */
2829
+ first_purchase_only?: boolean;
2824
2830
  /** Format: date-time */
2825
2831
  started_at?: string;
2826
2832
  /** Format: date-time */
@@ -2847,19 +2853,20 @@ export interface components {
2847
2853
  /** @description How many periods one purchase covers. */
2848
2854
  interval_count?: number;
2849
2855
  unit_amount?: components["schemas"]["Money"];
2856
+ /** @description False once the price is archived. It still applies to purchases already made at this price. */
2857
+ active: boolean;
2850
2858
  };
2851
2859
  /**
2852
- * @description Product, plan and price lists form a union; three empty lists permit every item.
2853
- * Other conditions apply together. Entries always include their display fields.
2860
+ * @description Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
2861
+ * given, subject to the billing type, operation and term conditions. Entries always include their
2862
+ * display fields; archived plans and prices stay listed with active set to false.
2854
2863
  */
2855
2864
  Applicability: {
2856
2865
  products?: components["schemas"]["Product"][];
2857
- plans?: components["schemas"]["ObjectIdentity"][];
2866
+ plans?: components["schemas"]["ApplicablePlan"][];
2858
2867
  prices?: components["schemas"]["PriceOption"][];
2859
2868
  price_types?: string[];
2860
2869
  operations?: components["schemas"]["PurchaseOperation"][];
2861
- /** @description Restricted to your first purchase of a covered product. */
2862
- first_purchase_only?: boolean;
2863
2870
  /**
2864
2871
  * @description The shortest term a purchase may have, in months. A purchase with no term, such as
2865
2872
  * metered usage, never qualifies while this is set.
@@ -2867,6 +2874,16 @@ export interface components {
2867
2874
  min_term_months?: number;
2868
2875
  /** @description The longest term a purchase may have, in months. */
2869
2876
  max_term_months?: number;
2877
+ excluded_products?: components["schemas"]["Product"][];
2878
+ excluded_plans?: components["schemas"]["ApplicablePlan"][];
2879
+ excluded_prices?: components["schemas"]["PriceOption"][];
2880
+ };
2881
+ /** @description A plan it refers to. active is false once the plan is archived; it still applies to subscriptions already on this plan. */
2882
+ ApplicablePlan: {
2883
+ /** Format: uuid */
2884
+ id: string;
2885
+ name: string;
2886
+ active: boolean;
2870
2887
  };
2871
2888
  /**
2872
2889
  * @description Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are absent
@@ -31,6 +31,14 @@ export type ListRequestsResult = operations["list-requests"]["responses"][200]["
31
31
  export type ListRequestsQuery = operations["list-requests"]["parameters"]["query"];
32
32
  /** The success response body of `GET /api/v1/requests/{requestId}`. */
33
33
  export type GetRequestResult = operations["get-request"]["responses"][200]["content"]["application/json"];
34
+ /** The success response body of `GET /api/v1/service`. */
35
+ export type GetServiceResult = operations["get-service"]["responses"][200]["content"]["application/json"];
36
+ /** The success response body of `POST /api/v1/service`. */
37
+ export type CreateServiceResult = operations["create-service"]["responses"][202]["content"]["application/json"];
38
+ /** The request body of `POST /api/v1/service`. */
39
+ export type CreateServiceBody = NonNullable<operations["create-service"]["requestBody"]>["content"]["application/json"];
40
+ /** The success response body of `POST /api/v1/service/quote`. */
41
+ export type CreateServiceQuoteResult = operations["create-service-quote"]["responses"][200]["content"]["application/json"];
34
42
  /** The success response body of `GET /api/v1/usage/by-api-key`. */
35
43
  export type ListUsageByApiKeyResult = operations["list-usage-by-api-key"]["responses"][200]["content"]["application/json"];
36
44
  /** The query parameters of `GET /api/v1/usage/by-api-key`. */
@@ -127,6 +127,8 @@ export interface paths {
127
127
  * @description A model that has been retired does not appear here, while it remains readable individually.
128
128
  *
129
129
  * `context_length` and `max_output_tokens` are advisory. The server does not truncate on their basis, and the request body is forwarded upstream unchanged.
130
+ *
131
+ * `pricing` states what requests to each model cost in the currency of the project's current billing account.
130
132
  */
131
133
  get: operations["list-models"];
132
134
  put?: never;
@@ -198,6 +200,56 @@ export interface paths {
198
200
  patch?: never;
199
201
  trace?: never;
200
202
  };
203
+ "/api/v1/service": {
204
+ parameters: {
205
+ query?: never;
206
+ header?: never;
207
+ path?: never;
208
+ cookie?: never;
209
+ };
210
+ /**
211
+ * Get the model platform service
212
+ * @description The model platform service of the authenticated project. The forwarding endpoints accept its requests only while `status` is `active`; each request is then billed under `subscription_id`, per token, at the rates stated in each model's `pricing`.
213
+ *
214
+ * When the project is deleted, its API keys are revoked and the subscription is canceled; the service then reads `inactive` with `ended_at` set.
215
+ */
216
+ get: operations["get-service"];
217
+ put?: never;
218
+ /**
219
+ * Enable the model platform service
220
+ * @description Purchases the model platform service for this project. The service itself has no charge; requests are billed under it postpaid, by the tokens they use. It takes no billing choice. Returns the service as `pending` with its order; it becomes `active` once the order is accepted, which for an order with nothing to pay happens without further action.
221
+ *
222
+ * Refused with 409 `SERVICE_ALREADY_ENABLED` while an enablement is pending or the service is active. A refusal of the order by Billing is returned with Billing's code, such as `BILLING_PRICE_UNAVAILABLE` when the service has no price in the currency of the project's billing account.
223
+ */
224
+ post: operations["create-service"];
225
+ delete?: never;
226
+ options?: never;
227
+ head?: never;
228
+ patch?: never;
229
+ trace?: never;
230
+ };
231
+ "/api/v1/service/quote": {
232
+ parameters: {
233
+ query?: never;
234
+ header?: never;
235
+ path?: never;
236
+ cookie?: never;
237
+ };
238
+ get?: never;
239
+ put?: never;
240
+ /**
241
+ * Quote enabling the model platform service
242
+ * @description Prices what `create-service` would order, without ordering or creating anything; nothing is reserved or recorded. Billing evaluates applicable account discounts and tax as for automatic checkout. `total` is what automatic checkout would collect before credit grants and balance; give it as `checkout.expected_amount` to be refused rather than charged a different amount.
243
+ *
244
+ * Token usage is priced per model, as each model's `pricing` states, and is neither part of `total` nor projected: `estimated_usage_amount` is null. A request the purchase would refuse is refused the same way.
245
+ */
246
+ post: operations["create-service-quote"];
247
+ delete?: never;
248
+ options?: never;
249
+ head?: never;
250
+ patch?: never;
251
+ trace?: never;
252
+ };
201
253
  "/api/v1/usage/by-api-key": {
202
254
  parameters: {
203
255
  query?: never;
@@ -426,6 +478,8 @@ export interface components {
426
478
  * @description The maximum output length. Advisory only
427
479
  */
428
480
  max_output_tokens: number;
481
+ /** @description What requests to this model cost. Null when the project has no billing account. */
482
+ pricing: components["schemas"]["ModelPricing"] | null;
429
483
  /** @description The values accepted for `reasoning_effort`. Empty means it is not supported */
430
484
  reasoning_tiers: string[];
431
485
  /** @enum {string} */
@@ -434,6 +488,24 @@ export interface components {
434
488
  supports_tools: boolean;
435
489
  supports_vision: boolean;
436
490
  };
491
+ /**
492
+ * @description What requests to a model cost, as Billing prices them in the currency of the project's current billing account. These are list amounts before promotion codes, not a checkout guarantee; usage is billed afterwards under the service's subscription.
493
+ *
494
+ * Each token kind is priced on its own. `input` excludes cached input, which is `cache_read`, and `output` excludes reasoning the provider reports separately, which is `reasoning`; a request is billed for each kind it used.
495
+ */
496
+ ModelPricing: {
497
+ currency: string;
498
+ /** @description One entry for each of the five token kinds, in the order input, output, cache_read, cache_write, reasoning. */
499
+ token_kinds: components["schemas"]["TokenPrice"][];
500
+ };
501
+ TokenPrice: {
502
+ /** @enum {string} */
503
+ token_kind: "input" | "output" | "cache_read" | "cache_write" | "reasoning";
504
+ /** @description The charge for `unit_quantity` tokens of this kind. Null when the kind has no rate in the currency, in which case the model cannot be billed for it. */
505
+ unit_amount: components["schemas"]["Money"] | null;
506
+ /** @description How many tokens `unit_amount` is for, such as `1000000`. Null when `unit_amount` is null. */
507
+ unit_quantity: string | null;
508
+ };
437
509
  ModelListResponseBody: {
438
510
  items: components["schemas"]["ModelResource"][];
439
511
  };
@@ -567,8 +639,194 @@ export interface components {
567
639
  UsageTimelineResponseBody: {
568
640
  items: components["schemas"]["UsageBucketResource"][];
569
641
  };
642
+ /** @description The model platform service of a project. */
643
+ ServiceResource: {
644
+ /**
645
+ * @description `inactive` has never been enabled or its subscription has ended; `pending` awaits acceptance of its order; `active` accepts requests on the forwarding endpoints; `failed` means the enablement failed, as `failure_reason` states. An `inactive` or `failed` service can be enabled again.
646
+ * @enum {string}
647
+ */
648
+ status: "inactive" | "pending" | "active" | "failed";
649
+ /**
650
+ * @description Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means its checkout was not confirmed in time.
651
+ * @enum {string|null}
652
+ */
653
+ failure_reason: "order_declined" | "order_canceled" | "order_expired" | null;
654
+ /**
655
+ * Format: uuid
656
+ * @description The order that enabled the service, or that the latest enablement placed; null before any enablement.
657
+ */
658
+ order_id: string | null;
659
+ /**
660
+ * Format: uuid
661
+ * @description The Billing subscription that requests are billed under; null before any enablement.
662
+ */
663
+ subscription_id: string | null;
664
+ /**
665
+ * Format: date-time
666
+ * @description When the service became active and billing began; null until then.
667
+ */
668
+ activated_at: string | null;
669
+ /**
670
+ * Format: date-time
671
+ * @description When the subscription ended; null unless it has.
672
+ */
673
+ ended_at: string | null;
674
+ };
675
+ CreateServiceRequestBody: {
676
+ checkout?: components["schemas"]["CheckoutOptions"];
677
+ };
678
+ /** @description The service, `pending` until its order is accepted, and the order. */
679
+ CreateServiceResponseBody: {
680
+ service: components["schemas"]["ServiceResource"];
681
+ order: components["schemas"]["PlacedOrder"];
682
+ };
683
+ /**
684
+ * @description Shared checkout choices for a product purchase. Omitting this object or mode selects
685
+ * automatic checkout. Each purchase creates its own order. Promotion codes are supplied only to
686
+ * Billing quote and checkout operations. A service may retain a failed creation record when Billing
687
+ * refuses a purchase; no infrastructure is created for that refusal.
688
+ */
689
+ CheckoutOptions: {
690
+ /** @default automatic */
691
+ mode?: components["schemas"]["CheckoutMode"];
692
+ /**
693
+ * @description Expected invoice total after discounts and tax, before applying credit grants or balance.
694
+ * A different total fails with BILLING_AMOUNT_CHANGED without charging or reserving a discount.
695
+ * Accepted only in automatic mode; with deferred it is refused with HTTP 400. For deferred
696
+ * checkout, confirm the amount through Billing.
697
+ */
698
+ expected_amount?: components["schemas"]["Money"];
699
+ };
700
+ /** @description Identifies the purchase. Read the order for purchase progress and its invoice for amounts and payment status. */
701
+ PlacedOrder: {
702
+ /**
703
+ * Format: uuid
704
+ * @description The invoice for this purchase, which may still be a draft awaiting checkout. Null when no invoice has been created. Its presence or absence does not establish whether delivery may begin.
705
+ */
706
+ invoice_id: string | null;
707
+ /**
708
+ * Format: uuid
709
+ * @description The order, including for purchases without an immediate charge. Payment alone does not imply that the service has completed delivery.
710
+ */
711
+ order_id: string;
712
+ };
713
+ /**
714
+ * @description A price preview for the purchase described by a service, calculated by Billing. Nothing is saved,
715
+ * charged or reserved, and no discount redemption is consumed. Account discounts and tax are
716
+ * evaluated as for automatic checkout. Promotion codes are evaluated through Billing quote operations.
717
+ * All amounts use currency. This preview does not lock prices or guarantee discount availability.
718
+ */
719
+ Quote: {
720
+ /** @description One line for each item the purchase would order, in the order it would order them. */
721
+ lines: components["schemas"]["QuotedLine"][];
722
+ /**
723
+ * @description Sum of line amounts before discounts, less tax already included in the discounted line
724
+ * amounts, as on an invoice. Null when any line cannot be priced.
725
+ */
726
+ subtotal: components["schemas"]["Money"] | null;
727
+ /** @description Sum of line discounts. Null when any line cannot be priced. */
728
+ discount_amount: components["schemas"]["Money"] | null;
729
+ /** @description Sum of tax on the discounted line amounts. Null when any line cannot be priced. */
730
+ tax_amount: components["schemas"]["Money"] | null;
731
+ /**
732
+ * @description subtotal minus discount_amount plus tax_amount: what checkout collects, before applying
733
+ * credit grants or balance. Equals the sum of line totals and excludes estimated_usage_amount.
734
+ * Null when any line cannot be priced.
735
+ */
736
+ total: components["schemas"]["Money"] | null;
737
+ /**
738
+ * @description Sum of the lines' estimated_usage_amount. A projection, not part of total and not collected at
739
+ * checkout. Null when no line is billed for usage or when any usage cannot be priced.
740
+ */
741
+ estimated_usage_amount: components["schemas"]["Money"] | null;
742
+ currency: string;
743
+ /**
744
+ * Format: date-time
745
+ * @description Changes only; null otherwise. The instant the change is priced from. Pass it with the change so the
746
+ * order is priced from the same instant.
747
+ */
748
+ proration_date: string | null;
749
+ /**
750
+ * @description Changes that lower the price only; null otherwise. What the change would return to the original
751
+ * payment sources, including the tax paid on it. total is zero for such a change.
752
+ */
753
+ refundable_amount: components["schemas"]["Money"] | null;
754
+ };
755
+ /**
756
+ * @description A decimal string, in the currency stated alongside it.
757
+ *
758
+ * **The currency is not part of this type.** It is carried by a `currency` field next to the
759
+ * amount, or by the account the amount belongs to. Reading an amount without that field is
760
+ * reading a number with no unit.
761
+ *
762
+ * It is a string rather than a JSON number because a JSON number is a float in most parsers,
763
+ * and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
764
+ * through a float.
765
+ * @example 10.2500000000
766
+ */
767
+ Money: string;
768
+ /**
769
+ * @description automatic confirms checkout with applicable account discounts and collects payment from eligible
770
+ * credit grants and available balance. Insufficient funds fail the purchase with HTTP 422
771
+ * BILLING_INSUFFICIENT_FUNDS; no Billing order, charge or discount redemption is committed.
772
+ * deferred creates a pending_checkout order for subsequent confirmation and payment through Billing.
773
+ * No new discount redemption or payment is made when the order is created. An order whose total is
774
+ * zero, with nothing to pay or discount, completes checkout at placement in either mode.
775
+ * @enum {string}
776
+ */
777
+ CheckoutMode: "automatic" | "deferred";
778
+ /**
779
+ * @description One calculated purchase line. Fixed purchase amounts are rounded as checkout rounds them.
780
+ * When priced is false, every monetary field is null. A priced line without an
781
+ * immediate charge has zero amounts; an unavailable unit price remains null.
782
+ */
783
+ QuotedLine: {
784
+ /** @description Whether the line can be priced. When false, unpriced_reason states what is missing. */
785
+ priced: boolean;
786
+ /**
787
+ * @description Why no price was found; `none` while `priced` is true.
788
+ * @enum {string}
789
+ */
790
+ unpriced_reason: "none" | "no_price";
791
+ plan_name: string;
792
+ /** @description Unit price before discounts, with tax included only where the price includes it. */
793
+ unit_amount: components["schemas"]["Money"] | null;
794
+ /** @description The quantity priced. */
795
+ quantity: string;
796
+ /**
797
+ * @description Before discounts, including any setup charges. Contains tax only where the price includes it.
798
+ * Zero for a priced order item with no immediate charge.
799
+ */
800
+ amount: components["schemas"]["Money"] | null;
801
+ /** @description Total reduction on this line, including any committed recurring discount. */
802
+ discount_amount: components["schemas"]["Money"] | null;
803
+ /** @description Tax on the discounted amount, including any tax already contained in that amount. */
804
+ tax_amount: components["schemas"]["Money"] | null;
805
+ /** @description The part of tax_amount already contained in amount minus discount_amount. */
806
+ tax_included_amount: components["schemas"]["Money"] | null;
807
+ /** @description amount minus discount_amount plus tax_amount minus tax_included_amount. */
808
+ total: components["schemas"]["Money"] | null;
809
+ /**
810
+ * @description Projected charge for this line's future usage over the period stated by the quoting operation,
811
+ * at current rates, before discounts and tax and not rounded. Not part of amount or total and
812
+ * not collected at checkout. Null when the line is not billed for usage or its usage cannot be
813
+ * priced.
814
+ */
815
+ estimated_usage_amount: components["schemas"]["Money"] | null;
816
+ currency: string;
817
+ };
818
+ };
819
+ responses: {
820
+ /** @description The request conflicts with the current state of the service. The codes are described where they apply. */
821
+ Conflict: {
822
+ headers: {
823
+ [name: string]: unknown;
824
+ };
825
+ content: {
826
+ "application/json": components["schemas"]["Error"];
827
+ };
828
+ };
570
829
  };
571
- responses: never;
572
830
  parameters: never;
573
831
  requestBodies: never;
574
832
  headers: never;
@@ -939,6 +1197,99 @@ export interface operations {
939
1197
  };
940
1198
  };
941
1199
  };
1200
+ "get-service": {
1201
+ parameters: {
1202
+ query?: never;
1203
+ header?: never;
1204
+ path?: never;
1205
+ cookie?: never;
1206
+ };
1207
+ requestBody?: never;
1208
+ responses: {
1209
+ /** @description OK */
1210
+ 200: {
1211
+ headers: {
1212
+ [name: string]: unknown;
1213
+ };
1214
+ content: {
1215
+ "application/json": components["schemas"]["ServiceResource"];
1216
+ };
1217
+ };
1218
+ /** @description Error */
1219
+ default: {
1220
+ headers: {
1221
+ [name: string]: unknown;
1222
+ };
1223
+ content: {
1224
+ "application/json": components["schemas"]["Error"];
1225
+ };
1226
+ };
1227
+ };
1228
+ };
1229
+ "create-service": {
1230
+ parameters: {
1231
+ query?: never;
1232
+ header?: never;
1233
+ path?: never;
1234
+ cookie?: never;
1235
+ };
1236
+ requestBody: {
1237
+ content: {
1238
+ "application/json": components["schemas"]["CreateServiceRequestBody"];
1239
+ };
1240
+ };
1241
+ responses: {
1242
+ /** @description The service and its order were created; the service is not active yet. */
1243
+ 202: {
1244
+ headers: {
1245
+ [name: string]: unknown;
1246
+ };
1247
+ content: {
1248
+ "application/json": components["schemas"]["CreateServiceResponseBody"];
1249
+ };
1250
+ };
1251
+ 409: components["responses"]["Conflict"];
1252
+ /** @description Error */
1253
+ default: {
1254
+ headers: {
1255
+ [name: string]: unknown;
1256
+ };
1257
+ content: {
1258
+ "application/json": components["schemas"]["Error"];
1259
+ };
1260
+ };
1261
+ };
1262
+ };
1263
+ "create-service-quote": {
1264
+ parameters: {
1265
+ query?: never;
1266
+ header?: never;
1267
+ path?: never;
1268
+ cookie?: never;
1269
+ };
1270
+ requestBody?: never;
1271
+ responses: {
1272
+ /** @description OK */
1273
+ 200: {
1274
+ headers: {
1275
+ [name: string]: unknown;
1276
+ };
1277
+ content: {
1278
+ "application/json": components["schemas"]["Quote"];
1279
+ };
1280
+ };
1281
+ 409: components["responses"]["Conflict"];
1282
+ /** @description Error */
1283
+ default: {
1284
+ headers: {
1285
+ [name: string]: unknown;
1286
+ };
1287
+ content: {
1288
+ "application/json": components["schemas"]["Error"];
1289
+ };
1290
+ };
1291
+ };
1292
+ };
942
1293
  "list-usage-by-api-key": {
943
1294
  parameters: {
944
1295
  query: {
@@ -503,7 +503,7 @@ export interface paths {
503
503
  * Release a floating IP
504
504
  * @description Releases the floating IP after unbinding it. The floating IP shows the `delete` operation until it is released.
505
505
  *
506
- * 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`.
506
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the address, 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`.
507
507
  */
508
508
  delete: operations["release-floating-ip"];
509
509
  options?: never;
@@ -1794,10 +1794,10 @@ export interface components {
1794
1794
  */
1795
1795
  source_disk_id: string;
1796
1796
  /**
1797
- * @description `provisioning` while the backup is taken, then `available`. `failed` means the backup was not created.
1797
+ * @description `provisioning` while the backup is taken, then `available`. `failed` means the backup was not created. `missing` means the backup no longer exists in the cloud.
1798
1798
  * @enum {string}
1799
1799
  */
1800
- status: "provisioning" | "available" | "deleted" | "failed" | "error";
1800
+ status: "provisioning" | "available" | "deleted" | "failed" | "error" | "missing";
1801
1801
  /** @description The operation in progress on this backup, or null when none is. */
1802
1802
  readonly operation: components["schemas"]["BackupOperation"] | null;
1803
1803
  /** Format: int64 */
@@ -1869,10 +1869,10 @@ export interface components {
1869
1869
  */
1870
1870
  throughput_bytes_per_sec: number | null;
1871
1871
  /**
1872
- * @description `pending` until the order is accepted, with no storage allocated; `provisioning` while the disk is created; then `available`, or `in_use` once attached. `failed` means the disk was not created; `failure_reason` states why.
1872
+ * @description `pending` until the order is accepted, with no storage allocated; `provisioning` while the disk is created; then `available`, or `in_use` once attached. `failed` means the disk was not created; `failure_reason` states why. `missing` means the disk no longer exists in the cloud.
1873
1873
  * @enum {string}
1874
1874
  */
1875
- status: "pending" | "provisioning" | "available" | "in_use" | "deleted" | "failed" | "error";
1875
+ status: "pending" | "provisioning" | "available" | "in_use" | "deleted" | "failed" | "error" | "missing";
1876
1876
  /** Format: uuid */
1877
1877
  order_id: string | null;
1878
1878
  /**
@@ -1989,10 +1989,10 @@ export interface components {
1989
1989
  /** @description False means a new password can only be set by rebuilding an instance created from this image */
1990
1990
  supports_password_reset: boolean;
1991
1991
  /**
1992
- * @description Only `available` images can install instances. A public image is always `available`; a private image is `pending` until its order is accepted, then goes through `provisioning` and `uploading` while it is captured. `failed` means the capture produced no image; `failure_reason` states why.
1992
+ * @description Only `available` images can install instances. A public image is always `available`; a private image is `pending` until its order is accepted, then goes through `provisioning` and `uploading` while it is captured. `failed` means the capture produced no image; `failure_reason` states why. `missing` means a private image no longer exists in the cloud.
1993
1993
  * @enum {string}
1994
1994
  */
1995
- status: "pending" | "provisioning" | "uploading" | "available" | "deleted" | "failed" | "error";
1995
+ status: "pending" | "provisioning" | "uploading" | "available" | "deleted" | "failed" | "error" | "missing";
1996
1996
  /** @description Details of why the capture failed; non-empty only when `status` is `failed` */
1997
1997
  failure: string | null;
1998
1998
  /**
@@ -2162,8 +2162,8 @@ export interface components {
2162
2162
  };
2163
2163
  /**
2164
2164
  * @description One purchased public IP resource, including its bandwidth configuration. Bandwidth has no
2165
- * separate Compute resource ID. Billing may split fees internally; read the order for the
2166
- * commercial breakdown. Changing bandwidth updates this same resource, not another allocation.
2165
+ * separate Compute resource ID; one subscription pays for the address and its bandwidth.
2166
+ * Changing bandwidth updates this same resource, not another allocation.
2167
2167
  */
2168
2168
  FloatingIPResource: {
2169
2169
  /** @description The allocated public address. Null until the address is allocated. */
@@ -2177,10 +2177,10 @@ export interface components {
2177
2177
  /** Format: uuid */
2178
2178
  region_id: string;
2179
2179
  /**
2180
- * @description `pending` until the order is accepted, with no address allocated; `provisioning` while the address is allocated; then `available`. `failed` means no address was allocated; `failure_reason` states why.
2180
+ * @description `pending` until the order is accepted, with no address allocated; `provisioning` while the address is allocated; then `available`. `failed` means no address was allocated; `failure_reason` states why. `missing` means the address no longer exists in the cloud.
2181
2181
  * @enum {string}
2182
2182
  */
2183
- status: "pending" | "provisioning" | "available" | "deleted" | "failed" | "error" | "unknown";
2183
+ status: "pending" | "provisioning" | "available" | "deleted" | "failed" | "error" | "unknown" | "missing";
2184
2184
  /** Format: uuid */
2185
2185
  order_id: string | null;
2186
2186
  /**
@@ -2194,7 +2194,7 @@ export interface components {
2194
2194
  * presence does not imply delivery or metering. Null when no subscription is associated.
2195
2195
  */
2196
2196
  subscription_id: string | null;
2197
- /** @description The complete subscription set a cancellation through Billing has to cover to release this floating IP, including any internal fee components. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
2197
+ /** @description The subscription a cancellation through Billing has to cover to release this floating IP. A subscription that has ended is not listed, and the list is empty when no subscription pays for the floating IP. */
2198
2198
  release_subscription_ids: string[];
2199
2199
  /** @description The subscriptions of `release_subscription_ids`, in the same order, each with the resource it pays for, so that each line of a cancellation can name what it releases. */
2200
2200
  release_set: components["schemas"]["ReleaseSetItem"][];
@@ -2300,16 +2300,14 @@ export interface components {
2300
2300
  /** Format: uuid */
2301
2301
  region_id: string;
2302
2302
  /**
2303
- * @description `pending` until the order is accepted: no virtual machine exists and addresses are null. `provisioning` while the instance is created, then `active`. `failed` means the instance was not created; `failure_reason` states why. The other values are the state last observed in the cloud; an operation in progress appears in `operation`, not here.
2303
+ * @description `pending` until the order is accepted: no virtual machine exists and addresses are null. `provisioning` while the instance is created, then `active`. `failed` means the instance was not created; `failure_reason` states why. `missing` means the virtual machine no longer exists in the cloud. The other values are the state last observed in the cloud; an operation in progress appears in `operation`, not here.
2304
2304
  * @enum {string}
2305
2305
  */
2306
- status: "pending" | "provisioning" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "deleted" | "failed" | "error" | "unknown";
2306
+ status: "pending" | "provisioning" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "deleted" | "failed" | "error" | "unknown" | "missing";
2307
2307
  /** Format: uuid */
2308
2308
  subnet_id: string | null;
2309
2309
  /** Format: date-time */
2310
2310
  updated_at: string;
2311
- /** @enum {string} */
2312
- power_state: "no_state" | "running" | "paused" | "shutdown" | "crashed" | "suspended" | "unknown";
2313
2311
  /** Format: int64 */
2314
2312
  generation: number;
2315
2313
  /** Format: date-time */
@@ -2515,8 +2513,11 @@ export interface components {
2515
2513
  public_ips: string[] | null;
2516
2514
  addresses?: components["schemas"]["PortAddress"][];
2517
2515
  attachment?: components["schemas"]["PortAttachment"] | null;
2518
- /** @enum {string} */
2519
- status: "pending" | "available" | "error" | "unknown";
2516
+ /**
2517
+ * @description `missing` means the interface no longer exists in the cloud.
2518
+ * @enum {string}
2519
+ */
2520
+ status: "pending" | "available" | "error" | "unknown" | "missing";
2520
2521
  /** Format: int64 */
2521
2522
  generation: number;
2522
2523
  /** Format: date-time */
@@ -2608,10 +2609,10 @@ export interface components {
2608
2609
  /** Format: uuid */
2609
2610
  region_id: string;
2610
2611
  /**
2611
- * @description Only `available` accepts new instances, interfaces and floating IPs
2612
+ * @description Only `available` accepts new instances, interfaces and floating IPs. `missing` means the network no longer exists in the cloud.
2612
2613
  * @enum {string}
2613
2614
  */
2614
- status: "pending" | "available" | "error" | "unknown";
2615
+ status: "pending" | "available" | "error" | "unknown" | "missing";
2615
2616
  /** Format: date-time */
2616
2617
  updated_at: string;
2617
2618
  /** @description The operation in progress on this private network, or null when none is. */
@@ -2808,6 +2809,10 @@ export interface components {
2808
2809
  * until a replacement quota is activated. Null when no purchase has been recorded.
2809
2810
  */
2810
2811
  subscription_id: string | null;
2812
+ /** @description The billing choice of the associated quota purchase, as given when it was bought. A change of an existing purchase has to give the same choice. Null when no purchase has been recorded. */
2813
+ billing: components["schemas"]["BillingChoice"] | null;
2814
+ /** @description The subscription a cancellation through Billing has to cover to release this snapshot quota. A subscription that has ended is not listed, and the list is empty when no subscription pays for the quota. */
2815
+ release_subscription_ids: string[];
2811
2816
  /**
2812
2817
  * Format: int64
2813
2818
  * @description Target count awaiting checkout or activation; null when no purchase is pending.
@@ -2867,10 +2872,10 @@ export interface components {
2867
2872
  */
2868
2873
  size_gb: number;
2869
2874
  /**
2870
- * @description `pending` once a quota slot is reserved, `provisioning` while the snapshot is taken, then `available`. `failed` means the snapshot was not created; its slot is released once no snapshot data remains.
2875
+ * @description `pending` once a quota slot is reserved, `provisioning` while the snapshot is taken, then `available`. `failed` means the snapshot was not created; its slot is released once no snapshot data remains. `missing` means the snapshot no longer exists in the cloud.
2871
2876
  * @enum {string}
2872
2877
  */
2873
- status: "pending" | "provisioning" | "available" | "deleted" | "failed" | "error";
2878
+ status: "pending" | "provisioning" | "available" | "deleted" | "failed" | "error" | "missing";
2874
2879
  /** @description The operation in progress on this snapshot, or null when none is. */
2875
2880
  readonly operation: components["schemas"]["SnapshotOperation"] | null;
2876
2881
  /** Format: int64 */
@@ -2969,6 +2974,8 @@ export interface components {
2969
2974
  * @description The Billing subscription that backup usage is billed under; null before an activation is requested.
2970
2975
  */
2971
2976
  subscription_id: string | null;
2977
+ /** @description The subscription a cancellation through Billing has to cover to release this backup service. A subscription that has ended is not listed, and the list is empty when no subscription pays for the service. */
2978
+ release_subscription_ids: string[];
2972
2979
  /**
2973
2980
  * Format: int64
2974
2981
  * @description The total `capacity_gib` of the backups retained in this region.
@@ -3016,11 +3023,8 @@ export interface components {
3016
3023
  * @description The pack's Billing subscription, through which it is renewed or canceled.
3017
3024
  */
3018
3025
  subscription_id: string | null;
3019
- /**
3020
- * Format: date-time
3021
- * @description The end of the current paid term; null until the pack is active.
3022
- */
3023
- paid_until: string | null;
3026
+ /** @description The subscription a cancellation through Billing has to cover to release this capacity pack. A subscription that has ended is not listed, and the list is empty when no subscription pays for the pack. */
3027
+ release_subscription_ids: string[];
3024
3028
  /** Format: date-time */
3025
3029
  created_at: string;
3026
3030
  };
@@ -3418,7 +3422,7 @@ export interface components {
3418
3422
  name: string;
3419
3423
  /** @description How an address from this pool can be bought, per address. Null when the project has no billing account. */
3420
3424
  readonly pricing: components["schemas"]["Pricing"] | null;
3421
- /** @description How the bandwidth of an address from this pool is billed, per Mbit/s, with the same billing choice as the address. Null when the project has no billing account. */
3425
+ /** @description How the bandwidth of an address from this pool is billed, per Mbit/s. It is bought in the same purchase as the address, with the same billing choice. Null when the project has no billing account. */
3422
3426
  readonly bandwidth_pricing: components["schemas"]["Pricing"] | null;
3423
3427
  };
3424
3428
  IPv4PoolListResponseBody: {
@@ -3443,7 +3447,7 @@ export interface components {
3443
3447
  /** Format: date-time */
3444
3448
  released_at: string | null;
3445
3449
  };
3446
- /** @description One subscription of a release set and the resource it pays for. Multiple internal billing components may refer to the same floating IP; they do not create independent bandwidth resources. */
3450
+ /** @description One subscription of a release set and the resource it pays for. */
3447
3451
  ReleaseSetItem: {
3448
3452
  /** Format: uuid */
3449
3453
  subscription_id: string;
package/dist/routes.d.ts CHANGED
@@ -1134,6 +1134,14 @@ export declare const routes: readonly [{
1134
1134
  readonly operationId: "get-request";
1135
1135
  readonly securityScheme: "ScopedToken";
1136
1136
  readonly upstreamUrl: "https://canopy.leaflow.cloud";
1137
+ }, {
1138
+ readonly service: "canopy";
1139
+ readonly contract: "canopy";
1140
+ readonly method: "GET";
1141
+ readonly path: "/api/v1/service";
1142
+ readonly operationId: "get-service";
1143
+ readonly securityScheme: "ScopedToken";
1144
+ readonly upstreamUrl: "https://canopy.leaflow.cloud";
1137
1145
  }, {
1138
1146
  readonly service: "canopy";
1139
1147
  readonly contract: "canopy";
@@ -1206,6 +1214,22 @@ export declare const routes: readonly [{
1206
1214
  readonly operationId: "revoke-api-key";
1207
1215
  readonly securityScheme: "ScopedToken";
1208
1216
  readonly upstreamUrl: "https://canopy.leaflow.cloud";
1217
+ }, {
1218
+ readonly service: "canopy";
1219
+ readonly contract: "canopy";
1220
+ readonly method: "POST";
1221
+ readonly path: "/api/v1/service";
1222
+ readonly operationId: "create-service";
1223
+ readonly securityScheme: "ScopedToken";
1224
+ readonly upstreamUrl: "https://canopy.leaflow.cloud";
1225
+ }, {
1226
+ readonly service: "canopy";
1227
+ readonly contract: "canopy";
1228
+ readonly method: "POST";
1229
+ readonly path: "/api/v1/service/quote";
1230
+ readonly operationId: "create-service-quote";
1231
+ readonly securityScheme: "ScopedToken";
1232
+ readonly upstreamUrl: "https://canopy.leaflow.cloud";
1209
1233
  }, {
1210
1234
  readonly service: "compute";
1211
1235
  readonly contract: "compute";
package/dist/routes.js CHANGED
@@ -1278,6 +1278,15 @@ export const routes = [
1278
1278
  securityScheme: "ScopedToken",
1279
1279
  upstreamUrl: "https://canopy.leaflow.cloud",
1280
1280
  },
1281
+ {
1282
+ service: "canopy",
1283
+ contract: "canopy",
1284
+ method: "GET",
1285
+ path: "/api/v1/service",
1286
+ operationId: "get-service",
1287
+ securityScheme: "ScopedToken",
1288
+ upstreamUrl: "https://canopy.leaflow.cloud",
1289
+ },
1281
1290
  {
1282
1291
  service: "canopy",
1283
1292
  contract: "canopy",
@@ -1359,6 +1368,24 @@ export const routes = [
1359
1368
  securityScheme: "ScopedToken",
1360
1369
  upstreamUrl: "https://canopy.leaflow.cloud",
1361
1370
  },
1371
+ {
1372
+ service: "canopy",
1373
+ contract: "canopy",
1374
+ method: "POST",
1375
+ path: "/api/v1/service",
1376
+ operationId: "create-service",
1377
+ securityScheme: "ScopedToken",
1378
+ upstreamUrl: "https://canopy.leaflow.cloud",
1379
+ },
1380
+ {
1381
+ service: "canopy",
1382
+ contract: "canopy",
1383
+ method: "POST",
1384
+ path: "/api/v1/service/quote",
1385
+ operationId: "create-service-quote",
1386
+ securityScheme: "ScopedToken",
1387
+ upstreamUrl: "https://canopy.leaflow.cloud",
1388
+ },
1362
1389
  {
1363
1390
  service: "compute",
1364
1391
  contract: "compute",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.103.0",
3
+ "version": "0.105.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {