@breign/client 1.0.126 → 1.0.128

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 (167) hide show
  1. package/dist/apis/AiGatewayApi.d.ts +100 -0
  2. package/dist/apis/AiGatewayApi.js +248 -0
  3. package/dist/apis/AppApi.d.ts +17 -3
  4. package/dist/apis/AppApi.js +36 -2
  5. package/dist/apis/AuthApi.d.ts +40 -1
  6. package/dist/apis/AuthApi.js +82 -0
  7. package/dist/apis/ConfigurationApi.d.ts +16 -3
  8. package/dist/apis/ConfigurationApi.js +33 -2
  9. package/dist/apis/ConversationsApi.d.ts +73 -3
  10. package/dist/apis/ConversationsApi.js +174 -2
  11. package/dist/apis/EngineApi.d.ts +17 -16
  12. package/dist/apis/EngineApi.js +33 -30
  13. package/dist/apis/EnginesApi.d.ts +3 -3
  14. package/dist/apis/EnginesApi.js +4 -4
  15. package/dist/apis/OrganizationsApi.d.ts +10 -111
  16. package/dist/apis/OrganizationsApi.js +12 -264
  17. package/dist/apis/PromptsApi.d.ts +3 -3
  18. package/dist/apis/PromptsApi.js +1 -1
  19. package/dist/apis/ToolsApi.d.ts +1 -2
  20. package/dist/apis/ToolsApi.js +3 -6
  21. package/dist/apis/UsersApi.d.ts +127 -0
  22. package/dist/apis/UsersApi.js +308 -0
  23. package/dist/apis/index.d.ts +2 -0
  24. package/dist/apis/index.js +2 -0
  25. package/dist/models/AgentPatchUio.d.ts +7 -0
  26. package/dist/models/AgentPatchUio.js +3 -0
  27. package/dist/models/AgentSandboxConfigurationUio.d.ts +58 -0
  28. package/dist/models/AgentSandboxConfigurationUio.js +62 -0
  29. package/dist/models/AgentSandboxNetworkConfigurationUio.d.ts +57 -0
  30. package/dist/models/AgentSandboxNetworkConfigurationUio.js +65 -0
  31. package/dist/models/AgentUio.d.ts +7 -0
  32. package/dist/models/AgentUio.js +3 -0
  33. package/dist/models/AiGatewayChatCompletionRequestUio.d.ts +57 -0
  34. package/dist/models/AiGatewayChatCompletionRequestUio.js +61 -0
  35. package/dist/models/AiGatewayChatCompletionResponseUio.d.ts +47 -0
  36. package/dist/models/AiGatewayChatCompletionResponseUio.js +54 -0
  37. package/dist/models/AiGatewayEmbeddingRequestUio.d.ts +38 -0
  38. package/dist/models/AiGatewayEmbeddingRequestUio.js +54 -0
  39. package/dist/models/AiGatewayEmbeddingResponseUio.d.ts +47 -0
  40. package/dist/models/AiGatewayEmbeddingResponseUio.js +54 -0
  41. package/dist/models/AiGatewayErrorUio.d.ts +33 -0
  42. package/dist/models/AiGatewayErrorUio.js +51 -0
  43. package/dist/models/AiGatewayMessageUio.d.ts +47 -0
  44. package/dist/models/AiGatewayMessageUio.js +63 -0
  45. package/dist/models/AiGatewayModelListDataInnerUio.d.ts +57 -0
  46. package/dist/models/AiGatewayModelListDataInnerUio.js +69 -0
  47. package/dist/models/AiGatewayModelListUio.d.ts +46 -0
  48. package/dist/models/AiGatewayModelListUio.js +62 -0
  49. package/dist/models/AiGatewayModelUio.d.ts +57 -0
  50. package/dist/models/AiGatewayModelUio.js +69 -0
  51. package/dist/models/ApiKeyCreateRequestUio.d.ts +32 -0
  52. package/dist/models/ApiKeyCreateRequestUio.js +50 -0
  53. package/dist/models/ApiKeyCreatedUio.d.ts +44 -0
  54. package/dist/models/{ApiKeyUio.js → ApiKeyCreatedUio.js} +13 -13
  55. package/dist/models/ApiKeyRefUio.d.ts +38 -0
  56. package/dist/models/ApiKeyRefUio.js +54 -0
  57. package/dist/models/AppInstanceEphemeralCreateRequestUio.d.ts +1 -1
  58. package/dist/models/AppInstanceEphemeralCreateRequestUio.js +3 -1
  59. package/dist/models/AppReplaceRequestUio.d.ts +94 -0
  60. package/dist/models/AppReplaceRequestUio.js +82 -0
  61. package/dist/models/AppTextToSpeechResponseUio.d.ts +3 -3
  62. package/dist/models/AppTextToSpeechResponseUio.js +3 -3
  63. package/dist/models/AppUpdateRequestEphemeralInstancesUio.d.ts +38 -0
  64. package/dist/models/AppUpdateRequestEphemeralInstancesUio.js +50 -0
  65. package/dist/models/AppUpdateRequestUio.d.ts +12 -12
  66. package/dist/models/AppUpdateRequestUio.js +3 -3
  67. package/dist/models/AttachmentProcessedRequestUio.d.ts +50 -0
  68. package/dist/models/AttachmentProcessedRequestUio.js +62 -0
  69. package/dist/models/AuthCodeConfirmRequestUio.d.ts +1 -1
  70. package/dist/models/AuthCodeConfirmRequestUio.js +3 -1
  71. package/dist/models/AuthCodeConfirmResponseUio.d.ts +15 -3
  72. package/dist/models/AuthCodeConfirmResponseUio.js +6 -3
  73. package/dist/models/ChatMessageUio.d.ts +6 -0
  74. package/dist/models/ChatMessageUio.js +2 -0
  75. package/dist/models/ConfigurationDefaultFillerPhrasesUio.d.ts +7 -6
  76. package/dist/models/ConfigurationDefaultFillerPhrasesUio.js +7 -8
  77. package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.d.ts +39 -0
  78. package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.js +55 -0
  79. package/dist/models/ContextLocationRequestUio.d.ts +38 -0
  80. package/dist/models/ContextLocationRequestUio.js +54 -0
  81. package/dist/models/ConversationDetailUio.d.ts +101 -0
  82. package/dist/models/ConversationDetailUio.js +75 -0
  83. package/dist/models/ConversationMessagesInnerUio.d.ts +6 -0
  84. package/dist/models/ConversationMessagesInnerUio.js +2 -0
  85. package/dist/models/DeleteOrganizationUser200ResponseUio.d.ts +32 -0
  86. package/dist/models/DeleteOrganizationUser200ResponseUio.js +50 -0
  87. package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.d.ts +50 -0
  88. package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.js +54 -0
  89. package/dist/models/DeleteProvider200ResponseUio.d.ts +45 -0
  90. package/dist/models/DeleteProvider200ResponseUio.js +55 -0
  91. package/dist/models/EmbeddingProviderModelsInnerUio.d.ts +44 -0
  92. package/dist/models/EmbeddingProviderModelsInnerUio.js +58 -0
  93. package/dist/models/EmbeddingProviderUio.d.ts +57 -0
  94. package/dist/models/EmbeddingProviderUio.js +65 -0
  95. package/dist/models/FillerPhraseUio.d.ts +38 -0
  96. package/dist/models/FillerPhraseUio.js +54 -0
  97. package/dist/models/GetJwks200ResponseUio.d.ts +34 -0
  98. package/dist/models/GetJwks200ResponseUio.js +50 -0
  99. package/dist/models/MarkAttachmentProcessed400ResponseUio.d.ts +40 -0
  100. package/dist/models/MarkAttachmentProcessed400ResponseUio.js +52 -0
  101. package/dist/models/MessageUio.d.ts +7 -1
  102. package/dist/models/MessageUio.js +2 -0
  103. package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.d.ts +32 -0
  104. package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.js +48 -0
  105. package/dist/models/OpenAiChatCompletionRequestUio.d.ts +64 -0
  106. package/dist/models/OpenAiChatCompletionRequestUio.js +64 -0
  107. package/dist/models/OpenAiChatCompletionResponseUio.d.ts +67 -0
  108. package/dist/models/OpenAiChatCompletionResponseUio.js +60 -0
  109. package/dist/models/OrganizationMemberUio.d.ts +3 -3
  110. package/dist/models/OrganizationMemberUio.js +3 -3
  111. package/dist/models/OrganizationMemberUserUio.d.ts +32 -0
  112. package/dist/models/OrganizationMemberUserUio.js +50 -0
  113. package/dist/models/PinRequestUio.d.ts +3 -3
  114. package/dist/models/PinRequestUio.js +3 -3
  115. package/dist/models/ProviderValiationRequestUio.d.ts +1 -1
  116. package/dist/models/ProviderValiationRequestUio.js +1 -3
  117. package/dist/models/SetContextLocation400ResponseUio.d.ts +40 -0
  118. package/dist/models/SetContextLocation400ResponseUio.js +52 -0
  119. package/dist/models/TTSRequestUio.d.ts +1 -1
  120. package/dist/models/TTSRequestUio.js +1 -3
  121. package/dist/models/UserCreateRequestUio.d.ts +45 -0
  122. package/dist/models/UserCreateRequestUio.js +57 -0
  123. package/dist/models/UserDetailUio.d.ts +88 -0
  124. package/dist/models/UserDetailUio.js +80 -0
  125. package/dist/models/UserIdentifierRequestUio.d.ts +32 -0
  126. package/dist/models/UserIdentifierRequestUio.js +50 -0
  127. package/dist/models/UserIdentifierUio.d.ts +38 -0
  128. package/dist/models/UserIdentifierUio.js +52 -0
  129. package/dist/models/UserLockRequestUio.d.ts +32 -0
  130. package/dist/models/UserLockRequestUio.js +50 -0
  131. package/dist/models/UserUpdateRequestUio.d.ts +63 -0
  132. package/dist/models/UserUpdateRequestUio.js +59 -0
  133. package/dist/models/WorkspaceFileContentUio.d.ts +62 -0
  134. package/dist/models/WorkspaceFileContentUio.js +70 -0
  135. package/dist/models/WorkspaceFileEntryUio.d.ts +56 -0
  136. package/dist/models/WorkspaceFileEntryUio.js +66 -0
  137. package/dist/models/index.d.ts +41 -14
  138. package/dist/models/index.js +41 -14
  139. package/dist/openapi.json +3890 -2297
  140. package/package.json +1 -1
  141. package/dist/models/AccessRoleCreateRequestUio.d.ts +0 -45
  142. package/dist/models/AccessRoleCreateRequestUio.js +0 -55
  143. package/dist/models/AccessRolePermissionsRequestUio.d.ts +0 -33
  144. package/dist/models/AccessRolePermissionsRequestUio.js +0 -51
  145. package/dist/models/AccessRoleUio.d.ts +0 -75
  146. package/dist/models/AccessRoleUio.js +0 -75
  147. package/dist/models/AccessRoleUpdateRequestUio.d.ts +0 -38
  148. package/dist/models/AccessRoleUpdateRequestUio.js +0 -52
  149. package/dist/models/ApiKeyUio.d.ts +0 -44
  150. package/dist/models/AudioFile1Uio.d.ts +0 -45
  151. package/dist/models/AudioFile1Uio.js +0 -59
  152. package/dist/models/Conversation1Uio.d.ts +0 -46
  153. package/dist/models/Conversation1Uio.js +0 -60
  154. package/dist/models/OrganizationPermissionKeyUio.d.ts +0 -59
  155. package/dist/models/OrganizationPermissionKeyUio.js +0 -85
  156. package/dist/models/PermissionEntryUio.d.ts +0 -39
  157. package/dist/models/PermissionEntryUio.js +0 -55
  158. package/dist/models/ProviderSimpleUio.d.ts +0 -57
  159. package/dist/models/ProviderSimpleUio.js +0 -65
  160. package/dist/models/UserAccessRolesRequestUio.d.ts +0 -32
  161. package/dist/models/UserAccessRolesRequestUio.js +0 -50
  162. package/dist/models/UserAccessUio.d.ts +0 -39
  163. package/dist/models/UserAccessUio.js +0 -55
  164. package/dist/models/UserDirectPermissionsRequestUio.d.ts +0 -33
  165. package/dist/models/UserDirectPermissionsRequestUio.js +0 -51
  166. package/dist/models/UserUio.d.ts +0 -87
  167. package/dist/models/UserUio.js +0 -67
