@openmeter/sdk 1.0.0-beta-8a1bc3f3231a → 1.0.0-beta-cd7699299ca5

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.
@@ -2313,6 +2313,8 @@ export declare const uninstallAppParams: zod.ZodObject<{
2313
2313
  }>;
2314
2314
  /**
2315
2315
  * Update the Stripe API key.
2316
+
2317
+ ⚠️ __Deprecated__: Use [`PUT /api/v1/apps/{id}`](#tag/apps/put/api/v1/apps/{id}) instead.
2316
2318
  * @deprecated
2317
2319
  * @summary Update Stripe API key
2318
2320
  */
@@ -8620,6 +8622,9 @@ export declare const listCustomerSubscriptionsQueryParams: zod.ZodObject<{
8620
8622
  * List all entitlements for all the subjects and features. This endpoint is intended for administrative purposes only.
8621
8623
  To fetch the entitlements of a specific subject please use the /api/v1/subjects/{subjectKeyOrID}/entitlements endpoint.
8622
8624
  If page is provided that takes precedence and the paginated response is returned.
8625
+
8626
+ ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements`](#tag/entitlements/get/api/v2/entitlements) instead.
8627
+ * @deprecated
8623
8628
  * @summary List all entitlements
8624
8629
  */
8625
8630
  export declare const listEntitlementsQueryExcludeInactiveDefault: false;
@@ -8665,8 +8670,11 @@ export declare const listEntitlementsQueryParams: zod.ZodObject<{
8665
8670
  orderBy?: "createdAt" | "updatedAt" | undefined;
8666
8671
  }>;
8667
8672
  /**
8668
- * Get entitlement by id.
8669
- * @summary Get entitlement by id
8673
+ * Get entitlement by ID.
8674
+
8675
+ ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements/{entitlementId}`](#tag/entitlements/get/api/v2/entitlements/{entitlementId}) instead.
8676
+ * @deprecated
8677
+ * @summary Get entitlement by ID
8670
8678
  */
8671
8679
  export declare const getEntitlementByIdPathEntitlementIdRegExp: RegExp;
8672
8680
  export declare const getEntitlementByIdParams: zod.ZodObject<{
@@ -8961,6 +8969,9 @@ export declare const deleteFeatureParams: zod.ZodObject<{
8961
8969
  * List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only.
8962
8970
  To fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint.
8963
8971
  If page is provided that takes precedence and the paginated response is returned.
8972
+
8973
+ ⚠️ __Deprecated__: Use [`GET /api/v2/grants`](#tag/entitlements/get/api/v2/grants) instead.
8974
+ * @deprecated
8964
8975
  * @summary List grants
8965
8976
  */
8966
8977
  export declare const listGrantsQueryIncludeDeletedDefault: false;
@@ -9005,6 +9016,9 @@ export declare const listGrantsQueryParams: zod.ZodObject<{
9005
9016
  /**
9006
9017
  * Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations. Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed to the grant will remain, but future usage cannot be burnt down from the grant.
9007
9018
  For example, if you have a single grant for your metered entitlement with an initial amount of 100, and so far 60 usage has been metered, the grant (and the entitlement itself) would have a balance of 40. If you then void that grant, balance becomes 0, but the 60 previous usage will not be affected.
9019
+
9020
+ ⚠️ __Deprecated__: Use [`DELETE /api/v2/grants/{grantId}`](#tag/entitlements/delete/api/v2/grants/{grantId}) instead.
9021
+ * @deprecated
9008
9022
  * @summary Void grant
9009
9023
  */
9010
9024
  export declare const voidGrantParams: zod.ZodObject<{
@@ -13404,6 +13418,9 @@ export declare const createStripeCheckoutSessionBody: zod.ZodObject<{
13404
13418
 
13405
13419
  If the subject doesn't exist, it will be created.
13406
13420
  If the subject exists, it will be partially updated with the provided fields.
13421
+
13422
+ ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
13423
+ * @deprecated
13407
13424
  * @summary Upsert subject
13408
13425
  */
13409
13426
  export declare const upsertSubjectBodyItem: zod.ZodObject<{
@@ -13452,6 +13469,9 @@ export declare const upsertSubjectBody: zod.ZodArray<zod.ZodObject<{
13452
13469
  }>, "many">;
13453
13470
  /**
13454
13471
  * Get subject by ID or key.
13472
+
13473
+ ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
13474
+ * @deprecated
13455
13475
  * @summary Get subject
13456
13476
  */
13457
13477
  export declare const getSubjectParams: zod.ZodObject<{
@@ -13463,6 +13483,9 @@ export declare const getSubjectParams: zod.ZodObject<{
13463
13483
  }>;
13464
13484
  /**
13465
13485
  * Delete subject by ID or key.
13486
+
13487
+ ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
13488
+ * @deprecated
13466
13489
  * @summary Delete subject
13467
13490
  */
13468
13491
  export declare const deleteSubjectParams: zod.ZodObject<{
@@ -13482,6 +13505,9 @@ export declare const deleteSubjectParams: zod.ZodObject<{
13482
13505
  A given subject can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.
13483
13506
 
13484
13507
  Once an entitlement is created you cannot modify it, only delete it.
13508
+
13509
+ ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements) instead.
13510
+ * @deprecated
13485
13511
  * @summary Create a subject entitlement
13486
13512
  */
13487
13513
  export declare const createEntitlementParams: zod.ZodObject<{
@@ -13632,6 +13658,9 @@ export declare const createEntitlementBody: zod.ZodUnion<[zod.ZodObject<{
13632
13658
  }>]>;
13633
13659
  /**
13634
13660
  * List all entitlements for a subject. For checking entitlement access, use the /value endpoint instead.
13661
+
13662
+ ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements) instead.
13663
+ * @deprecated
13635
13664
  * @summary List subject entitlements
13636
13665
  */
13637
13666
  export declare const listSubjectEntitlementsParams: zod.ZodObject<{
@@ -13651,6 +13680,9 @@ export declare const listSubjectEntitlementsQueryParams: zod.ZodObject<{
13651
13680
  }>;
13652
13681
  /**
13653
13682
  * List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
13683
+
13684
+ ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.
13685
+ * @deprecated
13654
13686
  * @summary List subject entitlement grants
13655
13687
  */
13656
13688
  export declare const listEntitlementGrantsParams: zod.ZodObject<{
@@ -13686,6 +13718,9 @@ Grants can have a recurrence setting intended to automate the manual reissuing o
13686
13718
  Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
13687
13719
 
13688
13720
  Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
13721
+
13722
+ ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.
13723
+ * @deprecated
13689
13724
  * @summary Create subject entitlement grant
13690
13725
  */
13691
13726
  export declare const createGrantParams: zod.ZodObject<{
@@ -13766,6 +13801,9 @@ export declare const createGrantBody: zod.ZodObject<{
13766
13801
  * Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided subject-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.
13767
13802
 
13768
13803
  This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
13804
+
13805
+ ⚠️ __Deprecated__: Use [`PUT /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override`](#tag/entitlements/put/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override) instead.
13806
+ * @deprecated
13769
13807
  * @summary Override subject entitlement
13770
13808
  */
13771
13809
  export declare const overrideEntitlementParams: zod.ZodObject<{
@@ -13921,6 +13959,9 @@ export declare const overrideEntitlementBody: zod.ZodUnion<[zod.ZodObject<{
13921
13959
  * This endpoint should be used for access checks and enforcement. All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.
13922
13960
 
13923
13961
  For convenience reasons, /value works with both entitlementId and featureKey.
13962
+
13963
+ ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value) instead.
13964
+ * @deprecated
13924
13965
  * @summary Get subject entitlement value
13925
13966
  */
13926
13967
  export declare const getEntitlementValueParams: zod.ZodObject<{
@@ -13942,6 +13983,9 @@ export declare const getEntitlementValueQueryParams: zod.ZodObject<{
13942
13983
  }>;
13943
13984
  /**
13944
13985
  * Get entitlement by id. For checking entitlement access, use the /value endpoint instead.
13986
+
13987
+ ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.
13988
+ * @deprecated
13945
13989
  * @summary Get subject entitlement
13946
13990
  */
13947
13991
  export declare const getEntitlementParams: zod.ZodObject<{
@@ -13957,6 +14001,9 @@ export declare const getEntitlementParams: zod.ZodObject<{
13957
14001
  /**
13958
14002
  * Deleting an entitlement revokes access to the associated feature. As a single subject can only have one entitlement per featureKey, when "migrating" features you have to delete the old entitlements as well.
13959
14003
  As access and status checks can be historical queries, deleting an entitlement populates the deletedAt timestamp. When queried for a time before that, the entitlement is still considered active, you cannot have retroactive changes to access, which is important for, among other things, auditing.
14004
+
14005
+ ⚠️ __Deprecated__: Use [`DELETE /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/delete/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.
14006
+ * @deprecated
13960
14007
  * @summary Delete subject entitlement
13961
14008
  */
13962
14009
  export declare const deleteEntitlementParams: zod.ZodObject<{
@@ -13975,6 +14022,9 @@ export declare const deleteEntitlementParams: zod.ZodObject<{
13975
14022
  BurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period.
13976
14023
 
13977
14024
  WindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window.
14025
+
14026
+ ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history) instead.
14027
+ * @deprecated
13978
14028
  * @summary Get subject entitlement history
13979
14029
  */
13980
14030
  export declare const getEntitlementHistoryParams: zod.ZodObject<{
@@ -14008,6 +14058,9 @@ export declare const getEntitlementHistoryQueryParams: zod.ZodObject<{
14008
14058
  * Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the subjects billing period to enforce usage based on their subscription.
14009
14059
 
14010
14060
  Usage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.
14061
+
14062
+ ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset) instead.
14063
+ * @deprecated
14011
14064
  * @summary Reset subject entitlement
14012
14065
  */
14013
14066
  export declare const resetEntitlementUsageParams: zod.ZodObject<{
@@ -19914,8 +19967,8 @@ export declare const listEntitlementsV2QueryParams: zod.ZodObject<{
19914
19967
  customerKeys?: string[] | undefined;
19915
19968
  }>;
19916
19969
  /**
19917
- * Get entitlement by id.
19918
- * @summary Get entitlement by id
19970
+ * Get entitlement by ID.
19971
+ * @summary Get entitlement by ID
19919
19972
  */
19920
19973
  export declare const getEntitlementByIdV2PathEntitlementIdRegExp: RegExp;
19921
19974
  export declare const getEntitlementByIdV2Params: zod.ZodObject<{