@openmeter/client 1.0.0-beta.230 → 1.0.0-beta.232
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/LICENSE +202 -0
- package/README.md +365 -76
- package/dist/core.d.ts +0 -1
- package/dist/core.js +11 -1
- package/dist/funcs/addons.d.ts +49 -1
- package/dist/funcs/addons.js +109 -12
- package/dist/funcs/apps.d.ts +55 -2
- package/dist/funcs/apps.js +179 -4
- package/dist/funcs/billing.d.ts +46 -1
- package/dist/funcs/billing.js +81 -8
- package/dist/funcs/currencies.d.ts +39 -2
- package/dist/funcs/currencies.js +93 -6
- package/dist/funcs/customers.d.ts +165 -2
- package/dist/funcs/customers.js +402 -40
- package/dist/funcs/defaults.d.ts +10 -1
- package/dist/funcs/defaults.js +11 -1
- package/dist/funcs/entitlements.d.ts +5 -1
- package/dist/funcs/entitlements.js +18 -4
- package/dist/funcs/events.d.ts +14 -1
- package/dist/funcs/events.js +18 -1
- package/dist/funcs/features.d.ts +42 -1
- package/dist/funcs/features.js +91 -10
- package/dist/funcs/governance.d.ts +14 -1
- package/dist/funcs/governance.js +15 -1
- package/dist/funcs/index.d.ts +0 -1
- package/dist/funcs/index.js +1 -1
- package/dist/funcs/invoices.d.ts +102 -2
- package/dist/funcs/invoices.js +247 -8
- package/dist/funcs/llmCost.d.ts +36 -1
- package/dist/funcs/llmCost.js +63 -6
- package/dist/funcs/meters.d.ts +53 -1
- package/dist/funcs/meters.js +113 -12
- package/dist/funcs/planAddons.d.ts +35 -1
- package/dist/funcs/planAddons.js +101 -18
- package/dist/funcs/plans.d.ts +49 -1
- package/dist/funcs/plans.js +109 -12
- package/dist/funcs/subscriptions.d.ts +59 -1
- package/dist/funcs/subscriptions.js +147 -18
- package/dist/funcs/tax.d.ts +25 -1
- package/dist/funcs/tax.js +60 -8
- package/dist/index.d.ts +4 -7
- package/dist/index.js +4 -6
- package/dist/lib/config.d.ts +2 -3
- package/dist/lib/config.js +1 -1
- package/dist/lib/encodings.d.ts +0 -1
- package/dist/lib/encodings.js +1 -1
- package/dist/lib/paginate.d.ts +56 -0
- package/dist/lib/paginate.js +60 -0
- package/dist/lib/request.d.ts +0 -1
- package/dist/lib/request.js +1 -1
- package/dist/lib/to-error.d.ts +0 -1
- package/dist/lib/to-error.js +1 -1
- package/dist/lib/types.d.ts +0 -1
- package/dist/lib/types.js +1 -1
- package/dist/lib/version.d.ts +1 -0
- package/dist/lib/version.js +5 -0
- package/dist/lib/wire.d.ts +4 -1
- package/dist/lib/wire.js +118 -7
- package/dist/models/errors.d.ts +13 -2
- package/dist/models/errors.js +31 -4
- package/dist/models/operations/addons.d.ts +0 -1
- package/dist/models/operations/addons.js +1 -1
- package/dist/models/operations/apps.d.ts +26 -5
- package/dist/models/operations/apps.js +1 -1
- package/dist/models/operations/billing.d.ts +0 -1
- package/dist/models/operations/billing.js +1 -1
- package/dist/models/operations/currencies.d.ts +10 -1
- package/dist/models/operations/currencies.js +1 -1
- package/dist/models/operations/customers.d.ts +11 -7
- package/dist/models/operations/customers.js +1 -1
- package/dist/models/operations/defaults.d.ts +0 -1
- package/dist/models/operations/defaults.js +1 -1
- package/dist/models/operations/entitlements.d.ts +0 -1
- package/dist/models/operations/entitlements.js +1 -1
- package/dist/models/operations/events.d.ts +0 -1
- package/dist/models/operations/events.js +1 -1
- package/dist/models/operations/features.d.ts +0 -1
- package/dist/models/operations/features.js +1 -1
- package/dist/models/operations/governance.d.ts +0 -1
- package/dist/models/operations/governance.js +1 -1
- package/dist/models/operations/invoices.d.ts +20 -7
- package/dist/models/operations/invoices.js +1 -1
- package/dist/models/operations/llmCost.d.ts +0 -1
- package/dist/models/operations/llmCost.js +1 -1
- package/dist/models/operations/meters.d.ts +0 -1
- package/dist/models/operations/meters.js +1 -1
- package/dist/models/operations/planAddons.d.ts +0 -1
- package/dist/models/operations/planAddons.js +1 -1
- package/dist/models/operations/plans.d.ts +0 -1
- package/dist/models/operations/plans.js +1 -1
- package/dist/models/operations/subscriptions.d.ts +0 -1
- package/dist/models/operations/subscriptions.js +1 -1
- package/dist/models/operations/tax.d.ts +0 -1
- package/dist/models/operations/tax.js +1 -1
- package/dist/models/schemas.d.ts +11651 -6090
- package/dist/models/schemas.js +991 -468
- package/dist/models/types.d.ts +941 -810
- package/dist/models/types.js +1 -1
- package/dist/sdk/addons.d.ts +60 -1
- package/dist/sdk/addons.js +63 -1
- package/dist/sdk/apps.d.ts +68 -2
- package/dist/sdk/apps.js +81 -2
- package/dist/sdk/billing.d.ts +57 -1
- package/dist/sdk/billing.js +60 -1
- package/dist/sdk/customers.d.ts +211 -2
- package/dist/sdk/customers.js +222 -2
- package/dist/sdk/defaults.d.ts +10 -1
- package/dist/sdk/defaults.js +11 -1
- package/dist/sdk/entitlements.d.ts +5 -1
- package/dist/sdk/entitlements.js +6 -1
- package/dist/sdk/events.d.ts +25 -1
- package/dist/sdk/events.js +28 -1
- package/dist/sdk/features.d.ts +53 -1
- package/dist/sdk/features.js +56 -1
- package/dist/sdk/internal.d.ts +328 -0
- package/dist/sdk/internal.js +404 -0
- package/dist/sdk/invoices.d.ts +5 -2
- package/dist/sdk/invoices.js +13 -2
- package/dist/sdk/llmCost.d.ts +57 -1
- package/dist/sdk/llmCost.js +62 -1
- package/dist/sdk/meters.d.ts +64 -1
- package/dist/sdk/meters.js +67 -1
- package/dist/sdk/planAddons.d.ts +46 -1
- package/dist/sdk/planAddons.js +49 -1
- package/dist/sdk/plans.d.ts +60 -1
- package/dist/sdk/plans.js +63 -1
- package/dist/sdk/sdk.d.ts +9 -13
- package/dist/sdk/sdk.js +11 -20
- package/dist/sdk/subscriptions.d.ts +72 -3
- package/dist/sdk/subscriptions.js +77 -5
- package/dist/sdk/tax.d.ts +34 -1
- package/dist/sdk/tax.js +37 -1
- package/package.json +30 -6
- package/dist/sdk/currencies.d.ts +0 -12
- package/dist/sdk/currencies.js +0 -21
- package/dist/sdk/governance.d.ts +0 -9
- package/dist/sdk/governance.js +0 -12
package/dist/sdk/events.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
3
|
import type { ListMeteringEventsRequest, ListMeteringEventsResponse, IngestMeteringEventsRequest, IngestMeteringEventsResponse } from '../models/operations/events.js';
|
|
4
|
+
import type { IngestedEvent } from '../models/types.js';
|
|
4
5
|
export declare class Events {
|
|
5
6
|
private readonly _client;
|
|
6
7
|
constructor(_client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* List metering events
|
|
10
|
+
*
|
|
11
|
+
* List ingested events.
|
|
12
|
+
*
|
|
13
|
+
* GET /openmeter/events
|
|
14
|
+
*/
|
|
7
15
|
list(request?: ListMeteringEventsRequest, options?: RequestOptions): Promise<ListMeteringEventsResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* List metering events
|
|
18
|
+
*
|
|
19
|
+
* List ingested events.
|
|
20
|
+
*
|
|
21
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
22
|
+
*
|
|
23
|
+
* GET /openmeter/events
|
|
24
|
+
*/
|
|
25
|
+
listAll(request?: ListMeteringEventsRequest, options?: RequestOptions): AsyncIterable<IngestedEvent>;
|
|
26
|
+
/**
|
|
27
|
+
* Ingest metering events
|
|
28
|
+
*
|
|
29
|
+
* Ingests an event or batch of events following the CloudEvents specification.
|
|
30
|
+
*
|
|
31
|
+
* POST /openmeter/events
|
|
32
|
+
*/
|
|
8
33
|
ingest(request: IngestMeteringEventsRequest, options?: RequestOptions): Promise<IngestMeteringEventsResponse>;
|
|
9
34
|
}
|
|
10
|
-
//# sourceMappingURL=events.d.ts.map
|
package/dist/sdk/events.js
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
1
2
|
import { unwrap } from '../lib/types.js';
|
|
3
|
+
import { paginateCursor } from '../lib/paginate.js';
|
|
2
4
|
import { listMeteringEvents, ingestMeteringEvents } from '../funcs/events.js';
|
|
3
5
|
export class Events {
|
|
4
6
|
_client;
|
|
5
7
|
constructor(_client) {
|
|
6
8
|
this._client = _client;
|
|
7
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* List metering events
|
|
12
|
+
*
|
|
13
|
+
* List ingested events.
|
|
14
|
+
*
|
|
15
|
+
* GET /openmeter/events
|
|
16
|
+
*/
|
|
8
17
|
async list(request, options) {
|
|
9
18
|
return unwrap(await listMeteringEvents(this._client, request, options));
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* List metering events
|
|
22
|
+
*
|
|
23
|
+
* List ingested events.
|
|
24
|
+
*
|
|
25
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
26
|
+
*
|
|
27
|
+
* GET /openmeter/events
|
|
28
|
+
*/
|
|
29
|
+
listAll(request, options) {
|
|
30
|
+
return paginateCursor((req, opts) => listMeteringEvents(this._client, req, opts), request ?? {}, options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Ingest metering events
|
|
34
|
+
*
|
|
35
|
+
* Ingests an event or batch of events following the CloudEvents specification.
|
|
36
|
+
*
|
|
37
|
+
* POST /openmeter/events
|
|
38
|
+
*/
|
|
11
39
|
async ingest(request, options) {
|
|
12
40
|
return unwrap(await ingestMeteringEvents(this._client, request, options));
|
|
13
41
|
}
|
|
14
42
|
}
|
|
15
|
-
//# sourceMappingURL=events.js.map
|
package/dist/sdk/features.d.ts
CHANGED
|
@@ -1,14 +1,66 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
3
|
import type { ListFeaturesRequest, ListFeaturesResponse, CreateFeatureRequest, CreateFeatureResponse, GetFeatureRequest, GetFeatureResponse, UpdateFeatureRequest, UpdateFeatureResponse, DeleteFeatureRequest, DeleteFeatureResponse, QueryFeatureCostRequest, QueryFeatureCostResponse } from '../models/operations/features.js';
|
|
4
|
+
import type { Feature } from '../models/types.js';
|
|
4
5
|
export declare class Features {
|
|
5
6
|
private readonly _client;
|
|
6
7
|
constructor(_client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* List features
|
|
10
|
+
*
|
|
11
|
+
* List all features.
|
|
12
|
+
*
|
|
13
|
+
* GET /openmeter/features
|
|
14
|
+
*/
|
|
7
15
|
list(request?: ListFeaturesRequest, options?: RequestOptions): Promise<ListFeaturesResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* List features
|
|
18
|
+
*
|
|
19
|
+
* List all features.
|
|
20
|
+
*
|
|
21
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
22
|
+
*
|
|
23
|
+
* GET /openmeter/features
|
|
24
|
+
*/
|
|
25
|
+
listAll(request?: ListFeaturesRequest, options?: RequestOptions): AsyncIterable<Feature>;
|
|
26
|
+
/**
|
|
27
|
+
* Create feature
|
|
28
|
+
*
|
|
29
|
+
* Create a feature.
|
|
30
|
+
*
|
|
31
|
+
* POST /openmeter/features
|
|
32
|
+
*/
|
|
8
33
|
create(request: CreateFeatureRequest, options?: RequestOptions): Promise<CreateFeatureResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Get feature
|
|
36
|
+
*
|
|
37
|
+
* Get a feature by id.
|
|
38
|
+
*
|
|
39
|
+
* GET /openmeter/features/{featureId}
|
|
40
|
+
*/
|
|
9
41
|
get(request: GetFeatureRequest, options?: RequestOptions): Promise<GetFeatureResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Update feature
|
|
44
|
+
*
|
|
45
|
+
* Update a feature by id. Currently only the unit_cost field can be updated.
|
|
46
|
+
*
|
|
47
|
+
* PATCH /openmeter/features/{featureId}
|
|
48
|
+
*/
|
|
10
49
|
update(request: UpdateFeatureRequest, options?: RequestOptions): Promise<UpdateFeatureResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete feature
|
|
52
|
+
*
|
|
53
|
+
* Delete a feature by id.
|
|
54
|
+
*
|
|
55
|
+
* DELETE /openmeter/features/{featureId}
|
|
56
|
+
*/
|
|
11
57
|
delete(request: DeleteFeatureRequest, options?: RequestOptions): Promise<DeleteFeatureResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Query feature cost
|
|
60
|
+
*
|
|
61
|
+
* Query the cost of a feature.
|
|
62
|
+
*
|
|
63
|
+
* POST /openmeter/features/{featureId}/cost/query
|
|
64
|
+
*/
|
|
12
65
|
queryCost(request: QueryFeatureCostRequest, options?: RequestOptions): Promise<QueryFeatureCostResponse>;
|
|
13
66
|
}
|
|
14
|
-
//# sourceMappingURL=features.d.ts.map
|
package/dist/sdk/features.js
CHANGED
|
@@ -1,27 +1,82 @@
|
|
|
1
|
+
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
1
2
|
import { unwrap } from '../lib/types.js';
|
|
3
|
+
import { paginatePages } from '../lib/paginate.js';
|
|
2
4
|
import { listFeatures, createFeature, getFeature, updateFeature, deleteFeature, queryFeatureCost, } from '../funcs/features.js';
|
|
3
5
|
export class Features {
|
|
4
6
|
_client;
|
|
5
7
|
constructor(_client) {
|
|
6
8
|
this._client = _client;
|
|
7
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* List features
|
|
12
|
+
*
|
|
13
|
+
* List all features.
|
|
14
|
+
*
|
|
15
|
+
* GET /openmeter/features
|
|
16
|
+
*/
|
|
8
17
|
async list(request, options) {
|
|
9
18
|
return unwrap(await listFeatures(this._client, request, options));
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* List features
|
|
22
|
+
*
|
|
23
|
+
* List all features.
|
|
24
|
+
*
|
|
25
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
26
|
+
*
|
|
27
|
+
* GET /openmeter/features
|
|
28
|
+
*/
|
|
29
|
+
listAll(request, options) {
|
|
30
|
+
return paginatePages((req, opts) => listFeatures(this._client, req, opts), request ?? {}, options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create feature
|
|
34
|
+
*
|
|
35
|
+
* Create a feature.
|
|
36
|
+
*
|
|
37
|
+
* POST /openmeter/features
|
|
38
|
+
*/
|
|
11
39
|
async create(request, options) {
|
|
12
40
|
return unwrap(await createFeature(this._client, request, options));
|
|
13
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Get feature
|
|
44
|
+
*
|
|
45
|
+
* Get a feature by id.
|
|
46
|
+
*
|
|
47
|
+
* GET /openmeter/features/{featureId}
|
|
48
|
+
*/
|
|
14
49
|
async get(request, options) {
|
|
15
50
|
return unwrap(await getFeature(this._client, request, options));
|
|
16
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Update feature
|
|
54
|
+
*
|
|
55
|
+
* Update a feature by id. Currently only the unit_cost field can be updated.
|
|
56
|
+
*
|
|
57
|
+
* PATCH /openmeter/features/{featureId}
|
|
58
|
+
*/
|
|
17
59
|
async update(request, options) {
|
|
18
60
|
return unwrap(await updateFeature(this._client, request, options));
|
|
19
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete feature
|
|
64
|
+
*
|
|
65
|
+
* Delete a feature by id.
|
|
66
|
+
*
|
|
67
|
+
* DELETE /openmeter/features/{featureId}
|
|
68
|
+
*/
|
|
20
69
|
async delete(request, options) {
|
|
21
70
|
return unwrap(await deleteFeature(this._client, request, options));
|
|
22
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Query feature cost
|
|
74
|
+
*
|
|
75
|
+
* Query the cost of a feature.
|
|
76
|
+
*
|
|
77
|
+
* POST /openmeter/features/{featureId}/cost/query
|
|
78
|
+
*/
|
|
23
79
|
async queryCost(request, options) {
|
|
24
80
|
return unwrap(await queryFeatureCost(this._client, request, options));
|
|
25
81
|
}
|
|
26
82
|
}
|
|
27
|
-
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { type Client } from '../core.js';
|
|
2
|
+
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
+
import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
4
|
+
import type { ListAppsRequest, ListAppsResponse, GetAppRequest, GetAppResponse, UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
5
|
+
import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
|
|
6
|
+
import type { ListCurrenciesRequest, ListCurrenciesResponse, CreateCustomCurrencyRequest, CreateCustomCurrencyResponse, GetCustomCurrencyRequest, GetCustomCurrencyResponse, ListCostBasesRequest, ListCostBasesResponse, CreateCostBasisRequest, CreateCostBasisResponse } from '../models/operations/currencies.js';
|
|
7
|
+
import type { QueryGovernanceAccessRequest, QueryGovernanceAccessResponse } from '../models/operations/governance.js';
|
|
8
|
+
import type { App, AppCatalogItem, CostBasis, Currency, Invoice } from '../models/types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Operations marked internal in the API definition. They are not part of
|
|
11
|
+
* the customer surface: they may require additional permissions, and they
|
|
12
|
+
* can change or be removed without notice or semver consideration.
|
|
13
|
+
*/
|
|
14
|
+
export declare class Internal {
|
|
15
|
+
private readonly _client;
|
|
16
|
+
constructor(_client: Client);
|
|
17
|
+
private _subscriptions?;
|
|
18
|
+
get subscriptions(): InternalSubscriptions;
|
|
19
|
+
private _apps?;
|
|
20
|
+
get apps(): InternalApps;
|
|
21
|
+
private _invoices?;
|
|
22
|
+
get invoices(): InternalInvoices;
|
|
23
|
+
private _currencies?;
|
|
24
|
+
get currencies(): InternalCurrencies;
|
|
25
|
+
private _governance?;
|
|
26
|
+
get governance(): InternalGovernance;
|
|
27
|
+
}
|
|
28
|
+
export declare class InternalSubscriptions {
|
|
29
|
+
private readonly _client;
|
|
30
|
+
constructor(_client: Client);
|
|
31
|
+
/**
|
|
32
|
+
* Create a new subscription add-on
|
|
33
|
+
*
|
|
34
|
+
* Add add-on to a subscription.
|
|
35
|
+
*
|
|
36
|
+
* POST /openmeter/subscriptions/{subscriptionId}/addons
|
|
37
|
+
*/
|
|
38
|
+
createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
|
|
39
|
+
}
|
|
40
|
+
export declare class InternalApps {
|
|
41
|
+
private readonly _client;
|
|
42
|
+
constructor(_client: Client);
|
|
43
|
+
/**
|
|
44
|
+
* List apps
|
|
45
|
+
*
|
|
46
|
+
* List installed apps.
|
|
47
|
+
*
|
|
48
|
+
* GET /openmeter/apps
|
|
49
|
+
*/
|
|
50
|
+
list(request?: ListAppsRequest, options?: RequestOptions): Promise<ListAppsResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* List apps
|
|
53
|
+
*
|
|
54
|
+
* List installed apps.
|
|
55
|
+
*
|
|
56
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
57
|
+
*
|
|
58
|
+
* GET /openmeter/apps
|
|
59
|
+
*/
|
|
60
|
+
listAll(request?: ListAppsRequest, options?: RequestOptions): AsyncIterable<App>;
|
|
61
|
+
/**
|
|
62
|
+
* Get app
|
|
63
|
+
*
|
|
64
|
+
* Get an installed app.
|
|
65
|
+
*
|
|
66
|
+
* GET /openmeter/apps/{appId}
|
|
67
|
+
*/
|
|
68
|
+
get(request: GetAppRequest, options?: RequestOptions): Promise<GetAppResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Uninstall app
|
|
71
|
+
*
|
|
72
|
+
* Uninstall an app by ID.
|
|
73
|
+
*
|
|
74
|
+
* DELETE /openmeter/apps/{appId}
|
|
75
|
+
*/
|
|
76
|
+
uninstall(request: UninstallAppRequest, options?: RequestOptions): Promise<UninstallAppResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* Update app
|
|
79
|
+
*
|
|
80
|
+
* Update an installed app.
|
|
81
|
+
*
|
|
82
|
+
* PUT /openmeter/apps/{appId}
|
|
83
|
+
*/
|
|
84
|
+
update(request: UpdateAppRequest, options?: RequestOptions): Promise<UpdateAppResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* List app catalog
|
|
87
|
+
*
|
|
88
|
+
* List available apps.
|
|
89
|
+
*
|
|
90
|
+
* GET /openmeter/app-catalog
|
|
91
|
+
*/
|
|
92
|
+
listCatalog(request?: ListAppCatalogRequest, options?: RequestOptions): Promise<ListAppCatalogResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* List app catalog
|
|
95
|
+
*
|
|
96
|
+
* List available apps.
|
|
97
|
+
*
|
|
98
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
99
|
+
*
|
|
100
|
+
* GET /openmeter/app-catalog
|
|
101
|
+
*/
|
|
102
|
+
listCatalogAll(request?: ListAppCatalogRequest, options?: RequestOptions): AsyncIterable<AppCatalogItem>;
|
|
103
|
+
/**
|
|
104
|
+
* Get app catalog item by type
|
|
105
|
+
*
|
|
106
|
+
* Get an app catalog item by type.
|
|
107
|
+
*
|
|
108
|
+
* GET /openmeter/app-catalog/{appType}
|
|
109
|
+
*/
|
|
110
|
+
getCatalogItem(request: GetAppCatalogItemRequest, options?: RequestOptions): Promise<GetAppCatalogItemResponse>;
|
|
111
|
+
/**
|
|
112
|
+
* Install app from the catalog
|
|
113
|
+
*
|
|
114
|
+
* Install an app from the catalog.
|
|
115
|
+
*
|
|
116
|
+
* POST /openmeter/app-catalog/install
|
|
117
|
+
*/
|
|
118
|
+
install(request: InstallAppRequest, options?: RequestOptions): Promise<InstallAppResponse>;
|
|
119
|
+
}
|
|
120
|
+
export declare class InternalInvoices {
|
|
121
|
+
private readonly _client;
|
|
122
|
+
constructor(_client: Client);
|
|
123
|
+
/**
|
|
124
|
+
* List billing invoices
|
|
125
|
+
*
|
|
126
|
+
* List billing invoices.
|
|
127
|
+
*
|
|
128
|
+
* Returns a page of invoices. Gathering invoices are never included. Use `filter`
|
|
129
|
+
* to narrow by status, customer, dates, or service period start. Use `sort` to
|
|
130
|
+
* control ordering.
|
|
131
|
+
*
|
|
132
|
+
* GET /openmeter/billing/invoices
|
|
133
|
+
*/
|
|
134
|
+
list(request?: ListInvoicesRequest, options?: RequestOptions): Promise<ListInvoicesResponse>;
|
|
135
|
+
/**
|
|
136
|
+
* List billing invoices
|
|
137
|
+
*
|
|
138
|
+
* List billing invoices.
|
|
139
|
+
*
|
|
140
|
+
* Returns a page of invoices. Gathering invoices are never included. Use `filter`
|
|
141
|
+
* to narrow by status, customer, dates, or service period start. Use `sort` to
|
|
142
|
+
* control ordering.
|
|
143
|
+
*
|
|
144
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
145
|
+
*
|
|
146
|
+
* GET /openmeter/billing/invoices
|
|
147
|
+
*/
|
|
148
|
+
listAll(request?: ListInvoicesRequest, options?: RequestOptions): AsyncIterable<Invoice>;
|
|
149
|
+
/**
|
|
150
|
+
* Get a billing invoice
|
|
151
|
+
*
|
|
152
|
+
* Get a billing invoice by ID.
|
|
153
|
+
*
|
|
154
|
+
* Returns the full invoice resource including line items, status details, totals,
|
|
155
|
+
* and workflow configuration snapshot.
|
|
156
|
+
*
|
|
157
|
+
* GET /openmeter/billing/invoices/{invoiceId}
|
|
158
|
+
*/
|
|
159
|
+
get(request: GetInvoiceRequest, options?: RequestOptions): Promise<GetInvoiceResponse>;
|
|
160
|
+
/**
|
|
161
|
+
* Update a billing invoice
|
|
162
|
+
*
|
|
163
|
+
* Update a billing invoice.
|
|
164
|
+
*
|
|
165
|
+
* Only the mutable fields of the invoice can be edited: description, labels,
|
|
166
|
+
* supplier, customer, workflow settings, and top-level lines. Top-level lines are
|
|
167
|
+
* matched by `id`; lines without an `id` are created, and existing lines omitted
|
|
168
|
+
* from `lines` are deleted. Detailed (child) lines are always computed and cannot
|
|
169
|
+
* be edited directly. Only invoices in draft status can be updated.
|
|
170
|
+
*
|
|
171
|
+
* PUT /openmeter/billing/invoices/{invoiceId}
|
|
172
|
+
*/
|
|
173
|
+
update(request: UpdateInvoiceRequest, options?: RequestOptions): Promise<UpdateInvoiceResponse>;
|
|
174
|
+
/**
|
|
175
|
+
* Delete a billing invoice
|
|
176
|
+
*
|
|
177
|
+
* Delete a billing invoice.
|
|
178
|
+
*
|
|
179
|
+
* Only standard invoices in draft status can be deleted. Deleting an invoice will
|
|
180
|
+
* also delete all associated line items and workflow configuration.
|
|
181
|
+
*
|
|
182
|
+
* DELETE /openmeter/billing/invoices/{invoiceId}
|
|
183
|
+
*/
|
|
184
|
+
delete(request: DeleteInvoiceRequest, options?: RequestOptions): Promise<DeleteInvoiceResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Advance billing invoice's next status
|
|
187
|
+
*
|
|
188
|
+
* Advance a billing invoice.
|
|
189
|
+
*
|
|
190
|
+
* Advances the invoice to the next workflow state. The next state is determined by
|
|
191
|
+
* the invoice's current status and workflow configuration. Only invoices in draft
|
|
192
|
+
* or issued status can be advanced.
|
|
193
|
+
*
|
|
194
|
+
* POST /openmeter/billing/invoices/{invoiceId}/advance
|
|
195
|
+
*/
|
|
196
|
+
advance(request: AdvanceInvoiceRequest, options?: RequestOptions): Promise<AdvanceInvoiceResponse>;
|
|
197
|
+
/**
|
|
198
|
+
* Send the invoice to the customer
|
|
199
|
+
*
|
|
200
|
+
* Approve a billing invoice.
|
|
201
|
+
*
|
|
202
|
+
* This call instantly sends the invoice to the customer using the configured
|
|
203
|
+
* billing profile app.
|
|
204
|
+
*
|
|
205
|
+
* This call is valid in two invoice statuses:
|
|
206
|
+
*
|
|
207
|
+
* - draft: the invoice will be sent to the customer, the invoice state becomes
|
|
208
|
+
* issued
|
|
209
|
+
* - manual_approval_needed: the invoice will be sent to the customer, the invoice
|
|
210
|
+
* state becomes issued
|
|
211
|
+
*
|
|
212
|
+
* POST /openmeter/billing/invoices/{invoiceId}/approve
|
|
213
|
+
*/
|
|
214
|
+
approve(request: ApproveInvoiceRequest, options?: RequestOptions): Promise<ApproveInvoiceResponse>;
|
|
215
|
+
/**
|
|
216
|
+
* Retry advancing the invoice after a failed attempt
|
|
217
|
+
*
|
|
218
|
+
* Retry sending a billing invoice.
|
|
219
|
+
*
|
|
220
|
+
* Retry advancing the invoice after a failed attempt.
|
|
221
|
+
*
|
|
222
|
+
* The action can be called when the invoice's statusDetails' actions field contain
|
|
223
|
+
* the "retry" action.
|
|
224
|
+
*
|
|
225
|
+
* POST /openmeter/billing/invoices/{invoiceId}/retry
|
|
226
|
+
*/
|
|
227
|
+
retry(request: RetryInvoiceRequest, options?: RequestOptions): Promise<RetryInvoiceResponse>;
|
|
228
|
+
/**
|
|
229
|
+
* Snapshot quantities for usage based line items
|
|
230
|
+
*
|
|
231
|
+
* Snapshot quantities for usage-based line items.
|
|
232
|
+
*
|
|
233
|
+
* This call will snapshot the quantities for all usage based line items in the
|
|
234
|
+
* invoice.
|
|
235
|
+
*
|
|
236
|
+
* This call is only valid in draft.waiting_for_collection status, where the
|
|
237
|
+
* collection period can be skipped using this action.
|
|
238
|
+
*
|
|
239
|
+
* POST /openmeter/billing/invoices/{invoiceId}/snapshot-quantities
|
|
240
|
+
*/
|
|
241
|
+
snapshotQuantities(request: SnapshotQuantitiesInvoiceRequest, options?: RequestOptions): Promise<SnapshotQuantitiesInvoiceResponse>;
|
|
242
|
+
}
|
|
243
|
+
export declare class InternalCurrencies {
|
|
244
|
+
private readonly _client;
|
|
245
|
+
constructor(_client: Client);
|
|
246
|
+
/**
|
|
247
|
+
* List currencies
|
|
248
|
+
*
|
|
249
|
+
* List currencies supported by the billing system.
|
|
250
|
+
*
|
|
251
|
+
* GET /openmeter/currencies
|
|
252
|
+
*/
|
|
253
|
+
list(request?: ListCurrenciesRequest, options?: RequestOptions): Promise<ListCurrenciesResponse>;
|
|
254
|
+
/**
|
|
255
|
+
* List currencies
|
|
256
|
+
*
|
|
257
|
+
* List currencies supported by the billing system.
|
|
258
|
+
*
|
|
259
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
260
|
+
*
|
|
261
|
+
* GET /openmeter/currencies
|
|
262
|
+
*/
|
|
263
|
+
listAll(request?: ListCurrenciesRequest, options?: RequestOptions): AsyncIterable<Currency>;
|
|
264
|
+
/**
|
|
265
|
+
* Create custom currency
|
|
266
|
+
*
|
|
267
|
+
* Create a custom currency. This operation allows defining your own custom
|
|
268
|
+
* currency for billing purposes.
|
|
269
|
+
*
|
|
270
|
+
* POST /openmeter/currencies/custom
|
|
271
|
+
*/
|
|
272
|
+
createCustomCurrency(request: CreateCustomCurrencyRequest, options?: RequestOptions): Promise<CreateCustomCurrencyResponse>;
|
|
273
|
+
/**
|
|
274
|
+
* Get custom currency
|
|
275
|
+
*
|
|
276
|
+
* Get a custom currency.
|
|
277
|
+
*
|
|
278
|
+
* GET /openmeter/currencies/custom/{currencyId}
|
|
279
|
+
*/
|
|
280
|
+
getCustomCurrency(request: GetCustomCurrencyRequest, options?: RequestOptions): Promise<GetCustomCurrencyResponse>;
|
|
281
|
+
/**
|
|
282
|
+
* List cost bases
|
|
283
|
+
*
|
|
284
|
+
* List cost bases for a currency. For custom currencies, there can be multiple
|
|
285
|
+
* cost bases with different `effective_from` dates.
|
|
286
|
+
*
|
|
287
|
+
* GET /openmeter/currencies/custom/{currencyId}/cost-bases
|
|
288
|
+
*/
|
|
289
|
+
listCostBases(request: ListCostBasesRequest, options?: RequestOptions): Promise<ListCostBasesResponse>;
|
|
290
|
+
/**
|
|
291
|
+
* List cost bases
|
|
292
|
+
*
|
|
293
|
+
* List cost bases for a currency. For custom currencies, there can be multiple
|
|
294
|
+
* cost bases with different `effective_from` dates.
|
|
295
|
+
*
|
|
296
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
297
|
+
*
|
|
298
|
+
* GET /openmeter/currencies/custom/{currencyId}/cost-bases
|
|
299
|
+
*/
|
|
300
|
+
listCostBasesAll(request: ListCostBasesRequest, options?: RequestOptions): AsyncIterable<CostBasis>;
|
|
301
|
+
/**
|
|
302
|
+
* Create cost basis
|
|
303
|
+
*
|
|
304
|
+
* Create a cost basis for a currency.
|
|
305
|
+
*
|
|
306
|
+
* POST /openmeter/currencies/custom/{currencyId}/cost-bases
|
|
307
|
+
*/
|
|
308
|
+
createCostBasis(request: CreateCostBasisRequest, options?: RequestOptions): Promise<CreateCostBasisResponse>;
|
|
309
|
+
}
|
|
310
|
+
export declare class InternalGovernance {
|
|
311
|
+
private readonly _client;
|
|
312
|
+
constructor(_client: Client);
|
|
313
|
+
/**
|
|
314
|
+
* Query governance access
|
|
315
|
+
*
|
|
316
|
+
* Query feature access for a list of customers.
|
|
317
|
+
*
|
|
318
|
+
* The endpoint resolves each provided identifier to a customer and returns the
|
|
319
|
+
* access status for the requested features, plus optional credit balance
|
|
320
|
+
* availability.
|
|
321
|
+
*
|
|
322
|
+
* _Designed to be called on a fixed refresh interval and the query response is
|
|
323
|
+
* intended to be cached._
|
|
324
|
+
*
|
|
325
|
+
* POST /openmeter/governance/query
|
|
326
|
+
*/
|
|
327
|
+
queryAccess(request: QueryGovernanceAccessRequest, options?: RequestOptions): Promise<QueryGovernanceAccessResponse>;
|
|
328
|
+
}
|