@metronome/sdk 3.4.1 → 3.6.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/README.md +2 -2
  3. package/bin/cli +12 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +11 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/types.d.mts +6 -6
  11. package/internal/types.d.mts.map +1 -1
  12. package/internal/types.d.ts +6 -6
  13. package/internal/types.d.ts.map +1 -1
  14. package/internal/utils/env.js +2 -2
  15. package/internal/utils/env.js.map +1 -1
  16. package/internal/utils/env.mjs +2 -2
  17. package/internal/utils/env.mjs.map +1 -1
  18. package/internal/utils/log.d.mts.map +1 -1
  19. package/internal/utils/log.d.ts.map +1 -1
  20. package/internal/utils/log.js +2 -0
  21. package/internal/utils/log.js.map +1 -1
  22. package/internal/utils/log.mjs +2 -0
  23. package/internal/utils/log.mjs.map +1 -1
  24. package/package.json +1 -1
  25. package/resources/shared.d.mts +176 -7
  26. package/resources/shared.d.mts.map +1 -1
  27. package/resources/shared.d.ts +176 -7
  28. package/resources/shared.d.ts.map +1 -1
  29. package/resources/v1/alerts.d.mts +1 -1
  30. package/resources/v1/alerts.d.mts.map +1 -1
  31. package/resources/v1/alerts.d.ts +1 -1
  32. package/resources/v1/alerts.d.ts.map +1 -1
  33. package/resources/v1/contracts/contracts.d.mts +240 -166
  34. package/resources/v1/contracts/contracts.d.mts.map +1 -1
  35. package/resources/v1/contracts/contracts.d.ts +240 -166
  36. package/resources/v1/contracts/contracts.d.ts.map +1 -1
  37. package/resources/v1/contracts/contracts.js +54 -2
  38. package/resources/v1/contracts/contracts.js.map +1 -1
  39. package/resources/v1/contracts/contracts.mjs +54 -2
  40. package/resources/v1/contracts/contracts.mjs.map +1 -1
  41. package/resources/v1/contracts/index.d.mts +1 -1
  42. package/resources/v1/contracts/index.d.mts.map +1 -1
  43. package/resources/v1/contracts/index.d.ts +1 -1
  44. package/resources/v1/contracts/index.d.ts.map +1 -1
  45. package/resources/v1/contracts/index.js.map +1 -1
  46. package/resources/v1/contracts/index.mjs.map +1 -1
  47. package/resources/v1/contracts/products.d.mts +18 -0
  48. package/resources/v1/contracts/products.d.mts.map +1 -1
  49. package/resources/v1/contracts/products.d.ts +18 -0
  50. package/resources/v1/contracts/products.d.ts.map +1 -1
  51. package/resources/v1/customers/alerts.d.mts +1 -1
  52. package/resources/v1/customers/alerts.d.mts.map +1 -1
  53. package/resources/v1/customers/alerts.d.ts +1 -1
  54. package/resources/v1/customers/alerts.d.ts.map +1 -1
  55. package/resources/v1/customers/invoices.d.mts +9 -0
  56. package/resources/v1/customers/invoices.d.mts.map +1 -1
  57. package/resources/v1/customers/invoices.d.ts +9 -0
  58. package/resources/v1/customers/invoices.d.ts.map +1 -1
  59. package/resources/v1/index.d.mts +1 -1
  60. package/resources/v1/index.d.mts.map +1 -1
  61. package/resources/v1/index.d.ts +1 -1
  62. package/resources/v1/index.d.ts.map +1 -1
  63. package/resources/v1/index.js.map +1 -1
  64. package/resources/v1/index.mjs.map +1 -1
  65. package/resources/v1/packages.d.mts +10 -10
  66. package/resources/v1/packages.d.mts.map +1 -1
  67. package/resources/v1/packages.d.ts +10 -10
  68. package/resources/v1/packages.d.ts.map +1 -1
  69. package/resources/v1/v1.d.mts +2 -2
  70. package/resources/v1/v1.d.mts.map +1 -1
  71. package/resources/v1/v1.d.ts +2 -2
  72. package/resources/v1/v1.d.ts.map +1 -1
  73. package/resources/v1/v1.js.map +1 -1
  74. package/resources/v1/v1.mjs.map +1 -1
  75. package/resources/v2/contracts.d.mts +163 -13
  76. package/resources/v2/contracts.d.mts.map +1 -1
  77. package/resources/v2/contracts.d.ts +163 -13
  78. package/resources/v2/contracts.d.ts.map +1 -1
  79. package/resources/webhooks.js +1 -1
  80. package/resources/webhooks.js.map +1 -1
  81. package/resources/webhooks.mjs +1 -1
  82. package/resources/webhooks.mjs.map +1 -1
  83. package/src/client.ts +12 -0
  84. package/src/internal/types.ts +6 -8
  85. package/src/internal/utils/env.ts +2 -2
  86. package/src/internal/utils/log.ts +2 -0
  87. package/src/resources/shared.ts +236 -7
  88. package/src/resources/v1/alerts.ts +1 -1
  89. package/src/resources/v1/contracts/contracts.ts +302 -183
  90. package/src/resources/v1/contracts/index.ts +2 -0
  91. package/src/resources/v1/contracts/products.ts +20 -0
  92. package/src/resources/v1/customers/alerts.ts +1 -1
  93. package/src/resources/v1/customers/invoices.ts +12 -0
  94. package/src/resources/v1/index.ts +2 -0
  95. package/src/resources/v1/packages.ts +14 -14
  96. package/src/resources/v1/v1.ts +4 -0
  97. package/src/resources/v2/contracts.ts +209 -15
  98. package/src/resources/webhooks.ts +1 -1
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -17,8 +17,8 @@ export declare class Contracts extends APIResource {
17
17
  /**
18
18
  * Contracts define a customer's products, pricing, discounts, access duration, and
19
19
  * billing configuration. Contracts serve as the central billing agreement for both
20
- * PLG and Enterprise customers, you can automatically customers access to your
21
- * products and services directly from your product or CRM.
20
+ * PLG and Enterprise customers. You can automatically grant customers access to
21
+ * your products and services directly from your product or CRM.
22
22
  *
23
23
  * ### Use this endpoint to:
24
24
  *
@@ -339,6 +339,10 @@ export declare class Contracts extends APIResource {
339
339
  *
340
340
  * ### Usage guidelines:
341
341
  *
342
+ * - **Balance ledger details**: Use the
343
+ * [listBalances](https://docs.metronome.com/api-reference/credits-and-commits/list-balances)
344
+ * endpoint instead to understand detailed ledger drawdowns for each individual
345
+ * balance
342
346
  * - **Draft invoice handling**: Use `invoice_inclusion_mode` to control whether
343
347
  * pending draft invoice deductions are included (`FINALIZED_AND_DRAFT`, the
344
348
  * default) or excluded (`FINALIZED`) from the balance calculation
@@ -395,6 +399,9 @@ export declare class Contracts extends APIResource {
395
399
  *
396
400
  * ### Usage guidelines:
397
401
  *
402
+ * - Use the
403
+ * [getNetBalance](https://docs.metronome.com/api-reference/credits-and-commits/get-the-net-balance-of-a-customer)
404
+ * endpoint to retrieve a single combined current balance
398
405
  * - Date filtering: Use `effective_before` to include only balances with access
399
406
  * before a specific date (exclusive)
400
407
  * - Set `include_balance=true` for calculated balance amounts on each commit or
@@ -420,6 +427,49 @@ export declare class Contracts extends APIResource {
420
427
  * ```
421
428
  */
422
429
  listBalances(body: ContractListBalancesParams, options?: RequestOptions): PagePromise<ContractListBalancesResponsesBodyCursorPage, ContractListBalancesResponse>;
430
+ /**
431
+ * Retrieve detailed balance for seat-based credits and commits from the contract's
432
+ * subscriptions, broken down by individual seats.
433
+ *
434
+ * ### Use this endpoint to:
435
+ *
436
+ * - Display per-seat balance information in customer dashboards
437
+ * - Filter balance data by subscription or specific seats
438
+ *
439
+ * ### Key response fields:
440
+ *
441
+ * An array of seat balance objects containing:
442
+ *
443
+ * - Seat id
444
+ * - Balance: current total balance across all commits and credits
445
+ *
446
+ * ### Usage guidelines:
447
+ *
448
+ * - Date filtering: use `covering_date` OR `starting_at`/`ending_before` to filter
449
+ * balance data by time range
450
+ * - Set `include_credits_and_commits=true` for detailed commits and credits
451
+ * breakdown per seat
452
+ * - Set `include_ledgers=true` for detailed transaction history per commit/credit
453
+ * per seat
454
+ *
455
+ * @example
456
+ * ```ts
457
+ * const response = await client.v1.contracts.listSeatBalances(
458
+ * {
459
+ * contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
460
+ * customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
461
+ * covering_date: '2024-03-01T00:00:00.000Z',
462
+ * include_credits_and_commits: true,
463
+ * include_ledgers: true,
464
+ * limit: 25,
465
+ * subscription_ids: [
466
+ * '8deed800-1b7a-495d-a207-6c52bac54dc9',
467
+ * ],
468
+ * },
469
+ * );
470
+ * ```
471
+ */
472
+ listSeatBalances(body: ContractListSeatBalancesParams, options?: RequestOptions): APIPromise<ContractListSeatBalancesResponse>;
423
473
  /**
424
474
  * For a specific customer and contract, get the rates at a specific point in time.
425
475
  * This endpoint takes the contract's rate card into consideration, including
@@ -584,6 +634,134 @@ export declare namespace ContractGetNetBalanceResponse {
584
634
  }
585
635
  }
586
636
  export type ContractListBalancesResponse = Shared.Commit | Shared.Credit;
637
+ export interface ContractListSeatBalancesResponse {
638
+ data: Array<ContractListSeatBalancesResponse.Data>;
639
+ pagination: ContractListSeatBalancesResponse.Pagination;
640
+ }
641
+ export declare namespace ContractListSeatBalancesResponse {
642
+ interface Data {
643
+ balances: Array<Data.Balance>;
644
+ /**
645
+ * The unique identifier for the seat
646
+ */
647
+ seat_id: string;
648
+ /**
649
+ * Array of commits applicable to this seat with their balances
650
+ */
651
+ commits?: Array<Data.Commit> | null;
652
+ /**
653
+ * Array of credits applicable to this seat with their balances
654
+ */
655
+ credits?: Array<Data.Credit>;
656
+ }
657
+ namespace Data {
658
+ interface Balance {
659
+ /**
660
+ * The total balance across all commits and credits for this seat, of this credit
661
+ * type.
662
+ */
663
+ balance: number;
664
+ credit_type_id: string;
665
+ /**
666
+ * The total initial balances of all commits and credits for this seat, of this
667
+ * credit type.
668
+ */
669
+ starting_balance: number;
670
+ }
671
+ interface Commit {
672
+ /**
673
+ * The commit or credit ID
674
+ */
675
+ id: string;
676
+ /**
677
+ * The current balance for this commit for this specific seat
678
+ */
679
+ balance: number;
680
+ /**
681
+ * The datetime when the commit becomes active
682
+ */
683
+ start_date: string;
684
+ /**
685
+ * The datetime when the commit expires
686
+ */
687
+ end_date?: string | null;
688
+ /**
689
+ * Transaction history for this commit for this seat (only included if
690
+ * include_ledgers=true)
691
+ */
692
+ ledger_entries?: Array<Commit.LedgerEntry>;
693
+ }
694
+ namespace Commit {
695
+ interface LedgerEntry {
696
+ /**
697
+ * Amount of the ledger entry
698
+ */
699
+ amount: number;
700
+ /**
701
+ * The datetime when the ledger is created
702
+ */
703
+ timestamp: string;
704
+ /**
705
+ * Commit ledger type
706
+ */
707
+ type: 'PREPAID_COMMIT_SEGMENT_START' | 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION' | 'PREPAID_COMMIT_ROLLOVER' | 'PREPAID_COMMIT_EXPIRATION' | 'PREPAID_COMMIT_CANCELED' | 'PREPAID_COMMIT_CREDITED' | 'PREPAID_COMMIT_MANUAL' | 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
708
+ }
709
+ }
710
+ interface Credit {
711
+ /**
712
+ * The credit ID
713
+ */
714
+ id: string;
715
+ /**
716
+ * The current balance for this credit for this specific seat
717
+ */
718
+ balance: number;
719
+ /**
720
+ * The datetime when the credit becomes active
721
+ */
722
+ start_date: string;
723
+ /**
724
+ * The datetime when the credit expires
725
+ */
726
+ end_date?: string | null;
727
+ /**
728
+ * Transaction history for this credit for this seat (only included if
729
+ * include_ledgers=true)
730
+ */
731
+ ledger_entries?: Array<Credit.LedgerEntry>;
732
+ }
733
+ namespace Credit {
734
+ interface LedgerEntry {
735
+ /**
736
+ * Amount of the ledger entry
737
+ */
738
+ amount: number;
739
+ /**
740
+ * The datetime when the ledger is created
741
+ */
742
+ timestamp: string;
743
+ /**
744
+ * Credit ledger type
745
+ */
746
+ type: 'CREDIT_SEGMENT_START' | 'CREDIT_AUTOMATED_INVOICE_DEDUCTION' | 'CREDIT_EXPIRATION' | 'CREDIT_CANCELED' | 'CREDIT_CREDITED' | 'CREDIT_MANUAL' | 'CREDIT_SEAT_BASED_ADJUSTMENT' | 'CREDIT_ROLLOVER';
747
+ }
748
+ }
749
+ }
750
+ interface Pagination {
751
+ /**
752
+ * Number of seats available to fetch in the next page
753
+ */
754
+ seats_available_for_next_page: number;
755
+ /**
756
+ * Number of seats included in this response
757
+ */
758
+ seats_included: number;
759
+ /**
760
+ * Token to retrieve the next page of results. Null if no more pages available
761
+ */
762
+ next_page?: string | null;
763
+ }
764
+ }
587
765
  export interface ContractRetrieveRateScheduleResponse {
588
766
  data: Array<ContractRetrieveRateScheduleResponse.Data>;
589
767
  next_page?: string | null;
@@ -695,7 +873,7 @@ export interface ContractCreateParams {
695
873
  /**
696
874
  * If provided, provisions a customer on a package instead of creating a
697
875
  * traditional contract. When specified, only customer_id, starting_at, package_id,
698
- * and uniqueness_key are allowed.
876
+ * uniqueness_key, transition, and custom_fields are allowed.
699
877
  */
700
878
  package_id?: string;
701
879
  prepaid_balance_threshold_configuration?: Shared.PrepaidBalanceThresholdConfiguration;
@@ -829,10 +1007,6 @@ export declare namespace ContractCreateParams {
829
1007
  * This field's availability is dependent on your client's configuration.
830
1008
  */
831
1009
  netsuite_sales_order_id?: string;
832
- /**
833
- * optionally payment gate this commit
834
- */
835
- payment_gate_config?: Commit.PaymentGateConfig;
836
1010
  /**
837
1011
  * If multiple commits are applicable, the one with the lower priority will apply
838
1012
  * first.
@@ -970,76 +1144,6 @@ export declare namespace ContractCreateParams {
970
1144
  unit_price?: number;
971
1145
  }
972
1146
  }
973
- /**
974
- * optionally payment gate this commit
975
- */
976
- interface PaymentGateConfig {
977
- /**
978
- * Gate access to the commit balance based on successful collection of payment.
979
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
980
- * facilitate payment using your own payment integration. Select NONE if you do not
981
- * wish to payment gate the commit balance.
982
- */
983
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
984
- /**
985
- * Only applicable if using PRECALCULATED as your tax type.
986
- */
987
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
988
- /**
989
- * Only applicable if using STRIPE as your payment gate type.
990
- */
991
- stripe_config?: PaymentGateConfig.StripeConfig;
992
- /**
993
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
994
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
995
- * will default to NONE.
996
- */
997
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
998
- }
999
- namespace PaymentGateConfig {
1000
- /**
1001
- * Only applicable if using PRECALCULATED as your tax type.
1002
- */
1003
- interface PrecalculatedTaxConfig {
1004
- /**
1005
- * Amount of tax to be applied. This should be in the same currency and
1006
- * denomination as the commit's invoice schedule
1007
- */
1008
- tax_amount: number;
1009
- /**
1010
- * Name of the tax to be applied. This may be used in an invoice line item
1011
- * description.
1012
- */
1013
- tax_name?: string;
1014
- }
1015
- /**
1016
- * Only applicable if using STRIPE as your payment gate type.
1017
- */
1018
- interface StripeConfig {
1019
- /**
1020
- * If left blank, will default to INVOICE
1021
- */
1022
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
1023
- /**
1024
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
1025
- * your payment type.
1026
- */
1027
- invoice_metadata?: {
1028
- [key: string]: string;
1029
- };
1030
- /**
1031
- * If true, the payment will be made assuming the customer is present (i.e. on
1032
- * session).
1033
- *
1034
- * If false, the payment will be made assuming the customer is not present (i.e.
1035
- * off session). For cardholders from a country with an e-mandate requirement (e.g.
1036
- * India), the payment may be declined.
1037
- *
1038
- * If left blank, will default to false.
1039
- */
1040
- on_session_payment?: boolean;
1041
- }
1042
- }
1043
1147
  }
1044
1148
  interface Credit {
1045
1149
  /**
@@ -1373,13 +1477,6 @@ export declare namespace ContractCreateParams {
1373
1477
  * commits created by the specified recurring commit ids.
1374
1478
  */
1375
1479
  recurring_commit_ids?: Array<string>;
1376
- /**
1377
- * Can only be used for commit specific overrides. Must be used in conjunction with
1378
- * one of `product_id`, `product_tags`, `pricing_group_values`, or
1379
- * `presentation_group_values`. If provided, the override will only apply to
1380
- * credits created by the specified recurring credit ids.
1381
- */
1382
- recurring_credit_ids?: Array<string>;
1383
1480
  }
1384
1481
  /**
1385
1482
  * Required for OVERWRITE type.
@@ -2201,10 +2298,6 @@ export declare namespace ContractAmendParams {
2201
2298
  * This field's availability is dependent on your client's configuration.
2202
2299
  */
2203
2300
  netsuite_sales_order_id?: string;
2204
- /**
2205
- * optionally payment gate this commit
2206
- */
2207
- payment_gate_config?: Commit.PaymentGateConfig;
2208
2301
  /**
2209
2302
  * If multiple commits are applicable, the one with the lower priority will apply
2210
2303
  * first.
@@ -2342,76 +2435,6 @@ export declare namespace ContractAmendParams {
2342
2435
  unit_price?: number;
2343
2436
  }
2344
2437
  }
2345
- /**
2346
- * optionally payment gate this commit
2347
- */
2348
- interface PaymentGateConfig {
2349
- /**
2350
- * Gate access to the commit balance based on successful collection of payment.
2351
- * Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
2352
- * facilitate payment using your own payment integration. Select NONE if you do not
2353
- * wish to payment gate the commit balance.
2354
- */
2355
- payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
2356
- /**
2357
- * Only applicable if using PRECALCULATED as your tax type.
2358
- */
2359
- precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
2360
- /**
2361
- * Only applicable if using STRIPE as your payment gate type.
2362
- */
2363
- stripe_config?: PaymentGateConfig.StripeConfig;
2364
- /**
2365
- * Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
2366
- * not wish Metronome to calculate tax on your behalf. Leaving this field blank
2367
- * will default to NONE.
2368
- */
2369
- tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
2370
- }
2371
- namespace PaymentGateConfig {
2372
- /**
2373
- * Only applicable if using PRECALCULATED as your tax type.
2374
- */
2375
- interface PrecalculatedTaxConfig {
2376
- /**
2377
- * Amount of tax to be applied. This should be in the same currency and
2378
- * denomination as the commit's invoice schedule
2379
- */
2380
- tax_amount: number;
2381
- /**
2382
- * Name of the tax to be applied. This may be used in an invoice line item
2383
- * description.
2384
- */
2385
- tax_name?: string;
2386
- }
2387
- /**
2388
- * Only applicable if using STRIPE as your payment gate type.
2389
- */
2390
- interface StripeConfig {
2391
- /**
2392
- * If left blank, will default to INVOICE
2393
- */
2394
- payment_type: 'INVOICE' | 'PAYMENT_INTENT';
2395
- /**
2396
- * Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
2397
- * your payment type.
2398
- */
2399
- invoice_metadata?: {
2400
- [key: string]: string;
2401
- };
2402
- /**
2403
- * If true, the payment will be made assuming the customer is present (i.e. on
2404
- * session).
2405
- *
2406
- * If false, the payment will be made assuming the customer is not present (i.e.
2407
- * off session). For cardholders from a country with an e-mandate requirement (e.g.
2408
- * India), the payment may be declined.
2409
- *
2410
- * If left blank, will default to false.
2411
- */
2412
- on_session_payment?: boolean;
2413
- }
2414
- }
2415
2438
  }
2416
2439
  interface Credit {
2417
2440
  /**
@@ -2704,13 +2727,6 @@ export declare namespace ContractAmendParams {
2704
2727
  * commits created by the specified recurring commit ids.
2705
2728
  */
2706
2729
  recurring_commit_ids?: Array<string>;
2707
- /**
2708
- * Can only be used for commit specific overrides. Must be used in conjunction with
2709
- * one of `product_id`, `product_tags`, `pricing_group_values`, or
2710
- * `presentation_group_values`. If provided, the override will only apply to
2711
- * credits created by the specified recurring credit ids.
2712
- */
2713
- recurring_credit_ids?: Array<string>;
2714
2730
  }
2715
2731
  /**
2716
2732
  * Required for OVERWRITE type.
@@ -3041,6 +3057,64 @@ export interface ContractListBalancesParams extends BodyCursorPageParams {
3041
3057
  */
3042
3058
  starting_at?: string;
3043
3059
  }
3060
+ export interface ContractListSeatBalancesParams {
3061
+ /**
3062
+ * The contract ID to retrieve seat balances for
3063
+ */
3064
+ contract_id: string;
3065
+ /**
3066
+ * The customer ID to retrieve seat balances for
3067
+ */
3068
+ customer_id: string;
3069
+ /**
3070
+ * Include only commits or credits with access that cover this specific date
3071
+ * (cannot be used with starting_at or ending_before).
3072
+ */
3073
+ covering_date?: string;
3074
+ /**
3075
+ * Page token from a previous response to retrieve the next page
3076
+ */
3077
+ cursor?: string;
3078
+ /**
3079
+ * Include only commits or credits with access effective on or before this date
3080
+ * (cannot be used with covering_date).
3081
+ */
3082
+ effective_before?: string;
3083
+ /**
3084
+ * Include credits and commits in the response
3085
+ */
3086
+ include_credits_and_commits?: boolean;
3087
+ /**
3088
+ * Include ledger entries for each commit and commit. `include_credits_and_commits`
3089
+ * must be set to `true` for `include_ledgers=true` to apply.
3090
+ */
3091
+ include_ledgers?: boolean;
3092
+ /**
3093
+ * Maximum number of seats to return. Range: 1-100. Default: 25. When
3094
+ * `include_credits_and_commits = true`, if the total commits/credits across all
3095
+ * seats exceeds 100, a limit of 100 applies to the total credits and commits.
3096
+ * Seats are included greedily to maximize the number of seats returned. Example:
3097
+ * if seat 1 has 98 commits and seat 2 has 10 commits, both seats will be returned
3098
+ * (total: 108 commits). Each returned seat includes all of its associated credits
3099
+ * and commits.
3100
+ */
3101
+ limit?: number;
3102
+ /**
3103
+ * Optional filter to only include specific seats.
3104
+ */
3105
+ seat_ids?: Array<string>;
3106
+ /**
3107
+ * Include only commits or credits with access effective on or after this date
3108
+ * (cannot be used with covering_date).
3109
+ */
3110
+ starting_at?: string;
3111
+ /**
3112
+ * Optional filter to only include seats from specific subscriptions. If
3113
+ * subscriptions ids are not mapped to SEAT_BASED subscriptions, error will be
3114
+ * returned.
3115
+ */
3116
+ subscription_ids?: Array<string>;
3117
+ }
3044
3118
  export interface ContractRetrieveRateScheduleParams {
3045
3119
  /**
3046
3120
  * Body param: ID of the contract to get the rate schedule for.
@@ -3195,7 +3269,7 @@ export interface ContractUpdateEndDateParams {
3195
3269
  ending_before?: string;
3196
3270
  }
3197
3271
  export declare namespace Contracts {
3198
- export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3272
+ export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractGetNetBalanceResponse as ContractGetNetBalanceResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractListSeatBalancesResponse as ContractListSeatBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractListBalancesResponsesBodyCursorPage as ContractListBalancesResponsesBodyCursorPage, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractGetNetBalanceParams as ContractGetNetBalanceParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractListSeatBalancesParams as ContractListSeatBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
3199
3273
  export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, type ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
3200
3274
  export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, type RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
3201
3275
  export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };