@openmeter/client 1.0.0-beta-0abbaf78837c → 1.0.0-beta-3a2cce989354

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.
@@ -170,9 +170,6 @@ export declare const entitlementType: z.ZodEnum<{
170
170
  metered: "metered";
171
171
  static: "static";
172
172
  }>;
173
- export declare const entitlementAccessExpand: z.ZodEnum<{
174
- value: "value";
175
- }>;
176
173
  export declare const iso8601Duration: z.ZodString;
177
174
  export declare const entitlementMeasureUsageFromPreset: z.ZodEnum<{
178
175
  current_period_start: "current_period_start";
@@ -184,6 +181,9 @@ export declare const stringFieldFilterExact: z.ZodUnion<readonly [z.ZodString, z
184
181
  oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
185
182
  neq: z.ZodOptional<z.ZodString>;
186
183
  }, z.core.$strip>]>;
184
+ export declare const entitlementAccessExpand: z.ZodEnum<{
185
+ value: "value";
186
+ }>;
187
187
  export declare const createLabels: z.ZodRecord<z.ZodString, z.ZodString>;
188
188
  export declare const creditFundingMethod: z.ZodEnum<{
189
189
  external: "external";
@@ -1390,6 +1390,15 @@ export declare const customerStripeCreateCustomerPortalSessionRequest: z.ZodObje
1390
1390
  returnUrl: z.ZodOptional<z.ZodString>;
1391
1391
  }, z.core.$strip>;
1392
1392
  }, z.core.$strip>;
1393
+ export declare const entitlementAccessCheckResult: z.ZodObject<{
1394
+ hasAccess: z.ZodBoolean;
1395
+ config: z.ZodOptional<z.ZodString>;
1396
+ type: z.ZodOptional<z.ZodEnum<{
1397
+ boolean: "boolean";
1398
+ metered: "metered";
1399
+ static: "static";
1400
+ }>>;
1401
+ }, z.core.$strip>;
1393
1402
  export declare const recurringPeriodInput: z.ZodObject<{
1394
1403
  interval: z.ZodString;
1395
1404
  anchor: z.ZodOptional<z.ZodDate>;
@@ -1864,7 +1873,7 @@ export declare const currencyAmount: z.ZodObject<{
1864
1873
  amount: z.ZodString;
1865
1874
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
1866
1875
  }, z.core.$strip>;
1867
- export declare const entitlementAccessResult: z.ZodObject<{
1876
+ export declare const entitlementValueResult: z.ZodObject<{
1868
1877
  type: z.ZodEnum<{
1869
1878
  boolean: "boolean";
1870
1879
  metered: "metered";
@@ -2097,6 +2106,18 @@ export declare const listEntitlementsParamsFilter: z.ZodObject<{
2097
2106
  neq: z.ZodOptional<z.ZodString>;
2098
2107
  }, z.core.$strip>]>>;
2099
2108
  }, z.core.$strip>;
2109
+ export declare const listGrantsParamsFilter: z.ZodObject<{
2110
+ customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2111
+ eq: z.ZodOptional<z.ZodString>;
2112
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
2113
+ neq: z.ZodOptional<z.ZodString>;
2114
+ }, z.core.$strip>]>>;
2115
+ featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2116
+ eq: z.ZodOptional<z.ZodString>;
2117
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
2118
+ neq: z.ZodOptional<z.ZodString>;
2119
+ }, z.core.$strip>]>>;
2120
+ }, z.core.$strip>;
2100
2121
  export declare const listSubscriptionsParamsFilter: z.ZodObject<{
2101
2122
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2102
2123
  eq: z.ZodOptional<z.ZodString>;
@@ -18594,27 +18615,14 @@ export declare const getCustomerEntitlementAccessPathParams: z.ZodObject<{
18594
18615
  customerId: z.ZodString;
18595
18616
  featureKey: z.ZodString;
18596
18617
  }, z.core.$strip>;
18597
- export declare const getCustomerEntitlementAccessQueryParams: z.ZodObject<{
18598
- expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
18599
- value: "value";
18600
- }>>>;
18601
- }, z.core.$strip>;
18602
18618
  export declare const getCustomerEntitlementAccessResponse: z.ZodObject<{
18603
- type: z.ZodEnum<{
18619
+ hasAccess: z.ZodBoolean;
18620
+ config: z.ZodOptional<z.ZodString>;
18621
+ type: z.ZodOptional<z.ZodEnum<{
18604
18622
  boolean: "boolean";
18605
18623
  metered: "metered";
18606
18624
  static: "static";
18607
- }>;
18608
- featureKey: z.ZodString;
18609
- hasAccess: z.ZodBoolean;
18610
- config: z.ZodOptional<z.ZodString>;
18611
- value: z.ZodOptional<z.ZodObject<{
18612
- balance: z.ZodString;
18613
- usage: z.ZodString;
18614
- overage: z.ZodString;
18615
- totalAvailableGrantAmount: z.ZodString;
18616
- grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
18617
- }, z.core.$strip>>;
18625
+ }>>;
18618
18626
  }, z.core.$strip>;
18619
18627
  export declare const createCustomerEntitlementPathParams: z.ZodObject<{
18620
18628
  customerId: z.ZodString;
@@ -19446,6 +19454,92 @@ export declare const listCustomerEntitlementGrantsResponse: z.ZodObject<{
19446
19454
  }, z.core.$strip>;
19447
19455
  }, z.core.$strip>;
19448
19456
  }, z.core.$strip>;
19457
+ export declare const getCustomerEntitlementValuePathParams: z.ZodObject<{
19458
+ customerId: z.ZodString;
19459
+ entitlementId: z.ZodString;
19460
+ }, z.core.$strip>;
19461
+ export declare const getCustomerEntitlementValueQueryParams: z.ZodObject<{
19462
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
19463
+ value: "value";
19464
+ }>>>;
19465
+ at: z.ZodOptional<z.ZodDate>;
19466
+ }, z.core.$strip>;
19467
+ export declare const getCustomerEntitlementValueResponse: z.ZodObject<{
19468
+ type: z.ZodEnum<{
19469
+ boolean: "boolean";
19470
+ metered: "metered";
19471
+ static: "static";
19472
+ }>;
19473
+ featureKey: z.ZodString;
19474
+ hasAccess: z.ZodBoolean;
19475
+ config: z.ZodOptional<z.ZodString>;
19476
+ value: z.ZodOptional<z.ZodObject<{
19477
+ balance: z.ZodString;
19478
+ usage: z.ZodString;
19479
+ overage: z.ZodString;
19480
+ totalAvailableGrantAmount: z.ZodString;
19481
+ grantBalances: z.ZodRecord<z.ZodString, z.ZodString>;
19482
+ }, z.core.$strip>>;
19483
+ }, z.core.$strip>;
19484
+ export declare const listGrantsQueryParams: z.ZodObject<{
19485
+ page: z.ZodOptional<z.ZodObject<{
19486
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
19487
+ number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
19488
+ }, z.core.$strip>>;
19489
+ sort: z.ZodOptional<z.ZodObject<{
19490
+ by: z.ZodString;
19491
+ order: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"asc">, z.ZodLiteral<"desc">]>>>;
19492
+ }, z.core.$strip>>;
19493
+ filter: z.ZodOptional<z.ZodObject<{
19494
+ customerId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
19495
+ eq: z.ZodOptional<z.ZodString>;
19496
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
19497
+ neq: z.ZodOptional<z.ZodString>;
19498
+ }, z.core.$strip>]>>;
19499
+ featureId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
19500
+ eq: z.ZodOptional<z.ZodString>;
19501
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
19502
+ neq: z.ZodOptional<z.ZodString>;
19503
+ }, z.core.$strip>]>>;
19504
+ }, z.core.$strip>>;
19505
+ includeDeleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
19506
+ }, z.core.$strip>;
19507
+ export declare const listGrantsResponse: z.ZodObject<{
19508
+ data: z.ZodArray<z.ZodObject<{
19509
+ id: z.ZodString;
19510
+ entitlementId: z.ZodString;
19511
+ amount: z.ZodString;
19512
+ priority: z.ZodNumber;
19513
+ effectiveAt: z.ZodDate;
19514
+ expiresAfter: z.ZodOptional<z.ZodString>;
19515
+ expiresAt: z.ZodOptional<z.ZodDate>;
19516
+ maxRolloverAmount: z.ZodString;
19517
+ minRolloverAmount: z.ZodString;
19518
+ recurrence: z.ZodOptional<z.ZodObject<{
19519
+ anchor: z.ZodDate;
19520
+ interval: z.ZodString;
19521
+ }, z.core.$strip>>;
19522
+ nextRecurrence: z.ZodOptional<z.ZodDate>;
19523
+ voidedAt: z.ZodOptional<z.ZodDate>;
19524
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
19525
+ createdAt: z.ZodDate;
19526
+ updatedAt: z.ZodDate;
19527
+ deletedAt: z.ZodOptional<z.ZodDate>;
19528
+ }, z.core.$strip>>;
19529
+ meta: z.ZodObject<{
19530
+ page: z.ZodObject<{
19531
+ number: z.ZodNumber;
19532
+ size: z.ZodNumber;
19533
+ total: z.ZodNumber;
19534
+ }, z.core.$strip>;
19535
+ }, z.core.$strip>;
19536
+ }, z.core.$strip>;
19537
+ export declare const voidGrantPathParams: z.ZodObject<{
19538
+ grantId: z.ZodString;
19539
+ }, z.core.$strip>;
19540
+ export declare const voidGrantQueryParams: z.ZodObject<{
19541
+ voidedAt: z.ZodOptional<z.ZodDate>;
19542
+ }, z.core.$strip>;
19449
19543
  export declare const createCreditGrantPathParams: z.ZodObject<{
19450
19544
  customerId: z.ZodString;
19451
19545
  }, z.core.$strip>;
@@ -34675,9 +34769,6 @@ export declare const entitlementTypeWire: z.ZodEnum<{
34675
34769
  metered: "metered";
34676
34770
  static: "static";
34677
34771
  }>;
34678
- export declare const entitlementAccessExpandWire: z.ZodEnum<{
34679
- value: "value";
34680
- }>;
34681
34772
  export declare const iso8601DurationWire: z.ZodString;
34682
34773
  export declare const entitlementMeasureUsageFromPresetWire: z.ZodEnum<{
34683
34774
  current_period_start: "current_period_start";
@@ -34689,6 +34780,9 @@ export declare const stringFieldFilterExactWire: z.ZodUnion<readonly [z.ZodStrin
34689
34780
  oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
34690
34781
  neq: z.ZodOptional<z.ZodString>;
34691
34782
  }, z.core.$strict>]>;
34783
+ export declare const entitlementAccessExpandWire: z.ZodEnum<{
34784
+ value: "value";
34785
+ }>;
34692
34786
  export declare const createLabelsWire: z.ZodRecord<z.ZodString, z.ZodString>;
34693
34787
  export declare const creditFundingMethodWire: z.ZodEnum<{
34694
34788
  external: "external";
@@ -35895,6 +35989,15 @@ export declare const customerStripeCreateCustomerPortalSessionRequestWire: z.Zod
35895
35989
  return_url: z.ZodOptional<z.ZodString>;
35896
35990
  }, z.core.$strict>;
35897
35991
  }, z.core.$strict>;
35992
+ export declare const entitlementAccessCheckResultWire: z.ZodObject<{
35993
+ has_access: z.ZodBoolean;
35994
+ config: z.ZodOptional<z.ZodString>;
35995
+ type: z.ZodOptional<z.ZodEnum<{
35996
+ boolean: "boolean";
35997
+ metered: "metered";
35998
+ static: "static";
35999
+ }>>;
36000
+ }, z.core.$strict>;
35898
36001
  export declare const recurringPeriodInputWire: z.ZodObject<{
35899
36002
  interval: z.ZodString;
35900
36003
  anchor: z.ZodOptional<z.ZodString>;
@@ -36369,7 +36472,7 @@ export declare const currencyAmountWire: z.ZodObject<{
36369
36472
  amount: z.ZodString;
36370
36473
  currency: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
36371
36474
  }, z.core.$strict>;
36372
- export declare const entitlementAccessResultWire: z.ZodObject<{
36475
+ export declare const entitlementValueResultWire: z.ZodObject<{
36373
36476
  type: z.ZodEnum<{
36374
36477
  boolean: "boolean";
36375
36478
  metered: "metered";
@@ -36602,6 +36705,18 @@ export declare const listEntitlementsParamsFilterWire: z.ZodObject<{
36602
36705
  neq: z.ZodOptional<z.ZodString>;
36603
36706
  }, z.core.$strict>]>>;
36604
36707
  }, z.core.$strict>;
36708
+ export declare const listGrantsParamsFilterWire: z.ZodObject<{
36709
+ customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
36710
+ eq: z.ZodOptional<z.ZodString>;
36711
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
36712
+ neq: z.ZodOptional<z.ZodString>;
36713
+ }, z.core.$strict>]>>;
36714
+ feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
36715
+ eq: z.ZodOptional<z.ZodString>;
36716
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
36717
+ neq: z.ZodOptional<z.ZodString>;
36718
+ }, z.core.$strict>]>>;
36719
+ }, z.core.$strict>;
36605
36720
  export declare const listSubscriptionsParamsFilterWire: z.ZodObject<{
36606
36721
  id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
36607
36722
  eq: z.ZodOptional<z.ZodString>;
@@ -53090,27 +53205,14 @@ export declare const getCustomerEntitlementAccessPathParamsWire: z.ZodObject<{
53090
53205
  customerId: z.ZodString;
53091
53206
  featureKey: z.ZodString;
53092
53207
  }, z.core.$strip>;
53093
- export declare const getCustomerEntitlementAccessQueryParamsWire: z.ZodObject<{
53094
- expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
53095
- value: "value";
53096
- }>>>;
53097
- }, z.core.$strip>;
53098
53208
  export declare const getCustomerEntitlementAccessResponseWire: z.ZodObject<{
53099
- type: z.ZodEnum<{
53209
+ has_access: z.ZodBoolean;
53210
+ config: z.ZodOptional<z.ZodString>;
53211
+ type: z.ZodOptional<z.ZodEnum<{
53100
53212
  boolean: "boolean";
53101
53213
  metered: "metered";
53102
53214
  static: "static";
53103
- }>;
53104
- feature_key: z.ZodString;
53105
- has_access: z.ZodBoolean;
53106
- config: z.ZodOptional<z.ZodString>;
53107
- value: z.ZodOptional<z.ZodObject<{
53108
- balance: z.ZodString;
53109
- usage: z.ZodString;
53110
- overage: z.ZodString;
53111
- total_available_grant_amount: z.ZodString;
53112
- grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
53113
- }, z.core.$strict>>;
53215
+ }>>;
53114
53216
  }, z.core.$strict>;
53115
53217
  export declare const createCustomerEntitlementPathParamsWire: z.ZodObject<{
53116
53218
  customerId: z.ZodString;
@@ -53933,6 +54035,89 @@ export declare const listCustomerEntitlementGrantsResponseWire: z.ZodObject<{
53933
54035
  }, z.core.$strict>;
53934
54036
  }, z.core.$strict>;
53935
54037
  }, z.core.$strict>;
54038
+ export declare const getCustomerEntitlementValuePathParamsWire: z.ZodObject<{
54039
+ customerId: z.ZodString;
54040
+ entitlementId: z.ZodString;
54041
+ }, z.core.$strip>;
54042
+ export declare const getCustomerEntitlementValueQueryParamsWire: z.ZodObject<{
54043
+ expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
54044
+ value: "value";
54045
+ }>>>;
54046
+ at: z.ZodOptional<z.ZodString>;
54047
+ }, z.core.$strip>;
54048
+ export declare const getCustomerEntitlementValueResponseWire: z.ZodObject<{
54049
+ type: z.ZodEnum<{
54050
+ boolean: "boolean";
54051
+ metered: "metered";
54052
+ static: "static";
54053
+ }>;
54054
+ feature_key: z.ZodString;
54055
+ has_access: z.ZodBoolean;
54056
+ config: z.ZodOptional<z.ZodString>;
54057
+ value: z.ZodOptional<z.ZodObject<{
54058
+ balance: z.ZodString;
54059
+ usage: z.ZodString;
54060
+ overage: z.ZodString;
54061
+ total_available_grant_amount: z.ZodString;
54062
+ grant_balances: z.ZodRecord<z.ZodString, z.ZodString>;
54063
+ }, z.core.$strict>>;
54064
+ }, z.core.$strict>;
54065
+ export declare const listGrantsQueryParamsWire: z.ZodObject<{
54066
+ page: z.ZodOptional<z.ZodObject<{
54067
+ size: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
54068
+ number: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
54069
+ }, z.core.$strict>>;
54070
+ sort: z.ZodOptional<z.ZodString>;
54071
+ filter: z.ZodOptional<z.ZodObject<{
54072
+ customer_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
54073
+ eq: z.ZodOptional<z.ZodString>;
54074
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
54075
+ neq: z.ZodOptional<z.ZodString>;
54076
+ }, z.core.$strict>]>>;
54077
+ feature_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
54078
+ eq: z.ZodOptional<z.ZodString>;
54079
+ oeq: z.ZodOptional<z.ZodArray<z.ZodString>>;
54080
+ neq: z.ZodOptional<z.ZodString>;
54081
+ }, z.core.$strict>]>>;
54082
+ }, z.core.$strict>>;
54083
+ include_deleted: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
54084
+ }, z.core.$strip>;
54085
+ export declare const listGrantsResponseWire: z.ZodObject<{
54086
+ data: z.ZodArray<z.ZodObject<{
54087
+ id: z.ZodString;
54088
+ entitlement_id: z.ZodString;
54089
+ amount: z.ZodString;
54090
+ priority: z.ZodNumber;
54091
+ effective_at: z.ZodString;
54092
+ expires_after: z.ZodOptional<z.ZodString>;
54093
+ expires_at: z.ZodOptional<z.ZodString>;
54094
+ max_rollover_amount: z.ZodString;
54095
+ min_rollover_amount: z.ZodString;
54096
+ recurrence: z.ZodOptional<z.ZodObject<{
54097
+ anchor: z.ZodString;
54098
+ interval: z.ZodString;
54099
+ }, z.core.$strict>>;
54100
+ next_recurrence: z.ZodOptional<z.ZodString>;
54101
+ voided_at: z.ZodOptional<z.ZodString>;
54102
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
54103
+ created_at: z.ZodString;
54104
+ updated_at: z.ZodString;
54105
+ deleted_at: z.ZodOptional<z.ZodString>;
54106
+ }, z.core.$strict>>;
54107
+ meta: z.ZodObject<{
54108
+ page: z.ZodObject<{
54109
+ number: z.ZodNumber;
54110
+ size: z.ZodNumber;
54111
+ total: z.ZodNumber;
54112
+ }, z.core.$strict>;
54113
+ }, z.core.$strict>;
54114
+ }, z.core.$strict>;
54115
+ export declare const voidGrantPathParamsWire: z.ZodObject<{
54116
+ grantId: z.ZodString;
54117
+ }, z.core.$strip>;
54118
+ export declare const voidGrantQueryParamsWire: z.ZodObject<{
54119
+ voided_at: z.ZodOptional<z.ZodString>;
54120
+ }, z.core.$strip>;
53936
54121
  export declare const createCreditGrantPathParamsWire: z.ZodObject<{
53937
54122
  customerId: z.ZodString;
53938
54123
  }, z.core.$strip>;
@@ -375,9 +375,6 @@ export const appStripeCreateCustomerPortalSessionOptions = z
375
375
  export const entitlementType = z
376
376
  .enum(['metered', 'static', 'boolean'])
377
377
  .describe('The type of the entitlement.');
378
- export const entitlementAccessExpand = z
379
- .enum(['value'])
380
- .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
381
378
  export const iso8601Duration = z
382
379
  .string()
383
380
  .regex(new RegExp('^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$'))
@@ -407,6 +404,9 @@ export const stringFieldFilterExact = z
407
404
  }),
408
405
  ])
409
406
  .describe('Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
407
+ export const entitlementAccessExpand = z
408
+ .enum(['value'])
409
+ .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
410
410
  export const createLabels = z
411
411
  .record(z.string(), z.string())
412
412
  .describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
@@ -1252,7 +1252,7 @@ export const entitlementAccessValue = z
1252
1252
  .record(z.string(), numeric)
1253
1253
  .describe('The remaining balance of each grant, keyed by grant ID.'),
1254
1254
  })
1255
- .describe('Balance details of a metered entitlement.');
1255
+ .describe('Balance details of a metered entitlement at the evaluation time, which is the `at` query parameter when given and the current time otherwise.');
1256
1256
  export const entitlementIssueAfterReset = z
1257
1257
  .object({
1258
1258
  amount: numeric,
@@ -2257,6 +2257,18 @@ export const customerStripeCreateCustomerPortalSessionRequest = z
2257
2257
  stripeOptions: appStripeCreateCustomerPortalSessionOptions,
2258
2258
  })
2259
2259
  .describe('Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.');
2260
+ export const entitlementAccessCheckResult = z
2261
+ .object({
2262
+ hasAccess: z
2263
+ .boolean()
2264
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
2265
+ config: z
2266
+ .string()
2267
+ .optional()
2268
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2269
+ type: entitlementType.optional(),
2270
+ })
2271
+ .describe('Entitlement access check result.');
2260
2272
  export const recurringPeriodInput = z
2261
2273
  .object({
2262
2274
  interval: iso8601Duration,
@@ -2787,7 +2799,7 @@ export const currencyAmount = z
2787
2799
  currency: billingCurrencyCode,
2788
2800
  })
2789
2801
  .describe('Monetary amount in a fiat or custom currency.');
2790
- export const entitlementAccessResult = z
2802
+ export const entitlementValueResult = z
2791
2803
  .object({
2792
2804
  type: entitlementType,
2793
2805
  featureKey: resourceKey,
@@ -2800,7 +2812,7 @@ export const entitlementAccessResult = z
2800
2812
  .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
2801
2813
  value: entitlementAccessValue.optional(),
2802
2814
  })
2803
- .describe('Entitlement access result.');
2815
+ .describe('Entitlement value result.');
2804
2816
  export const priceTier = z
2805
2817
  .object({
2806
2818
  upToAmount: numeric.optional(),
@@ -2900,6 +2912,12 @@ export const listEntitlementsParamsFilter = z
2900
2912
  customerId: ulidFieldFilter.optional(),
2901
2913
  })
2902
2914
  .describe('Filter options for listing entitlements.');
2915
+ export const listGrantsParamsFilter = z
2916
+ .object({
2917
+ customerId: ulidFieldFilter.optional(),
2918
+ featureId: ulidFieldFilter.optional(),
2919
+ })
2920
+ .describe('Filter options for listing grants.');
2903
2921
  export const listSubscriptionsParamsFilter = z
2904
2922
  .object({
2905
2923
  id: ulidFieldFilter.optional(),
@@ -3892,7 +3910,7 @@ export const chargeFlatFeeSystemIntent = z
3892
3910
  export const listCustomerEntitlementAccessResponseData = z
3893
3911
  .object({
3894
3912
  data: z
3895
- .array(entitlementAccessResult)
3913
+ .array(entitlementValueResult)
3896
3914
  .describe('The list of entitlement access results.'),
3897
3915
  })
3898
3916
  .describe('List customer entitlement access response data.');
@@ -5782,13 +5800,7 @@ export const getCustomerEntitlementAccessPathParams = z.object({
5782
5800
  customerId: ulid,
5783
5801
  featureKey: resourceKey,
5784
5802
  });
5785
- export const getCustomerEntitlementAccessQueryParams = z.object({
5786
- expand: z
5787
- .array(entitlementAccessExpand)
5788
- .optional()
5789
- .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
5790
- });
5791
- export const getCustomerEntitlementAccessResponse = entitlementAccessResult;
5803
+ export const getCustomerEntitlementAccessResponse = entitlementAccessCheckResult;
5792
5804
  export const createCustomerEntitlementPathParams = z.object({
5793
5805
  customerId: ulid,
5794
5806
  });
@@ -5906,6 +5918,47 @@ export const listCustomerEntitlementGrantsResponse = z.object({
5906
5918
  data: z.array(entitlementGrant),
5907
5919
  meta: paginatedMeta,
5908
5920
  });
5921
+ export const getCustomerEntitlementValuePathParams = z.object({
5922
+ customerId: ulid,
5923
+ entitlementId: ulid,
5924
+ });
5925
+ export const getCustomerEntitlementValueQueryParams = z.object({
5926
+ expand: z
5927
+ .array(entitlementAccessExpand)
5928
+ .optional()
5929
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
5930
+ at: dateTime.optional(),
5931
+ });
5932
+ export const getCustomerEntitlementValueResponse = entitlementValueResult;
5933
+ export const listGrantsQueryParams = z.object({
5934
+ page: z
5935
+ .object({
5936
+ size: z.coerce
5937
+ .number()
5938
+ .int()
5939
+ .optional()
5940
+ .describe('The number of items to include per page.'),
5941
+ number: z.coerce.number().int().optional().describe('The page number.'),
5942
+ })
5943
+ .optional()
5944
+ .describe('Determines which page of the collection to retrieve.'),
5945
+ sort: sortQuery.optional(),
5946
+ filter: listGrantsParamsFilter.optional(),
5947
+ includeDeleted: z.coerce
5948
+ .boolean()
5949
+ .optional()
5950
+ .describe('Include deleted grants in the response.'),
5951
+ });
5952
+ export const listGrantsResponse = z.object({
5953
+ data: z.array(entitlementGrant),
5954
+ meta: paginatedMeta,
5955
+ });
5956
+ export const voidGrantPathParams = z.object({
5957
+ grantId: ulid,
5958
+ });
5959
+ export const voidGrantQueryParams = z.object({
5960
+ voidedAt: dateTime.optional(),
5961
+ });
5909
5962
  export const createCreditGrantPathParams = z.object({
5910
5963
  customerId: ulid,
5911
5964
  });
@@ -6967,9 +7020,6 @@ export const appStripeCreateCustomerPortalSessionOptionsWire = z
6967
7020
  export const entitlementTypeWire = z
6968
7021
  .enum(['metered', 'static', 'boolean'])
6969
7022
  .describe('The type of the entitlement.');
6970
- export const entitlementAccessExpandWire = z
6971
- .enum(['value'])
6972
- .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
6973
7023
  export const iso8601DurationWire = z
6974
7024
  .string()
6975
7025
  .regex(new RegExp('^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$'))
@@ -6999,6 +7049,9 @@ export const stringFieldFilterExactWire = z
6999
7049
  }),
7000
7050
  ])
7001
7051
  .describe('Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
7052
+ export const entitlementAccessExpandWire = z
7053
+ .enum(['value'])
7054
+ .describe('Expands for customer entitlement access. Values: - `value`: The balance details of a metered entitlement; it sets the `value` field.');
7002
7055
  export const createLabelsWire = z
7003
7056
  .record(z.string(), z.string())
7004
7057
  .describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
@@ -7838,7 +7891,7 @@ export const entitlementAccessValueWire = z
7838
7891
  .record(z.string(), numericWire)
7839
7892
  .describe('The remaining balance of each grant, keyed by grant ID.'),
7840
7893
  })
7841
- .describe('Balance details of a metered entitlement.');
7894
+ .describe('Balance details of a metered entitlement at the evaluation time, which is the `at` query parameter when given and the current time otherwise.');
7842
7895
  export const entitlementIssueAfterResetWire = z
7843
7896
  .strictObject({
7844
7897
  amount: numericWire,
@@ -8831,6 +8884,18 @@ export const customerStripeCreateCustomerPortalSessionRequestWire = z
8831
8884
  stripe_options: appStripeCreateCustomerPortalSessionOptionsWire,
8832
8885
  })
8833
8886
  .describe('Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.');
8887
+ export const entitlementAccessCheckResultWire = z
8888
+ .strictObject({
8889
+ has_access: z
8890
+ .boolean()
8891
+ .describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
8892
+ config: z
8893
+ .string()
8894
+ .optional()
8895
+ .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
8896
+ type: entitlementTypeWire.optional(),
8897
+ })
8898
+ .describe('Entitlement access check result.');
8834
8899
  export const recurringPeriodInputWire = z
8835
8900
  .strictObject({
8836
8901
  interval: iso8601DurationWire,
@@ -9348,7 +9413,7 @@ export const currencyAmountWire = z
9348
9413
  currency: billingCurrencyCodeWire,
9349
9414
  })
9350
9415
  .describe('Monetary amount in a fiat or custom currency.');
9351
- export const entitlementAccessResultWire = z
9416
+ export const entitlementValueResultWire = z
9352
9417
  .strictObject({
9353
9418
  type: entitlementTypeWire,
9354
9419
  feature_key: resourceKeyWire,
@@ -9361,7 +9426,7 @@ export const entitlementAccessResultWire = z
9361
9426
  .describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
9362
9427
  value: entitlementAccessValueWire.optional(),
9363
9428
  })
9364
- .describe('Entitlement access result.');
9429
+ .describe('Entitlement value result.');
9365
9430
  export const priceTierWire = z
9366
9431
  .strictObject({
9367
9432
  up_to_amount: numericWire.optional(),
@@ -9461,6 +9526,12 @@ export const listEntitlementsParamsFilterWire = z
9461
9526
  customer_id: ulidFieldFilterWire.optional(),
9462
9527
  })
9463
9528
  .describe('Filter options for listing entitlements.');
9529
+ export const listGrantsParamsFilterWire = z
9530
+ .strictObject({
9531
+ customer_id: ulidFieldFilterWire.optional(),
9532
+ feature_id: ulidFieldFilterWire.optional(),
9533
+ })
9534
+ .describe('Filter options for listing grants.');
9464
9535
  export const listSubscriptionsParamsFilterWire = z
9465
9536
  .strictObject({
9466
9537
  id: ulidFieldFilterWire.optional(),
@@ -10452,7 +10523,7 @@ export const chargeFlatFeeSystemIntentWire = z
10452
10523
  export const listCustomerEntitlementAccessResponseDataWire = z
10453
10524
  .strictObject({
10454
10525
  data: z
10455
- .array(entitlementAccessResultWire)
10526
+ .array(entitlementValueResultWire)
10456
10527
  .describe('The list of entitlement access results.'),
10457
10528
  })
10458
10529
  .describe('List customer entitlement access response data.');
@@ -12344,13 +12415,7 @@ export const getCustomerEntitlementAccessPathParamsWire = z.object({
12344
12415
  customerId: ulidWire,
12345
12416
  featureKey: resourceKeyWire,
12346
12417
  });
12347
- export const getCustomerEntitlementAccessQueryParamsWire = z.object({
12348
- expand: z
12349
- .array(entitlementAccessExpandWire)
12350
- .optional()
12351
- .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
12352
- });
12353
- export const getCustomerEntitlementAccessResponseWire = entitlementAccessResultWire;
12418
+ export const getCustomerEntitlementAccessResponseWire = entitlementAccessCheckResultWire;
12354
12419
  export const createCustomerEntitlementPathParamsWire = z.object({
12355
12420
  customerId: ulidWire,
12356
12421
  });
@@ -12476,6 +12541,50 @@ export const listCustomerEntitlementGrantsResponseWire = z.strictObject({
12476
12541
  data: z.array(entitlementGrantWire),
12477
12542
  meta: paginatedMetaWire,
12478
12543
  });
12544
+ export const getCustomerEntitlementValuePathParamsWire = z.object({
12545
+ customerId: ulidWire,
12546
+ entitlementId: ulidWire,
12547
+ });
12548
+ export const getCustomerEntitlementValueQueryParamsWire = z.object({
12549
+ expand: z
12550
+ .array(entitlementAccessExpandWire)
12551
+ .optional()
12552
+ .describe('Expand computed fields. Supported values are: - `value`: Expand the balance details of a metered entitlement; it sets the `value` field.'),
12553
+ at: dateTimeWire.optional(),
12554
+ });
12555
+ export const getCustomerEntitlementValueResponseWire = entitlementValueResultWire;
12556
+ export const listGrantsQueryParamsWire = z.object({
12557
+ page: z
12558
+ .strictObject({
12559
+ size: z.coerce
12560
+ .number()
12561
+ .int()
12562
+ .optional()
12563
+ .describe('The number of items to include per page.'),
12564
+ number: z.coerce.number().int().optional().describe('The page number.'),
12565
+ })
12566
+ .optional()
12567
+ .describe('Determines which page of the collection to retrieve.'),
12568
+ sort: z
12569
+ .string()
12570
+ .optional()
12571
+ .describe('Sort grants returned in the response. Supported sort attributes are: - `created_at` (default) - `updated_at` - `effective_at` - `expires_at` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order.'),
12572
+ filter: listGrantsParamsFilterWire.optional(),
12573
+ include_deleted: z.coerce
12574
+ .boolean()
12575
+ .optional()
12576
+ .describe('Include deleted grants in the response.'),
12577
+ });
12578
+ export const listGrantsResponseWire = z.strictObject({
12579
+ data: z.array(entitlementGrantWire),
12580
+ meta: paginatedMetaWire,
12581
+ });
12582
+ export const voidGrantPathParamsWire = z.object({
12583
+ grantId: ulidWire,
12584
+ });
12585
+ export const voidGrantQueryParamsWire = z.object({
12586
+ voided_at: dateTimeWire.optional(),
12587
+ });
12479
12588
  export const createCreditGrantPathParamsWire = z.object({
12480
12589
  customerId: ulidWire,
12481
12590
  });