@leaflow/sdk 0.115.0 → 0.116.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.
@@ -676,19 +676,17 @@ export interface PriceOption {
676
676
  active: boolean;
677
677
  }
678
678
  /**
679
- * Which purchase this applies to. `upgrade` and `downgrade` are told apart by money: a change
680
- * that costs more for the remainder of the period is an upgrade, one that returns money
681
- * is a downgrade. A change that costs neither more nor less is neither.
682
- *
683
- * `purchase` means a new purchase as opposed to a renewal or a change. It does not mean the
684
- * account's first purchase.
679
+ * Which purchase operation this applies to. `new` covers every new purchase, including
680
+ * zero-charge purchases. It does not mean the account's first purchase; use
681
+ * `first_purchase_only` for that restriction. `renew` covers renewals. `change` covers
682
+ * configuration or billing-term changes, including changes that increase or decrease
683
+ * the amount due and changes with no additional charge or refund.
685
684
  */
686
685
  export type PurchaseOperation = (typeof PurchaseOperation)[keyof typeof PurchaseOperation];
687
686
  export declare const PurchaseOperation: {
688
- readonly purchase: "purchase";
687
+ readonly new: "new";
689
688
  readonly renew: "renew";
690
- readonly upgrade: "upgrade";
691
- readonly downgrade: "downgrade";
689
+ readonly change: "change";
692
690
  };
693
691
  /**
694
692
  * Anything not excluded that matches an inclusion, or anything not excluded when no inclusion is
@@ -85,10 +85,9 @@ export const PriceOptionInterval = {
85
85
  year: "year",
86
86
  };
87
87
  export const PurchaseOperation = {
88
- purchase: "purchase",
88
+ new: "new",
89
89
  renew: "renew",
90
- upgrade: "upgrade",
91
- downgrade: "downgrade",
90
+ change: "change",
92
91
  };
93
92
  export const TopUpStatus = {
94
93
  pending: "pending",
@@ -61,10 +61,9 @@ export declare const AccountBalance: zod.ZodObject<{
61
61
  }, zod.z.core.$strict>>>;
62
62
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
63
63
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
64
- purchase: "purchase";
64
+ new: "new";
65
65
  renew: "renew";
66
- upgrade: "upgrade";
67
- downgrade: "downgrade";
66
+ change: "change";
68
67
  }>>>;
69
68
  min_term_months: zod.ZodOptional<zod.ZodInt>;
70
69
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -53,10 +53,9 @@ export declare const Applicability: zod.ZodObject<{
53
53
  }, zod.z.core.$strict>>>;
54
54
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
55
55
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
56
- purchase: "purchase";
56
+ new: "new";
57
57
  renew: "renew";
58
- upgrade: "upgrade";
59
- downgrade: "downgrade";
58
+ change: "change";
60
59
  }>>>;
61
60
  min_term_months: zod.ZodOptional<zod.ZodInt>;
62
61
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -61,10 +61,9 @@ export declare const CreditGrant: zod.ZodObject<{
61
61
  }, zod.z.core.$strict>>>;
62
62
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
63
63
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
64
- purchase: "purchase";
64
+ new: "new";
65
65
  renew: "renew";
66
- upgrade: "upgrade";
67
- downgrade: "downgrade";
66
+ change: "change";
68
67
  }>>>;
69
68
  min_term_months: zod.ZodOptional<zod.ZodInt>;
70
69
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -62,10 +62,9 @@ export declare const CreditGrantList: zod.ZodObject<{
62
62
  }, zod.z.core.$strict>>>;
63
63
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
64
64
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
65
- purchase: "purchase";
65
+ new: "new";
66
66
  renew: "renew";
67
- upgrade: "upgrade";
68
- downgrade: "downgrade";
67
+ change: "change";
69
68
  }>>>;
70
69
  min_term_months: zod.ZodOptional<zod.ZodInt>;
71
70
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -54,10 +54,9 @@ export declare const CreditGroup: zod.ZodObject<{
54
54
  }, zod.z.core.$strict>>>;
55
55
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
56
56
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
57
- purchase: "purchase";
57
+ new: "new";
58
58
  renew: "renew";
59
- upgrade: "upgrade";
60
- downgrade: "downgrade";
59
+ change: "change";
61
60
  }>>>;
62
61
  min_term_months: zod.ZodOptional<zod.ZodInt>;
63
62
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -77,10 +77,9 @@ export declare const Discount: zod.ZodObject<{
77
77
  }, zod.z.core.$strict>>>;
78
78
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
79
79
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
80
- purchase: "purchase";
80
+ new: "new";
81
81
  renew: "renew";
82
- upgrade: "upgrade";
83
- downgrade: "downgrade";
82
+ change: "change";
84
83
  }>>>;
85
84
  min_term_months: zod.ZodOptional<zod.ZodInt>;
86
85
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -78,10 +78,9 @@ export declare const DiscountList: zod.ZodObject<{
78
78
  }, zod.z.core.$strict>>>;
79
79
  price_types: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
80
80
  operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
81
- purchase: "purchase";
81
+ new: "new";
82
82
  renew: "renew";
83
- upgrade: "upgrade";
84
- downgrade: "downgrade";
83
+ change: "change";
85
84
  }>>>;
86
85
  min_term_months: zod.ZodOptional<zod.ZodInt>;
87
86
  max_term_months: zod.ZodOptional<zod.ZodInt>;
@@ -60,9 +60,9 @@ export declare const Order: zod.ZodObject<{
60
60
  billing_account_id: zod.ZodOptional<zod.ZodInt>;
61
61
  currency: zod.ZodString;
62
62
  type: zod.ZodEnum<{
63
- purchase: "purchase";
64
63
  renew: "renew";
65
64
  change: "change";
65
+ purchase: "purchase";
66
66
  adopt: "adopt";
67
67
  }>;
68
68
  status: zod.ZodEnum<{
@@ -61,9 +61,9 @@ export declare const OrderList: zod.ZodObject<{
61
61
  billing_account_id: zod.ZodOptional<zod.ZodInt>;
62
62
  currency: zod.ZodString;
63
63
  type: zod.ZodEnum<{
64
- purchase: "purchase";
65
64
  renew: "renew";
66
65
  change: "change";
66
+ purchase: "purchase";
67
67
  adopt: "adopt";
68
68
  }>;
69
69
  status: zod.ZodEnum<{
@@ -7,10 +7,9 @@
7
7
  */
8
8
  import * as zod from "zod";
9
9
  export declare const PurchaseOperation: zod.ZodEnum<{
10
- purchase: "purchase";
10
+ new: "new";
11
11
  renew: "renew";
12
- upgrade: "upgrade";
13
- downgrade: "downgrade";
12
+ change: "change";
14
13
  }>;
15
14
  export type PurchaseOperation = zod.input<typeof PurchaseOperation>;
16
15
  export type PurchaseOperationOutput = zod.output<typeof PurchaseOperation>;
@@ -7,5 +7,5 @@
7
7
  */
8
8
  import * as zod from "zod";
9
9
  export const PurchaseOperation = zod
10
- .enum(["purchase", "renew", "upgrade", "downgrade"])
11
- .describe("Which purchase this applies to. `upgrade` and `downgrade` are told apart by money: a change\nthat costs more for the remainder of the period is an upgrade, one that returns money\nis a downgrade. A change that costs neither more nor less is neither.\n\n`purchase` means a new purchase as opposed to a renewal or a change. It does not mean the\naccount's first purchase.");
10
+ .enum(["new", "renew", "change"])
11
+ .describe("Which purchase operation this applies to. `new` covers every new purchase, including\nzero-charge purchases. It does not mean the account's first purchase; use\n`first_purchase_only` for that restriction. `renew` covers renewals. `change` covers\nconfiguration or billing-term changes, including changes that increase or decrease\nthe amount due and changes with no additional charge or refund.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.115.0",
3
+ "version": "0.116.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {