@leaflow/sdk 0.45.0 → 0.46.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.
@@ -32,6 +32,10 @@ export type SubmitIdentityVerificationBody = NonNullable<operations["submit-iden
32
32
  export type ListMyInvitationsResult = operations["list-my-invitations"]["responses"][200]["content"]["application/json"];
33
33
  /** `GET /account/v1/me/invitations` 的查询参数。 */
34
34
  export type ListMyInvitationsQuery = operations["list-my-invitations"]["parameters"]["query"];
35
+ /** `GET /account/v1/invitations/by-token` 成功时的响应体。 */
36
+ export type PreviewInvitationByTokenResult = operations["preview-invitation-by-token"]["responses"][200]["content"]["application/json"];
37
+ /** `GET /account/v1/invitations/by-token` 的查询参数。 */
38
+ export type PreviewInvitationByTokenQuery = operations["preview-invitation-by-token"]["parameters"]["query"];
35
39
  /** `POST /account/v1/me/invitations/accept` 成功时的响应体。 */
36
40
  export type AcceptInvitationByTokenResult = operations["accept-invitation-by-token"]["responses"][200]["content"]["application/json"];
37
41
  /** `POST /account/v1/me/invitations/accept` 的请求体。 */
@@ -187,6 +187,30 @@ export interface paths {
187
187
  patch?: never;
188
188
  trace?: never;
189
189
  };
190
+ "/account/v1/invitations/by-token": {
191
+ parameters: {
192
+ query?: never;
193
+ header?: never;
194
+ path?: never;
195
+ cookie?: never;
196
+ };
197
+ /**
198
+ * 看一眼这封邀请是谁发的、加入哪儿、什么角色
199
+ * @description 免认证,而且是有意的:点邮件里那条链接的人多半还没登录,甚至还没有账号。要他先注册再 告诉他这是谁发来的、加入哪个项目,等于让他在不知道要加入什么的情况下决定要不要注册。
200
+ * 它不多泄露任何东西。 这三样——项目名、邀请人、角色——邮件正文里已经写着了,而读得到 这个令牌的人就是收得到那封邮件的人。同一个令牌本来就能把持有者加进项目(见 `accept-invitation-by-token`),读一个项目名比那件事轻得多。
201
+ * 收件地址打了码(`t***@example.com`)。 不打码的话,这个接口就成了「拿一个令牌反查它 当初寄给了哪个地址」——而那是邮件正文里没有、持有者也未必知道的一件事。
202
+ * 令牌不存在、已经用过、被撤回、过期,四种情况同一个 404 和同一句话。分开报会把它变成 一个可以拿来试令牌的探针,而这个接口免认证,任何人都试得起。
203
+ * 它不在 `/me` 下面,隔壁那两条接受要约的在。 `/me` 的意思是「按这次请求的身份认出来 的、属于我的那些」,而这条路上没有身份——持有令牌的人未必是收件人本人。挂在 `/me` 下面会让读的人以为它认过身份,而那正是这条路唯一不做的事。
204
+ */
205
+ get: operations["preview-invitation-by-token"];
206
+ put?: never;
207
+ post?: never;
208
+ delete?: never;
209
+ options?: never;
210
+ head?: never;
211
+ patch?: never;
212
+ trace?: never;
213
+ };
190
214
  "/account/v1/me/invitations/accept": {
191
215
  parameters: {
192
216
  query?: never;
@@ -424,6 +448,21 @@ export interface components {
424
448
  /** @description 真实姓名。敏感个人信息,加密入库,任何接口都不会再把它读出来 */
425
449
  real_name: string;
426
450
  };
451
+ /**
452
+ * @description 一封邀请在被接受之前能给出的全部信息。
453
+ * 它比 InvitationResource 少两样:要约 id 和完整的收件地址。id 不给是因为持有令牌不等于 这封要约列在你名下——真正列在你名下的那些走 list-my-invitations,那条是认过身份的。
454
+ */
455
+ InvitationPreviewResource: {
456
+ /** @description 打过码的收件地址,只够收件人认出「这是发给我的」 */
457
+ email_masked: string;
458
+ /** Format: date-time */
459
+ expires_at: string;
460
+ /** @description 邀请人的显示名,姓名都空时是他的邮箱 */
461
+ invited_by_name: string;
462
+ project_name: string;
463
+ /** @description 接受之后会拿到的角色,显示名 */
464
+ role_names: string[] | null;
465
+ };
427
466
  InvitationResource: {
428
467
  /** Format: date-time */
429
468
  created_at: string;
@@ -432,11 +471,21 @@ export interface components {
432
471
  expires_at: string;
433
472
  /** Format: uuid */
434
473
  id: string;
474
+ /** @description 发出这份要约的账号 id */
435
475
  invited_by: string;
476
+ /** @description 发出这份要约的人的显示名,姓名都空时是他的邮箱。它是读取那一刻的事实,不是发信时的快照 */
477
+ invited_by_name: string;
436
478
  /** Format: uuid */
437
479
  project_id: string;
480
+ /**
481
+ * @description 目标项目的名字。
482
+ * 它在这里,而这一度是刻意不给的——理由是「没接受就不是成员,而名字只有成员能读」。 那条克制在这个场景下站不住:邀请邮件正文里就写着项目名,收件人早就知道了,而一个 只显示 uuid 的邀请列表让人没法判断该不该接受。
483
+ */
484
+ project_name: string;
438
485
  /** @description 兑现时会授予的角色编码 */
439
486
  roles: string[] | null;
487
+ /** @description 上面那些编码的显示名,按同样的顺序。读者看的是「管理员」,不是 ADMIN */
488
+ role_names: string[] | null;
440
489
  };
441
490
  LengthAwarePageInvitationResource: {
442
491
  /** @description 这一页的内容 */
@@ -907,6 +956,38 @@ export interface operations {
907
956
  };
908
957
  };
909
958
  };
959
+ "preview-invitation-by-token": {
960
+ parameters: {
961
+ query: {
962
+ /** @description 邀请链接里那串令牌 */
963
+ token: string;
964
+ };
965
+ header?: never;
966
+ path?: never;
967
+ cookie?: never;
968
+ };
969
+ requestBody?: never;
970
+ responses: {
971
+ /** @description OK */
972
+ 200: {
973
+ headers: {
974
+ [name: string]: unknown;
975
+ };
976
+ content: {
977
+ "application/json": components["schemas"]["InvitationPreviewResource"];
978
+ };
979
+ };
980
+ /** @description Error */
981
+ default: {
982
+ headers: {
983
+ [name: string]: unknown;
984
+ };
985
+ content: {
986
+ "application/json": components["schemas"]["Error"];
987
+ };
988
+ };
989
+ };
990
+ };
910
991
  "accept-invitation-by-token": {
911
992
  parameters: {
912
993
  query?: never;
@@ -62,3 +62,13 @@ export type ListOffersResult = operations["list-offers"]["responses"][200]["cont
62
62
  export type PurchaseOfferResult = operations["purchase-offer"]["responses"][200]["content"]["application/json"];
63
63
  /** `POST /account/v1/billing-accounts/{accountKey}/offers/{offerKey}/purchase` 的查询参数。 */
64
64
  export type PurchaseOfferQuery = operations["purchase-offer"]["parameters"]["query"];
65
+ /** `GET /account/v1/billing-accounts/{accountKey}/prepaid-assets` 成功时的响应体。 */
66
+ export type ListPrepaidAssetsResult = operations["list-prepaid-assets"]["responses"][200]["content"]["application/json"];
67
+ /** `GET /account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renewal-quote` 成功时的响应体。 */
68
+ export type QuoteRenewalResult = operations["quote-renewal"]["responses"][200]["content"]["application/json"];
69
+ /** `GET /account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renewal-quote` 的查询参数。 */
70
+ export type QuoteRenewalQuery = operations["quote-renewal"]["parameters"]["query"];
71
+ /** `POST /account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renew` 成功时的响应体。 */
72
+ export type RenewPrepaidAssetResult = operations["renew-prepaid-asset"]["responses"][200]["content"]["application/json"];
73
+ /** `POST /account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renew` 的请求体。 */
74
+ export type RenewPrepaidAssetBody = NonNullable<operations["renew-prepaid-asset"]["requestBody"]>["content"]["application/json"];
@@ -675,6 +675,126 @@ export interface paths {
675
675
  patch?: never;
676
676
  trace?: never;
677
677
  };
678
+ "/account/v1/billing-accounts/{accountKey}/prepaid-assets": {
679
+ parameters: {
680
+ query?: never;
681
+ header?: never;
682
+ path?: never;
683
+ cookie?: never;
684
+ };
685
+ /**
686
+ * What I bought outright, and when it runs out
687
+ * @description Everything this account paid a term for, across every product, soonest to expire first.
688
+ *
689
+ * ## Why this is one list rather than a page inside each product
690
+ *
691
+ * Renewal is the one thing a customer forgets, and forgetting it stops the machine. Splitting
692
+ * the list per product means the instance about to lapse tomorrow is only visible to someone
693
+ * who thought to go and look at instances. Sorting by expiry rather than by purchase date is
694
+ * the same reason: the row that matters is the one at the top.
695
+ *
696
+ * ## Metered resources are not here
697
+ *
698
+ * There is no term to run out. Listing them with an empty expiry would invite renewing
699
+ * something that is already billed by the hour until it is deleted.
700
+ *
701
+ * ## `state` and `desired_state` are both reported
702
+ *
703
+ * A machine stopped because its term lapsed reads `suspended` for both. One that has just been
704
+ * renewed reads `suspended` and `active` — it is on its way back. Without the second field
705
+ * those look identical, and a customer who just paid concludes it did not work and pays again.
706
+ */
707
+ get: operations["list-prepaid-assets"];
708
+ put?: never;
709
+ post?: never;
710
+ delete?: never;
711
+ options?: never;
712
+ head?: never;
713
+ patch?: never;
714
+ trace?: never;
715
+ };
716
+ "/account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renewal-quote": {
717
+ parameters: {
718
+ query?: never;
719
+ header?: never;
720
+ path?: never;
721
+ cookie?: never;
722
+ };
723
+ /**
724
+ * What renewing this would cost
725
+ * @description Priced the same way the charge is, from the same table, so the number shown is the number
726
+ * taken. Quoting separately from charging is what lets a customer see the price before
727
+ * committing; computing it twice in two places is what makes the two disagree, and a bill that
728
+ * disagrees with the page that sold it is a complaint rather than a bug report.
729
+ *
730
+ * ## Both the current and the resulting expiry are returned
731
+ *
732
+ * Renewing early adds the term to what is left, not to today — otherwise renewing a month
733
+ * ahead throws that month away, and everyone learns to wait until the last moment. Something
734
+ * that lapsed long ago is counted from now instead, because adding to a date in the past
735
+ * produces an expiry that is still in the past.
736
+ *
737
+ * Reporting only the new date leaves the customer unable to tell which of those happened.
738
+ *
739
+ * ## A withdrawn price still quotes
740
+ *
741
+ * Taking a product off sale means stop selling new ones. Refusing renewals as well would stop
742
+ * a batch of existing machines on their expiry date, which is not what the operator pressed
743
+ * that button for.
744
+ */
745
+ get: operations["quote-renewal"];
746
+ put?: never;
747
+ post?: never;
748
+ delete?: never;
749
+ options?: never;
750
+ head?: never;
751
+ patch?: never;
752
+ trace?: never;
753
+ };
754
+ "/account/v1/billing-accounts/{accountKey}/prepaid-assets/{provisionId}/renew": {
755
+ parameters: {
756
+ query?: never;
757
+ header?: never;
758
+ path?: never;
759
+ cookie?: never;
760
+ };
761
+ get?: never;
762
+ put?: never;
763
+ /**
764
+ * Renew it
765
+ * @description Takes the money from the balance and pushes the expiry out. The resource itself is not
766
+ * touched — nothing is rebuilt, nothing restarts, the id stays the same.
767
+ *
768
+ * ## An idempotency key is required, not optional
769
+ *
770
+ * Renewal is a pure charge. Unlike creating something, there is no resource whose uniqueness
771
+ * catches a repeat, so a double click is two charges and twice the term — and both calls
772
+ * return success. Letting the field be omitted would mean losing that protection silently, in
773
+ * the one case that looks completely normal until the books are reconciled.
774
+ *
775
+ * Sending the same key again returns the order that was already placed. It does not charge
776
+ * again, and it is not an error: reporting a repeat as a failure makes the caller retry
777
+ * forever, and makes the customer press the button a second time with a fresh key.
778
+ *
779
+ * ## What happens if the balance is short
780
+ *
781
+ * The order is recorded as failed and nothing else changes: no money moves, the expiry stays
782
+ * where it was, and the resource keeps running until its existing term ends. Retrying with the
783
+ * same key after topping up goes through.
784
+ *
785
+ * ## Renewing something that already lapsed brings it back
786
+ *
787
+ * Its term is counted from now, and it is asked to start again. Coming back is the
788
+ * reconciliation loop's job, so it is not instant — which is what `desired_state` on the asset
789
+ * list is for.
790
+ */
791
+ post: operations["renew-prepaid-asset"];
792
+ delete?: never;
793
+ options?: never;
794
+ head?: never;
795
+ patch?: never;
796
+ trace?: never;
797
+ };
678
798
  }
679
799
  export type webhooks = Record<string, never>;
680
800
  export interface components {
@@ -873,6 +993,19 @@ export interface components {
873
993
  */
874
994
  state: "pending" | "fulfilled" | "failed";
875
995
  failure_reason?: string;
996
+ /**
997
+ * @description What was taken, as a decimal string. Absent on a metered order, where the amount is not
998
+ * known when the order is placed: it comes from usage afterwards. Absent must be read as
999
+ * "billed by usage" — writing zero would make a metered order and a genuinely free one
1000
+ * look the same.
1001
+ */
1002
+ amount?: string;
1003
+ currency?: string;
1004
+ /**
1005
+ * @description Always `none` on a metered order.
1006
+ * @enum {string}
1007
+ */
1008
+ payment_state?: "none" | "paid" | "refunded";
876
1009
  /** Format: date-time */
877
1010
  created_at: string;
878
1011
  /** @description Only present on the single-order route. */
@@ -889,6 +1022,74 @@ export interface components {
889
1022
  /** Format: int64 */
890
1023
  quantity: number;
891
1024
  };
1025
+ PrepaidAsset: {
1026
+ /** @description Use this to quote and to renew. */
1027
+ id: string;
1028
+ project_id: string;
1029
+ /** @description Which service holds it. Also which console it is managed from. */
1030
+ service: string;
1031
+ /**
1032
+ * @description That service's own catalogue id, not a billing sku. The price of a machine is made of
1033
+ * finer parts than the machine type — the type does not appear in the rate card at all.
1034
+ */
1035
+ product_id: string;
1036
+ /** @description The id that service knows it by, so the two consoles can be lined up. */
1037
+ resource_id?: string;
1038
+ /**
1039
+ * Format: int64
1040
+ * @description GiB for a disk, 1 for a machine or an address.
1041
+ */
1042
+ quantity: number;
1043
+ /**
1044
+ * Format: date-time
1045
+ * @description Paid up to this instant. It stops being served after it, not before.
1046
+ */
1047
+ term_end: string;
1048
+ /** @enum {string} */
1049
+ state: "pending" | "active" | "suspended" | "terminated";
1050
+ /**
1051
+ * @description What it is being moved to. Differs from `state` while a change is still being applied —
1052
+ * in particular right after a renewal, which is the moment a customer is most likely to
1053
+ * conclude that nothing happened.
1054
+ * @enum {string}
1055
+ */
1056
+ desired_state: "active" | "suspended" | "terminated";
1057
+ };
1058
+ PrepaidAssetList: {
1059
+ assets: components["schemas"]["PrepaidAsset"][];
1060
+ };
1061
+ RenewalQuote: {
1062
+ provision_id: string;
1063
+ term: string;
1064
+ /**
1065
+ * @description A decimal string, not a float. Money that survives a round trip through binary floating
1066
+ * point is money that stops adding up.
1067
+ */
1068
+ amount: string;
1069
+ currency: string;
1070
+ /**
1071
+ * Format: date-time
1072
+ * @description What it is paid up to now.
1073
+ */
1074
+ current_term_end: string;
1075
+ /**
1076
+ * Format: date-time
1077
+ * @description What it would be paid up to after renewing.
1078
+ */
1079
+ term_end: string;
1080
+ };
1081
+ RenewRequestBody: {
1082
+ /**
1083
+ * @description How long to renew for, as an ISO 8601 duration (P1M, P1Y). It does not have to match the
1084
+ * term originally bought.
1085
+ */
1086
+ term: string;
1087
+ /**
1088
+ * @description Generate one per renewal the customer starts — when the dialog opens, not when it is
1089
+ * submitted — and send the same one on every retry of that renewal.
1090
+ */
1091
+ idempotency_key: string;
1092
+ };
892
1093
  OrderList: {
893
1094
  orders: components["schemas"]["Order"][];
894
1095
  };
@@ -1215,6 +1416,8 @@ export interface components {
1215
1416
  };
1216
1417
  responses: never;
1217
1418
  parameters: {
1419
+ /** @description Which asset, from the prepaid list */
1420
+ ProvisionId: string;
1218
1421
  /**
1219
1422
  * @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
1220
1423
  * which is why the key is what addresses the account.
@@ -2120,4 +2323,123 @@ export interface operations {
2120
2323
  };
2121
2324
  };
2122
2325
  };
2326
+ "list-prepaid-assets": {
2327
+ parameters: {
2328
+ query?: never;
2329
+ header?: never;
2330
+ path: {
2331
+ /**
2332
+ * @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
2333
+ * which is why the key is what addresses the account.
2334
+ */
2335
+ accountKey: components["parameters"]["AccountKey"];
2336
+ };
2337
+ cookie?: never;
2338
+ };
2339
+ requestBody?: never;
2340
+ responses: {
2341
+ /** @description OK */
2342
+ 200: {
2343
+ headers: {
2344
+ [name: string]: unknown;
2345
+ };
2346
+ content: {
2347
+ "application/json": components["schemas"]["PrepaidAssetList"];
2348
+ };
2349
+ };
2350
+ /** @description Error */
2351
+ default: {
2352
+ headers: {
2353
+ [name: string]: unknown;
2354
+ };
2355
+ content: {
2356
+ "application/json": components["schemas"]["Error"];
2357
+ };
2358
+ };
2359
+ };
2360
+ };
2361
+ "quote-renewal": {
2362
+ parameters: {
2363
+ query: {
2364
+ /**
2365
+ * @description How long to renew for, as an ISO 8601 duration (P1M, P1Y). A duration rather than a
2366
+ * number of months: months are not the same length.
2367
+ */
2368
+ term: string;
2369
+ };
2370
+ header?: never;
2371
+ path: {
2372
+ /**
2373
+ * @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
2374
+ * which is why the key is what addresses the account.
2375
+ */
2376
+ accountKey: components["parameters"]["AccountKey"];
2377
+ /** @description Which asset, from the prepaid list */
2378
+ provisionId: components["parameters"]["ProvisionId"];
2379
+ };
2380
+ cookie?: never;
2381
+ };
2382
+ requestBody?: never;
2383
+ responses: {
2384
+ /** @description OK */
2385
+ 200: {
2386
+ headers: {
2387
+ [name: string]: unknown;
2388
+ };
2389
+ content: {
2390
+ "application/json": components["schemas"]["RenewalQuote"];
2391
+ };
2392
+ };
2393
+ /** @description Error */
2394
+ default: {
2395
+ headers: {
2396
+ [name: string]: unknown;
2397
+ };
2398
+ content: {
2399
+ "application/json": components["schemas"]["Error"];
2400
+ };
2401
+ };
2402
+ };
2403
+ };
2404
+ "renew-prepaid-asset": {
2405
+ parameters: {
2406
+ query?: never;
2407
+ header?: never;
2408
+ path: {
2409
+ /**
2410
+ * @description The account's key, of the form `u_<user_id>_<seq>`. Ownership is stated by the key itself,
2411
+ * which is why the key is what addresses the account.
2412
+ */
2413
+ accountKey: components["parameters"]["AccountKey"];
2414
+ /** @description Which asset, from the prepaid list */
2415
+ provisionId: components["parameters"]["ProvisionId"];
2416
+ };
2417
+ cookie?: never;
2418
+ };
2419
+ requestBody: {
2420
+ content: {
2421
+ "application/json": components["schemas"]["RenewRequestBody"];
2422
+ };
2423
+ };
2424
+ responses: {
2425
+ /** @description OK */
2426
+ 200: {
2427
+ headers: {
2428
+ [name: string]: unknown;
2429
+ };
2430
+ content: {
2431
+ "application/json": components["schemas"]["Order"];
2432
+ };
2433
+ };
2434
+ /** @description Error */
2435
+ default: {
2436
+ headers: {
2437
+ [name: string]: unknown;
2438
+ };
2439
+ content: {
2440
+ "application/json": components["schemas"]["Error"];
2441
+ };
2442
+ };
2443
+ };
2444
+ };
2123
2445
  }
@@ -1381,6 +1381,19 @@ export interface components {
1381
1381
  ImageListResponseBody: {
1382
1382
  items: components["schemas"]["ImageResource"][] | null;
1383
1383
  };
1384
+ PrepaidPrice: {
1385
+ /**
1386
+ * @description An ISO 8601 duration (P1M, P1Y). A duration rather than a number of months: months are not
1387
+ * the same length, and storing a number leaves whoever reads it to decide what it means.
1388
+ */
1389
+ term: string;
1390
+ /**
1391
+ * @description A decimal string, not a float. Money that survives a round trip through binary floating
1392
+ * point is money that stops adding up.
1393
+ */
1394
+ amount: string;
1395
+ currency: string;
1396
+ };
1384
1397
  InstanceTypeResource: {
1385
1398
  /** @description Availability zone of this instance type. A disk must be in the same zone to be attached */
1386
1399
  availability_zone_code: string;
@@ -1398,6 +1411,39 @@ export interface components {
1398
1411
  region_code: string;
1399
1412
  /** Format: int64 */
1400
1413
  vcpus: number;
1414
+ /**
1415
+ * @description Whether this type can be ordered right now.
1416
+ *
1417
+ * It reflects a limit set by operations, not what the cloud can physically schedule — raising
1418
+ * the limit does not create capacity that is not there, and a type that is not sold out can
1419
+ * still fail to start if the zone is full.
1420
+ *
1421
+ * It is advisory: it is read when the list is built, and the last one can be taken between
1422
+ * that read and the order. The order is what actually refuses.
1423
+ */
1424
+ sold_out: boolean;
1425
+ /**
1426
+ * Format: int64
1427
+ * @description How many more may be created. Absent when this type is not limited at all.
1428
+ *
1429
+ * Absent is not zero and not "unknown": a type with no limit simply has no number to show.
1430
+ * Reporting it as a number would need a sentinel, and any sentinel eventually gets compared
1431
+ * against a real count.
1432
+ */
1433
+ remaining?: number;
1434
+ /**
1435
+ * @description What buying this type outright costs, per term. Empty means this type is only sold by the
1436
+ * hour.
1437
+ *
1438
+ * The hourly price is not here and is not missing: it is made of finer parts than the type
1439
+ * (cores and memory are priced separately, and the type itself does not appear in the rate
1440
+ * card at all), so there is no single number to show. A term price is one number because a
1441
+ * term is one purchase.
1442
+ *
1443
+ * Advisory, like `sold_out`: it is read when the list is built. The order is what fixes the
1444
+ * price, and it refuses rather than falling back to hourly if the term is not sold.
1445
+ */
1446
+ prepaid_prices?: components["schemas"]["PrepaidPrice"][];
1401
1447
  };
1402
1448
  InstanceTypeListResponseBody: {
1403
1449
  items: components["schemas"]["InstanceTypeResource"][] | null;
@@ -1596,6 +1642,24 @@ export interface components {
1596
1642
  * @description A private image. Exactly one of this, `image_id` and `boot_disk_id`
1597
1643
  */
1598
1644
  private_image_id?: string;
1645
+ /**
1646
+ * @description Buy the instance outright for this long, as an ISO 8601 duration (P1M, P1Y). Billed by the
1647
+ * hour when omitted.
1648
+ *
1649
+ * The money is taken from the balance when the order is placed, at the price the catalogue
1650
+ * reported for this type and term. If that term is not on sale for this type the request is
1651
+ * refused — it is never quietly sold by the hour instead, because the customer who asked for
1652
+ * a year would find out only from the bill.
1653
+ *
1654
+ * The system disk is bought for the same term: it is the same purchase, and one order cannot
1655
+ * be half outright and half hourly. A term is therefore refused together with `boot_disk_id`,
1656
+ * where the disk already exists and is already billed its own way.
1657
+ *
1658
+ * When the term runs out the instance is stopped, not deleted, and starts again once it is
1659
+ * renewed. Renewal lives in the billing console, across every product, because what a
1660
+ * customer needs to see is everything expiring this month rather than one product at a time.
1661
+ */
1662
+ term?: string;
1599
1663
  /**
1600
1664
  * Format: int64
1601
1665
  * @description System disk capacity in GB. Chosen automatically from the requirement of the image and the platform minimum when omitted. Ignored with `boot_disk_id`, since that disk already has its capacity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {