@leaflow/sdk 0.127.0 → 0.128.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.
@@ -891,7 +891,7 @@ export interface AccountBalance {
891
891
  * spendable balance and may differ from the recorded credits total.
892
892
  */
893
893
  credit_groups: CreditGroup[];
894
- /** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
894
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
895
895
  due: Money;
896
896
  pending_returns_amount: Money;
897
897
  }
@@ -2220,9 +2220,15 @@ export interface OrderItem {
2220
2220
  /** `gross_amount` less `discount_amount`. */
2221
2221
  amount?: Money;
2222
2222
  currency: string;
2223
- /** @nullable */
2223
+ /**
2224
+ * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2225
+ * @nullable
2226
+ */
2224
2227
  period_start?: string | null;
2225
- /** @nullable */
2228
+ /**
2229
+ * The end of that service period, exclusive.
2230
+ * @nullable
2231
+ */
2226
2232
  period_end?: string | null;
2227
2233
  status: OrderItemStatus;
2228
2234
  }
@@ -21,7 +21,7 @@ export const AccountBalance = zod
21
21
  credit_groups: zod
22
22
  .array(CreditGroup)
23
23
  .describe("Currently valid, unspent credit grouped by permitted use. Restrictions and\nvalidity dates determine which charges a group can cover, so these groups are not a general\nspendable balance and may differ from the recorded credits total."),
24
- due: Money.describe("Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
24
+ due: Money.describe("Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
25
25
  pending_returns_amount: Money,
26
26
  })
27
27
  .describe("Account balance, credits, and unpaid charges are reported separately.");
@@ -65,8 +65,14 @@ export const OrderItem = zod
65
65
  discount_amount: Money.optional().describe("The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,\nfrom the discount the subscription carries.\n\nA carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then\n`unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and\nthe carried discount is already reflected in it: the renewal order also uses a coupon the account\nholds, or the account's tax rate is inclusive."),
66
66
  amount: Money.optional().describe("`gross_amount` less `discount_amount`."),
67
67
  currency: zod.string(),
68
- period_start: zod.iso.datetime({ offset: true }).nullish(),
69
- period_end: zod.iso.datetime({ offset: true }).nullish(),
68
+ period_start: zod.iso
69
+ .datetime({ offset: true })
70
+ .nullish()
71
+ .describe("The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines."),
72
+ period_end: zod.iso
73
+ .datetime({ offset: true })
74
+ .nullish()
75
+ .describe("The end of that service period, exclusive."),
70
76
  status: OrderItemStatus,
71
77
  })
72
78
  .describe("Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero\nfor a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service\npurchase creates its pending subscription when this item is recorded, not when payment succeeds.");
@@ -607,8 +607,12 @@ export declare const getPayInvoiceUrl: (invoiceId: string) => string;
607
607
  * `BILLING_CHANGE_NOT_INVOICED`.
608
608
  *
609
609
  * Returns a payment action when customer interaction is required. requires_action and processing
610
- * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved payment
611
- * attempt is reused, and retries do not apply credit grants or balance twice.
610
+ * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved online
611
+ * payment made with the same gateway, method and saved payment method is reused, and retries do not
612
+ * apply credit grants or balance twice. Paying any other way cancels that earlier online payment
613
+ * first; if the gateway had already collected it, the invoice is paid by it and nothing more is
614
+ * charged. One the gateway is still processing is refused with `BILLING_PAYMENT_PENDING` and
615
+ * `meta.transaction_id`; wait for its outcome.
612
616
  *
613
617
  * Calling this on an invoice that is already paid returns the existing payment result without
614
618
  * another charge. A void invoice is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an
@@ -679,8 +683,9 @@ export declare const getPayTogetherUrl: () => string;
679
683
  * Either every invoice is paid or none is. When the credit grants and balance cannot cover
680
684
  * them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
681
685
  * A total different from expected_amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged.
682
- * Invoices that are already paid are not charged again. An invoice with an online payment
683
- * still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
686
+ * Invoices that are already paid are not charged again. An online payment started earlier for one
687
+ * of the invoices is canceled first; one the gateway is still processing is refused with
688
+ * `BILLING_PAYMENT_PENDING` and `meta.transaction_id`, a void invoice with
684
689
  * `BILLING_INVOICE_NOT_PAYABLE`, a deferred period-end change not yet due to be invoiced with
685
690
  * `BILLING_CHANGE_NOT_INVOICED`, an order that has failed or was canceled with
686
691
  * `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
@@ -1430,7 +1435,7 @@ export declare const getCancelOrderUrl: (orderId: string) => string;
1430
1435
  * Payment may be absent, partial or complete. Once the order's terms are fixed, the selected items
1431
1436
  * keep their agreed amounts and discounts; credit notes reduce issued invoices, and collected amounts
1432
1437
  * are returned to their original payment sources. While the terms of a deferred order are not fixed,
1433
- * the remaining items are priced again. External payment-method refunds can finish asynchronously.
1438
+ * the remaining items are priced again. External payment-method refunds can finish asynchronously. An online payment still waiting for the payer is canceled with the order; one the gateway is already processing is refused with `BILLING_PAYMENT_PENDING` and `meta.transaction_id`.
1434
1439
  * The order and financial history are retained; the same cancellation does not refund twice.
1435
1440
  *
1436
1441
  * Once the order is accepted, its owning service coordinates cancellation and confirms
@@ -638,8 +638,12 @@ export const getPayInvoiceUrl = (invoiceId) => {
638
638
  * `BILLING_CHANGE_NOT_INVOICED`.
639
639
  *
640
640
  * Returns a payment action when customer interaction is required. requires_action and processing
641
- * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved payment
642
- * attempt is reused, and retries do not apply credit grants or balance twice.
641
+ * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved online
642
+ * payment made with the same gateway, method and saved payment method is reused, and retries do not
643
+ * apply credit grants or balance twice. Paying any other way cancels that earlier online payment
644
+ * first; if the gateway had already collected it, the invoice is paid by it and nothing more is
645
+ * charged. One the gateway is still processing is refused with `BILLING_PAYMENT_PENDING` and
646
+ * `meta.transaction_id`; wait for its outcome.
643
647
  *
644
648
  * Calling this on an invoice that is already paid returns the existing payment result without
645
649
  * another charge. A void invoice is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an
@@ -726,8 +730,9 @@ export const getPayTogetherUrl = () => {
726
730
  * Either every invoice is paid or none is. When the credit grants and balance cannot cover
727
731
  * them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
728
732
  * A total different from expected_amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged.
729
- * Invoices that are already paid are not charged again. An invoice with an online payment
730
- * still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
733
+ * Invoices that are already paid are not charged again. An online payment started earlier for one
734
+ * of the invoices is canceled first; one the gateway is still processing is refused with
735
+ * `BILLING_PAYMENT_PENDING` and `meta.transaction_id`, a void invoice with
731
736
  * `BILLING_INVOICE_NOT_PAYABLE`, a deferred period-end change not yet due to be invoiced with
732
737
  * `BILLING_CHANGE_NOT_INVOICED`, an order that has failed or was canceled with
733
738
  * `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
@@ -1578,7 +1583,7 @@ export const getCancelOrderUrl = (orderId) => {
1578
1583
  * Payment may be absent, partial or complete. Once the order's terms are fixed, the selected items
1579
1584
  * keep their agreed amounts and discounts; credit notes reduce issued invoices, and collected amounts
1580
1585
  * are returned to their original payment sources. While the terms of a deferred order are not fixed,
1581
- * the remaining items are priced again. External payment-method refunds can finish asynchronously.
1586
+ * the remaining items are priced again. External payment-method refunds can finish asynchronously. An online payment still waiting for the payer is canceled with the order; one the gateway is already processing is refused with `BILLING_PAYMENT_PENDING` and `meta.transaction_id`.
1582
1587
  * The order and financial history are retained; the same cancellation does not refund twice.
1583
1588
  *
1584
1589
  * Once the order is accepted, its owning service coordinates cancellation and confirms
@@ -712,7 +712,7 @@ export interface AccountBalance {
712
712
  * spendable balance and may differ from the recorded credits total.
713
713
  */
714
714
  credit_groups: CreditGroup[];
715
- /** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
715
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
716
716
  due: Money;
717
717
  pending_returns_amount: Money;
718
718
  }
@@ -2091,9 +2091,15 @@ export interface OrderItem {
2091
2091
  /** `gross_amount` less `discount_amount`. */
2092
2092
  amount?: Money;
2093
2093
  currency: string;
2094
- /** @nullable */
2094
+ /**
2095
+ * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2096
+ * @nullable
2097
+ */
2095
2098
  period_start?: string | null;
2096
- /** @nullable */
2099
+ /**
2100
+ * The end of that service period, exclusive.
2101
+ * @nullable
2102
+ */
2097
2103
  period_end?: string | null;
2098
2104
  status: OrderItemStatus;
2099
2105
  }
@@ -334,8 +334,12 @@ export declare const DeletePaymentMethodParams: zod.ZodObject<{
334
334
  * `BILLING_CHANGE_NOT_INVOICED`.
335
335
  *
336
336
  * Returns a payment action when customer interaction is required. requires_action and processing
337
- * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved payment
338
- * attempt is reused, and retries do not apply credit grants or balance twice.
337
+ * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved online
338
+ * payment made with the same gateway, method and saved payment method is reused, and retries do not
339
+ * apply credit grants or balance twice. Paying any other way cancels that earlier online payment
340
+ * first; if the gateway had already collected it, the invoice is paid by it and nothing more is
341
+ * charged. One the gateway is still processing is refused with `BILLING_PAYMENT_PENDING` and
342
+ * `meta.transaction_id`; wait for its outcome.
339
343
  *
340
344
  * Calling this on an invoice that is already paid returns the existing payment result without
341
345
  * another charge. A void invoice is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an
@@ -396,8 +400,9 @@ export declare const PreviewInvoicePaymentQueryParams: zod.ZodObject<{
396
400
  * Either every invoice is paid or none is. When the credit grants and balance cannot cover
397
401
  * them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
398
402
  * A total different from expected_amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged.
399
- * Invoices that are already paid are not charged again. An invoice with an online payment
400
- * still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
403
+ * Invoices that are already paid are not charged again. An online payment started earlier for one
404
+ * of the invoices is canceled first; one the gateway is still processing is refused with
405
+ * `BILLING_PAYMENT_PENDING` and `meta.transaction_id`, a void invoice with
401
406
  * `BILLING_INVOICE_NOT_PAYABLE`, a deferred period-end change not yet due to be invoiced with
402
407
  * `BILLING_CHANGE_NOT_INVOICED`, an order that has failed or was canceled with
403
408
  * `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
@@ -996,7 +1001,7 @@ export declare const GetOrderParams: zod.ZodObject<{
996
1001
  * Payment may be absent, partial or complete. Once the order's terms are fixed, the selected items
997
1002
  * keep their agreed amounts and discounts; credit notes reduce issued invoices, and collected amounts
998
1003
  * are returned to their original payment sources. While the terms of a deferred order are not fixed,
999
- * the remaining items are priced again. External payment-method refunds can finish asynchronously.
1004
+ * the remaining items are priced again. External payment-method refunds can finish asynchronously. An online payment still waiting for the payer is canceled with the order; one the gateway is already processing is refused with `BILLING_PAYMENT_PENDING` and `meta.transaction_id`.
1000
1005
  * The order and financial history are retained; the same cancellation does not refund twice.
1001
1006
  *
1002
1007
  * Once the order is accepted, its owning service coordinates cancellation and confirms
@@ -389,8 +389,12 @@ export const DeletePaymentMethodParams = zod.strictObject({
389
389
  * `BILLING_CHANGE_NOT_INVOICED`.
390
390
  *
391
391
  * Returns a payment action when customer interaction is required. requires_action and processing
392
- * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved payment
393
- * attempt is reused, and retries do not apply credit grants or balance twice.
392
+ * do not mean paid; the invoice is marked paid after payment is confirmed. An unresolved online
393
+ * payment made with the same gateway, method and saved payment method is reused, and retries do not
394
+ * apply credit grants or balance twice. Paying any other way cancels that earlier online payment
395
+ * first; if the gateway had already collected it, the invoice is paid by it and nothing more is
396
+ * charged. One the gateway is still processing is refused with `BILLING_PAYMENT_PENDING` and
397
+ * `meta.transaction_id`; wait for its outcome.
394
398
  *
395
399
  * Calling this on an invoice that is already paid returns the existing payment result without
396
400
  * another charge. A void invoice is refused with `BILLING_INVOICE_NOT_PAYABLE`; the invoice of an
@@ -453,8 +457,9 @@ export const PreviewInvoicePaymentQueryParams = zod.strictObject({
453
457
  * Either every invoice is paid or none is. When the credit grants and balance cannot cover
454
458
  * them all, the request fails with `BILLING_INSUFFICIENT_FUNDS` and nothing is charged.
455
459
  * A total different from expected_amount fails with `BILLING_AMOUNT_CHANGED` and nothing is charged.
456
- * Invoices that are already paid are not charged again. An invoice with an online payment
457
- * still in progress is refused with `BILLING_PAYMENT_PENDING`, a void invoice with
460
+ * Invoices that are already paid are not charged again. An online payment started earlier for one
461
+ * of the invoices is canceled first; one the gateway is still processing is refused with
462
+ * `BILLING_PAYMENT_PENDING` and `meta.transaction_id`, a void invoice with
458
463
  * `BILLING_INVOICE_NOT_PAYABLE`, a deferred period-end change not yet due to be invoiced with
459
464
  * `BILLING_CHANGE_NOT_INVOICED`, an order that has failed or was canceled with
460
465
  * `BILLING_ORDER_FAILED` or `BILLING_ORDER_CANCELED`, and an order whose payment deadline has
@@ -1135,7 +1140,7 @@ export const GetOrderParams = zod.strictObject({
1135
1140
  * Payment may be absent, partial or complete. Once the order's terms are fixed, the selected items
1136
1141
  * keep their agreed amounts and discounts; credit notes reduce issued invoices, and collected amounts
1137
1142
  * are returned to their original payment sources. While the terms of a deferred order are not fixed,
1138
- * the remaining items are priced again. External payment-method refunds can finish asynchronously.
1143
+ * the remaining items are priced again. External payment-method refunds can finish asynchronously. An online payment still waiting for the payer is canceled with the order; one the gateway is already processing is refused with `BILLING_PAYMENT_PENDING` and `meta.transaction_id`.
1139
1144
  * The order and financial history are retained; the same cancellation does not refund twice.
1140
1145
  *
1141
1146
  * Once the order is accepted, its owning service coordinates cancellation and confirms
@@ -21,7 +21,7 @@ export const AccountBalance = zod
21
21
  credit_groups: zod
22
22
  .array(CreditGroup)
23
23
  .describe("Currently valid, unspent credit grouped by permitted use. Restrictions and\nvalidity dates determine which charges a group can cover, so these groups are not a general\nspendable balance and may differ from the recorded credits total."),
24
- due: Money.describe("Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
24
+ due: Money.describe("Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
25
25
  pending_returns_amount: Money,
26
26
  })
27
27
  .describe("Account balance, credits, and unpaid charges are reported separately.");
@@ -65,8 +65,14 @@ export const OrderItem = zod
65
65
  discount_amount: Money.optional().describe("The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,\nfrom the discount the subscription carries.\n\nA carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then\n`unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and\nthe carried discount is already reflected in it: the renewal order also uses a coupon the account\nholds, or the account's tax rate is inclusive."),
66
66
  amount: Money.optional().describe("`gross_amount` less `discount_amount`."),
67
67
  currency: zod.string(),
68
- period_start: zod.iso.datetime({ offset: true }).nullish(),
69
- period_end: zod.iso.datetime({ offset: true }).nullish(),
68
+ period_start: zod.iso
69
+ .datetime({ offset: true })
70
+ .nullish()
71
+ .describe("The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines."),
72
+ period_end: zod.iso
73
+ .datetime({ offset: true })
74
+ .nullish()
75
+ .describe("The end of that service period, exclusive."),
70
76
  status: OrderItemStatus,
71
77
  })
72
78
  .describe("Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero\nfor a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service\npurchase creates its pending subscription when this item is recorded, not when payment succeeds.");
@@ -1359,7 +1359,7 @@ export interface AccountBalance {
1359
1359
  * spendable balance and may differ from the recorded credits total.
1360
1360
  */
1361
1361
  credit_groups: CreditGroup[];
1362
- /** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1362
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1363
1363
  due: Money;
1364
1364
  pending_returns_amount: Money;
1365
1365
  }
@@ -2688,9 +2688,15 @@ export interface OrderItem {
2688
2688
  /** `gross_amount` less `discount_amount`. */
2689
2689
  amount?: Money;
2690
2690
  currency: string;
2691
- /** @nullable */
2691
+ /**
2692
+ * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2693
+ * @nullable
2694
+ */
2692
2695
  period_start?: string | null;
2693
- /** @nullable */
2696
+ /**
2697
+ * The end of that service period, exclusive.
2698
+ * @nullable
2699
+ */
2694
2700
  period_end?: string | null;
2695
2701
  status: OrderItemStatus;
2696
2702
  }
@@ -44,7 +44,7 @@ export const AccountBalance = zod
44
44
  credit_groups: zod
45
45
  .array(CreditGroup)
46
46
  .describe("Currently valid, unspent credit grouped by permitted use. Restrictions and\nvalidity dates determine which charges a group can cover, so these groups are not a general\nspendable balance and may differ from the recorded credits total."),
47
- due: Money.describe("Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
47
+ due: Money.describe("Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
48
48
  pending_returns_amount: Money,
49
49
  })
50
50
  .describe("Account balance, credits, and unpaid charges are reported separately.");
@@ -88,8 +88,14 @@ export const OrderItem = zod
88
88
  discount_amount: Money.optional().describe("The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,\nfrom the discount the subscription carries.\n\nA carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then\n`unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and\nthe carried discount is already reflected in it: the renewal order also uses a coupon the account\nholds, or the account's tax rate is inclusive."),
89
89
  amount: Money.optional().describe("`gross_amount` less `discount_amount`."),
90
90
  currency: zod.string(),
91
- period_start: zod.iso.datetime({ offset: true }).nullish(),
92
- period_end: zod.iso.datetime({ offset: true }).nullish(),
91
+ period_start: zod.iso
92
+ .datetime({ offset: true })
93
+ .nullish()
94
+ .describe("The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines."),
95
+ period_end: zod.iso
96
+ .datetime({ offset: true })
97
+ .nullish()
98
+ .describe("The end of that service period, exclusive."),
93
99
  status: OrderItemStatus,
94
100
  })
95
101
  .describe("Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero\nfor a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service\npurchase creates its pending subscription when this item is recorded, not when payment succeeds.");
@@ -3305,7 +3305,7 @@ export interface AccountBalance {
3305
3305
  * spendable balance and may differ from the recorded credits total.
3306
3306
  */
3307
3307
  credit_groups: CreditGroup[];
3308
- /** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
3308
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
3309
3309
  due: Money;
3310
3310
  pending_returns_amount: Money;
3311
3311
  }
@@ -4634,9 +4634,15 @@ export interface OrderItem {
4634
4634
  /** `gross_amount` less `discount_amount`. */
4635
4635
  amount?: Money;
4636
4636
  currency: string;
4637
- /** @nullable */
4637
+ /**
4638
+ * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
4639
+ * @nullable
4640
+ */
4638
4641
  period_start?: string | null;
4639
- /** @nullable */
4642
+ /**
4643
+ * The end of that service period, exclusive.
4644
+ * @nullable
4645
+ */
4640
4646
  period_end?: string | null;
4641
4647
  status: OrderItemStatus;
4642
4648
  }
@@ -37,7 +37,7 @@ export const AccountBalance = zod
37
37
  credit_groups: zod
38
38
  .array(CreditGroup)
39
39
  .describe("Currently valid, unspent credit grouped by permitted use. Restrictions and\nvalidity dates determine which charges a group can cover, so these groups are not a general\nspendable balance and may differ from the recorded credits total."),
