@lumoauth/api-client 1.2.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.
Files changed (120) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/README.md +17 -4
  3. package/api/admin-agents-api.ts +130 -0
  4. package/api/admin-email-api.ts +67 -15
  5. package/api/admin-oauth-clients-api.ts +370 -0
  6. package/api/agents-api.ts +118 -0
  7. package/api/oauth-api.ts +0 -186
  8. package/dist/api/admin-agents-api.d.ts +73 -0
  9. package/dist/api/admin-agents-api.js +82 -0
  10. package/dist/api/admin-email-api.d.ts +41 -9
  11. package/dist/api/admin-email-api.js +34 -14
  12. package/dist/api/admin-oauth-clients-api.d.ts +210 -0
  13. package/dist/api/admin-oauth-clients-api.js +236 -0
  14. package/dist/api/agents-api.d.ts +65 -0
  15. package/dist/api/agents-api.js +77 -0
  16. package/dist/api/oauth-api.d.ts +0 -110
  17. package/dist/api/oauth-api.js +0 -132
  18. package/dist/esm/api/admin-agents-api.d.ts +73 -0
  19. package/dist/esm/api/admin-agents-api.js +82 -0
  20. package/dist/esm/api/admin-email-api.d.ts +41 -9
  21. package/dist/esm/api/admin-email-api.js +34 -14
  22. package/dist/esm/api/admin-oauth-clients-api.d.ts +210 -0
  23. package/dist/esm/api/admin-oauth-clients-api.js +236 -0
  24. package/dist/esm/api/agents-api.d.ts +65 -0
  25. package/dist/esm/api/agents-api.js +77 -0
  26. package/dist/esm/api/oauth-api.d.ts +0 -110
  27. package/dist/esm/api/oauth-api.js +0 -132
  28. package/dist/esm/models/abac-attribute-definition.d.ts +1 -1
  29. package/dist/esm/models/abac-resource-attribute.d.ts +1 -1
  30. package/dist/esm/models/admin-agents-report-usage-request.d.ts +30 -0
  31. package/dist/esm/models/admin-agents-report-usage-request.js +14 -0
  32. package/dist/esm/models/admin-agents-report-usage-response-data-recorded.d.ts +30 -0
  33. package/dist/esm/models/admin-agents-report-usage-response-data-recorded.js +14 -0
  34. package/dist/esm/models/admin-agents-report-usage-response-data.d.ts +33 -0
  35. package/dist/esm/models/admin-agents-report-usage-response-data.js +14 -0
  36. package/dist/esm/models/admin-agents-report-usage-response.d.ts +25 -0
  37. package/dist/esm/models/admin-agents-report-usage-response.js +14 -0
  38. package/dist/esm/models/admin-clients-get-branding-response-data.d.ts +34 -0
  39. package/dist/esm/models/admin-clients-get-branding-response-data.js +14 -0
  40. package/dist/esm/models/admin-clients-get-branding-response.d.ts +25 -0
  41. package/dist/esm/models/admin-clients-get-branding-response.js +14 -0
  42. package/dist/esm/models/authorization-server-metadata.d.ts +0 -6
  43. package/dist/esm/models/index.d.ts +10 -0
  44. package/dist/esm/models/index.js +10 -0
  45. package/dist/esm/models/open-id-configuration.d.ts +6 -6
  46. package/dist/esm/models/patch-admin-clients-update-branding-response.d.ts +32 -0
  47. package/dist/esm/models/patch-admin-clients-update-branding-response.js +14 -0
  48. package/dist/esm/models/put-admin-clients-update-branding-request.d.ts +34 -0
  49. package/dist/esm/models/put-admin-clients-update-branding-request.js +14 -0
  50. package/dist/esm/models/put-admin-clients-update-branding-response.d.ts +32 -0
  51. package/dist/esm/models/put-admin-clients-update-branding-response.js +14 -0
  52. package/dist/esm/models/report-agent-usage-response.d.ts +33 -0
  53. package/dist/esm/models/report-agent-usage-response.js +14 -0
  54. package/dist/esm/models/set-user-attribute-response-data.d.ts +1 -1
  55. package/dist/esm/models/userinfo-response.d.ts +8 -0
  56. package/dist/models/abac-attribute-definition.d.ts +1 -1
  57. package/dist/models/abac-resource-attribute.d.ts +1 -1
  58. package/dist/models/admin-agents-report-usage-request.d.ts +30 -0
  59. package/dist/models/admin-agents-report-usage-request.js +15 -0
  60. package/dist/models/admin-agents-report-usage-response-data-recorded.d.ts +30 -0
  61. package/dist/models/admin-agents-report-usage-response-data-recorded.js +15 -0
  62. package/dist/models/admin-agents-report-usage-response-data.d.ts +33 -0
  63. package/dist/models/admin-agents-report-usage-response-data.js +15 -0
  64. package/dist/models/admin-agents-report-usage-response.d.ts +25 -0
  65. package/dist/models/admin-agents-report-usage-response.js +15 -0
  66. package/dist/models/admin-clients-get-branding-response-data.d.ts +34 -0
  67. package/dist/models/admin-clients-get-branding-response-data.js +15 -0
  68. package/dist/models/admin-clients-get-branding-response.d.ts +25 -0
  69. package/dist/models/admin-clients-get-branding-response.js +15 -0
  70. package/dist/models/authorization-server-metadata.d.ts +0 -6
  71. package/dist/models/index.d.ts +10 -0
  72. package/dist/models/index.js +10 -0
  73. package/dist/models/open-id-configuration.d.ts +6 -6
  74. package/dist/models/patch-admin-clients-update-branding-response.d.ts +32 -0
  75. package/dist/models/patch-admin-clients-update-branding-response.js +15 -0
  76. package/dist/models/put-admin-clients-update-branding-request.d.ts +34 -0
  77. package/dist/models/put-admin-clients-update-branding-request.js +15 -0
  78. package/dist/models/put-admin-clients-update-branding-response.d.ts +32 -0
  79. package/dist/models/put-admin-clients-update-branding-response.js +15 -0
  80. package/dist/models/report-agent-usage-response.d.ts +33 -0
  81. package/dist/models/report-agent-usage-response.js +15 -0
  82. package/dist/models/set-user-attribute-response-data.d.ts +1 -1
  83. package/dist/models/userinfo-response.d.ts +8 -0
  84. package/docs/AdminAgentsApi.md +63 -0
  85. package/docs/AdminAgentsReportUsageRequest.md +22 -0
  86. package/docs/AdminAgentsReportUsageResponse.md +20 -0
  87. package/docs/AdminAgentsReportUsageResponseData.md +22 -0
  88. package/docs/AdminAgentsReportUsageResponseDataRecorded.md +22 -0
  89. package/docs/AdminClientsGetBrandingResponse.md +20 -0
  90. package/docs/AdminClientsGetBrandingResponseData.md +22 -0
  91. package/docs/AdminEmailApi.md +15 -2
  92. package/docs/AdminOAuthClientsApi.md +174 -0
  93. package/docs/AgentsApi.md +59 -0
  94. package/docs/AuthorizationServerMetadata.md +0 -2
  95. package/docs/OAuthApi.md +0 -105
  96. package/docs/OIDCApi.md +2 -2
  97. package/docs/OpenIdConfiguration.md +2 -2
  98. package/docs/PatchAdminClientsUpdateBrandingResponse.md +22 -0
  99. package/docs/PutAdminClientsUpdateBrandingRequest.md +22 -0
  100. package/docs/PutAdminClientsUpdateBrandingResponse.md +22 -0
  101. package/docs/ReportAgentUsageResponse.md +22 -0
  102. package/docs/UserinfoResponse.md +2 -0
  103. package/models/abac-attribute-definition.ts +1 -1
  104. package/models/abac-resource-attribute.ts +1 -1
  105. package/models/admin-agents-report-usage-request.ts +36 -0
  106. package/models/admin-agents-report-usage-response-data-recorded.ts +36 -0
  107. package/models/admin-agents-report-usage-response-data.ts +39 -0
  108. package/models/admin-agents-report-usage-response.ts +33 -0
  109. package/models/admin-clients-get-branding-response-data.ts +36 -0
  110. package/models/admin-clients-get-branding-response.ts +33 -0
  111. package/models/authorization-server-metadata.ts +0 -6
  112. package/models/index.ts +10 -0
  113. package/models/open-id-configuration.ts +6 -6
  114. package/models/patch-admin-clients-update-branding-response.ts +36 -0
  115. package/models/put-admin-clients-update-branding-request.ts +36 -0
  116. package/models/put-admin-clients-update-branding-response.ts +36 -0
  117. package/models/report-agent-usage-response.ts +39 -0
  118. package/models/set-user-attribute-response-data.ts +1 -1
  119. package/models/userinfo-response.ts +6 -0
  120. package/package.json +1 -1