@@ -0,0 +1,100 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { AiGatewayChatCompletionRequestUio, AiGatewayChatCompletionResponseUio, AiGatewayEmbeddingRequestUio, AiGatewayEmbeddingResponseUio, AiGatewayModelListUio, AiGatewayModelUio, OpenAiChatCompletionRequestUio, OpenAiChatCompletionResponseUio } from '../models/index';
14
+ export interface CreateAiGatewayChatCompletionRequest {
15
+ organizationId: string;
16
+ aiGatewayChatCompletionRequestUio: AiGatewayChatCompletionRequestUio;
17
+ }
18
+ export interface CreateAiGatewayEmbeddingRequest {
19
+ organizationId: string;
20
+ aiGatewayEmbeddingRequestUio: AiGatewayEmbeddingRequestUio;
21
+ }
22
+ export interface CreateOpenAiChatCompletionRequest {
23
+ organizationId: string;
24
+ openAiChatCompletionRequestUio: OpenAiChatCompletionRequestUio;
25
+ }
26
+ export interface GetAiGatewayCreditsRequest {
27
+ organizationId: string;
28
+ }
29
+ export interface GetAiGatewayModelRequest {
30
+ organizationId: string;
31
+ model: string;
32
+ }
33
+ export interface ListAiGatewayModelsRequest {
34
+ organizationId: string;
35
+ }
36
+ /**
37
+ *
38
+ */
39
+ export declare class AiGatewayApi extends runtime.BaseAPI {
40
+ /**
41
+ * Runs a chat completion against a model exposed by one of the organization\'s engine providers. `model` porte l\'identifiant côté provider, tel que listé par `GET /organizations/{organizationId}/ai-gateway/models`. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
42
+ * Create a chat completion through the AI gateway
43
+ */
44
+ createAiGatewayChatCompletionRaw(requestParameters: CreateAiGatewayChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayChatCompletionResponseUio>>;
45
+ /**
46
+ * Runs a chat completion against a model exposed by one of the organization\'s engine providers. `model` porte l\'identifiant côté provider, tel que listé par `GET /organizations/{organizationId}/ai-gateway/models`. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
47
+ * Create a chat completion through the AI gateway
48
+ */
49
+ createAiGatewayChatCompletion(organizationId: string, aiGatewayChatCompletionRequestUio: AiGatewayChatCompletionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayChatCompletionResponseUio>;
50
+ /**
51
+ * Embeds a single string using a model exposed by one of the organization\'s engine providers. Le résultat de l\'appel d\'embedding est renvoyé tel quel. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
52
+ * Create an embedding through the AI gateway
53
+ */
54
+ createAiGatewayEmbeddingRaw(requestParameters: CreateAiGatewayEmbeddingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayEmbeddingResponseUio>>;
55
+ /**
56
+ * Embeds a single string using a model exposed by one of the organization\'s engine providers. Le résultat de l\'appel d\'embedding est renvoyé tel quel. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
57
+ * Create an embedding through the AI gateway
58
+ */
59
+ createAiGatewayEmbedding(organizationId: string, aiGatewayEmbeddingRequestUio: AiGatewayEmbeddingRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayEmbeddingResponseUio>;
60
+ /**
61
+ * OpenAI-compatible chat completion. Contrairement à `/ai-gateway/chat/completions`, la réponse OpenAI native est relayée sans transformation, `stream_options` est accepté, et la consommation de tokens est enregistrée dans les métriques de l\'organisation. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
62
+ * Create a chat completion using the native OpenAI client
63
+ */
64
+ createOpenAiChatCompletionRaw(requestParameters: CreateOpenAiChatCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OpenAiChatCompletionResponseUio>>;
65
+ /**
66
+ * OpenAI-compatible chat completion. Contrairement à `/ai-gateway/chat/completions`, la réponse OpenAI native est relayée sans transformation, `stream_options` est accepté, et la consommation de tokens est enregistrée dans les métriques de l\'organisation. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
67
+ * Create a chat completion using the native OpenAI client
68
+ */
69
+ createOpenAiChatCompletion(organizationId: string, openAiChatCompletionRequestUio: OpenAiChatCompletionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OpenAiChatCompletionResponseUio>;
70
+ /**
71
+ * Le suivi de crédits n\'est pas implémenté sur ce déploiement : l\'endpoint répond systématiquement 501 à un appelant autorisé. Réservé pour un usage futur.
72
+ * Get AI gateway credits
73
+ */
74
+ getAiGatewayCreditsRaw(requestParameters: GetAiGatewayCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
75
+ /**
76
+ * Le suivi de crédits n\'est pas implémenté sur ce déploiement : l\'endpoint répond systématiquement 501 à un appelant autorisé. Réservé pour un usage futur.
77
+ * Get AI gateway credits
78
+ */
79
+ getAiGatewayCredits(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
80
+ /**
81
+ * Returns a single model in an OpenAI-compatible shape, resolved against the organization\'s engine providers.
82
+ * Get a model available through the AI gateway
83
+ */
84
+ getAiGatewayModelRaw(requestParameters: GetAiGatewayModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayModelUio>>;
85
+ /**
86
+ * Returns a single model in an OpenAI-compatible shape, resolved against the organization\'s engine providers.
87
+ * Get a model available through the AI gateway
88
+ */
89
+ getAiGatewayModel(organizationId: string, model: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayModelUio>;
90
+ /**
91
+ * Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
92
+ * List models available through the AI gateway
93
+ */
94
+ listAiGatewayModelsRaw(requestParameters: ListAiGatewayModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayModelListUio>>;
95
+ /**
96
+ * Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
97
+ * List models available through the AI gateway
98
+ */
99
+ listAiGatewayModels(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayModelListUio>;
100
+ }
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.AiGatewayApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class AiGatewayApi extends runtime.BaseAPI {
56
+ /**
57
+ * Runs a chat completion against a model exposed by one of the organization\'s engine providers. `model` porte l\'identifiant côté provider, tel que listé par `GET /organizations/{organizationId}/ai-gateway/models`. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
58
+ * Create a chat completion through the AI gateway
59
+ */
60
+ async createAiGatewayChatCompletionRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['organizationId'] == null) {
62
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createAiGatewayChatCompletion().');
63
+ }
64
+ if (requestParameters['aiGatewayChatCompletionRequestUio'] == null) {
65
+ throw new runtime.RequiredError('aiGatewayChatCompletionRequestUio', 'Required parameter "aiGatewayChatCompletionRequestUio" was null or undefined when calling createAiGatewayChatCompletion().');
66
+ }
67
+ const queryParameters = {};
68
+ const headerParameters = {};
69
+ headerParameters['Content-Type'] = 'application/json';
70
+ if (this.configuration && this.configuration.apiKey) {
71
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
72
+ }
73
+ const response = await this.request({
74
+ path: `/organizations/{organizationId}/ai-gateway/chat/completions`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
75
+ method: 'POST',
76
+ headers: headerParameters,
77
+ query: queryParameters,
78
+ body: (0, index_1.AiGatewayChatCompletionRequestUioToJSON)(requestParameters['aiGatewayChatCompletionRequestUio']),
79
+ }, initOverrides);
80
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayChatCompletionResponseUioFromJSON)(jsonValue));
81
+ }
82
+ /**
83
+ * Runs a chat completion against a model exposed by one of the organization\'s engine providers. `model` porte l\'identifiant côté provider, tel que listé par `GET /organizations/{organizationId}/ai-gateway/models`. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
84
+ * Create a chat completion through the AI gateway
85
+ */
86
+ async createAiGatewayChatCompletion(organizationId, aiGatewayChatCompletionRequestUio, initOverrides) {
87
+ const response = await this.createAiGatewayChatCompletionRaw({ organizationId: organizationId, aiGatewayChatCompletionRequestUio: aiGatewayChatCompletionRequestUio }, initOverrides);
88
+ return await response.value();
89
+ }
90
+ /**
91
+ * Embeds a single string using a model exposed by one of the organization\'s engine providers. Le résultat de l\'appel d\'embedding est renvoyé tel quel. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
92
+ * Create an embedding through the AI gateway
93
+ */
94
+ async createAiGatewayEmbeddingRaw(requestParameters, initOverrides) {
95
+ if (requestParameters['organizationId'] == null) {
96
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createAiGatewayEmbedding().');
97
+ }
98
+ if (requestParameters['aiGatewayEmbeddingRequestUio'] == null) {
99
+ throw new runtime.RequiredError('aiGatewayEmbeddingRequestUio', 'Required parameter "aiGatewayEmbeddingRequestUio" was null or undefined when calling createAiGatewayEmbedding().');
100
+ }
101
+ const queryParameters = {};
102
+ const headerParameters = {};
103
+ headerParameters['Content-Type'] = 'application/json';
104
+ if (this.configuration && this.configuration.apiKey) {
105
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
106
+ }
107
+ const response = await this.request({
108
+ path: `/organizations/{organizationId}/ai-gateway/embeddings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
109
+ method: 'POST',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ body: (0, index_1.AiGatewayEmbeddingRequestUioToJSON)(requestParameters['aiGatewayEmbeddingRequestUio']),
113
+ }, initOverrides);
114
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayEmbeddingResponseUioFromJSON)(jsonValue));
115
+ }
116
+ /**
117
+ * Embeds a single string using a model exposed by one of the organization\'s engine providers. Le résultat de l\'appel d\'embedding est renvoyé tel quel. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
118
+ * Create an embedding through the AI gateway
119
+ */
120
+ async createAiGatewayEmbedding(organizationId, aiGatewayEmbeddingRequestUio, initOverrides) {
121
+ const response = await this.createAiGatewayEmbeddingRaw({ organizationId: organizationId, aiGatewayEmbeddingRequestUio: aiGatewayEmbeddingRequestUio }, initOverrides);
122
+ return await response.value();
123
+ }
124
+ /**
125
+ * OpenAI-compatible chat completion. Contrairement à `/ai-gateway/chat/completions`, la réponse OpenAI native est relayée sans transformation, `stream_options` est accepté, et la consommation de tokens est enregistrée dans les métriques de l\'organisation. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
126
+ * Create a chat completion using the native OpenAI client
127
+ */
128
+ async createOpenAiChatCompletionRaw(requestParameters, initOverrides) {
129
+ if (requestParameters['organizationId'] == null) {
130
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling createOpenAiChatCompletion().');
131
+ }
132
+ if (requestParameters['openAiChatCompletionRequestUio'] == null) {
133
+ throw new runtime.RequiredError('openAiChatCompletionRequestUio', 'Required parameter "openAiChatCompletionRequestUio" was null or undefined when calling createOpenAiChatCompletion().');
134
+ }
135
+ const queryParameters = {};
136
+ const headerParameters = {};
137
+ headerParameters['Content-Type'] = 'application/json';
138
+ if (this.configuration && this.configuration.apiKey) {
139
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
140
+ }
141
+ const response = await this.request({
142
+ path: `/organizations/{organizationId}/openai/chat/completions`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
143
+ method: 'POST',
144
+ headers: headerParameters,
145
+ query: queryParameters,
146
+ body: (0, index_1.OpenAiChatCompletionRequestUioToJSON)(requestParameters['openAiChatCompletionRequestUio']),
147
+ }, initOverrides);
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OpenAiChatCompletionResponseUioFromJSON)(jsonValue));
149
+ }
150
+ /**
151
+ * OpenAI-compatible chat completion. Contrairement à `/ai-gateway/chat/completions`, la réponse OpenAI native est relayée sans transformation, `stream_options` est accepté, et la consommation de tokens est enregistrée dans les métriques de l\'organisation. Toutes les erreurs utilisent l\'enveloppe OpenAI `{ error: { message } }`.
152
+ * Create a chat completion using the native OpenAI client
153
+ */
154
+ async createOpenAiChatCompletion(organizationId, openAiChatCompletionRequestUio, initOverrides) {
155
+ const response = await this.createOpenAiChatCompletionRaw({ organizationId: organizationId, openAiChatCompletionRequestUio: openAiChatCompletionRequestUio }, initOverrides);
156
+ return await response.value();
157
+ }
158
+ /**
159
+ * Le suivi de crédits n\'est pas implémenté sur ce déploiement : l\'endpoint répond systématiquement 501 à un appelant autorisé. Réservé pour un usage futur.
160
+ * Get AI gateway credits
161
+ */
162
+ async getAiGatewayCreditsRaw(requestParameters, initOverrides) {
163
+ if (requestParameters['organizationId'] == null) {
164
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayCredits().');
165
+ }
166
+ const queryParameters = {};
167
+ const headerParameters = {};
168
+ if (this.configuration && this.configuration.apiKey) {
169
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
170
+ }
171
+ const response = await this.request({
172
+ path: `/organizations/{organizationId}/ai-gateway/credits`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
173
+ method: 'GET',
174
+ headers: headerParameters,
175
+ query: queryParameters,
176
+ }, initOverrides);
177
+ return new runtime.VoidApiResponse(response);
178
+ }
179
+ /**
180
+ * Le suivi de crédits n\'est pas implémenté sur ce déploiement : l\'endpoint répond systématiquement 501 à un appelant autorisé. Réservé pour un usage futur.
181
+ * Get AI gateway credits
182
+ */
183
+ async getAiGatewayCredits(organizationId, initOverrides) {
184
+ await this.getAiGatewayCreditsRaw({ organizationId: organizationId }, initOverrides);
185
+ }
186
+ /**
187
+ * Returns a single model in an OpenAI-compatible shape, resolved against the organization\'s engine providers.
188
+ * Get a model available through the AI gateway
189
+ */
190
+ async getAiGatewayModelRaw(requestParameters, initOverrides) {
191
+ if (requestParameters['organizationId'] == null) {
192
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayModel().');
193
+ }
194
+ if (requestParameters['model'] == null) {
195
+ throw new runtime.RequiredError('model', 'Required parameter "model" was null or undefined when calling getAiGatewayModel().');
196
+ }
197
+ const queryParameters = {};
198
+ const headerParameters = {};
199
+ if (this.configuration && this.configuration.apiKey) {
200
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
201
+ }
202
+ const response = await this.request({
203
+ path: `/organizations/{organizationId}/ai-gateway/models/{model}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"model"}}`, encodeURIComponent(String(requestParameters['model']))),
204
+ method: 'GET',
205
+ headers: headerParameters,
206
+ query: queryParameters,
207
+ }, initOverrides);
208
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayModelUioFromJSON)(jsonValue));
209
+ }
210
+ /**
211
+ * Returns a single model in an OpenAI-compatible shape, resolved against the organization\'s engine providers.
212
+ * Get a model available through the AI gateway
213
+ */
214
+ async getAiGatewayModel(organizationId, model, initOverrides) {
215
+ const response = await this.getAiGatewayModelRaw({ organizationId: organizationId, model: model }, initOverrides);
216
+ return await response.value();
217
+ }
218
+ /**
219
+ * Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
220
+ * List models available through the AI gateway
221
+ */
222
+ async listAiGatewayModelsRaw(requestParameters, initOverrides) {
223
+ if (requestParameters['organizationId'] == null) {
224
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listAiGatewayModels().');
225
+ }
226
+ const queryParameters = {};
227
+ const headerParameters = {};
228
+ if (this.configuration && this.configuration.apiKey) {
229
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
230
+ }
231
+ const response = await this.request({
232
+ path: `/organizations/{organizationId}/ai-gateway/models`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
233
+ method: 'GET',
234
+ headers: headerParameters,
235
+ query: queryParameters,
236
+ }, initOverrides);
237
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayModelListUioFromJSON)(jsonValue));
238
+ }
239
+ /**
240
+ * Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
241
+ * List models available through the AI gateway
242
+ */
243
+ async listAiGatewayModels(organizationId, initOverrides) {
244
+ const response = await this.listAiGatewayModelsRaw({ organizationId: organizationId }, initOverrides);
245
+ return await response.value();
246
+ }
247
+ }
248
+ exports.AiGatewayApi = AiGatewayApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
13
+ import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppReplaceRequestUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
14
14
  export interface AddAnimationRequest {
15
15
  appId: string;
16
16
  animationCreateRequestUio: AnimationCreateRequestUio;
@@ -142,6 +142,10 @@ export interface RemoveSequenceRequest {
142
142
  appId: string;
143
143
  sequenceId: string;
144
144
  }
145
+ export interface ReplaceAppByIdRequest {
146
+ appId: string;
147
+ appReplaceRequestUio: AppReplaceRequestUio;
148
+ }
145
149
  export interface SaySomethingRequest {
146
150
  appId: string;
147
151
  appChatSayRequestUio: AppChatSayRequestUio;
@@ -293,12 +297,12 @@ export declare class AppApi extends runtime.BaseAPI {
293
297
  */
294
298
  createInstance(appId: string, appInstanceCreateRequestUio: AppInstanceCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithIdUio>;
295
299
  /**
296
- * Delete an app
300
+ * Delete an app by ID
297
301
  * Delete an app
298
302
  */
299
303
  deleteAppByIdRaw(requestParameters: DeleteAppByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
300
304
  /**
301
- * Delete an app
305
+ * Delete an app by ID
302
306
  * Delete an app
303
307
  */
304
308
  deleteAppById(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -492,6 +496,16 @@ export declare class AppApi extends runtime.BaseAPI {
492
496
  * Remove a sequence from an app
493
497
  */
494
498
  removeSequence(appId: string, sequenceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
499
+ /**
500
+ * Replace an app\'s full configuration. Contrairement au PATCH, ce corps exige `name`, `agentId`, `streamingEnabled`, `voiceProvider`, `voiceId` et `voiceModelId`, et n\'accepte ni `disableFillers`, ni `favoriteOutfit`, ni `ephemeralInstances`.
501
+ * Replace an app
502
+ */
503
+ replaceAppByIdRaw(requestParameters: ReplaceAppByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppUio>>;
504
+ /**
505
+ * Replace an app\'s full configuration. Contrairement au PATCH, ce corps exige `name`, `agentId`, `streamingEnabled`, `voiceProvider`, `voiceId` et `voiceModelId`, et n\'accepte ni `disableFillers`, ni `favoriteOutfit`, ni `ephemeralInstances`.
506
+ * Replace an app
507
+ */
508
+ replaceAppById(appId: string, appReplaceRequestUio: AppReplaceRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppUio>;
495
509
  /**
496
510
  * Make the app say something
497
511
  * Make the app say something
@@ -425,7 +425,7 @@ class AppApi extends runtime.BaseAPI {
425
425
  return await response.value();
426
426
  }
427
427
  /**
428
- * Delete an app
428
+ * Delete an app by ID
429
429
  * Delete an app
430
430
  */
431
431
  async deleteAppByIdRaw(requestParameters, initOverrides) {
@@ -446,7 +446,7 @@ class AppApi extends runtime.BaseAPI {
446
446
  return new runtime.VoidApiResponse(response);
447
447
  }
448
448
  /**
449
- * Delete an app
449
+ * Delete an app by ID
450
450
  * Delete an app
451
451
  */
452
452
  async deleteAppById(appId, initOverrides) {
@@ -1067,6 +1067,40 @@ class AppApi extends runtime.BaseAPI {
1067
1067
  const response = await this.removeSequenceRaw({ appId: appId, sequenceId: sequenceId }, initOverrides);
1068
1068
  return await response.value();
1069
1069
  }
1070
+ /**
1071
+ * Replace an app\'s full configuration. Contrairement au PATCH, ce corps exige `name`, `agentId`, `streamingEnabled`, `voiceProvider`, `voiceId` et `voiceModelId`, et n\'accepte ni `disableFillers`, ni `favoriteOutfit`, ni `ephemeralInstances`.
1072
+ * Replace an app
1073
+ */
1074
+ async replaceAppByIdRaw(requestParameters, initOverrides) {
1075
+ if (requestParameters['appId'] == null) {
1076
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling replaceAppById().');
1077
+ }
1078
+ if (requestParameters['appReplaceRequestUio'] == null) {
1079
+ throw new runtime.RequiredError('appReplaceRequestUio', 'Required parameter "appReplaceRequestUio" was null or undefined when calling replaceAppById().');
1080
+ }
1081
+ const queryParameters = {};
1082
+ const headerParameters = {};
1083
+ headerParameters['Content-Type'] = 'application/json';
1084
+ if (this.configuration && this.configuration.apiKey) {
1085
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1086
+ }
1087
+ const response = await this.request({
1088
+ path: `/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
1089
+ method: 'PUT',
1090
+ headers: headerParameters,
1091
+ query: queryParameters,
1092
+ body: (0, index_1.AppReplaceRequestUioToJSON)(requestParameters['appReplaceRequestUio']),
1093
+ }, initOverrides);
1094
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppUioFromJSON)(jsonValue));
1095
+ }
1096
+ /**
1097
+ * Replace an app\'s full configuration. Contrairement au PATCH, ce corps exige `name`, `agentId`, `streamingEnabled`, `voiceProvider`, `voiceId` et `voiceModelId`, et n\'accepte ni `disableFillers`, ni `favoriteOutfit`, ni `ephemeralInstances`.
1098
+ * Replace an app
1099
+ */
1100
+ async replaceAppById(appId, appReplaceRequestUio, initOverrides) {
1101
+ const response = await this.replaceAppByIdRaw({ appId: appId, appReplaceRequestUio: appReplaceRequestUio }, initOverrides);
1102
+ return await response.value();
1103
+ }
1070
1104
  /**
1071
1105
  * Make the app say something
1072
1106
  * Make the app say something
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AuthCodeConfirmRequestUio, AuthCodeConfirmResponseUio, AuthCodeRequestUio, AuthCodeResponseUio } from '../models/index';
13
+ import type { AuthCodeConfirmRequestUio, AuthCodeConfirmResponseUio, AuthCodeRequestUio, AuthCodeResponseUio, GetJwks200ResponseUio } from '../models/index';
14
14
  export interface ConfirmAuthCodeRequest {
15
15
  authFlowId: string;
16
16
  authCodeConfirmRequestUio: AuthCodeConfirmRequestUio;
@@ -18,6 +18,15 @@ export interface ConfirmAuthCodeRequest {
18
18
  export interface GetAuthCodeRequest {
19
19
  authCodeRequestUio: AuthCodeRequestUio;
20
20
  }
21
+ export interface OauthCallbackRequest {
22
+ code?: string;
23
+ state?: string;
24
+ }
25
+ export interface ToolOauthCallbackRequest {
26
+ toolId: string;
27
+ code?: string;
28
+ state?: string;
29
+ }
21
30
  /**
22
31
  *
23
32
  */
@@ -42,4 +51,34 @@ export declare class AuthApi extends runtime.BaseAPI {
42
51
  * Get auth code
43
52
  */
44
53
  getAuthCode(authCodeRequestUio: AuthCodeRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthCodeResponseUio>;
54
+ /**
55
+ * Returns the JSON Web Key Set for JWT verification
56
+ * Get JWKS public keys
57
+ */
58
+ getJwksRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetJwks200ResponseUio>>;
59
+ /**
60
+ * Returns the JSON Web Key Set for JWT verification
61
+ * Get JWKS public keys
62
+ */
63
+ getJwks(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetJwks200ResponseUio>;
64
+ /**
65
+ * Handles OAuth provider callback
66
+ * OAuth callback
67
+ */
68
+ oauthCallbackRaw(requestParameters: OauthCallbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
69
+ /**
70
+ * Handles OAuth provider callback
71
+ * OAuth callback
72
+ */
73
+ oauthCallback(code?: string, state?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
74
+ /**
75
+ * Handles OAuth provider callback for a specific tool
76
+ * Tool OAuth callback
77
+ */
78
+ toolOauthCallbackRaw(requestParameters: ToolOauthCallbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
79
+ /**
80
+ * Handles OAuth provider callback for a specific tool
81
+ * Tool OAuth callback
82
+ */
83
+ toolOauthCallback(toolId: string, code?: string, state?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
45
84
  }
@@ -118,5 +118,87 @@ class AuthApi extends runtime.BaseAPI {
118
118
  const response = await this.getAuthCodeRaw({ authCodeRequestUio: authCodeRequestUio }, initOverrides);
119
119
  return await response.value();
120
120
  }
121
+ /**
122
+ * Returns the JSON Web Key Set for JWT verification
123
+ * Get JWKS public keys
124
+ */
125
+ async getJwksRaw(initOverrides) {
126
+ const queryParameters = {};
127
+ const headerParameters = {};
128
+ const response = await this.request({
129
+ path: `/.well-known/jwks.json`,
130
+ method: 'GET',
131
+ headers: headerParameters,
132
+ query: queryParameters,
133
+ }, initOverrides);
134
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetJwks200ResponseUioFromJSON)(jsonValue));
135
+ }
136
+ /**
137
+ * Returns the JSON Web Key Set for JWT verification
138
+ * Get JWKS public keys
139
+ */
140
+ async getJwks(initOverrides) {
141
+ const response = await this.getJwksRaw(initOverrides);
142
+ return await response.value();
143
+ }
144
+ /**
145
+ * Handles OAuth provider callback
146
+ * OAuth callback
147
+ */
148
+ async oauthCallbackRaw(requestParameters, initOverrides) {
149
+ const queryParameters = {};
150
+ if (requestParameters['code'] != null) {
151
+ queryParameters['code'] = requestParameters['code'];
152
+ }
153
+ if (requestParameters['state'] != null) {
154
+ queryParameters['state'] = requestParameters['state'];
155
+ }
156
+ const headerParameters = {};
157
+ const response = await this.request({
158
+ path: `/oauth/callback`,
159
+ method: 'GET',
160
+ headers: headerParameters,
161
+ query: queryParameters,
162
+ }, initOverrides);
163
+ return new runtime.VoidApiResponse(response);
164
+ }
165
+ /**
166
+ * Handles OAuth provider callback
167
+ * OAuth callback
168
+ */
169
+ async oauthCallback(code, state, initOverrides) {
170
+ await this.oauthCallbackRaw({ code: code, state: state }, initOverrides);
171
+ }
172
+ /**
173
+ * Handles OAuth provider callback for a specific tool
174
+ * Tool OAuth callback
175
+ */
176
+ async toolOauthCallbackRaw(requestParameters, initOverrides) {
177
+ if (requestParameters['toolId'] == null) {
178
+ throw new runtime.RequiredError('toolId', 'Required parameter "toolId" was null or undefined when calling toolOauthCallback().');
179
+ }
180
+ const queryParameters = {};
181
+ if (requestParameters['code'] != null) {
182
+ queryParameters['code'] = requestParameters['code'];
183
+ }
184
+ if (requestParameters['state'] != null) {
185
+ queryParameters['state'] = requestParameters['state'];
186
+ }
187
+ const headerParameters = {};
188
+ const response = await this.request({
189
+ path: `/tools/{toolId}/oauth/callback`.replace(`{${"toolId"}}`, encodeURIComponent(String(requestParameters['toolId']))),
190
+ method: 'GET',
191
+ headers: headerParameters,
192
+ query: queryParameters,
193
+ }, initOverrides);
194
+ return new runtime.VoidApiResponse(response);
195
+ }
196
+ /**
197
+ * Handles OAuth provider callback for a specific tool
198
+ * Tool OAuth callback
199
+ */
200
+ async toolOauthCallback(toolId, code, state, initOverrides) {
201
+ await this.toolOauthCallbackRaw({ toolId: toolId, code: code, state: state }, initOverrides);
202
+ }
121
203
  }
122
204
  exports.AuthApi = AuthApi;