@openmeter/client 1.0.0-beta-fcd2968ba8f9 → 1.0.0-beta-d10745e7ba87

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.
@@ -1497,8 +1497,9 @@ export declare const creditAdjustment: z.ZodObject<{
1497
1497
  }, z.core.$strip>;
1498
1498
  export declare const creditBalance: z.ZodObject<{
1499
1499
  currency: z.ZodUnion<readonly [z.ZodString]>;
1500
+ live: z.ZodString;
1501
+ settled: z.ZodString;
1500
1502
  pending: z.ZodString;
1501
- available: z.ZodString;
1502
1503
  }, z.core.$strip>;
1503
1504
  export declare const createCreditAdjustmentRequest: z.ZodObject<{
1504
1505
  name: z.ZodString;
@@ -2845,8 +2846,9 @@ export declare const creditBalances: z.ZodObject<{
2845
2846
  retrieved_at: z.ZodString;
2846
2847
  balances: z.ZodArray<z.ZodObject<{
2847
2848
  currency: z.ZodUnion<readonly [z.ZodString]>;
2849
+ live: z.ZodString;
2850
+ settled: z.ZodString;
2848
2851
  pending: z.ZodString;
2849
- available: z.ZodString;
2850
2852
  }, z.core.$strip>>;
2851
2853
  }, z.core.$strip>;
2852
2854
  export declare const creditTransactionPaginatedResponse: z.ZodObject<{
@@ -3001,6 +3003,7 @@ export declare const createCreditGrantRequest: z.ZodObject<{
3001
3003
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
3002
3004
  }, z.core.$strip>>;
3003
3005
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3006
+ effective_at: z.ZodOptional<z.ZodString>;
3004
3007
  expires_after: z.ZodOptional<z.ZodString>;
3005
3008
  key: z.ZodOptional<z.ZodString>;
3006
3009
  }, z.core.$strip>;
@@ -3051,6 +3054,7 @@ export declare const creditGrant: z.ZodObject<{
3051
3054
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
3052
3055
  }, z.core.$strip>>;
3053
3056
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3057
+ effective_at: z.ZodOptional<z.ZodString>;
3054
3058
  expires_after: z.ZodOptional<z.ZodString>;
3055
3059
  key: z.ZodOptional<z.ZodString>;
3056
3060
  expires_at: z.ZodOptional<z.ZodString>;
@@ -3997,6 +4001,7 @@ export declare const creditGrantPagePaginatedResponse: z.ZodObject<{
3997
4001
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
3998
4002
  }, z.core.$strip>>;
3999
4003
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4004
+ effective_at: z.ZodOptional<z.ZodString>;
4000
4005
  expires_after: z.ZodOptional<z.ZodString>;
4001
4006
  key: z.ZodOptional<z.ZodString>;
4002
4007
  expires_at: z.ZodOptional<z.ZodString>;
@@ -9391,6 +9396,7 @@ export declare const createCreditGrantBody: z.ZodObject<{
9391
9396
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9392
9397
  }, z.core.$strip>>;
9393
9398
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9399
+ effective_at: z.ZodOptional<z.ZodString>;
9394
9400
  expires_after: z.ZodOptional<z.ZodString>;
9395
9401
  key: z.ZodOptional<z.ZodString>;
9396
9402
  }, z.core.$strip>;
@@ -9441,6 +9447,7 @@ export declare const createCreditGrantResponse: z.ZodObject<{
9441
9447
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9442
9448
  }, z.core.$strip>>;
9443
9449
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9450
+ effective_at: z.ZodOptional<z.ZodString>;
9444
9451
  expires_after: z.ZodOptional<z.ZodString>;
9445
9452
  key: z.ZodOptional<z.ZodString>;
9446
9453
  expires_at: z.ZodOptional<z.ZodString>;
@@ -9503,6 +9510,7 @@ export declare const getCreditGrantResponse: z.ZodObject<{
9503
9510
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9504
9511
  }, z.core.$strip>>;
9505
9512
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9513
+ effective_at: z.ZodOptional<z.ZodString>;
9506
9514
  expires_after: z.ZodOptional<z.ZodString>;
9507
9515
  key: z.ZodOptional<z.ZodString>;
9508
9516
  expires_at: z.ZodOptional<z.ZodString>;
@@ -9580,6 +9588,7 @@ export declare const listCreditGrantsResponse: z.ZodObject<{
9580
9588
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9581
9589
  }, z.core.$strip>>;
9582
9590
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9591
+ effective_at: z.ZodOptional<z.ZodString>;
9583
9592
  expires_after: z.ZodOptional<z.ZodString>;
9584
9593
  key: z.ZodOptional<z.ZodString>;
9585
9594
  expires_at: z.ZodOptional<z.ZodString>;
@@ -9628,8 +9637,9 @@ export declare const getCustomerCreditBalanceResponse: z.ZodObject<{
9628
9637
  retrieved_at: z.ZodString;
9629
9638
  balances: z.ZodArray<z.ZodObject<{
9630
9639
  currency: z.ZodUnion<readonly [z.ZodString]>;
9640
+ live: z.ZodString;
9641
+ settled: z.ZodString;
9631
9642
  pending: z.ZodString;
9632
- available: z.ZodString;
9633
9643
  }, z.core.$strip>>;
9634
9644
  }, z.core.$strip>;
