@openmeter/client 1.0.0-beta-4bc7392a70e6

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.
Files changed (122) hide show
  1. package/README.md +318 -0
  2. package/dist/core.d.ts +10 -0
  3. package/dist/core.js +38 -0
  4. package/dist/funcs/addons.d.ts +11 -0
  5. package/dist/funcs/addons.js +53 -0
  6. package/dist/funcs/apps.d.ts +6 -0
  7. package/dist/funcs/apps.js +16 -0
  8. package/dist/funcs/billing.d.ts +9 -0
  9. package/dist/funcs/billing.js +33 -0
  10. package/dist/funcs/currencies.d.ts +8 -0
  11. package/dist/funcs/currencies.js +35 -0
  12. package/dist/funcs/customers.d.ts +21 -0
  13. package/dist/funcs/customers.js +141 -0
  14. package/dist/funcs/defaults.d.ts +6 -0
  15. package/dist/funcs/defaults.js +13 -0
  16. package/dist/funcs/entitlements.d.ts +5 -0
  17. package/dist/funcs/entitlements.js +10 -0
  18. package/dist/funcs/events.d.ts +6 -0
  19. package/dist/funcs/events.js +19 -0
  20. package/dist/funcs/features.d.ts +10 -0
  21. package/dist/funcs/features.js +49 -0
  22. package/dist/funcs/governance.d.ts +5 -0
  23. package/dist/funcs/governance.js +16 -0
  24. package/dist/funcs/index.d.ts +17 -0
  25. package/dist/funcs/index.js +17 -0
  26. package/dist/funcs/llmCost.d.ts +9 -0
  27. package/dist/funcs/llmCost.js +42 -0
  28. package/dist/funcs/meters.d.ts +10 -0
  29. package/dist/funcs/meters.js +49 -0
  30. package/dist/funcs/planAddons.d.ts +9 -0
  31. package/dist/funcs/planAddons.js +48 -0
  32. package/dist/funcs/plans.d.ts +11 -0
  33. package/dist/funcs/plans.js +47 -0
  34. package/dist/funcs/subscriptions.d.ts +12 -0
  35. package/dist/funcs/subscriptions.js +64 -0
  36. package/dist/funcs/tax.d.ts +9 -0
  37. package/dist/funcs/tax.js +40 -0
  38. package/dist/index.d.ts +42 -0
  39. package/dist/index.js +23 -0
  40. package/dist/lib/config.d.ts +14 -0
  41. package/dist/lib/config.js +7 -0
  42. package/dist/lib/encodings.d.ts +8 -0
  43. package/dist/lib/encodings.js +56 -0
  44. package/dist/lib/request.d.ts +3 -0
  45. package/dist/lib/request.js +11 -0
  46. package/dist/lib/to-error.d.ts +2 -0
  47. package/dist/lib/to-error.js +16 -0
  48. package/dist/lib/types.d.ts +15 -0
  49. package/dist/lib/types.js +13 -0
  50. package/dist/models/errors.d.ts +16 -0
  51. package/dist/models/errors.js +28 -0
  52. package/dist/models/operations/addons.d.ts +38 -0
  53. package/dist/models/operations/addons.js +2 -0
  54. package/dist/models/operations/apps.d.ts +17 -0
  55. package/dist/models/operations/apps.js +2 -0
  56. package/dist/models/operations/billing.d.ts +26 -0
  57. package/dist/models/operations/billing.js +2 -0
  58. package/dist/models/operations/currencies.d.ts +35 -0
  59. package/dist/models/operations/currencies.js +2 -0
  60. package/dist/models/operations/customers.d.ts +117 -0
  61. package/dist/models/operations/customers.js +2 -0
  62. package/dist/models/operations/defaults.d.ts +6 -0
  63. package/dist/models/operations/defaults.js +2 -0
  64. package/dist/models/operations/entitlements.d.ts +6 -0
  65. package/dist/models/operations/entitlements.js +2 -0
  66. package/dist/models/operations/events.d.ts +13 -0
  67. package/dist/models/operations/events.js +2 -0
  68. package/dist/models/operations/features.d.ts +35 -0
  69. package/dist/models/operations/features.js +2 -0
  70. package/dist/models/operations/governance.d.ts +9 -0
  71. package/dist/models/operations/governance.js +2 -0
  72. package/dist/models/operations/llmCost.d.ts +35 -0
  73. package/dist/models/operations/llmCost.js +2 -0
  74. package/dist/models/operations/meters.d.ts +35 -0
  75. package/dist/models/operations/meters.js +2 -0
  76. package/dist/models/operations/planAddons.d.ts +34 -0
  77. package/dist/models/operations/planAddons.js +2 -0
  78. package/dist/models/operations/plans.d.ts +38 -0
  79. package/dist/models/operations/plans.js +2 -0
  80. package/dist/models/operations/subscriptions.d.ts +52 -0
  81. package/dist/models/operations/subscriptions.js +2 -0
  82. package/dist/models/operations/tax.d.ts +28 -0
  83. package/dist/models/operations/tax.js +2 -0
  84. package/dist/models/schemas.d.ts +11372 -0
  85. package/dist/models/schemas.js +4023 -0
  86. package/dist/models/types.d.ts +3385 -0
  87. package/dist/models/types.js +2 -0
  88. package/dist/sdk/addons.d.ts +15 -0
  89. package/dist/sdk/addons.js +30 -0
  90. package/dist/sdk/apps.d.ts +10 -0
  91. package/dist/sdk/apps.js +15 -0
  92. package/dist/sdk/billing.d.ts +13 -0
  93. package/dist/sdk/billing.js +24 -0
  94. package/dist/sdk/currencies.d.ts +12 -0
  95. package/dist/sdk/currencies.js +21 -0
  96. package/dist/sdk/customers.d.ts +67 -0
  97. package/dist/sdk/customers.js +130 -0
  98. package/dist/sdk/defaults.d.ts +10 -0
  99. package/dist/sdk/defaults.js +15 -0
  100. package/dist/sdk/entitlements.d.ts +9 -0
  101. package/dist/sdk/entitlements.js +12 -0
  102. package/dist/sdk/events.d.ts +10 -0
  103. package/dist/sdk/events.js +15 -0
  104. package/dist/sdk/features.d.ts +14 -0
  105. package/dist/sdk/features.js +27 -0
  106. package/dist/sdk/governance.d.ts +9 -0
  107. package/dist/sdk/governance.js +12 -0
  108. package/dist/sdk/llmCost.d.ts +13 -0
  109. package/dist/sdk/llmCost.js +24 -0
  110. package/dist/sdk/meters.d.ts +14 -0
  111. package/dist/sdk/meters.js +27 -0
  112. package/dist/sdk/planAddons.d.ts +13 -0
  113. package/dist/sdk/planAddons.js +24 -0
  114. package/dist/sdk/plans.d.ts +15 -0
  115. package/dist/sdk/plans.js +30 -0
  116. package/dist/sdk/sdk.d.ts +52 -0
  117. package/dist/sdk/sdk.js +84 -0
  118. package/dist/sdk/subscriptions.d.ts +16 -0
  119. package/dist/sdk/subscriptions.js +33 -0
  120. package/dist/sdk/tax.d.ts +13 -0
  121. package/dist/sdk/tax.js +24 -0
  122. package/package.json +33 -0
@@ -0,0 +1,35 @@
1
+ import type { CreateFeatureRequest as CreateFeatureRequestBody, Feature, FeatureCostQueryResult, FeaturePagePaginatedResponse, ListFeatureParamsFilter, MeterQueryRequestInput, SortQueryInput, UpdateFeatureRequest as UpdateFeatureRequestBody } from '../types.js';
2
+ export interface ListFeaturesQuery {
3
+ /** Determines which page of the collection to retrieve. */
4
+ page?: {
5
+ size?: number;
6
+ number?: number;
7
+ };
8
+ /** Sort features returned in the response. Supported sort attributes are: - `key` - `name` - `created_at` (default) - `updated_at` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. */
9
+ sort?: SortQueryInput;
10
+ /** Filter features returned in the response. To filter features by meter_id add the following query param: filter[meter_id][oeq]=<id> */
11
+ filter?: ListFeatureParamsFilter;
12
+ }
13
+ export type ListFeaturesRequest = ListFeaturesQuery;
14
+ export type ListFeaturesResponse = FeaturePagePaginatedResponse;
15
+ export type CreateFeatureRequest = CreateFeatureRequestBody;
16
+ export type CreateFeatureResponse = Feature;
17
+ export type GetFeatureRequest = {
18
+ featureId: string;
19
+ };
20
+ export type GetFeatureResponse = Feature;
21
+ export type UpdateFeatureRequest = {
22
+ featureId: string;
23
+ body: UpdateFeatureRequestBody;
24
+ };
25
+ export type UpdateFeatureResponse = Feature;
26
+ export type DeleteFeatureRequest = {
27
+ featureId: string;
28
+ };
29
+ export type DeleteFeatureResponse = void;
30
+ export type QueryFeatureCostRequest = {
31
+ featureId: string;
32
+ body: MeterQueryRequestInput;
33
+ };
34
+ export type QueryFeatureCostResponse = FeatureCostQueryResult;
35
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1,9 @@
1
+ import type { CursorPaginationQueryPage, GovernanceQueryRequestInput, GovernanceQueryResponse } from '../types.js';
2
+ export interface QueryGovernanceAccessQuery {
3
+ page?: CursorPaginationQueryPage;
4
+ }
5
+ export type QueryGovernanceAccessRequest = {
6
+ body: GovernanceQueryRequestInput;
7
+ } & QueryGovernanceAccessQuery;
8
+ export type QueryGovernanceAccessResponse = GovernanceQueryResponse;
9
+ //# sourceMappingURL=governance.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=governance.js.map
@@ -0,0 +1,35 @@
1
+ import type { ListLlmCostPricesParamsFilter, LlmCostOverrideCreate, LlmCostPrice, PricePagePaginatedResponse, SortQueryInput } from '../types.js';
2
+ export interface ListLlmCostPricesQuery {
3
+ /** Filter prices. */
4
+ filter?: ListLlmCostPricesParamsFilter;
5
+ /** Sort prices returned in the response. Supported sort attributes are: - `id` - `provider.id` - `model.id` (default) - `effective_from` - `effective_to` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. */
6
+ sort?: SortQueryInput;
7
+ /** Determines which page of the collection to retrieve. */
8
+ page?: {
9
+ size?: number;
10
+ number?: number;
11
+ };
12
+ }
13
+ export type ListLlmCostPricesRequest = ListLlmCostPricesQuery;
14
+ export type ListLlmCostPricesResponse = PricePagePaginatedResponse;
15
+ export type GetLlmCostPriceRequest = {
16
+ priceId: string;
17
+ };
18
+ export type GetLlmCostPriceResponse = LlmCostPrice;
19
+ export interface ListLlmCostOverridesQuery {
20
+ filter?: ListLlmCostPricesParamsFilter;
21
+ /** Determines which page of the collection to retrieve. */
22
+ page?: {
23
+ size?: number;
24
+ number?: number;
25
+ };
26
+ }
27
+ export type ListLlmCostOverridesRequest = ListLlmCostOverridesQuery;
28
+ export type ListLlmCostOverridesResponse = PricePagePaginatedResponse;
29
+ export type CreateLlmCostOverrideRequest = LlmCostOverrideCreate;
30
+ export type CreateLlmCostOverrideResponse = LlmCostPrice;
31
+ export type DeleteLlmCostOverrideRequest = {
32
+ priceId: string;
33
+ };
34
+ export type DeleteLlmCostOverrideResponse = void;
35
+ //# sourceMappingURL=llmCost.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=llmCost.js.map
@@ -0,0 +1,35 @@
1
+ import type { CreateMeterRequest as CreateMeterRequestBody, ListMetersParamsFilter, Meter, MeterPagePaginatedResponse, MeterQueryRequestInput, MeterQueryResult, SortQueryInput, UpdateMeterRequest as UpdateMeterRequestBody } from '../types.js';
2
+ export type CreateMeterRequest = CreateMeterRequestBody;
3
+ export type CreateMeterResponse = Meter;
4
+ export type GetMeterRequest = {
5
+ meterId: string;
6
+ };
7
+ export type GetMeterResponse = Meter;
8
+ export interface ListMetersQuery {
9
+ /** Determines which page of the collection to retrieve. */
10
+ page?: {
11
+ size?: number;
12
+ number?: number;
13
+ };
14
+ /** Sort meters returned in the response. Supported sort attributes are: - `key` - `name` - `aggregation` - `createdAt` (default) - `updatedAt` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. */
15
+ sort?: SortQueryInput;
16
+ /** Filter meters returned in the response. To filter meters by key add the following query param: filter[key]=my-meter-key */
17
+ filter?: ListMetersParamsFilter;
18
+ }
19
+ export type ListMetersRequest = ListMetersQuery;
20
+ export type ListMetersResponse = MeterPagePaginatedResponse;
21
+ export type UpdateMeterRequest = {
22
+ meterId: string;
23
+ body: UpdateMeterRequestBody;
24
+ };
25
+ export type UpdateMeterResponse = Meter;
26
+ export type DeleteMeterRequest = {
27
+ meterId: string;
28
+ };
29
+ export type DeleteMeterResponse = void;
30
+ export type QueryMeterRequest = {
31
+ meterId: string;
32
+ body: MeterQueryRequestInput;
33
+ };
34
+ export type QueryMeterResponse = MeterQueryResult;
35
+ //# sourceMappingURL=meters.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=meters.js.map
@@ -0,0 +1,34 @@
1
+ import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, PlanAddon, PlanAddonPagePaginatedResponse, UpsertPlanAddonRequest } from '../types.js';
2
+ export interface ListPlanAddonsQuery {
3
+ /** Determines which page of the collection to retrieve. */
4
+ page?: {
5
+ size?: number;
6
+ number?: number;
7
+ };
8
+ }
9
+ export type ListPlanAddonsRequest = ListPlanAddonsQuery & {
10
+ planId: string;
11
+ };
12
+ export type ListPlanAddonsResponse = PlanAddonPagePaginatedResponse;
13
+ export type CreatePlanAddonRequest = {
14
+ planId: string;
15
+ body: CreatePlanAddonRequestBody;
16
+ };
17
+ export type CreatePlanAddonResponse = PlanAddon;
18
+ export type GetPlanAddonRequest = {
19
+ planId: string;
20
+ planAddonId: string;
21
+ };
22
+ export type GetPlanAddonResponse = PlanAddon;
23
+ export type UpdatePlanAddonRequest = {
24
+ planId: string;
25
+ planAddonId: string;
26
+ body: UpsertPlanAddonRequest;
27
+ };
28
+ export type UpdatePlanAddonResponse = PlanAddon;
29
+ export type DeletePlanAddonRequest = {
30
+ planId: string;
31
+ planAddonId: string;
32
+ };
33
+ export type DeletePlanAddonResponse = void;
34
+ //# sourceMappingURL=planAddons.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=planAddons.js.map
@@ -0,0 +1,38 @@
1
+ import type { CreatePlanRequestInput, ListPlansParamsFilter, Plan, PlanPagePaginatedResponse, SortQueryInput, UpsertPlanRequestInput } from '../types.js';
2
+ export interface ListPlansQuery {
3
+ /** Determines which page of the collection to retrieve. */
4
+ page?: {
5
+ size?: number;
6
+ number?: number;
7
+ };
8
+ /** Sort plans returned in the response. Supported sort attributes are: - `id` - `key` - `version` - `created_at` (default) - `updated_at` */
9
+ sort?: SortQueryInput;
10
+ /** Filter plans returned in the response. */
11
+ filter?: ListPlansParamsFilter;
12
+ }
13
+ export type ListPlansRequest = ListPlansQuery;
14
+ export type ListPlansResponse = PlanPagePaginatedResponse;
15
+ export type CreatePlanRequest = CreatePlanRequestInput;
16
+ export type CreatePlanResponse = Plan;
17
+ export type UpdatePlanRequest = {
18
+ planId: string;
19
+ body: UpsertPlanRequestInput;
20
+ };
21
+ export type UpdatePlanResponse = Plan;
22
+ export type GetPlanRequest = {
23
+ planId: string;
24
+ };
25
+ export type GetPlanResponse = Plan;
26
+ export type DeletePlanRequest = {
27
+ planId: string;
28
+ };
29
+ export type DeletePlanResponse = void;
30
+ export type ArchivePlanRequest = {
31
+ planId: string;
32
+ };
33
+ export type ArchivePlanResponse = Plan;
34
+ export type PublishPlanRequest = {
35
+ planId: string;
36
+ };
37
+ export type PublishPlanResponse = Plan;
38
+ //# sourceMappingURL=plans.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plans.js.map
@@ -0,0 +1,52 @@
1
+ import type { ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput, SubscriptionChange, SubscriptionChangeResponse, SubscriptionCreate, SubscriptionPagePaginatedResponse } from '../types.js';
2
+ export type CreateSubscriptionRequest = SubscriptionCreate;
3
+ export type CreateSubscriptionResponse = Subscription;
4
+ export interface ListSubscriptionsQuery {
5
+ /** Determines which page of the collection to retrieve. */
6
+ page?: {
7
+ size?: number;
8
+ number?: number;
9
+ };
10
+ /** Sort subscriptions returned in the response. Supported sort attributes are: - `id` - `active_from` (default) - `active_to` The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. */
11
+ sort?: SortQueryInput;
12
+ /** Filter subscriptions. */
13
+ filter?: ListSubscriptionsParamsFilter;
14
+ }
15
+ export type ListSubscriptionsRequest = ListSubscriptionsQuery;
16
+ export type ListSubscriptionsResponse = SubscriptionPagePaginatedResponse;
17
+ export type GetSubscriptionRequest = {
18
+ subscriptionId: string;
19
+ };
20
+ export type GetSubscriptionResponse = Subscription;
21
+ export type CancelSubscriptionRequest = {
22
+ subscriptionId: string;
23
+ body: SubscriptionCancelInput;
24
+ };
25
+ export type CancelSubscriptionResponse = Subscription;
26
+ export type UnscheduleCancelationRequest = {
27
+ subscriptionId: string;
28
+ };
29
+ export type UnscheduleCancelationResponse = Subscription;
30
+ export type ChangeSubscriptionRequest = {
31
+ subscriptionId: string;
32
+ body: SubscriptionChange;
33
+ };
34
+ export type ChangeSubscriptionResponse = SubscriptionChangeResponse;
35
+ export interface ListSubscriptionAddonsQuery {
36
+ /** Determines which page of the collection to retrieve. */
37
+ page?: {
38
+ size?: number;
39
+ number?: number;
40
+ };
41
+ sort?: SortQueryInput;
42
+ }
43
+ export type ListSubscriptionAddonsRequest = ListSubscriptionAddonsQuery & {
44
+ subscriptionId: string;
45
+ };
46
+ export type ListSubscriptionAddonsResponse = SubscriptionAddonPagePaginatedResponse;
47
+ export type GetSubscriptionAddonRequest = {
48
+ subscriptionId: string;
49
+ subscriptionAddonId: string;
50
+ };
51
+ export type GetSubscriptionAddonResponse = SubscriptionAddon;
52
+ //# sourceMappingURL=subscriptions.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=subscriptions.js.map
@@ -0,0 +1,28 @@
1
+ import type { CreateTaxCodeRequest as CreateTaxCodeRequestBody, TaxCode, TaxCodePagePaginatedResponse, UpsertTaxCodeRequest as UpsertTaxCodeRequestBody } from '../types.js';
2
+ export type CreateTaxCodeRequest = CreateTaxCodeRequestBody;
3
+ export type CreateTaxCodeResponse = TaxCode;
4
+ export type GetTaxCodeRequest = {
5
+ taxCodeId: string;
6
+ };
7
+ export type GetTaxCodeResponse = TaxCode;
8
+ export interface ListTaxCodesQuery {
9
+ /** Determines which page of the collection to retrieve. */
10
+ page?: {
11
+ size?: number;
12
+ number?: number;
13
+ };
14
+ /** Include deleted tax codes in the response. */
15
+ include_deleted?: boolean;
16
+ }
17
+ export type ListTaxCodesRequest = ListTaxCodesQuery;
18
+ export type ListTaxCodesResponse = TaxCodePagePaginatedResponse;
19
+ export type UpsertTaxCodeRequest = {
20
+ taxCodeId: string;
21
+ body: UpsertTaxCodeRequestBody;
22
+ };
23
+ export type UpsertTaxCodeResponse = TaxCode;
24
+ export type DeleteTaxCodeRequest = {
25
+ taxCodeId: string;
26
+ };
27
+ export type DeleteTaxCodeResponse = void;
28
+ //# sourceMappingURL=tax.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tax.js.map