@openmeter/client 1.0.0-beta-c817ba7663ad → 1.0.0-beta-eaeb4d58a615

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,7 +3003,9 @@ 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>;
3008
+ key: z.ZodOptional<z.ZodString>;
3005
3009
  }, z.core.$strip>;
3006
3010
  export declare const creditGrant: z.ZodObject<{
3007
3011
  id: z.ZodString;
@@ -3050,7 +3054,9 @@ export declare const creditGrant: z.ZodObject<{
3050
3054
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
3051
3055
  }, z.core.$strip>>;
3052
3056
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3057
+ effective_at: z.ZodOptional<z.ZodString>;
3053
3058
  expires_after: z.ZodOptional<z.ZodString>;
3059
+ key: z.ZodOptional<z.ZodString>;
3054
3060
  expires_at: z.ZodOptional<z.ZodString>;
3055
3061
  voided_at: z.ZodOptional<z.ZodString>;
3056
3062
  status: z.ZodEnum<{
@@ -3995,7 +4001,9 @@ export declare const creditGrantPagePaginatedResponse: z.ZodObject<{
3995
4001
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
3996
4002
  }, z.core.$strip>>;
3997
4003
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4004
+ effective_at: z.ZodOptional<z.ZodString>;
3998
4005
  expires_after: z.ZodOptional<z.ZodString>;
4006
+ key: z.ZodOptional<z.ZodString>;
3999
4007
  expires_at: z.ZodOptional<z.ZodString>;
4000
4008
  voided_at: z.ZodOptional<z.ZodString>;
4001
4009
  status: z.ZodEnum<{
@@ -9388,7 +9396,9 @@ export declare const createCreditGrantBody: z.ZodObject<{
9388
9396
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9389
9397
  }, z.core.$strip>>;
9390
9398
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9399
+ effective_at: z.ZodOptional<z.ZodString>;
9391
9400
  expires_after: z.ZodOptional<z.ZodString>;
9401
+ key: z.ZodOptional<z.ZodString>;
9392
9402
  }, z.core.$strip>;
9393
9403
  export declare const createCreditGrantResponse: z.ZodObject<{
9394
9404
  id: z.ZodString;
@@ -9437,7 +9447,9 @@ export declare const createCreditGrantResponse: z.ZodObject<{
9437
9447
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9438
9448
  }, z.core.$strip>>;
9439
9449
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9450
+ effective_at: z.ZodOptional<z.ZodString>;
9440
9451
  expires_after: z.ZodOptional<z.ZodString>;
9452
+ key: z.ZodOptional<z.ZodString>;
9441
9453
  expires_at: z.ZodOptional<z.ZodString>;
9442
9454
  voided_at: z.ZodOptional<z.ZodString>;
9443
9455
  status: z.ZodEnum<{
@@ -9498,7 +9510,9 @@ export declare const getCreditGrantResponse: z.ZodObject<{
9498
9510
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9499
9511
  }, z.core.$strip>>;
9500
9512
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9513
+ effective_at: z.ZodOptional<z.ZodString>;
9501
9514
  expires_after: z.ZodOptional<z.ZodString>;
9515
+ key: z.ZodOptional<z.ZodString>;
9502
9516
  expires_at: z.ZodOptional<z.ZodString>;
9503
9517
  voided_at: z.ZodOptional<z.ZodString>;
9504
9518
  status: z.ZodEnum<{
@@ -9574,7 +9588,9 @@ export declare const listCreditGrantsResponse: z.ZodObject<{
9574
9588
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9575
9589
  }, z.core.$strip>>;
9576
9590
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9591
+ effective_at: z.ZodOptional<z.ZodString>;
9577
9592
  expires_after: z.ZodOptional<z.ZodString>;
9593
+ key: z.ZodOptional<z.ZodString>;
9578
9594
  expires_at: z.ZodOptional<z.ZodString>;
9579
9595
  voided_at: z.ZodOptional<z.ZodString>;
9580
9596
  status: z.ZodEnum<{
@@ -9621,8 +9637,9 @@ export declare const getCustomerCreditBalanceResponse: z.ZodObject<{
9621
9637
  retrieved_at: z.ZodString;
9622
9638
  balances: z.ZodArray<z.ZodObject<{
9623
9639
  currency: z.ZodUnion<readonly [z.ZodString]>;
9640
+ live: z.ZodString;
9641
+ settled: z.ZodString;
9624
9642
  pending: z.ZodString;
9625
- available: z.ZodString;
9626
9643
  }, z.core.$strip>>;
9627
9644
  }, z.core.$strip>;
9628
9645
  export declare const createCreditAdjustmentPathParams: z.ZodObject<{
@@ -9700,7 +9717,9 @@ export declare const updateCreditGrantExternalSettlementResponse: z.ZodObject<{
9700
9717
  features: z.ZodOptional<z.ZodArray<z.ZodString>>;
9701
9718
  }, z.core.$strip>>;
9702
9719
  priority: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9720
+ effective_at: z.ZodOptional<z.ZodString>;
9703
9721
  expires_after: z.ZodOptional<z.ZodString>;
9722
+ key: z.ZodOptional<z.ZodString>;
9704
9723
  expires_at: z.ZodOptional<z.ZodString>;
9705
9724
  voided_at: z.ZodOptional<z.ZodString>;
9706
9725
  status: z.ZodEnum<{
@@ -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,7 +2937,9 @@ 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(),
2942
+ key: externalResourceKey.optional(),
2940
2943
  })
2941
2944
  .describe('CreditGrant create request.');
2942
2945
  export const creditGrant = z
@@ -2971,7 +2974,9 @@ export const creditGrant = z
2971
2974
  .optional()
2972
2975
  .default(10)
2973
2976
  .describe('Draw-down priority of the grant. Lower values have higher priority.'),
2977
+ effective_at: dateTime.optional(),
2974
2978
  expires_after: iso8601Duration.optional(),
2979
+ key: externalResourceKey.optional(),
2975
2980
  expires_at: dateTime.optional(),
2976
2981
  voided_at: dateTime.optional(),
2977
2982
  status: creditGrantStatus,
@@ -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,12 +3381,25 @@ 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
  *
3388
3393
  * Defaults to never expiring.
3389
3394
  */
3390
3395
  expires_after?: string;
3396
+ /**
3397
+ * Idempotency key for the credit grant creation request.
3398
+ *
3399
+ * When provided, reusing the same key returns an HTTP 409 Conflict instead of
3400
+ * creating a duplicate grant, which makes create requests safe to retry.
3401
+ */
3402
+ key?: string;
3391
3403
  }
3392
3404
  /**
3393
3405
  * A credit grant allocates credits to a customer.
@@ -3438,12 +3450,25 @@ export interface CreditGrant {
3438
3450
  filters?: CreditGrantFilters;
3439
3451
  /** Draw-down priority of the grant. Lower values have higher priority. */
3440
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;
3441
3459
  /**
3442
3460
  * The duration after which the credit grant expires.
3443
3461
  *
3444
3462
  * Defaults to never expiring.
3445
3463
  */
3446
3464
  expires_after?: string;
3465
+ /**
3466
+ * Idempotency key for the credit grant creation request.
3467
+ *
3468
+ * When provided, reusing the same key returns an HTTP 409 Conflict instead of
3469
+ * creating a duplicate grant, which makes create requests safe to retry.
3470
+ */
3471
+ key?: string;
3447
3472
  /**
3448
3473
  * The timestamp when the credit grant expires.
3449
3474
  *
@@ -5145,12 +5170,25 @@ export interface CreateCreditGrantRequestInput {
5145
5170
  filters?: CreateCreditGrantFilters;
5146
5171
  /** Draw-down priority of the grant. Lower values have higher priority. */
5147
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;
5148
5179
  /**
5149
5180
  * The duration after which the credit grant expires.
5150
5181
  *
5151
5182
  * Defaults to never expiring.
5152
5183
  */
5153
5184
  expires_after?: string;
5185
+ /**
5186
+ * Idempotency key for the credit grant creation request.
5187
+ *
5188
+ * When provided, reusing the same key returns an HTTP 409 Conflict instead of
5189
+ * creating a duplicate grant, which makes create requests safe to retry.
5190
+ */
5191
+ key?: string;
5154
5192
  }
5155
5193
  export interface CreditGrantInput {
5156
5194
  id: string;
@@ -5195,12 +5233,25 @@ export interface CreditGrantInput {
5195
5233
  filters?: CreditGrantFilters;
5196
5234
  /** Draw-down priority of the grant. Lower values have higher priority. */
5197
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;
5198
5242
  /**
5199
5243
  * The duration after which the credit grant expires.
5200
5244
  *
5201
5245
  * Defaults to never expiring.
5202
5246
  */
5203
5247
  expires_after?: string;
5248
+ /**
5249
+ * Idempotency key for the credit grant creation request.
5250
+ *
5251
+ * When provided, reusing the same key returns an HTTP 409 Conflict instead of
5252
+ * creating a duplicate grant, which makes create requests safe to retry.
5253
+ */
5254
+ key?: string;
5204
5255
  /**
5205
5256
  * The timestamp when the credit grant expires.
5206
5257
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-c817ba7663ad",
3
+ "version": "1.0.0-beta-eaeb4d58a615",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://openmeter.io",
6
6
  "repository": {