9635
9645
  export declare const createCreditAdjustmentPathParams: z.ZodObject<{
@@ -9707,6 +9717,7 @@ export declare const updateCreditGrantExternalSettlementResponse: z.ZodObject<{
9707
9717
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9708
9718
  }, z.core.$strip>>;
9709
9719
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9720
+ effective_at: z.ZodOptional<z.ZodString>;
9710
9721
  expires_after: z.ZodOptional<z.ZodString>;
9711
9722
  key: z.ZodOptional<z.ZodString>;
9712
9723
  expires_at: z.ZodOptional<z.ZodString>;
@@ -2124,8 +2124,9 @@ export const creditAdjustment = z
2124
2124
  export const creditBalance = z
2125
2125
  .object({
2126
2126
  currency: billingCurrencyCode,
2127
+ live: numeric,
2128
+ settled: numeric,
2127
2129
  pending: numeric,
2128
- available: numeric,
2129
2130
  })
2130
2131
  .describe('The credit balance by currency.');
2131
2132
  export const createCreditAdjustmentRequest = z
@@ -2936,6 +2937,7 @@ export const createCreditGrantRequest = z
2936
2937
  .optional()
2937
2938
  .default(10)
2938
2939
  .describe('Draw-down priority of the grant. Lower values have higher priority.'),
2940
+ effective_at: dateTime.optional(),
2939
2941
  expires_after: iso8601Duration.optional(),
2940
2942
  key: externalResourceKey.optional(),
2941
2943
  })
@@ -2972,6 +2974,7 @@ export const creditGrant = z
2972
2974
  .optional()
2973
2975
  .default(10)
2974
2976
  .describe('Draw-down priority of the grant. Lower values have higher priority.'),
2977
+ effective_at: dateTime.optional(),
2975
2978
  expires_after: iso8601Duration.optional(),
2976
2979
  key: externalResourceKey.optional(),
2977
2980
  expires_at: dateTime.optional(),
@@ -2010,16 +2010,15 @@ export interface CreditAdjustment {
2010
2010
  /** The credit balance by currency. */
2011
2011
  export interface CreditBalance {
2012
2012
  currency: string;
2013
+ /** Credits available after applying currently live charge impacts. */
2014
+ live: string;
2015
+ /** Credits that have been booked on the ledger as of the balance timestamp. */
2016
+ settled: string;
2013
2017
  /**
2014
- * Credits that have been granted but cannot yet be consumed. Includes grants
2015
- * awaiting payment clearance or with a future effective date.
2018
+ * Credits that have been granted but are not yet written to the ledger, or are
2019
+ * written to the ledger with a future booked time.
2016
2020
  */
2017
2021
  pending: string;
2018
- /**
2019
- * Credits that can be consumed right now. Derived from cleared grants after
2020
- * applying eligibility and restriction rules.
2021
- */
2022
- available: string;
2023
2022
  }
2024
2023
  /** CreditAdjustment create request. */
2025
2024
  export interface CreateCreditAdjustmentRequest {
@@ -3382,6 +3381,12 @@ export interface CreateCreditGrantRequest {
3382
3381
  filters?: CreateCreditGrantFilters;
3383
3382
  /** Draw-down priority of the grant. Lower values have higher priority. */
3384
3383
  priority: number;
3384
+ /**
3385
+ * The timestamp when the credit grant becomes effective.
3386
+ *
3387
+ * Defaults to the current date and time.
3388
+ */
3389
+ effective_at?: string;
3385
3390
  /**
3386
3391
  * The duration after which the credit grant expires.
3387
3392
  *
@@ -3445,6 +3450,12 @@ export interface CreditGrant {
3445
3450
  filters?: CreditGrantFilters;
3446
3451
  /** Draw-down priority of the grant. Lower values have higher priority. */
3447
3452
  priority: number;
3453
+ /**
3454
+ * The timestamp when the credit grant becomes effective.
3455
+ *
3456
+ * Defaults to the current date and time.
3457
+ */
3458
+ effective_at?: string;
3448
3459
  /**
3449
3460
  * The duration after which the credit grant expires.
3450
3461
  *
@@ -5159,6 +5170,12 @@ export interface CreateCreditGrantRequestInput {
5159
5170
  filters?: CreateCreditGrantFilters;
5160
5171
  /** Draw-down priority of the grant. Lower values have higher priority. */
5161
5172
  priority?: number;
5173
+ /**
5174
+ * The timestamp when the credit grant becomes effective.
5175
+ *
5176
+ * Defaults to the current date and time.
5177
+ */
5178
+ effective_at?: string;
5162
5179
  /**
5163
5180
  * The duration after which the credit grant expires.
5164
5181
  *
@@ -5216,6 +5233,12 @@ export interface CreditGrantInput {
5216
5233
  filters?: CreditGrantFilters;
5217
5234
  /** Draw-down priority of the grant. Lower values have higher priority. */
5218
5235
  priority?: number;
5236
+ /**
5237
+ * The timestamp when the credit grant becomes effective.
5238
+ *
5239
+ * Defaults to the current date and time.
5240
+ */
5241
+ effective_at?: string;
5219
5242
  /**
5220
5243
  * The duration after which the credit grant expires.
5221
5244
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-fcd2968ba8f9",
3
+ "version": "1.0.0-beta-d10745e7ba87",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://openmeter.io",
6
6
  "repository": {