package/api/agents-api.ts CHANGED
@@ -22,6 +22,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  // @ts-ignore
23
23
  import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
24
  // @ts-ignore
25
+ import type { AdminAgentsReportUsageRequest } from '../models';
26
+ // @ts-ignore
25
27
  import type { AskRequest } from '../models';
26
28
  // @ts-ignore
27
29
  import type { AskResponse } from '../models';
@@ -46,6 +48,8 @@ import type { GetCurrentAgentResponse } from '../models';
46
48
  // @ts-ignore
47
49
  import type { RegisterAgentResponse } from '../models';
48
50
  // @ts-ignore
51
+ import type { ReportAgentUsageResponse } from '../models';
52
+ // @ts-ignore
49
53
  import type { SignedAgentCard } from '../models';
50
54
  // @ts-ignore
51
55
  import type { VerifyAgentCardResponse } from '../models';
@@ -410,6 +414,53 @@ export const AgentsApiAxiosParamCreator = function (configuration?: Configuratio
410
414
  options: localVarRequestOptions,
411
415
  };
412
416
  },
417
+ /**
418
+ * 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.
419
+ * @summary Report the model tokens and cost that the agent used
420
+ * @param {string} orgId
421
+ * @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ reportAgentUsage: async (orgId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
426
+ // verify required parameter 'orgId' is not null or undefined
427
+ assertParamExists('reportAgentUsage', 'orgId', orgId)
428
+ // verify required parameter 'adminAgentsReportUsageRequest' is not null or undefined
429
+ assertParamExists('reportAgentUsage', 'adminAgentsReportUsageRequest', adminAgentsReportUsageRequest)
430
+ const localVarPath = `/orgs/{orgId}/api/v1/agents/me/usage`
431
+ .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
432
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
433
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
434
+ let baseOptions;
435
+ if (configuration) {
436
+ baseOptions = configuration.baseOptions;
437
+ }
438
+
439
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
440
+ const localVarHeaderParameter = {} as any;
441
+ const localVarQueryParameter = {} as any;
442
+
443
+ // authentication ApiKeyAuth required
444
+ await setApiKeyToObject(localVarHeaderParameter, "X-API-Key", configuration)
445
+
446
+ // authentication BearerAuth required
447
+ // http bearer authentication required
448
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
449
+
450
+
451
+
452
+ localVarHeaderParameter['Content-Type'] = 'application/json';
453
+
454
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
455
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
456
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
457
+ localVarRequestOptions.data = serializeDataIfNeeded(adminAgentsReportUsageRequest, localVarRequestOptions, configuration)
458
+
459
+ return {
460
+ url: toPathString(localVarUrlObj),
461
+ options: localVarRequestOptions,
462
+ };
463
+ },
413
464
  /**
414
465
  * 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.
415
466
  * @summary Verify a signed A2A agent card
@@ -576,6 +627,20 @@ export const AgentsApiFp = function(configuration?: Configuration) {
576
627
  const localVarOperationServerBasePath = operationServerMap['AgentsApi.registerAgent']?.[localVarOperationServerIndex]?.url;
577
628
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
578
629
  },
630
+ /**
631
+ * 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.
632
+ * @summary Report the model tokens and cost that the agent used
633
+ * @param {string} orgId
634
+ * @param {AdminAgentsReportUsageRequest} adminAgentsReportUsageRequest
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ async reportAgentUsage(orgId: string, adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReportAgentUsageResponse>> {
639
+ const localVarAxiosArgs = await localVarAxiosParamCreator.reportAgentUsage(orgId, adminAgentsReportUsageRequest, options);
640
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
641
+ const localVarOperationServerBasePath = operationServerMap['AgentsApi.reportAgentUsage']?.[localVarOperationServerIndex]?.url;
642
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
643
+ },
579
644
  /**
580
645
  * 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.
581
646
  * @summary Verify a signed A2A agent card
@@ -678,6 +743,16 @@ export const AgentsApiFactory = function (configuration?: Configuration, basePat
678
743
  registerAgent(requestParameters: AgentsApiRegisterAgentRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterAgentResponse> {
679
744
  return localVarFp.registerAgent(requestParameters.orgId, options).then((request) => request(axios, basePath));
680
745
  },
746
+ /**
747
+ * 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.
748
+ * @summary Report the model tokens and cost that the agent used
749
+ * @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReportAgentUsageResponse> {
754
+ return localVarFp.reportAgentUsage(requestParameters.orgId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(axios, basePath));
755
+ },
681
756
  /**
682
757
  * 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.
683
758
  * @summary Verify a signed A2A agent card
@@ -775,6 +850,16 @@ export interface AgentsApiInterface {
775
850
  */