40
- due: Money.describe("Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
40
+ due: Money.describe("Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
41
41
  pending_returns_amount: Money,
42
42
  })
43
43
  .describe("Account balance, credits, and unpaid charges are reported separately.");
@@ -81,8 +81,14 @@ export const OrderItem = zod
81
81
  discount_amount: Money.optional().describe("The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,\nfrom the discount the subscription carries.\n\nA carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then\n`unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and\nthe carried discount is already reflected in it: the renewal order also uses a coupon the account\nholds, or the account's tax rate is inclusive."),
82
82
  amount: Money.optional().describe("`gross_amount` less `discount_amount`."),
83
83
  currency: zod.string(),
84
- period_start: zod.iso.datetime({ offset: true }).nullish(),
85
- period_end: zod.iso.datetime({ offset: true }).nullish(),
84
+ period_start: zod.iso
85
+ .datetime({ offset: true })
86
+ .nullish()
87
+ .describe("The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines."),
88
+ period_end: zod.iso
89
+ .datetime({ offset: true })
90
+ .nullish()
91
+ .describe("The end of that service period, exclusive."),
86
92
  status: OrderItemStatus,
87
93
  })
88
94
  .describe("Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero\nfor a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service\npurchase creates its pending subscription when this item is recorded, not when payment succeeds.");
@@ -1180,7 +1180,7 @@ export interface AccountBalance {
1180
1180
  * spendable balance and may differ from the recorded credits total.
1181
1181
  */
1182
1182
  credit_groups: CreditGroup[];
1183
- /** Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1183
+ /** Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms. */
1184
1184
  due: Money;
1185
1185
  pending_returns_amount: Money;
1186
1186
  }
@@ -2509,9 +2509,15 @@ export interface OrderItem {
2509
2509
  /** `gross_amount` less `discount_amount`. */
2510
2510
  amount?: Money;
2511
2511
  currency: string;
2512
- /** @nullable */
2512
+ /**
2513
+ * The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines.
2514
+ * @nullable
2515
+ */
2513
2516
  period_start?: string | null;
2514
- /** @nullable */
2517
+ /**
2518
+ * The end of that service period, exclusive.
2519
+ * @nullable
2520
+ */
2515
2521
  period_end?: string | null;
2516
2522
  status: OrderItemStatus;
2517
2523
  }
@@ -21,7 +21,7 @@ export const AccountBalance = zod
21
21
  credit_groups: zod
22
22
  .array(CreditGroup)
23
23
  .describe("Currently valid, unspent credit grouped by permitted use. Restrictions and\nvalidity dates determine which charges a group can cover, so these groups are not a general\nspendable balance and may differ from the recorded credits total."),
24
- due: Money.describe("Amount still payable on issued invoices. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
24
+ due: Money.describe("Amount still payable on issued invoices. The invoice of an order not yet accepted is a request to pay for that order rather than a debt, so it is excluded here and from available_credit. Unbilled usage is reported separately; arrears depend on actual eligible funding and grace terms."),
25
25
  pending_returns_amount: Money,
26
26
  })
27
27
  .describe("Account balance, credits, and unpaid charges are reported separately.");
@@ -65,8 +65,14 @@ export const OrderItem = zod
65
65
  discount_amount: Money.optional().describe("The reduction on this line: from the coupon the order uses and, for a renewal at the agreed terms,\nfrom the discount the subscription carries.\n\nA carried discount is part of the agreed amount. It is listed here, and `gross_amount` is then\n`unit_amount` times `quantity`, except in two cases where `gross_amount` is the agreed amount and\nthe carried discount is already reflected in it: the renewal order also uses a coupon the account\nholds, or the account's tax rate is inclusive."),
66
66
  amount: Money.optional().describe("`gross_amount` less `discount_amount`."),
67
67
  currency: zod.string(),
68
- period_start: zod.iso.datetime({ offset: true }).nullish(),
69
- period_end: zod.iso.datetime({ offset: true }).nullish(),
68
+ period_start: zod.iso
69
+ .datetime({ offset: true })
70
+ .nullish()
71
+ .describe("The start of the service period this line paid for. Frozen at placement for renewals and period-end changes; for a prepaid line of a new purchase, fixed from the second its invoice is paid and kept when delivery is confirmed. Absent for postpaid and one-time lines."),
72
+ period_end: zod.iso
73
+ .datetime({ offset: true })
74
+ .nullish()
75
+ .describe("The end of that service period, exclusive."),
70
76
  status: OrderItemStatus,
71
77
  })
72
78
  .describe("Frozen purchase terms. Monetary fields come from related invoice-line snapshots and are zero\nfor a line with no immediate charge, such as postpaid admission. Later catalog changes do not reprice this line. A new service\npurchase creates its pending subscription when this item is recorded, not when payment succeeds.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.127.0",
3
+ "version": "0.128.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {