@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
|
@@ -453,6 +453,49 @@ const AdminAgentsApiAxiosParamCreator = function (configuration) {
|
|
|
453
453
|
options: localVarRequestOptions,
|
|
454
454
|
};
|
|
455
455
|
}),
|
|
456
|
+
/**
|
|
457
|
+
* 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.
|
|
458
|
+
* @summary Report model tokens and cost for an agent
|
|
459
|
+
* @param {string} orgId
|
|
460
|
+
* @param {string} agentId
|
|
461
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
462
|
+
* @param {*} [options] Override http request option.
|
|
463
|
+
* @throws {RequiredError}
|
|
464
|
+
*/
|
|
465
|
+
adminAgentsReportUsage: (orgId_1, agentId_1, adminAgentsReportUsageRequest_1, ...args_1) => __awaiter(this, [orgId_1, agentId_1, adminAgentsReportUsageRequest_1, ...args_1], void 0, function* (orgId, agentId, adminAgentsReportUsageRequest, options = {}) {
|
|
466
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
467
|
+
(0, common_1.assertParamExists)('adminAgentsReportUsage', 'orgId', orgId);
|
|
468
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
469
|
+
(0, common_1.assertParamExists)('adminAgentsReportUsage', 'agentId', agentId);
|
|
470
|
+
// verify required parameter 'adminAgentsReportUsageRequest' is not null or undefined
|
|
471
|
+
(0, common_1.assertParamExists)('adminAgentsReportUsage', 'adminAgentsReportUsageRequest', adminAgentsReportUsageRequest);
|
|
472
|
+
const localVarPath = `/orgs/{orgId}/api/v1/admin/agents/{agentId}/usage`
|
|
473
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)))
|
|
474
|
+
.replace(`{${"agentId"}}`, encodeURIComponent(String(agentId)));
|
|
475
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
476
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
477
|
+
let baseOptions;
|
|
478
|
+
if (configuration) {
|
|
479
|
+
baseOptions = configuration.baseOptions;
|
|
480
|
+
}
|
|
481
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
482
|
+
const localVarHeaderParameter = {};
|
|
483
|
+
const localVarQueryParameter = {};
|
|
484
|
+
// authentication ApiKeyAuth required
|
|
485
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
486
|
+
// authentication BearerAuth required
|
|
487
|
+
// http bearer authentication required
|
|
488
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
489
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
490
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
491
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
492
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
493
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminAgentsReportUsageRequest, localVarRequestOptions, configuration);
|
|
494
|
+
return {
|
|
495
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
496
|
+
options: localVarRequestOptions,
|
|
497
|
+
};
|
|
498
|
+
}),
|
|
456
499
|
/**
|
|
457
500
|
*
|
|
458
501
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -855,6 +898,24 @@ const AdminAgentsApiFp = function (configuration) {
|
|
|
855
898
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
856
899
|
});
|
|
857
900
|
},
|
|
901
|
+
/**
|
|
902
|
+
* 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.
|
|
903
|
+
* @summary Report model tokens and cost for an agent
|
|
904
|
+
* @param {string} orgId
|
|
905
|
+
* @param {string} agentId
|
|
906
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
907
|
+
* @param {*} [options] Override http request option.
|
|
908
|
+
* @throws {RequiredError}
|
|
909
|
+
*/
|
|
910
|
+
adminAgentsReportUsage(orgId, agentId, adminAgentsReportUsageRequest, options) {
|
|
911
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
912
|
+
var _a, _b, _c;
|
|
913
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.adminAgentsReportUsage(orgId, agentId, adminAgentsReportUsageRequest, options);
|
|
914
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
915
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdminAgentsApi.adminAgentsReportUsage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
916
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
917
|
+
});
|
|
918
|
+
},
|
|
858
919
|
/**
|
|
859
920
|
*
|
|
860
921
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -1063,6 +1124,16 @@ const AdminAgentsApiFactory = function (configuration, basePath, axios) {
|
|
|
1063
1124
|
adminAgentsList(requestParameters, options) {
|
|
1064
1125
|
return localVarFp.adminAgentsList(requestParameters.orgId, options).then((request) => request(axios, basePath));
|
|
1065
1126
|
},
|
|
1127
|
+
/**
|
|
1128
|
+
* 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.
|
|
1129
|
+
* @summary Report model tokens and cost for an agent
|
|
1130
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
1131
|
+
* @param {*} [options] Override http request option.
|
|
1132
|
+
* @throws {RequiredError}
|
|
1133
|
+
*/
|
|
1134
|
+
adminAgentsReportUsage(requestParameters, options) {
|
|
1135
|
+
return localVarFp.adminAgentsReportUsage(requestParameters.orgId, requestParameters.agentId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(axios, basePath));
|
|
1136
|
+
},
|
|
1066
1137
|
/**
|
|
1067
1138
|
*
|
|
1068
1139
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -1244,6 +1315,17 @@ class AdminAgentsApi extends base_1.BaseAPI {
|
|
|
1244
1315
|
adminAgentsList(requestParameters, options) {
|
|
1245
1316
|
return (0, exports.AdminAgentsApiFp)(this.configuration).adminAgentsList(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
|
|
1246
1317
|
}
|
|
1318
|
+
/**
|
|
1319
|
+
* 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.
|
|
1320
|
+
* @summary Report model tokens and cost for an agent
|
|
1321
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
1322
|
+
* @param {*} [options] Override http request option.
|
|
1323
|
+
* @throws {RequiredError}
|
|
1324
|
+
* @memberof AdminAgentsApi
|
|
1325
|
+
*/
|
|
1326
|
+
adminAgentsReportUsage(requestParameters, options) {
|
|
1327
|
+
return (0, exports.AdminAgentsApiFp)(this.configuration).adminAgentsReportUsage(requestParameters.orgId, requestParameters.agentId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1328
|
+
}
|
|
1247
1329
|
/**
|
|
1248
1330
|
*
|
|
1249
1331
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
package/dist/api/agents-api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import type { Configuration } from '../configuration';
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import { type RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import type { AdminAgentsReportUsageRequest } from '../models';
|
|
15
16
|
import type { AskRequest } from '../models';
|
|
16
17
|
import type { AskResponse } from '../models';
|
|
17
18
|
import type { AttestRequest } from '../models';
|
|
@@ -23,6 +24,7 @@ import type { CreateApprovalResponse } from '../models';
|
|
|
23
24
|
import type { GetApprovalStatusResponse } from '../models';
|
|
24
25
|
import type { GetCurrentAgentResponse } from '../models';
|
|
25
26
|
import type { RegisterAgentResponse } from '../models';
|
|
27
|
+
import type { ReportAgentUsageResponse } from '../models';
|
|
26
28
|
import type { SignedAgentCard } from '../models';
|
|
27
29
|
import type { VerifyAgentCardResponse } from '../models';
|
|
28
30
|
/**
|
|
@@ -99,6 +101,15 @@ export declare const AgentsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
99
101
|
* @throws {RequiredError}
|
|
100
102
|
*/
|
|
101
103
|
registerAgent: (orgId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
104
|
+
/**
|
|
105
|
+
* 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.
|
|
106
|
+
* @summary Report the model tokens and cost that the agent used
|
|
107
|
+
* @param {string} orgId
|
|
108
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
*/
|
|
112
|
+
reportAgentUsage: (orgId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
102
113
|
/**
|
|
103
114
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
104
115
|
* @summary Verify a signed A2A agent card
|
|
@@ -185,6 +196,15 @@ export declare const AgentsApiFp: (configuration?: Configuration) => {
|
|
|
185
196
|
* @throws {RequiredError}
|
|
186
197
|
*/
|
|
187
198
|
registerAgent(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RegisterAgentResponse>>;
|
|
199
|
+
/**
|
|
200
|
+
* 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.
|
|
201
|
+
* @summary Report the model tokens and cost that the agent used
|
|
202
|
+
* @param {string} orgId
|
|
203
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
reportAgentUsage(orgId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportAgentUsageResponse>>;
|
|
188
208
|
/**
|
|
189
209
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
190
210
|
* @summary Verify a signed A2A agent card
|
|
@@ -264,6 +284,14 @@ export declare const AgentsApiFactory: (configuration?: Configuration, basePath?
|
|
|
264
284
|
* @throws {RequiredError}
|
|
265
285
|
*/
|
|
266
286
|
registerAgent(requestParameters: AgentsApiRegisterAgentRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterAgentResponse>;
|
|
287
|
+
/**
|
|
288
|
+
* 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.
|
|
289
|
+
* @summary Report the model tokens and cost that the agent used
|
|
290
|
+
* @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
|
|
291
|
+
* @param {*} [options] Override http request option.
|
|
292
|
+
* @throws {RequiredError}
|
|
293
|
+
*/
|
|
294
|
+
reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReportAgentUsageResponse>;
|
|
267
295
|
/**
|
|
268
296
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
269
297
|
* @summary Verify a signed A2A agent card
|
|
@@ -349,6 +377,15 @@ export interface AgentsApiInterface {
|
|
|
349
377
|
* @memberof AgentsApiInterface
|
|
350
378
|
*/
|
|
351
379
|
registerAgent(requestParameters: AgentsApiRegisterAgentRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterAgentResponse>;
|
|
380
|
+
/**
|
|
381
|
+
* 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.
|
|
382
|
+
* @summary Report the model tokens and cost that the agent used
|
|
383
|
+
* @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
* @memberof AgentsApiInterface
|
|
387
|
+
*/
|
|
388
|
+
reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReportAgentUsageResponse>;
|
|
352
389
|
/**
|
|
353
390
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
354
391
|
* @summary Verify a signed A2A agent card
|
|
@@ -505,6 +542,25 @@ export interface AgentsApiRegisterAgentRequest {
|
|
|
505
542
|
*/
|
|
506
543
|
readonly orgId: string;
|
|
507
544
|
}
|
|
545
|
+
/**
|
|
546
|
+
* Request parameters for reportAgentUsage operation in AgentsApi.
|
|
547
|
+
* @export
|
|
548
|
+
* @interface AgentsApiReportAgentUsageRequest
|
|
549
|
+
*/
|
|
550
|
+
export interface AgentsApiReportAgentUsageRequest {
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @type {string}
|
|
554
|
+
* @memberof AgentsApiReportAgentUsage
|
|
555
|
+
*/
|
|
556
|
+
readonly orgId: string;
|
|
557
|
+
/**
|
|
558
|
+
*
|
|
559
|
+
* @type {AdminAgentsReportUsageRequest}
|
|
560
|
+
* @memberof AgentsApiReportAgentUsage
|
|
561
|
+
*/
|
|
562
|
+
readonly adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest;
|
|
563
|
+
}
|
|
508
564
|
/**
|
|
509
565
|
* Request parameters for verifyAgentCard operation in AgentsApi.
|
|
510
566
|
* @export
|
|
@@ -603,6 +659,15 @@ export declare class AgentsApi extends BaseAPI implements AgentsApiInterface {
|
|
|
603
659
|
* @memberof AgentsApi
|
|
604
660
|
*/
|
|
605
661
|
registerAgent(requestParameters: AgentsApiRegisterAgentRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RegisterAgentResponse, any, {}>>;
|
|
662
|
+
/**
|
|
663
|
+
* 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.
|
|
664
|
+
* @summary Report the model tokens and cost that the agent used
|
|
665
|
+
* @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
|
|
666
|
+
* @param {*} [options] Override http request option.
|
|
667
|
+
* @throws {RequiredError}
|
|
668
|
+
* @memberof AgentsApi
|
|
669
|
+
*/
|
|
670
|
+
reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ReportAgentUsageResponse, any, {}>>;
|
|
606
671
|
/**
|
|
607
672
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
608
673
|
* @summary Verify a signed A2A agent card
|
package/dist/api/agents-api.js
CHANGED
|
@@ -332,6 +332,45 @@ const AgentsApiAxiosParamCreator = function (configuration) {
|
|
|
332
332
|
options: localVarRequestOptions,
|
|
333
333
|
};
|
|
334
334
|
}),
|
|
335
|
+
/**
|
|
336
|
+
* 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.
|
|
337
|
+
* @summary Report the model tokens and cost that the agent used
|
|
338
|
+
* @param {string} orgId
|
|
339
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
reportAgentUsage: (orgId_1, adminAgentsReportUsageRequest_1, ...args_1) => __awaiter(this, [orgId_1, adminAgentsReportUsageRequest_1, ...args_1], void 0, function* (orgId, adminAgentsReportUsageRequest, options = {}) {
|
|
344
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
345
|
+
(0, common_1.assertParamExists)('reportAgentUsage', 'orgId', orgId);
|
|
346
|
+
// verify required parameter 'adminAgentsReportUsageRequest' is not null or undefined
|
|
347
|
+
(0, common_1.assertParamExists)('reportAgentUsage', 'adminAgentsReportUsageRequest', adminAgentsReportUsageRequest);
|
|
348
|
+
const localVarPath = `/orgs/{orgId}/api/v1/agents/me/usage`
|
|
349
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
|
|
350
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
351
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
352
|
+
let baseOptions;
|
|
353
|
+
if (configuration) {
|
|
354
|
+
baseOptions = configuration.baseOptions;
|
|
355
|
+
}
|
|
356
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
357
|
+
const localVarHeaderParameter = {};
|
|
358
|
+
const localVarQueryParameter = {};
|
|
359
|
+
// authentication ApiKeyAuth required
|
|
360
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
361
|
+
// authentication BearerAuth required
|
|
362
|
+
// http bearer authentication required
|
|
363
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
364
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
365
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
366
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
367
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
368
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminAgentsReportUsageRequest, localVarRequestOptions, configuration);
|
|
369
|
+
return {
|
|
370
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
371
|
+
options: localVarRequestOptions,
|
|
372
|
+
};
|
|
373
|
+
}),
|
|
335
374
|
/**
|
|
336
375
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
337
376
|
* @summary Verify a signed A2A agent card
|
|
@@ -514,6 +553,23 @@ const AgentsApiFp = function (configuration) {
|
|
|
514
553
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
515
554
|
});
|
|
516
555
|
},
|
|
556
|
+
/**
|
|
557
|
+
* 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.
|
|
558
|
+
* @summary Report the model tokens and cost that the agent used
|
|
559
|
+
* @param {string} orgId
|
|
560
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
561
|
+
* @param {*} [options] Override http request option.
|
|
562
|
+
* @throws {RequiredError}
|
|
563
|
+
*/
|
|
564
|
+
reportAgentUsage(orgId, adminAgentsReportUsageRequest, options) {
|
|
565
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
566
|
+
var _a, _b, _c;
|
|
567
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.reportAgentUsage(orgId, adminAgentsReportUsageRequest, options);
|
|
568
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
569
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentsApi.reportAgentUsage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
570
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
571
|
+
});
|
|
572
|
+
},
|
|
517
573
|
/**
|
|
518
574
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
519
575
|
* @summary Verify a signed A2A agent card
|
|
@@ -619,6 +675,16 @@ const AgentsApiFactory = function (configuration, basePath, axios) {
|
|
|
619
675
|
registerAgent(requestParameters, options) {
|
|
620
676
|
return localVarFp.registerAgent(requestParameters.orgId, options).then((request) => request(axios, basePath));
|
|
621
677
|
},
|
|
678
|
+
/**
|
|
679
|
+
* 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.
|
|
680
|
+
* @summary Report the model tokens and cost that the agent used
|
|
681
|
+
* @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
|
|
682
|
+
* @param {*} [options] Override http request option.
|
|
683
|
+
* @throws {RequiredError}
|
|
684
|
+
*/
|
|
685
|
+
reportAgentUsage(requestParameters, options) {
|
|
686
|
+
return localVarFp.reportAgentUsage(requestParameters.orgId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(axios, basePath));
|
|
687
|
+
},
|
|
622
688
|
/**
|
|
623
689
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
624
690
|
* @summary Verify a signed A2A agent card
|
|
@@ -725,6 +791,17 @@ class AgentsApi extends base_1.BaseAPI {
|
|
|
725
791
|
registerAgent(requestParameters, options) {
|
|
726
792
|
return (0, exports.AgentsApiFp)(this.configuration).registerAgent(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
|
|
727
793
|
}
|
|
794
|
+
/**
|
|
795
|
+
* 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.
|
|
796
|
+
* @summary Report the model tokens and cost that the agent used
|
|
797
|
+
* @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
|
|
798
|
+
* @param {*} [options] Override http request option.
|
|
799
|
+
* @throws {RequiredError}
|
|
800
|
+
* @memberof AgentsApi
|
|
801
|
+
*/
|
|
802
|
+
reportAgentUsage(requestParameters, options) {
|
|
803
|
+
return (0, exports.AgentsApiFp)(this.configuration).reportAgentUsage(requestParameters.orgId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
804
|
+
}
|
|
728
805
|
/**
|
|
729
806
|
* Authenticated (user, agent or API key of this organization). The body is the signed card itself, or {\"card\": {...}, \"jwks_uri\": \"https://...\"} to verify against an external issuer\'s key set (SSRF-guarded); by default the organization\'s own JWKS is used.
|
|
730
807
|
* @summary Verify a signed A2A agent card
|
|
@@ -25,6 +25,8 @@ import type { AdminAgentsGenerateTokenResponse } from '../models';
|
|
|
25
25
|
import type { AdminAgentsGetResponse } from '../models';
|
|
26
26
|
import type { AdminAgentsGetScopesResponse } from '../models';
|
|
27
27
|
import type { AdminAgentsListResponse } from '../models';
|
|
28
|
+
import type { AdminAgentsReportUsageRequest } from '../models';
|
|
29
|
+
import type { AdminAgentsReportUsageResponse } from '../models';
|
|
28
30
|
import type { AdminAgentsRevokeKeyResponse } from '../models';
|
|
29
31
|
import type { AdminAgentsRotateCredentialsResponse } from '../models';
|
|
30
32
|
import type { AdminAgentsSetScopesRequest } from '../models';
|
|
@@ -135,6 +137,16 @@ export declare const AdminAgentsApiAxiosParamCreator: (configuration?: Configura
|
|
|
135
137
|
* @throws {RequiredError}
|
|
136
138
|
*/
|
|
137
139
|
adminAgentsList: (orgId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
140
|
+
/**
|
|
141
|
+
* 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.
|
|
142
|
+
* @summary Report model tokens and cost for an agent
|
|
143
|
+
* @param {string} orgId
|
|
144
|
+
* @param {string} agentId
|
|
145
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
adminAgentsReportUsage: (orgId: string, agentId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
138
150
|
/**
|
|
139
151
|
*
|
|
140
152
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -288,6 +300,16 @@ export declare const AdminAgentsApiFp: (configuration?: Configuration) => {
|
|
|
288
300
|
* @throws {RequiredError}
|
|
289
301
|
*/
|
|
290
302
|
adminAgentsList(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminAgentsListResponse>>;
|
|
303
|
+
/**
|
|
304
|
+
* 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.
|
|
305
|
+
* @summary Report model tokens and cost for an agent
|
|
306
|
+
* @param {string} orgId
|
|
307
|
+
* @param {string} agentId
|
|
308
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
309
|
+
* @param {*} [options] Override http request option.
|
|
310
|
+
* @throws {RequiredError}
|
|
311
|
+
*/
|
|
312
|
+
adminAgentsReportUsage(orgId: string, agentId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AdminAgentsReportUsageResponse>>;
|
|
291
313
|
/**
|
|
292
314
|
*
|
|
293
315
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -430,6 +452,14 @@ export declare const AdminAgentsApiFactory: (configuration?: Configuration, base
|
|
|
430
452
|
* @throws {RequiredError}
|
|
431
453
|
*/
|
|
432
454
|
adminAgentsList(requestParameters: AdminAgentsApiAdminAgentsListRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminAgentsListResponse>;
|
|
455
|
+
/**
|
|
456
|
+
* 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.
|
|
457
|
+
* @summary Report model tokens and cost for an agent
|
|
458
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
459
|
+
* @param {*} [options] Override http request option.
|
|
460
|
+
* @throws {RequiredError}
|
|
461
|
+
*/
|
|
462
|
+
adminAgentsReportUsage(requestParameters: AdminAgentsApiAdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminAgentsReportUsageResponse>;
|
|
433
463
|
/**
|
|
434
464
|
*
|
|
435
465
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -576,6 +606,15 @@ export interface AdminAgentsApiInterface {
|
|
|
576
606
|
* @memberof AdminAgentsApiInterface
|
|
577
607
|
*/
|
|
578
608
|
adminAgentsList(requestParameters: AdminAgentsApiAdminAgentsListRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminAgentsListResponse>;
|
|
609
|
+
/**
|
|
610
|
+
* 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.
|
|
611
|
+
* @summary Report model tokens and cost for an agent
|
|
612
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
613
|
+
* @param {*} [options] Override http request option.
|
|
614
|
+
* @throws {RequiredError}
|
|
615
|
+
* @memberof AdminAgentsApiInterface
|
|
616
|
+
*/
|
|
617
|
+
adminAgentsReportUsage(requestParameters: AdminAgentsApiAdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<AdminAgentsReportUsageResponse>;
|
|
579
618
|
/**
|
|
580
619
|
*
|
|
581
620
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -831,6 +870,31 @@ export interface AdminAgentsApiAdminAgentsListRequest {
|
|
|
831
870
|
*/
|
|
832
871
|
readonly orgId: string;
|
|
833
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
* Request parameters for adminAgentsReportUsage operation in AdminAgentsApi.
|
|
875
|
+
* @export
|
|
876
|
+
* @interface AdminAgentsApiAdminAgentsReportUsageRequest
|
|
877
|
+
*/
|
|
878
|
+
export interface AdminAgentsApiAdminAgentsReportUsageRequest {
|
|
879
|
+
/**
|
|
880
|
+
*
|
|
881
|
+
* @type {string}
|
|
882
|
+
* @memberof AdminAgentsApiAdminAgentsReportUsage
|
|
883
|
+
*/
|
|
884
|
+
readonly orgId: string;
|
|
885
|
+
/**
|
|
886
|
+
*
|
|
887
|
+
* @type {string}
|
|
888
|
+
* @memberof AdminAgentsApiAdminAgentsReportUsage
|
|
889
|
+
*/
|
|
890
|
+
readonly agentId: string;
|
|
891
|
+
/**
|
|
892
|
+
*
|
|
893
|
+
* @type {AdminAgentsReportUsageRequest}
|
|
894
|
+
* @memberof AdminAgentsApiAdminAgentsReportUsage
|
|
895
|
+
*/
|
|
896
|
+
readonly adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest;
|
|
897
|
+
}
|
|
834
898
|
/**
|
|
835
899
|
* Request parameters for adminAgentsRevokeKey operation in AdminAgentsApi.
|
|
836
900
|
* @export
|
|
@@ -1050,6 +1114,15 @@ export declare class AdminAgentsApi extends BaseAPI implements AdminAgentsApiInt
|
|
|
1050
1114
|
* @memberof AdminAgentsApi
|
|
1051
1115
|
*/
|
|
1052
1116
|
adminAgentsList(requestParameters: AdminAgentsApiAdminAgentsListRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminAgentsListResponse, any, {}>>;
|
|
1117
|
+
/**
|
|
1118
|
+
* 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.
|
|
1119
|
+
* @summary Report model tokens and cost for an agent
|
|
1120
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
1121
|
+
* @param {*} [options] Override http request option.
|
|
1122
|
+
* @throws {RequiredError}
|
|
1123
|
+
* @memberof AdminAgentsApi
|
|
1124
|
+
*/
|
|
1125
|
+
adminAgentsReportUsage(requestParameters: AdminAgentsApiAdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AdminAgentsReportUsageResponse, any, {}>>;
|
|
1053
1126
|
/**
|
|
1054
1127
|
*
|
|
1055
1128
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -450,6 +450,49 @@ export const AdminAgentsApiAxiosParamCreator = function (configuration) {
|
|
|
450
450
|
options: localVarRequestOptions,
|
|
451
451
|
};
|
|
452
452
|
}),
|
|
453
|
+
/**
|
|
454
|
+
* 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.
|
|
455
|
+
* @summary Report model tokens and cost for an agent
|
|
456
|
+
* @param {string} orgId
|
|
457
|
+
* @param {string} agentId
|
|
458
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
459
|
+
* @param {*} [options] Override http request option.
|
|
460
|
+
* @throws {RequiredError}
|
|
461
|
+
*/
|
|
462
|
+
adminAgentsReportUsage: (orgId_1, agentId_1, adminAgentsReportUsageRequest_1, ...args_1) => __awaiter(this, [orgId_1, agentId_1, adminAgentsReportUsageRequest_1, ...args_1], void 0, function* (orgId, agentId, adminAgentsReportUsageRequest, options = {}) {
|
|
463
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
464
|
+
assertParamExists('adminAgentsReportUsage', 'orgId', orgId);
|
|
465
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
466
|
+
assertParamExists('adminAgentsReportUsage', 'agentId', agentId);
|
|
467
|
+
// verify required parameter 'adminAgentsReportUsageRequest' is not null or undefined
|
|
468
|
+
assertParamExists('adminAgentsReportUsage', 'adminAgentsReportUsageRequest', adminAgentsReportUsageRequest);
|
|
469
|
+
const localVarPath = `/orgs/{orgId}/api/v1/admin/agents/{agentId}/usage`
|
|
470
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)))
|
|
471
|
+
.replace(`{${"agentId"}}`, encodeURIComponent(String(agentId)));
|
|
472
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
473
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
474
|
+
let baseOptions;
|
|
475
|
+
if (configuration) {
|
|
476
|
+
baseOptions = configuration.baseOptions;
|
|
477
|
+
}
|
|
478
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
479
|
+
const localVarHeaderParameter = {};
|
|
480
|
+
const localVarQueryParameter = {};
|
|
481
|
+
// authentication ApiKeyAuth required
|
|
482
|
+
yield setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration);
|
|
483
|
+
// authentication BearerAuth required
|
|
484
|
+
// http bearer authentication required
|
|
485
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
486
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
487
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
488
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
489
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
490
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminAgentsReportUsageRequest, localVarRequestOptions, configuration);
|
|
491
|
+
return {
|
|
492
|
+
url: toPathString(localVarUrlObj),
|
|
493
|
+
options: localVarRequestOptions,
|
|
494
|
+
};
|
|
495
|
+
}),
|
|
453
496
|
/**
|
|
454
497
|
*
|
|
455
498
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -851,6 +894,24 @@ export const AdminAgentsApiFp = function (configuration) {
|
|
|
851
894
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
852
895
|
});
|
|
853
896
|
},
|
|
897
|
+
/**
|
|
898
|
+
* 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.
|
|
899
|
+
* @summary Report model tokens and cost for an agent
|
|
900
|
+
* @param {string} orgId
|
|
901
|
+
* @param {string} agentId
|
|
902
|
+
* @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
|
|
903
|
+
* @param {*} [options] Override http request option.
|
|
904
|
+
* @throws {RequiredError}
|
|
905
|
+
*/
|
|
906
|
+
adminAgentsReportUsage(orgId, agentId, adminAgentsReportUsageRequest, options) {
|
|
907
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
908
|
+
var _a, _b, _c;
|
|
909
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.adminAgentsReportUsage(orgId, agentId, adminAgentsReportUsageRequest, options);
|
|
910
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
911
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminAgentsApi.adminAgentsReportUsage']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
912
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
913
|
+
});
|
|
914
|
+
},
|
|
854
915
|
/**
|
|
855
916
|
*
|
|
856
917
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -1058,6 +1119,16 @@ export const AdminAgentsApiFactory = function (configuration, basePath, axios) {
|
|
|
1058
1119
|
adminAgentsList(requestParameters, options) {
|
|
1059
1120
|
return localVarFp.adminAgentsList(requestParameters.orgId, options).then((request) => request(axios, basePath));
|
|
1060
1121
|
},
|
|
1122
|
+
/**
|
|
1123
|
+
* 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.
|
|
1124
|
+
* @summary Report model tokens and cost for an agent
|
|
1125
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
1126
|
+
* @param {*} [options] Override http request option.
|
|
1127
|
+
* @throws {RequiredError}
|
|
1128
|
+
*/
|
|
1129
|
+
adminAgentsReportUsage(requestParameters, options) {
|
|
1130
|
+
return localVarFp.adminAgentsReportUsage(requestParameters.orgId, requestParameters.agentId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(axios, basePath));
|
|
1131
|
+
},
|
|
1061
1132
|
/**
|
|
1062
1133
|
*
|
|
1063
1134
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|
|
@@ -1238,6 +1309,17 @@ export class AdminAgentsApi extends BaseAPI {
|
|
|
1238
1309
|
adminAgentsList(requestParameters, options) {
|
|
1239
1310
|
return AdminAgentsApiFp(this.configuration).adminAgentsList(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
|
|
1240
1311
|
}
|
|
1312
|
+
/**
|
|
1313
|
+
* 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.
|
|
1314
|
+
* @summary Report model tokens and cost for an agent
|
|
1315
|
+
* @param {AdminAgentsApiAdminAgentsReportUsageRequest} requestParameters Request parameters.
|
|
1316
|
+
* @param {*} [options] Override http request option.
|
|
1317
|
+
* @throws {RequiredError}
|
|
1318
|
+
* @memberof AdminAgentsApi
|
|
1319
|
+
*/
|
|
1320
|
+
adminAgentsReportUsage(requestParameters, options) {
|
|
1321
|
+
return AdminAgentsApiFp(this.configuration).adminAgentsReportUsage(requestParameters.orgId, requestParameters.agentId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1322
|
+
}
|
|
1241
1323
|
/**
|
|
1242
1324
|
*
|
|
1243
1325
|
* @summary Revoke agent API key (nullify it so it can no longer authenticate)
|