@lumoauth/api-client 1.3.0 → 1.4.0
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/.openapi-generator/FILES +10 -0
- package/README.md +9 -2
- package/api/admin-agents-api.ts +130 -0
- package/api/agents-api.ts +118 -0
- package/dist/api/admin-agents-api.d.ts +73 -0
- package/dist/api/admin-agents-api.js +82 -0
- package/dist/api/agents-api.d.ts +65 -0
- package/dist/api/agents-api.js +77 -0
- package/dist/esm/api/admin-agents-api.d.ts +73 -0
- package/dist/esm/api/admin-agents-api.js +82 -0
- package/dist/esm/api/agents-api.d.ts +65 -0
- package/dist/esm/api/agents-api.js +77 -0
- package/dist/esm/models/abac-attribute-definition.d.ts +1 -1
- package/dist/esm/models/abac-resource-attribute.d.ts +1 -1
- package/dist/esm/models/admin-agents-report-usage-request.d.ts +30 -0
- package/dist/esm/models/admin-agents-report-usage-request.js +14 -0
- package/dist/esm/models/admin-agents-report-usage-response-data-recorded.d.ts +30 -0
- package/dist/esm/models/admin-agents-report-usage-response-data-recorded.js +14 -0
- package/dist/esm/models/admin-agents-report-usage-response-data.d.ts +33 -0
- package/dist/esm/models/admin-agents-report-usage-response-data.js +14 -0
- package/dist/esm/models/admin-agents-report-usage-response.d.ts +25 -0
- package/dist/esm/models/admin-agents-report-usage-response.js +14 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/report-agent-usage-response.d.ts +33 -0
- package/dist/esm/models/report-agent-usage-response.js +14 -0
- package/dist/esm/models/set-user-attribute-response-data.d.ts +1 -1
- package/dist/esm/models/userinfo-response.d.ts +8 -0
- package/dist/models/abac-attribute-definition.d.ts +1 -1
- package/dist/models/abac-resource-attribute.d.ts +1 -1
- package/dist/models/admin-agents-report-usage-request.d.ts +30 -0
- package/dist/models/admin-agents-report-usage-request.js +15 -0
- package/dist/models/admin-agents-report-usage-response-data-recorded.d.ts +30 -0
- package/dist/models/admin-agents-report-usage-response-data-recorded.js +15 -0
- package/dist/models/admin-agents-report-usage-response-data.d.ts +33 -0
- package/dist/models/admin-agents-report-usage-response-data.js +15 -0
- package/dist/models/admin-agents-report-usage-response.d.ts +25 -0
- package/dist/models/admin-agents-report-usage-response.js +15 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/models/report-agent-usage-response.d.ts +33 -0
- package/dist/models/report-agent-usage-response.js +15 -0
- package/dist/models/set-user-attribute-response-data.d.ts +1 -1
- package/dist/models/userinfo-response.d.ts +8 -0
- package/docs/AdminAgentsApi.md +63 -0
- package/docs/AdminAgentsReportUsageRequest.md +22 -0
- package/docs/AdminAgentsReportUsageResponse.md +20 -0
- package/docs/AdminAgentsReportUsageResponseData.md +22 -0
- package/docs/AdminAgentsReportUsageResponseDataRecorded.md +22 -0
- package/docs/AgentsApi.md +59 -0
- package/docs/OIDCApi.md +2 -2
- package/docs/ReportAgentUsageResponse.md +22 -0
- package/docs/UserinfoResponse.md +2 -0
- package/models/abac-attribute-definition.ts +1 -1
- package/models/abac-resource-attribute.ts +1 -1
- package/models/admin-agents-report-usage-request.ts +36 -0
- package/models/admin-agents-report-usage-response-data-recorded.ts +36 -0
- package/models/admin-agents-report-usage-response-data.ts +39 -0
- package/models/admin-agents-report-usage-response.ts +33 -0
- package/models/index.ts +5 -0
- package/models/report-agent-usage-response.ts +39 -0
- package/models/set-user-attribute-response-data.ts +1 -1
- package/models/userinfo-response.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LumoAuth API
|
|
6
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: sdk@lumoauth.dev
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LumoAuth API
|
|
3
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: sdk@lumoauth.dev
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminAgentsReportUsageResponseDataRecorded } from './admin-agents-report-usage-response-data-recorded';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminAgentsReportUsageResponseData
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminAgentsReportUsageResponseData {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {AdminAgentsReportUsageResponseDataRecorded}
|
|
22
|
+
* @memberof AdminAgentsReportUsageResponseData
|
|
23
|
+
*/
|
|
24
|
+
'recorded'?: AdminAgentsReportUsageResponseDataRecorded;
|
|
25
|
+
/**
|
|
26
|
+
* Same shape as budget_policy in UserInfo: limits, usage in the current windows, exhausted.
|
|
27
|
+
* @type {{ [key: string]: any; }}
|
|
28
|
+
* @memberof AdminAgentsReportUsageResponseData
|
|
29
|
+
*/
|
|
30
|
+
'budget'?: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LumoAuth API
|
|
6
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: sdk@lumoauth.dev
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LumoAuth API
|
|
3
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: sdk@lumoauth.dev
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminAgentsReportUsageResponseData } from './admin-agents-report-usage-response-data';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminAgentsReportUsageResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminAgentsReportUsageResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {AdminAgentsReportUsageResponseData}
|
|
22
|
+
* @memberof AdminAgentsReportUsageResponse
|
|
23
|
+
*/
|
|
24
|
+
'data'?: AdminAgentsReportUsageResponseData;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LumoAuth API
|
|
6
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: sdk@lumoauth.dev
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export * from './admin-agents-generate-token-response-data';
|
|
|
25
25
|
export * from './admin-agents-get-response';
|
|
26
26
|
export * from './admin-agents-get-scopes-response';
|
|
27
27
|
export * from './admin-agents-list-response';
|
|
28
|
+
export * from './admin-agents-report-usage-request';
|
|
29
|
+
export * from './admin-agents-report-usage-response';
|
|
30
|
+
export * from './admin-agents-report-usage-response-data';
|
|
31
|
+
export * from './admin-agents-report-usage-response-data-recorded';
|
|
28
32
|
export * from './admin-agents-revoke-key-response';
|
|
29
33
|
export * from './admin-agents-rotate-credentials-response';
|
|
30
34
|
export * from './admin-agents-set-scopes-request';
|
|
@@ -343,6 +347,7 @@ export * from './registered-client-metadata';
|
|
|
343
347
|
export * from './remove-user-group-response';
|
|
344
348
|
export * from './remove-user-permission-response';
|
|
345
349
|
export * from './remove-user-role-response';
|
|
350
|
+
export * from './report-agent-usage-response';
|
|
346
351
|
export * from './request-permission-request';
|
|
347
352
|
export * from './request-permission-response';
|
|
348
353
|
export * from './revoke-agent-token-request';
|
package/dist/models/index.js
CHANGED
|
@@ -41,6 +41,10 @@ __exportStar(require("./admin-agents-generate-token-response-data"), exports);
|
|
|
41
41
|
__exportStar(require("./admin-agents-get-response"), exports);
|
|
42
42
|
__exportStar(require("./admin-agents-get-scopes-response"), exports);
|
|
43
43
|
__exportStar(require("./admin-agents-list-response"), exports);
|
|
44
|
+
__exportStar(require("./admin-agents-report-usage-request"), exports);
|
|
45
|
+
__exportStar(require("./admin-agents-report-usage-response"), exports);
|
|
46
|
+
__exportStar(require("./admin-agents-report-usage-response-data"), exports);
|
|
47
|
+
__exportStar(require("./admin-agents-report-usage-response-data-recorded"), exports);
|
|
44
48
|
__exportStar(require("./admin-agents-revoke-key-response"), exports);
|
|
45
49
|
__exportStar(require("./admin-agents-rotate-credentials-response"), exports);
|
|
46
50
|
__exportStar(require("./admin-agents-set-scopes-request"), exports);
|
|
@@ -359,6 +363,7 @@ __exportStar(require("./registered-client-metadata"), exports);
|
|
|
359
363
|
__exportStar(require("./remove-user-group-response"), exports);
|
|
360
364
|
__exportStar(require("./remove-user-permission-response"), exports);
|
|
361
365
|
__exportStar(require("./remove-user-role-response"), exports);
|
|
366
|
+
__exportStar(require("./report-agent-usage-response"), exports);
|
|
362
367
|
__exportStar(require("./request-permission-request"), exports);
|
|
363
368
|
__exportStar(require("./request-permission-response"), exports);
|
|
364
369
|
__exportStar(require("./revoke-agent-token-request"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LumoAuth API
|
|
3
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: sdk@lumoauth.dev
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AdminAgentsReportUsageResponseDataRecorded } from './admin-agents-report-usage-response-data-recorded';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ReportAgentUsageResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface ReportAgentUsageResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {AdminAgentsReportUsageResponseDataRecorded}
|
|
22
|
+
* @memberof ReportAgentUsageResponse
|
|
23
|
+
*/
|
|
24
|
+
'recorded'?: AdminAgentsReportUsageResponseDataRecorded;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {{ [key: string]: any; }}
|
|
28
|
+
* @memberof ReportAgentUsageResponse
|
|
29
|
+
*/
|
|
30
|
+
'budget'?: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LumoAuth API
|
|
6
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: sdk@lumoauth.dev
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -173,6 +173,14 @@ export interface UserinfoResponse {
|
|
|
173
173
|
* @memberof UserinfoResponse
|
|
174
174
|
*/
|
|
175
175
|
'capabilities'?: Array<string> | null;
|
|
176
|
+
/**
|
|
177
|
+
* Agents only. The budget limits that are set (max_api_calls_per_hour, max_api_calls_per_day, max_tokens_per_hour, max_tokens_per_day, max_cost_per_day_usd, max_cost_per_month_usd, hard_limit; unlimited ones are left out) and any other policy keys, the usage in the current UTC windows (api_calls_this_hour, api_calls_today, tokens_used_this_hour, tokens_used_today, cost_today_usd, cost_this_month_usd), and exhausted: true when a limit is reached and the next metered call would get 429.
|
|
178
|
+
* @type {{ [key: string]: any; }}
|
|
179
|
+
* @memberof UserinfoResponse
|
|
180
|
+
*/
|
|
181
|
+
'budget_policy'?: {
|
|
182
|
+
[key: string]: any;
|
|
183
|
+
};
|
|
176
184
|
/**
|
|
177
185
|
* Clients only.
|
|
178
186
|
* @type {string}
|
package/docs/AdminAgentsApi.md
CHANGED
|
@@ -15,6 +15,7 @@ All URIs are relative to *https://app.lumoauth.dev*
|
|
|
15
15
|
|[**adminAgentsGet**](#adminagentsget) | **GET** /orgs/{orgId}/api/v1/admin/agents/{agentId} | Get a single agent by ID or agentId|
|
|
16
16
|
|[**adminAgentsGetScopes**](#adminagentsgetscopes) | **GET** /orgs/{orgId}/api/v1/admin/agents/{agentId}/scopes | Get agent scopes/capabilities|
|
|
17
17
|
|[**adminAgentsList**](#adminagentslist) | **GET** /orgs/{orgId}/api/v1/admin/agents | List all agents in the tenant|
|
|
18
|
+
|[**adminAgentsReportUsage**](#adminagentsreportusage) | **POST** /orgs/{orgId}/api/v1/admin/agents/{agentId}/usage | Report model tokens and cost for an agent|
|
|
18
19
|
|[**adminAgentsRevokeKey**](#adminagentsrevokekey) | **POST** /orgs/{orgId}/api/v1/admin/agents/{agentId}/revoke-key | Revoke agent API key (nullify it so it can no longer authenticate)|
|
|
19
20
|
|[**adminAgentsRotateCredentials**](#adminagentsrotatecredentials) | **POST** /orgs/{orgId}/api/v1/admin/agents/{agentId}/rotate-credentials | Rotate agent credentials|
|
|
20
21
|
|[**adminAgentsSetScopes**](#adminagentssetscopes) | **PUT** /orgs/{orgId}/api/v1/admin/agents/{agentId}/scopes | Update agent scopes/capabilities|
|
|
@@ -641,6 +642,68 @@ const { status, data } = await apiInstance.adminAgentsList(
|
|
|
641
642
|
|
|
642
643
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
643
644
|
|
|
645
|
+
# **adminAgentsReportUsage**
|
|
646
|
+
> AdminAgentsReportUsageResponse adminAgentsReportUsage(adminAgentsReportUsageRequest)
|
|
647
|
+
|
|
648
|
+
For a trusted component of your organization, such as an AI gateway\'s spend callback or an orchestrator, that sees the agent\'s model calls. Adds the tokens and cost to the agent\'s budget windows (current UTC hour, day and month), exactly like POST /agents/me/usage from the agent itself. The report adds no API call and is accepted even when the budget is spent.
|
|
649
|
+
|
|
650
|
+
### Example
|
|
651
|
+
|
|
652
|
+
```typescript
|
|
653
|
+
import {
|
|
654
|
+
AdminAgentsApi,
|
|
655
|
+
Configuration,
|
|
656
|
+
AdminAgentsReportUsageRequest
|
|
657
|
+
} from '@lumoauth/api-client';
|
|
658
|
+
|
|
659
|
+
const configuration = new Configuration();
|
|
660
|
+
const apiInstance = new AdminAgentsApi(configuration);
|
|
661
|
+
|
|
662
|
+
let orgId: string; // (default to undefined)
|
|
663
|
+
let agentId: string; // (default to undefined)
|
|
664
|
+
let adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest; //
|
|
665
|
+
|
|
666
|
+
const { status, data } = await apiInstance.adminAgentsReportUsage(
|
|
667
|
+
orgId,
|
|
668
|
+
agentId,
|
|
669
|
+
adminAgentsReportUsageRequest
|
|
670
|
+
);
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### Parameters
|
|
674
|
+
|
|
675
|
+
|Name | Type | Description | Notes|
|
|
676
|
+
|------------- | ------------- | ------------- | -------------|
|
|
677
|
+
| **adminAgentsReportUsageRequest** | **AdminAgentsReportUsageRequest**| | |
|
|
678
|
+
| **orgId** | [**string**] | | defaults to undefined|
|
|
679
|
+
| **agentId** | [**string**] | | defaults to undefined|
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
### Return type
|
|
683
|
+
|
|
684
|
+
**AdminAgentsReportUsageResponse**
|
|
685
|
+
|
|
686
|
+
### Authorization
|
|
687
|
+
|
|
688
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
|
|
689
|
+
|
|
690
|
+
### HTTP request headers
|
|
691
|
+
|
|
692
|
+
- **Content-Type**: application/json
|
|
693
|
+
- **Accept**: application/json
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
### HTTP response details
|
|
697
|
+
| Status code | Description | Response headers |
|
|
698
|
+
|-------------|-------------|------------------|
|
|
699
|
+
|**200** | Recorded. | - |
|
|
700
|
+
|**400** | tokens or cost_usd is missing, negative, too large or not a number. | - |
|
|
701
|
+
|**401** | Authentication required. | - |
|
|
702
|
+
|**403** | Admin privileges required. | - |
|
|
703
|
+
|**404** | Tenant or agent not found. | - |
|
|
704
|
+
|
|
705
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
706
|
+
|
|
644
707
|
# **adminAgentsRevokeKey**
|
|
645
708
|
> AdminAgentsRevokeKeyResponse adminAgentsRevokeKey()
|
|
646
709
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AdminAgentsReportUsageRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**tokens** | **number** | Model tokens used since the last report (input and output together). | [optional] [default to undefined]
|
|
9
|
+
**cost_usd** | **number** | Cost in USD since the last report. | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AdminAgentsReportUsageRequest } from '@lumoauth/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: AdminAgentsReportUsageRequest = {
|
|
17
|
+
tokens,
|
|
18
|
+
cost_usd,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AdminAgentsReportUsageResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**data** | [**AdminAgentsReportUsageResponseData**](AdminAgentsReportUsageResponseData.md) | | [optional] [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { AdminAgentsReportUsageResponse } from '@lumoauth/api-client';
|
|
14
|
+
|
|
15
|
+
const instance: AdminAgentsReportUsageResponse = {
|
|
16
|
+
data,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AdminAgentsReportUsageResponseData
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**recorded** | [**AdminAgentsReportUsageResponseDataRecorded**](AdminAgentsReportUsageResponseDataRecorded.md) | | [optional] [default to undefined]
|
|
9
|
+
**budget** | **{ [key: string]: any; }** | Same shape as budget_policy in UserInfo: limits, usage in the current windows, exhausted. | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AdminAgentsReportUsageResponseData } from '@lumoauth/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: AdminAgentsReportUsageResponseData = {
|
|
17
|
+
recorded,
|
|
18
|
+
budget,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AdminAgentsReportUsageResponseDataRecorded
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**tokens** | **number** | | [optional] [default to undefined]
|
|
9
|
+
**cost_usd** | **number** | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AdminAgentsReportUsageResponseDataRecorded } from '@lumoauth/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: AdminAgentsReportUsageResponseDataRecorded = {
|
|
17
|
+
tokens,
|
|
18
|
+
cost_usd,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/AgentsApi.md
CHANGED
|
@@ -12,6 +12,7 @@ All URIs are relative to *https://app.lumoauth.dev*
|
|
|
12
12
|
|[**getApprovalStatus**](#getapprovalstatus) | **GET** /orgs/{orgId}/api/v1/agents/me/approvals/{token}/status | |
|
|
13
13
|
|[**getCurrentAgent**](#getcurrentagent) | **GET** /orgs/{orgId}/api/v1/agents/me | Get details about the currently authenticated agent|
|
|
14
14
|
|[**registerAgent**](#registeragent) | **POST** /orgs/{orgId}/api/v1/agents/register | Register (or re-register) an agent|
|
|
15
|
+
|[**reportAgentUsage**](#reportagentusage) | **POST** /orgs/{orgId}/api/v1/agents/me/usage | Report the model tokens and cost that the agent used|
|
|
15
16
|
|[**verifyAgentCard**](#verifyagentcard) | **POST** /orgs/{orgId}/api/v1/agents/agent-card/verify | Verify a signed A2A agent card|
|
|
16
17
|
|
|
17
18
|
# **ask**
|
|
@@ -464,6 +465,64 @@ const { status, data } = await apiInstance.registerAgent(
|
|
|
464
465
|
|
|
465
466
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
466
467
|
|
|
468
|
+
# **reportAgentUsage**
|
|
469
|
+
> ReportAgentUsageResponse reportAgentUsage(adminAgentsReportUsageRequest)
|
|
470
|
+
|
|
471
|
+
Adds the reported tokens and cost to the agent\'s budget windows (current UTC hour, day and month). LumoAuth does not see model calls, so token and cost limits apply only to usage that is reported here or through the Admin API. The report adds no API call and is accepted even when the budget is spent. Agent credentials only; portal test tokens are refused. Rate limited per agent.
|
|
472
|
+
|
|
473
|
+
### Example
|
|
474
|
+
|
|
475
|
+
```typescript
|
|
476
|
+
import {
|
|
477
|
+
AgentsApi,
|
|
478
|
+
Configuration,
|
|
479
|
+
AdminAgentsReportUsageRequest
|
|
480
|
+
} from '@lumoauth/api-client';
|
|
481
|
+
|
|
482
|
+
const configuration = new Configuration();
|
|
483
|
+
const apiInstance = new AgentsApi(configuration);
|
|
484
|
+
|
|
485
|
+
let orgId: string; // (default to undefined)
|
|
486
|
+
let adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest; //
|
|
487
|
+
|
|
488
|
+
const { status, data } = await apiInstance.reportAgentUsage(
|
|
489
|
+
orgId,
|
|
490
|
+
adminAgentsReportUsageRequest
|
|
491
|
+
);
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Parameters
|
|
495
|
+
|
|
496
|
+
|Name | Type | Description | Notes|
|
|
497
|
+
|------------- | ------------- | ------------- | -------------|
|
|
498
|
+
| **adminAgentsReportUsageRequest** | **AdminAgentsReportUsageRequest**| | |
|
|
499
|
+
| **orgId** | [**string**] | | defaults to undefined|
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
### Return type
|
|
503
|
+
|
|
504
|
+
**ReportAgentUsageResponse**
|
|
505
|
+
|
|
506
|
+
### Authorization
|
|
507
|
+
|
|
508
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth), [BearerAuth](../README.md#BearerAuth)
|
|
509
|
+
|
|
510
|
+
### HTTP request headers
|
|
511
|
+
|
|
512
|
+
- **Content-Type**: application/json
|
|
513
|
+
- **Accept**: application/json
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
### HTTP response details
|
|
517
|
+
| Status code | Description | Response headers |
|
|
518
|
+
|-------------|-------------|------------------|
|
|
519
|
+
|**200** | Recorded. `budget` has the same shape as `budget_policy` in UserInfo; `exhausted: true` means that the next metered call gets 429. | - |
|
|
520
|
+
|**400** | invalid_request: tokens or cost_usd is missing, negative, too large or not a number. | - |
|
|
521
|
+
|**403** | test_token_not_accepted or cross_tenant. | - |
|
|
522
|
+
|**429** | rate_limited: too many reports from this agent. | - |
|
|
523
|
+
|
|
524
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
525
|
+
|
|
467
526
|
# **verifyAgentCard**
|
|
468
527
|
> VerifyAgentCardResponse verifyAgentCard(requestBody)
|
|
469
528
|
|
package/docs/OIDCApi.md
CHANGED
|
@@ -214,7 +214,7 @@ const { status, data } = await apiInstance.userinfo(
|
|
|
214
214
|
### HTTP response details
|
|
215
215
|
| Status code | Description | Response headers |
|
|
216
216
|
|-------------|-------------|------------------|
|
|
217
|
-
|**200** | Claims for the token\'s principal. The shape depends on the identity type: a user token yields standard OIDC claims gated by scope (profile, email, phone, address), roles only when the client enabled the roles claim, plus tenant — null-valued claims are omitted; an agent token yields sub=agent_<id>, name, agent_id, workload_identity, capabilities, tenant, identity_type=agent; a client token yields sub=client_<id>, client_id, name, tenant, identity_type=client. Sent with Cache-Control: no-store. | - |
|
|
217
|
+
|**200** | Claims for the token\'s principal. The shape depends on the identity type: a user token yields standard OIDC claims gated by scope (profile, email, phone, address), roles only when the client enabled the roles claim, plus tenant — null-valued claims are omitted; an agent token (no openid scope needed: an agent is not an End-User and reads only its own record) yields sub=agent_<id>, name, agent_id, workload_identity, capabilities, budget_policy, tenant, identity_type=agent; a client token yields sub=client_<id>, client_id, name, tenant, identity_type=client. Sent with Cache-Control: no-store. | - |
|
|
218
218
|
|**400** | invalid_request — Authorization header missing or malformed. | - |
|
|
219
219
|
|**401** | invalid_token (invalid, expired, or wrong DPoP binding) or invalid_dpop_proof. | - |
|
|
220
220
|
|**403** | insufficient_scope — the openid scope is required. | - |
|
|
@@ -268,7 +268,7 @@ const { status, data } = await apiInstance.userinfoPost(
|
|
|
268
268
|
### HTTP response details
|
|
269
269
|
| Status code | Description | Response headers |
|
|
270
270
|
|-------------|-------------|------------------|
|
|
271
|
-
|**200** | Claims for the token\'s principal. The shape depends on the identity type: a user token yields standard OIDC claims gated by scope (profile, email, phone, address), roles only when the client enabled the roles claim, plus tenant — null-valued claims are omitted; an agent token yields sub=agent_<id>, name, agent_id, workload_identity, capabilities, tenant, identity_type=agent; a client token yields sub=client_<id>, client_id, name, tenant, identity_type=client. Sent with Cache-Control: no-store. | - |
|
|
271
|
+
|**200** | Claims for the token\'s principal. The shape depends on the identity type: a user token yields standard OIDC claims gated by scope (profile, email, phone, address), roles only when the client enabled the roles claim, plus tenant — null-valued claims are omitted; an agent token (no openid scope needed: an agent is not an End-User and reads only its own record) yields sub=agent_<id>, name, agent_id, workload_identity, capabilities, budget_policy, tenant, identity_type=agent; a client token yields sub=client_<id>, client_id, name, tenant, identity_type=client. Sent with Cache-Control: no-store. | - |
|
|
272
272
|
|**400** | invalid_request — Authorization header missing or malformed. | - |
|
|
273
273
|
|**401** | invalid_token (invalid, expired, or wrong DPoP binding) or invalid_dpop_proof. | - |
|
|
274
274
|
|**403** | insufficient_scope — the openid scope is required. | - |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ReportAgentUsageResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**recorded** | [**AdminAgentsReportUsageResponseDataRecorded**](AdminAgentsReportUsageResponseDataRecorded.md) | | [optional] [default to undefined]
|
|
9
|
+
**budget** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ReportAgentUsageResponse } from '@lumoauth/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: ReportAgentUsageResponse = {
|
|
17
|
+
recorded,
|
|
18
|
+
budget,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/UserinfoResponse.md
CHANGED
|
@@ -31,6 +31,7 @@ Name | Type | Description | Notes
|
|
|
31
31
|
**agent_id** | **string** | Agents only. | [optional] [default to undefined]
|
|
32
32
|
**workload_identity** | **string** | Agents only. | [optional] [default to undefined]
|
|
33
33
|
**capabilities** | **Array<string>** | Agents only. | [optional] [default to undefined]
|
|
34
|
+
**budget_policy** | **{ [key: string]: any; }** | Agents only. The budget limits that are set (max_api_calls_per_hour, max_api_calls_per_day, max_tokens_per_hour, max_tokens_per_day, max_cost_per_day_usd, max_cost_per_month_usd, hard_limit; unlimited ones are left out) and any other policy keys, the usage in the current UTC windows (api_calls_this_hour, api_calls_today, tokens_used_this_hour, tokens_used_today, cost_today_usd, cost_this_month_usd), and exhausted: true when a limit is reached and the next metered call would get 429. | [optional] [default to undefined]
|
|
34
35
|
**client_id** | **string** | Clients only. | [optional] [default to undefined]
|
|
35
36
|
|
|
36
37
|
## Example
|
|
@@ -65,6 +66,7 @@ const instance: UserinfoResponse = {
|
|
|
65
66
|
agent_id,
|
|
66
67
|
workload_identity,
|
|
67
68
|
capabilities,
|
|
69
|
+
budget_policy,
|
|
68
70
|
client_id,
|
|
69
71
|
};
|
|
70
72
|
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LumoAuth API
|
|
5
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: sdk@lumoauth.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface AdminAgentsReportUsageRequest
|
|
21
|
+
*/
|
|
22
|
+
export interface AdminAgentsReportUsageRequest {
|
|
23
|
+
/**
|
|
24
|
+
* Model tokens used since the last report (input and output together).
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof AdminAgentsReportUsageRequest
|
|
27
|
+
*/
|
|
28
|
+
'tokens'?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Cost in USD since the last report.
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof AdminAgentsReportUsageRequest
|
|
33
|
+
*/
|
|
34
|
+
'cost_usd'?: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LumoAuth API
|
|
5
|
+
* LumoAuth REST API — authentication, authorization, agent registry, MCP server authorization, and tenant administration. Multi-tenant: most paths are scoped under `/orgs/{orgId}/api/v1/...`.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: sdk@lumoauth.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface AdminAgentsReportUsageResponseDataRecorded
|
|
21
|
+
*/
|
|
22
|
+
export interface AdminAgentsReportUsageResponseDataRecorded {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof AdminAgentsReportUsageResponseDataRecorded
|
|
27
|
+
*/
|
|
28
|
+
'tokens'?: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof AdminAgentsReportUsageResponseDataRecorded
|
|
33
|
+
*/
|
|
34
|
+
'cost_usd'?: number;
|
|
35
|
+
}
|
|
36
|
+
|