776
851
  registerAgent(requestParameters: AgentsApiRegisterAgentRequest, options?: RawAxiosRequestConfig): AxiosPromise<RegisterAgentResponse>;
777
852
 
853
+ /**
854
+ * 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.
855
+ * @summary Report the model tokens and cost that the agent used
856
+ * @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ * @memberof AgentsApiInterface
860
+ */
861
+ reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig): AxiosPromise<ReportAgentUsageResponse>;
862
+
778
863
  /**
779
864
  * 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.
780
865
  * @summary Verify a signed A2A agent card
@@ -948,6 +1033,27 @@ export interface AgentsApiRegisterAgentRequest {
948
1033
  readonly orgId: string
949
1034
  }
950
1035
 
1036
+ /**
1037
+ * Request parameters for reportAgentUsage operation in AgentsApi.
1038
+ * @export
1039
+ * @interface AgentsApiReportAgentUsageRequest
1040
+ */
1041
+ export interface AgentsApiReportAgentUsageRequest {
1042
+ /**
1043
+ *
1044
+ * @type {string}
1045
+ * @memberof AgentsApiReportAgentUsage
1046
+ */
1047
+ readonly orgId: string
1048
+
1049
+ /**
1050
+ *
1051
+ * @type {AdminAgentsReportUsageRequest}
1052
+ * @memberof AgentsApiReportAgentUsage
1053
+ */
1054
+ readonly adminAgentsReportUsageRequest: AdminAgentsReportUsageRequest
1055
+ }
1056
+
951
1057
  /**
952
1058
  * Request parameters for verifyAgentCard operation in AgentsApi.
953
1059
  * @export
@@ -1070,6 +1176,18 @@ export class AgentsApi extends BaseAPI implements AgentsApiInterface {
1070
1176
  return AgentsApiFp(this.configuration).registerAgent(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
1071
1177
  }
1072
1178
 
1179
+ /**
1180
+ * 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.
1181
+ * @summary Report the model tokens and cost that the agent used
1182
+ * @param {AgentsApiReportAgentUsageRequest} requestParameters Request parameters.
1183
+ * @param {*} [options] Override http request option.
1184
+ * @throws {RequiredError}
1185
+ * @memberof AgentsApi
1186
+ */
1187
+ public reportAgentUsage(requestParameters: AgentsApiReportAgentUsageRequest, options?: RawAxiosRequestConfig) {
1188
+ return AgentsApiFp(this.configuration).reportAgentUsage(requestParameters.orgId, requestParameters.adminAgentsReportUsageRequest, options).then((request) => request(this.axios, this.basePath));
1189
+ }
1190
+
1073
1191
  /**
1074
1192
  * 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.
1075
1193
  * @summary Verify a signed A2A agent card
package/api/oauth-api.ts CHANGED
@@ -333,40 +333,6 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration
333
333
 
334
334
 
335
335
 
336
- setSearchParams(localVarUrlObj, localVarQueryParameter);
337
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
338
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
339
-
340
- return {
341
- url: toPathString(localVarUrlObj),
342
- options: localVarRequestOptions,
343
- };
344
- },
345
- /**
346
- * Placeholder: flashes an informational message and redirects to the hosted login page. Not a JSON API.
347
- * @summary Passkey login entry point
348
- * @param {string} orgId
349
- * @param {*} [options] Override http request option.
350
- * @throws {RequiredError}
351
- */
352
- passkeyLogin: async (orgId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
353
- // verify required parameter 'orgId' is not null or undefined
354
- assertParamExists('passkeyLogin', 'orgId', orgId)
355
- const localVarPath = `/orgs/{orgId}/api/v1/oauth/passkey-login`
356
- .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
357
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
358
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
359
- let baseOptions;
360
- if (configuration) {
361
- baseOptions = configuration.baseOptions;
362
- }
363
-
364
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
365
- const localVarHeaderParameter = {} as any;
366
- const localVarQueryParameter = {} as any;
367
-
368
-
369
-
370
336
  setSearchParams(localVarUrlObj, localVarQueryParameter);
371
337
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
372
338
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -628,40 +594,6 @@ export const OAuthApiAxiosParamCreator = function (configuration?: Configuration
628
594
 
629
595
 
630
596
 
631
- setSearchParams(localVarUrlObj, localVarQueryParameter);
632
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
633
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
634
-
635
- return {
636
- url: toPathString(localVarUrlObj),
637
- options: localVarRequestOptions,
638
- };
639
- },
640
- /**
641
- * Receives the hosted OAuth login page\'s form (email, password, csrf token and the authorization request parameters). Every outcome — success, invalid credentials, locked account, captcha or CSRF failure — answers with the same redirect back to /oauth/authorize, which re-renders the login page or continues the flow. Not a JSON API.
642
- * @summary Hosted login form submission
643
- * @param {string} orgId
644
- * @param {*} [options] Override http request option.
645
- * @throws {RequiredError}
646
- */
647
- submitLogin: async (orgId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
648
- // verify required parameter 'orgId' is not null or undefined
649
- assertParamExists('submitLogin', 'orgId', orgId)
650
- const localVarPath = `/orgs/{orgId}/api/v1/oauth/login/submit`
651
- .replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
652
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
653
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
654
- let baseOptions;
655
- if (configuration) {
656
- baseOptions = configuration.baseOptions;
657
- }
658
-
659
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
660
- const localVarHeaderParameter = {} as any;
661
- const localVarQueryParameter = {} as any;
662
-
663
-
664
-
665
597
  setSearchParams(localVarUrlObj, localVarQueryParameter);
666
598
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
667
599
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -892,19 +824,6 @@ export const OAuthApiFp = function(configuration?: Configuration) {
892
824
  const localVarOperationServerBasePath = operationServerMap['OAuthApi.par']?.[localVarOperationServerIndex]?.url;
893
825
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
894
826
  },
895
- /**
896
- * Placeholder: flashes an informational message and redirects to the hosted login page. Not a JSON API.
897
- * @summary Passkey login entry point
898
- * @param {string} orgId
899
- * @param {*} [options] Override http request option.
900
- * @throws {RequiredError}
901
- */
902
- async passkeyLogin(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
903
- const localVarAxiosArgs = await localVarAxiosParamCreator.passkeyLogin(orgId, options);
904
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
905
- const localVarOperationServerBasePath = operationServerMap['OAuthApi.passkeyLogin']?.[localVarOperationServerIndex]?.url;
906
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
907
- },
908
827
  /**
909
828
  * Registers an OAuth client from a JSON metadata document. Authenticated with an initial access token (Authorization: Bearer) or an API key holding admin:clients:register; open registration applies when the organization allows it.
910
829
  * @summary Dynamic client registration (RFC 7591 / OIDC DCR)
@@ -999,19 +918,6 @@ export const OAuthApiFp = function(configuration?: Configuration) {
999
918
  const localVarOperationServerBasePath = operationServerMap['OAuthApi.submitDeviceVerification']?.[localVarOperationServerIndex]?.url;
1000
919
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1001
920
  },
1002
- /**
1003
- * Receives the hosted OAuth login page\'s form (email, password, csrf token and the authorization request parameters). Every outcome — success, invalid credentials, locked account, captcha or CSRF failure — answers with the same redirect back to /oauth/authorize, which re-renders the login page or continues the flow. Not a JSON API.
1004
- * @summary Hosted login form submission
1005
- * @param {string} orgId
1006
- * @param {*} [options] Override http request option.
1007
- * @throws {RequiredError}
1008
- */
1009
- async submitLogin(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1010
- const localVarAxiosArgs = await localVarAxiosParamCreator.submitLogin(orgId, options);
1011
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1012
- const localVarOperationServerBasePath = operationServerMap['OAuthApi.submitLogin']?.[localVarOperationServerIndex]?.url;
1013
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1014
- },
1015
921
  /**
1016
922
  * Establishes the end-user browser session from JSON credentials so a following /oauth/authorize request issues a code without showing the hosted login page. Deliberately mints no tokens. Only accepted from trusted origins.
1017
923
  * @summary Programmatic (JSON) login for the authorization flow
@@ -1141,16 +1047,6 @@ export const OAuthApiFactory = function (configuration?: Configuration, basePath
1141
1047
  par(requestParameters: OAuthApiParRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParResponse> {
1142
1048
  return localVarFp.par(requestParameters.orgId, options).then((request) => request(axios, basePath));
1143
1049
  },
1144
- /**
1145
- * Placeholder: flashes an informational message and redirects to the hosted login page. Not a JSON API.
1146
- * @summary Passkey login entry point
1147
- * @param {OAuthApiPasskeyLoginRequest} requestParameters Request parameters.
1148
- * @param {*} [options] Override http request option.
1149
- * @throws {RequiredError}
1150
- */
1151
- passkeyLogin(requestParameters: OAuthApiPasskeyLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1152
- return localVarFp.passkeyLogin(requestParameters.orgId, options).then((request) => request(axios, basePath));
1153
- },
1154
1050
  /**
1155
1051
  * Registers an OAuth client from a JSON metadata document. Authenticated with an initial access token (Authorization: Bearer) or an API key holding admin:clients:register; open registration applies when the organization allows it.
1156
1052
  * @summary Dynamic client registration (RFC 7591 / OIDC DCR)
@@ -1221,16 +1117,6 @@ export const OAuthApiFactory = function (configuration?: Configuration, basePath
1221
1117
  submitDeviceVerification(requestParameters: OAuthApiSubmitDeviceVerificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<string> {
1222
1118
  return localVarFp.submitDeviceVerification(requestParameters.orgId, options).then((request) => request(axios, basePath));
1223
1119
  },
1224
- /**
1225
- * Receives the hosted OAuth login page\'s form (email, password, csrf token and the authorization request parameters). Every outcome — success, invalid credentials, locked account, captcha or CSRF failure — answers with the same redirect back to /oauth/authorize, which re-renders the login page or continues the flow. Not a JSON API.
1226
- * @summary Hosted login form submission
1227
- * @param {OAuthApiSubmitLoginRequest} requestParameters Request parameters.
1228
- * @param {*} [options] Override http request option.
1229
- * @throws {RequiredError}
1230
- */
1231
- submitLogin(requestParameters: OAuthApiSubmitLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1232
- return localVarFp.submitLogin(requestParameters.orgId, options).then((request) => request(axios, basePath));
1233
- },
1234
1120
  /**
1235
1121
  * Establishes the end-user browser session from JSON credentials so a following /oauth/authorize request issues a code without showing the hosted login page. Deliberately mints no tokens. Only accepted from trusted origins.
1236
1122
  * @summary Programmatic (JSON) login for the authorization flow
@@ -1350,16 +1236,6 @@ export interface OAuthApiInterface {
1350
1236
  */
1351
1237
  par(requestParameters: OAuthApiParRequest, options?: RawAxiosRequestConfig): AxiosPromise<ParResponse>;
1352
1238
 
1353
- /**
1354
- * Placeholder: flashes an informational message and redirects to the hosted login page. Not a JSON API.
1355
- * @summary Passkey login entry point
1356
- * @param {OAuthApiPasskeyLoginRequest} requestParameters Request parameters.
1357
- * @param {*} [options] Override http request option.
1358
- * @throws {RequiredError}
1359
- * @memberof OAuthApiInterface
1360
- */
1361
- passkeyLogin(requestParameters: OAuthApiPasskeyLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1362
-
1363
1239
  /**
1364
1240
  * Registers an OAuth client from a JSON metadata document. Authenticated with an initial access token (Authorization: Bearer) or an API key holding admin:clients:register; open registration applies when the organization allows it.
1365
1241
  * @summary Dynamic client registration (RFC 7591 / OIDC DCR)
@@ -1430,16 +1306,6 @@ export interface OAuthApiInterface {
1430
1306
  */
1431
1307
  submitDeviceVerification(requestParameters: OAuthApiSubmitDeviceVerificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<string>;
1432
1308
 
1433
- /**
1434
- * Receives the hosted OAuth login page\'s form (email, password, csrf token and the authorization request parameters). Every outcome — success, invalid credentials, locked account, captcha or CSRF failure — answers with the same redirect back to /oauth/authorize, which re-renders the login page or continues the flow. Not a JSON API.
1435
- * @summary Hosted login form submission
1436
- * @param {OAuthApiSubmitLoginRequest} requestParameters Request parameters.
1437
- * @param {*} [options] Override http request option.
1438
- * @throws {RequiredError}
1439
- * @memberof OAuthApiInterface
1440
- */
1441
- submitLogin(requestParameters: OAuthApiSubmitLoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1442
-
1443
1309
  /**
1444
1310
  * Establishes the end-user browser session from JSON credentials so a following /oauth/authorize request issues a code without showing the hosted login page. Deliberately mints no tokens. Only accepted from trusted origins.
1445
1311
  * @summary Programmatic (JSON) login for the authorization flow
@@ -1591,20 +1457,6 @@ export interface OAuthApiParRequest {
1591
1457
  readonly orgId: string
1592
1458
  }
1593
1459
 
1594
- /**
1595
- * Request parameters for passkeyLogin operation in OAuthApi.
1596
- * @export
1597
- * @interface OAuthApiPasskeyLoginRequest
1598
- */
1599
- export interface OAuthApiPasskeyLoginRequest {
1600
- /**
1601
- *
1602
- * @type {string}
1603
- * @memberof OAuthApiPasskeyLogin
1604
- */
1605
- readonly orgId: string
1606
- }
1607
-
1608
1460
  /**
1609
1461
  * Request parameters for registerClient operation in OAuthApi.
1610
1462
  * @export
@@ -1724,20 +1576,6 @@ export interface OAuthApiSubmitDeviceVerificationRequest {
1724
1576
  readonly orgId: string
1725
1577
  }
1726
1578
 
1727
- /**
1728
- * Request parameters for submitLogin operation in OAuthApi.
1729
- * @export
1730
- * @interface OAuthApiSubmitLoginRequest
1731
- */
1732
- export interface OAuthApiSubmitLoginRequest {
1733
- /**
1734
- *
1735
- * @type {string}
1736
- * @memberof OAuthApiSubmitLogin
1737
- */
1738
- readonly orgId: string
1739
- }
1740
-
1741
1579
  /**
1742
1580
  * Request parameters for submitLoginJson operation in OAuthApi.
1743
1581
  * @export
@@ -1883,18 +1721,6 @@ export class OAuthApi extends BaseAPI implements OAuthApiInterface {
1883
1721
  return OAuthApiFp(this.configuration).par(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
1884
1722
  }
1885
1723
 
1886
- /**
1887
- * Placeholder: flashes an informational message and redirects to the hosted login page. Not a JSON API.
1888
- * @summary Passkey login entry point
1889
- * @param {OAuthApiPasskeyLoginRequest} requestParameters Request parameters.
1890
- * @param {*} [options] Override http request option.
1891
- * @throws {RequiredError}
1892
- * @memberof OAuthApi
1893
- */
1894
- public passkeyLogin(requestParameters: OAuthApiPasskeyLoginRequest, options?: RawAxiosRequestConfig) {
1895
- return OAuthApiFp(this.configuration).passkeyLogin(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
1896
- }
1897
-
1898
1724
  /**
1899
1725
  * Registers an OAuth client from a JSON metadata document. Authenticated with an initial access token (Authorization: Bearer) or an API key holding admin:clients:register; open registration applies when the organization allows it.
1900
1726
  * @summary Dynamic client registration (RFC 7591 / OIDC DCR)
@@ -1979,18 +1805,6 @@ export class OAuthApi extends BaseAPI implements OAuthApiInterface {
1979
1805
  return OAuthApiFp(this.configuration).submitDeviceVerification(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
1980
1806
  }
1981
1807
 
1982
- /**
1983
- * Receives the hosted OAuth login page\'s form (email, password, csrf token and the authorization request parameters). Every outcome — success, invalid credentials, locked account, captcha or CSRF failure — answers with the same redirect back to /oauth/authorize, which re-renders the login page or continues the flow. Not a JSON API.
1984
- * @summary Hosted login form submission
1985
- * @param {OAuthApiSubmitLoginRequest} requestParameters Request parameters.
1986
- * @param {*} [options] Override http request option.
1987
- * @throws {RequiredError}
1988
- * @memberof OAuthApi
1989
- */
1990
- public submitLogin(requestParameters: OAuthApiSubmitLoginRequest, options?: RawAxiosRequestConfig) {
1991
- return OAuthApiFp(this.configuration).submitLogin(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
1992
- }
1993
-
1994
1808
  /**
1995
1809
  * Establishes the end-user browser session from JSON credentials so a following /oauth/authorize request issues a code without showing the hosted login page. Deliberately mints no tokens. Only accepted from trusted origins.
1996
1810
  * @summary Programmatic (JSON) login for the authorization flow
@@ -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)