@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.
- package/dist/cjs/src/client/schemas.d.cts +115 -15
- package/dist/cjs/src/zod/index.cjs +61 -8
- package/dist/cjs/src/zod/index.d.cts +57 -4
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.9504e35d.tsbuildinfo → tsconfig.c4b9ded5.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.ed9d8238.tsbuildinfo → tsconfig.d7012c22.tsbuildinfo} +1 -1
- package/dist/src/client/schemas.d.ts +115 -15
- package/dist/src/zod/index.d.ts +57 -4
- package/dist/src/zod/index.js +61 -8
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -204,6 +204,8 @@ export interface paths {
|
|
|
204
204
|
* Update Stripe API key
|
|
205
205
|
* @deprecated
|
|
206
206
|
* @description Update the Stripe API key.
|
|
207
|
+
*
|
|
208
|
+
* ⚠️ __Deprecated__: Use [`PUT /api/v1/apps/{id}`](#tag/apps/put/api/v1/apps/{id}) instead.
|
|
207
209
|
*/
|
|
208
210
|
put: operations['updateStripeAPIKey'];
|
|
209
211
|
post?: never;
|
|
@@ -890,9 +892,12 @@ export interface paths {
|
|
|
890
892
|
};
|
|
891
893
|
/**
|
|
892
894
|
* List all entitlements
|
|
895
|
+
* @deprecated
|
|
893
896
|
* @description List all entitlements for all the subjects and features. This endpoint is intended for administrative purposes only.
|
|
894
897
|
* To fetch the entitlements of a specific subject please use the /api/v1/subjects/{subjectKeyOrID}/entitlements endpoint.
|
|
895
898
|
* If page is provided that takes precedence and the paginated response is returned.
|
|
899
|
+
*
|
|
900
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements`](#tag/entitlements/get/api/v2/entitlements) instead.
|
|
896
901
|
*/
|
|
897
902
|
get: operations['listEntitlements'];
|
|
898
903
|
put?: never;
|
|
@@ -911,8 +916,11 @@ export interface paths {
|
|
|
911
916
|
cookie?: never;
|
|
912
917
|
};
|
|
913
918
|
/**
|
|
914
|
-
* Get entitlement by
|
|
915
|
-
* @
|
|
919
|
+
* Get entitlement by ID
|
|
920
|
+
* @deprecated
|
|
921
|
+
* @description Get entitlement by ID.
|
|
922
|
+
*
|
|
923
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/entitlements/{entitlementId}`](#tag/entitlements/get/api/v2/entitlements/{entitlementId}) instead.
|
|
916
924
|
*/
|
|
917
925
|
get: operations['getEntitlementById'];
|
|
918
926
|
put?: never;
|
|
@@ -1012,9 +1020,12 @@ export interface paths {
|
|
|
1012
1020
|
};
|
|
1013
1021
|
/**
|
|
1014
1022
|
* List grants
|
|
1023
|
+
* @deprecated
|
|
1015
1024
|
* @description List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only.
|
|
1016
1025
|
* To fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint.
|
|
1017
1026
|
* If page is provided that takes precedence and the paginated response is returned.
|
|
1027
|
+
*
|
|
1028
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/grants`](#tag/entitlements/get/api/v2/grants) instead.
|
|
1018
1029
|
*/
|
|
1019
1030
|
get: operations['listGrants'];
|
|
1020
1031
|
put?: never;
|
|
@@ -1037,8 +1048,11 @@ export interface paths {
|
|
|
1037
1048
|
post?: never;
|
|
1038
1049
|
/**
|
|
1039
1050
|
* Void grant
|
|
1051
|
+
* @deprecated
|
|
1040
1052
|
* @description 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.
|
|
1041
1053
|
* 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.
|
|
1054
|
+
*
|
|
1055
|
+
* ⚠️ __Deprecated__: Use [`DELETE /api/v2/grants/{grantId}`](#tag/entitlements/delete/api/v2/grants/{grantId}) instead.
|
|
1042
1056
|
*/
|
|
1043
1057
|
delete: operations['voidGrant'];
|
|
1044
1058
|
options?: never;
|
|
@@ -1769,16 +1783,22 @@ export interface paths {
|
|
|
1769
1783
|
};
|
|
1770
1784
|
/**
|
|
1771
1785
|
* List subjects
|
|
1786
|
+
* @deprecated
|
|
1772
1787
|
* @description List subjects.
|
|
1788
|
+
*
|
|
1789
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
1773
1790
|
*/
|
|
1774
1791
|
get: operations['listSubjects'];
|
|
1775
1792
|
put?: never;
|
|
1776
1793
|
/**
|
|
1777
1794
|
* Upsert subject
|
|
1795
|
+
* @deprecated
|
|
1778
1796
|
* @description Upserts a subject. Creates or updates subject.
|
|
1779
1797
|
*
|
|
1780
1798
|
* If the subject doesn't exist, it will be created.
|
|
1781
1799
|
* If the subject exists, it will be partially updated with the provided fields.
|
|
1800
|
+
*
|
|
1801
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
1782
1802
|
*/
|
|
1783
1803
|
post: operations['upsertSubject'];
|
|
1784
1804
|
delete?: never;
|
|
@@ -1796,14 +1816,20 @@ export interface paths {
|
|
|
1796
1816
|
};
|
|
1797
1817
|
/**
|
|
1798
1818
|
* Get subject
|
|
1819
|
+
* @deprecated
|
|
1799
1820
|
* @description Get subject by ID or key.
|
|
1821
|
+
*
|
|
1822
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
1800
1823
|
*/
|
|
1801
1824
|
get: operations['getSubject'];
|
|
1802
1825
|
put?: never;
|
|
1803
1826
|
post?: never;
|
|
1804
1827
|
/**
|
|
1805
1828
|
* Delete subject
|
|
1829
|
+
* @deprecated
|
|
1806
1830
|
* @description Delete subject by ID or key.
|
|
1831
|
+
*
|
|
1832
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
1807
1833
|
*/
|
|
1808
1834
|
delete: operations['deleteSubject'];
|
|
1809
1835
|
options?: never;
|
|
@@ -1820,12 +1846,16 @@ export interface paths {
|
|
|
1820
1846
|
};
|
|
1821
1847
|
/**
|
|
1822
1848
|
* List subject entitlements
|
|
1849
|
+
* @deprecated
|
|
1823
1850
|
* @description List all entitlements for a subject. For checking entitlement access, use the /value endpoint instead.
|
|
1851
|
+
*
|
|
1852
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements) instead.
|
|
1824
1853
|
*/
|
|
1825
1854
|
get: operations['listSubjectEntitlements'];
|
|
1826
1855
|
put?: never;
|
|
1827
1856
|
/**
|
|
1828
1857
|
* Create a subject entitlement
|
|
1858
|
+
* @deprecated
|
|
1829
1859
|
* @description OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).
|
|
1830
1860
|
*
|
|
1831
1861
|
* - Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
|
|
@@ -1835,6 +1865,8 @@ export interface paths {
|
|
|
1835
1865
|
* 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.
|
|
1836
1866
|
*
|
|
1837
1867
|
* Once an entitlement is created you cannot modify it, only delete it.
|
|
1868
|
+
*
|
|
1869
|
+
* ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements) instead.
|
|
1838
1870
|
*/
|
|
1839
1871
|
post: operations['createEntitlement'];
|
|
1840
1872
|
delete?: never;
|
|
@@ -1852,12 +1884,16 @@ export interface paths {
|
|
|
1852
1884
|
};
|
|
1853
1885
|
/**
|
|
1854
1886
|
* List subject entitlement grants
|
|
1887
|
+
* @deprecated
|
|
1855
1888
|
* @description List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
1889
|
+
*
|
|
1890
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.
|
|
1856
1891
|
*/
|
|
1857
1892
|
get: operations['listEntitlementGrants'];
|
|
1858
1893
|
put?: never;
|
|
1859
1894
|
/**
|
|
1860
1895
|
* Create subject entitlement grant
|
|
1896
|
+
* @deprecated
|
|
1861
1897
|
* @description Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.
|
|
1862
1898
|
*
|
|
1863
1899
|
* A grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.
|
|
@@ -1869,6 +1905,8 @@ export interface paths {
|
|
|
1869
1905
|
* 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))
|
|
1870
1906
|
*
|
|
1871
1907
|
* Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
|
|
1908
|
+
*
|
|
1909
|
+
* ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) instead.
|
|
1872
1910
|
*/
|
|
1873
1911
|
post: operations['createGrant'];
|
|
1874
1912
|
delete?: never;
|
|
@@ -1887,9 +1925,12 @@ export interface paths {
|
|
|
1887
1925
|
get?: never;
|
|
1888
1926
|
/**
|
|
1889
1927
|
* Override subject entitlement
|
|
1928
|
+
* @deprecated
|
|
1890
1929
|
* @description 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.
|
|
1891
1930
|
*
|
|
1892
1931
|
* This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
1932
|
+
*
|
|
1933
|
+
* ⚠️ __Deprecated__: Use [`PUT /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override`](#tag/entitlements/put/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override) instead.
|
|
1893
1934
|
*/
|
|
1894
1935
|
put: operations['overrideEntitlement'];
|
|
1895
1936
|
post?: never;
|
|
@@ -1908,9 +1949,12 @@ export interface paths {
|
|
|
1908
1949
|
};
|
|
1909
1950
|
/**
|
|
1910
1951
|
* Get subject entitlement value
|
|
1952
|
+
* @deprecated
|
|
1911
1953
|
* @description 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.
|
|
1912
1954
|
*
|
|
1913
1955
|
* For convenience reasons, /value works with both entitlementId and featureKey.
|
|
1956
|
+
*
|
|
1957
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value) instead.
|
|
1914
1958
|
*/
|
|
1915
1959
|
get: operations['getEntitlementValue'];
|
|
1916
1960
|
put?: never;
|
|
@@ -1930,15 +1974,21 @@ export interface paths {
|
|
|
1930
1974
|
};
|
|
1931
1975
|
/**
|
|
1932
1976
|
* Get subject entitlement
|
|
1977
|
+
* @deprecated
|
|
1933
1978
|
* @description Get entitlement by id. For checking entitlement access, use the /value endpoint instead.
|
|
1979
|
+
*
|
|
1980
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.
|
|
1934
1981
|
*/
|
|
1935
1982
|
get: operations['getEntitlement'];
|
|
1936
1983
|
put?: never;
|
|
1937
1984
|
post?: never;
|
|
1938
1985
|
/**
|
|
1939
1986
|
* Delete subject entitlement
|
|
1987
|
+
* @deprecated
|
|
1940
1988
|
* @description 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.
|
|
1941
1989
|
* 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.
|
|
1990
|
+
*
|
|
1991
|
+
* ⚠️ __Deprecated__: Use [`DELETE /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}`](#tag/entitlements/delete/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}) instead.
|
|
1942
1992
|
*/
|
|
1943
1993
|
delete: operations['deleteEntitlement'];
|
|
1944
1994
|
options?: never;
|
|
@@ -1955,11 +2005,14 @@ export interface paths {
|
|
|
1955
2005
|
};
|
|
1956
2006
|
/**
|
|
1957
2007
|
* Get subject entitlement history
|
|
2008
|
+
* @deprecated
|
|
1958
2009
|
* @description Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
|
|
1959
2010
|
*
|
|
1960
2011
|
* 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.
|
|
1961
2012
|
*
|
|
1962
2013
|
* 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.
|
|
2014
|
+
*
|
|
2015
|
+
* ⚠️ __Deprecated__: Use [`GET /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history`](#tag/entitlements/get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/history) instead.
|
|
1963
2016
|
*/
|
|
1964
2017
|
get: operations['getEntitlementHistory'];
|
|
1965
2018
|
put?: never;
|
|
@@ -1981,9 +2034,12 @@ export interface paths {
|
|
|
1981
2034
|
put?: never;
|
|
1982
2035
|
/**
|
|
1983
2036
|
* Reset subject entitlement
|
|
2037
|
+
* @deprecated
|
|
1984
2038
|
* @description 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.
|
|
1985
2039
|
*
|
|
1986
2040
|
* 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.
|
|
2041
|
+
*
|
|
2042
|
+
* ⚠️ __Deprecated__: Use [`POST /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset`](#tag/entitlements/post/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/reset) instead.
|
|
1987
2043
|
*/
|
|
1988
2044
|
post: operations['resetEntitlementUsage'];
|
|
1989
2045
|
delete?: never;
|
|
@@ -2398,8 +2454,8 @@ export interface paths {
|
|
|
2398
2454
|
cookie?: never;
|
|
2399
2455
|
};
|
|
2400
2456
|
/**
|
|
2401
|
-
* Get entitlement by
|
|
2402
|
-
* @description Get entitlement by
|
|
2457
|
+
* Get entitlement by ID
|
|
2458
|
+
* @description Get entitlement by ID.
|
|
2403
2459
|
*/
|
|
2404
2460
|
get: operations['getEntitlementByIdV2'];
|
|
2405
2461
|
put?: never;
|
|
@@ -4411,10 +4467,16 @@ export interface components {
|
|
|
4411
4467
|
*/
|
|
4412
4468
|
op: 'unschedule_edit';
|
|
4413
4469
|
};
|
|
4414
|
-
/**
|
|
4415
|
-
*
|
|
4470
|
+
/**
|
|
4471
|
+
* @deprecated
|
|
4472
|
+
* @description Entitlement templates are used to define the entitlements of a plan.
|
|
4473
|
+
* Features are omitted from the entitlement template, as they are defined in the rate card.
|
|
4474
|
+
*/
|
|
4416
4475
|
Entitlement: components['schemas']['EntitlementMetered'] | components['schemas']['EntitlementStatic'] | components['schemas']['EntitlementBoolean'];
|
|
4417
|
-
/**
|
|
4476
|
+
/**
|
|
4477
|
+
* @deprecated
|
|
4478
|
+
* @description Entitlement template of a boolean entitlement.
|
|
4479
|
+
*/
|
|
4418
4480
|
EntitlementBoolean: {
|
|
4419
4481
|
/**
|
|
4420
4482
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -4489,7 +4551,10 @@ export interface components {
|
|
|
4489
4551
|
/** @description The defined usage period of the entitlement */
|
|
4490
4552
|
usagePeriod?: components['schemas']['RecurringPeriod'];
|
|
4491
4553
|
};
|
|
4492
|
-
/**
|
|
4554
|
+
/**
|
|
4555
|
+
* @deprecated
|
|
4556
|
+
* @description Create inputs for boolean entitlement
|
|
4557
|
+
*/
|
|
4493
4558
|
EntitlementBooleanCreateInputs: {
|
|
4494
4559
|
/**
|
|
4495
4560
|
* @description The feature the subject is entitled to use.
|
|
@@ -4594,7 +4659,10 @@ export interface components {
|
|
|
4594
4659
|
};
|
|
4595
4660
|
/** @description Create inputs for entitlement */
|
|
4596
4661
|
EntitlementCreateInputs: components['schemas']['EntitlementMeteredCreateInputs'] | components['schemas']['EntitlementStaticCreateInputs'] | components['schemas']['EntitlementBooleanCreateInputs'];
|
|
4597
|
-
/**
|
|
4662
|
+
/**
|
|
4663
|
+
* @deprecated
|
|
4664
|
+
* @description The grant.
|
|
4665
|
+
*/
|
|
4598
4666
|
EntitlementGrant: {
|
|
4599
4667
|
/**
|
|
4600
4668
|
* Creation Time
|
|
@@ -4703,7 +4771,10 @@ export interface components {
|
|
|
4703
4771
|
*/
|
|
4704
4772
|
annotations?: components['schemas']['Annotations'];
|
|
4705
4773
|
};
|
|
4706
|
-
/**
|
|
4774
|
+
/**
|
|
4775
|
+
* @deprecated
|
|
4776
|
+
* @description The grant creation input.
|
|
4777
|
+
*/
|
|
4707
4778
|
EntitlementGrantCreateInput: {
|
|
4708
4779
|
/**
|
|
4709
4780
|
* Format: double
|
|
@@ -4923,8 +4994,11 @@ export interface components {
|
|
|
4923
4994
|
/** @description The recurrence period of the grant. */
|
|
4924
4995
|
recurrence?: components['schemas']['RecurringPeriod'];
|
|
4925
4996
|
};
|
|
4926
|
-
/**
|
|
4927
|
-
*
|
|
4997
|
+
/**
|
|
4998
|
+
* @deprecated
|
|
4999
|
+
* @description Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems.
|
|
5000
|
+
* Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage).
|
|
5001
|
+
*/
|
|
4928
5002
|
EntitlementMetered: {
|
|
4929
5003
|
/**
|
|
4930
5004
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -5045,7 +5119,10 @@ export interface components {
|
|
|
5045
5119
|
/** @description THe usage period of the entitlement. */
|
|
5046
5120
|
readonly usagePeriod: components['schemas']['RecurringPeriod'];
|
|
5047
5121
|
};
|
|
5048
|
-
/**
|
|
5122
|
+
/**
|
|
5123
|
+
* @deprecated
|
|
5124
|
+
* @description Create inpurs for metered entitlement
|
|
5125
|
+
*/
|
|
5049
5126
|
EntitlementMeteredCreateInputs: {
|
|
5050
5127
|
/**
|
|
5051
5128
|
* @description The feature the subject is entitled to use.
|
|
@@ -5323,7 +5400,10 @@ export interface components {
|
|
|
5323
5400
|
/** @description The items in the current page. */
|
|
5324
5401
|
items: components['schemas']['Entitlement'][];
|
|
5325
5402
|
};
|
|
5326
|
-
/**
|
|
5403
|
+
/**
|
|
5404
|
+
* @deprecated
|
|
5405
|
+
* @description A static entitlement.
|
|
5406
|
+
*/
|
|
5327
5407
|
EntitlementStatic: {
|
|
5328
5408
|
/**
|
|
5329
5409
|
* @description discriminator enum property added by openapi-typescript
|
|
@@ -5404,7 +5484,10 @@ export interface components {
|
|
|
5404
5484
|
/** @description The defined usage period of the entitlement */
|
|
5405
5485
|
usagePeriod?: components['schemas']['RecurringPeriod'];
|
|
5406
5486
|
};
|
|
5407
|
-
/**
|
|
5487
|
+
/**
|
|
5488
|
+
* @deprecated
|
|
5489
|
+
* @description Create inputs for static entitlement
|
|
5490
|
+
*/
|
|
5408
5491
|
EntitlementStaticCreateInputs: {
|
|
5409
5492
|
/**
|
|
5410
5493
|
* @description The feature the subject is entitled to use.
|
|
@@ -5520,6 +5603,7 @@ export interface components {
|
|
|
5520
5603
|
customerId: string;
|
|
5521
5604
|
};
|
|
5522
5605
|
/**
|
|
5606
|
+
* @deprecated
|
|
5523
5607
|
* @description Type of the entitlement.
|
|
5524
5608
|
* @enum {string}
|
|
5525
5609
|
*/
|
|
@@ -5768,6 +5852,8 @@ export interface components {
|
|
|
5768
5852
|
* Useful if the meter scope is broader than what feature tracks.
|
|
5769
5853
|
* Example scenario would be a meter tracking all token use with groupBy fields for the model,
|
|
5770
5854
|
* then the feature could filter for model=gpt-4.
|
|
5855
|
+
*
|
|
5856
|
+
* ⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead
|
|
5771
5857
|
* @example {
|
|
5772
5858
|
* "model": "gpt-4",
|
|
5773
5859
|
* "type": "input"
|
|
@@ -5831,6 +5917,8 @@ export interface components {
|
|
|
5831
5917
|
* Useful if the meter scope is broader than what feature tracks.
|
|
5832
5918
|
* Example scenario would be a meter tracking all token use with groupBy fields for the model,
|
|
5833
5919
|
* then the feature could filter for model=gpt-4.
|
|
5920
|
+
*
|
|
5921
|
+
* ⚠️ __Deprecated__: Use advancedMeterGroupByFilters instead
|
|
5834
5922
|
* @example {
|
|
5835
5923
|
* "model": "gpt-4",
|
|
5836
5924
|
* "type": "input"
|
|
@@ -10071,11 +10159,14 @@ export interface components {
|
|
|
10071
10159
|
message?: string;
|
|
10072
10160
|
};
|
|
10073
10161
|
/**
|
|
10162
|
+
* @deprecated
|
|
10074
10163
|
* @description A subject is a unique identifier for a usage attribution by its key.
|
|
10075
10164
|
* Subjects only exist in the concept of metering.
|
|
10076
10165
|
* Subjects are optional to create and work as an enrichment for the subject key like displayName, metadata, etc.
|
|
10077
10166
|
* Subjects are useful when you are reporting usage events with your own database ID but want to enrich the subject with a human-readable name or metadata.
|
|
10078
10167
|
* For most use cases, a subject is equivalent to a customer.
|
|
10168
|
+
*
|
|
10169
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
10079
10170
|
* @example {
|
|
10080
10171
|
* "createdAt": "2025-01-01T01:01:01.001Z",
|
|
10081
10172
|
* "updatedAt": "2025-02-01T01:01:01.001Z",
|
|
@@ -10158,7 +10249,10 @@ export interface components {
|
|
|
10158
10249
|
stripeCustomerId?: string | null;
|
|
10159
10250
|
};
|
|
10160
10251
|
/**
|
|
10252
|
+
* @deprecated
|
|
10161
10253
|
* @description A subject is a unique identifier for a user or entity.
|
|
10254
|
+
*
|
|
10255
|
+
* ⚠️ __Deprecated__: Subjects as managable entities are being depracated, use customers with subject key usage attribution instead.
|
|
10162
10256
|
* @example {
|
|
10163
10257
|
* "key": "customer-id",
|
|
10164
10258
|
* "displayName": "Customer Name",
|
|
@@ -11451,6 +11545,8 @@ export interface components {
|
|
|
11451
11545
|
* @description Simple filter for group bys with exact match.
|
|
11452
11546
|
*
|
|
11453
11547
|
* For example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo
|
|
11548
|
+
*
|
|
11549
|
+
* ⚠️ __Deprecated__: Use `advancedMeterGroupByFilters` instead
|
|
11454
11550
|
*/
|
|
11455
11551
|
'MeterQuery.filterGroupBy': {
|
|
11456
11552
|
[key: string]: string;
|
|
@@ -19447,6 +19543,8 @@ export interface operations {
|
|
|
19447
19543
|
* @description Simple filter for group bys with exact match.
|
|
19448
19544
|
*
|
|
19449
19545
|
* For example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo
|
|
19546
|
+
*
|
|
19547
|
+
* ⚠️ __Deprecated__: Use `advancedMeterGroupByFilters` instead
|
|
19450
19548
|
*/
|
|
19451
19549
|
filterGroupBy?: components['parameters']['MeterQuery.filterGroupBy'];
|
|
19452
19550
|
/** @description Optional advanced meter group by filters.
|
|
@@ -22430,6 +22528,8 @@ export interface operations {
|
|
|
22430
22528
|
* @description Simple filter for group bys with exact match.
|
|
22431
22529
|
*
|
|
22432
22530
|
* For example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo
|
|
22531
|
+
*
|
|
22532
|
+
* ⚠️ __Deprecated__: Use `advancedMeterGroupByFilters` instead
|
|
22433
22533
|
*/
|
|
22434
22534
|
filterGroupBy?: components['parameters']['MeterQuery.filterGroupBy'];
|
|
22435
22535
|
/** @description Optional advanced meter group by filters.
|
package/dist/src/zod/index.d.ts
CHANGED
|
@@ -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
|
|
8669
|
-
|
|
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
|
|
19918
|
-
* @summary Get entitlement by
|
|
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<{
|