@breign/client 1.0.173 → 1.0.175

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.
@@ -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, 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';
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, EphemeralInstanceTokenUio, 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;
@@ -134,6 +134,10 @@ export interface RefreshAppProbeRequest {
134
134
  appId: string;
135
135
  instanceId?: string;
136
136
  }
137
+ export interface RefreshInstanceTokenRequest {
138
+ appId: string;
139
+ instanceId: string;
140
+ }
137
141
  export interface RemoveAnimationRequest {
138
142
  appId: string;
139
143
  animationId: string;
@@ -476,6 +480,16 @@ export declare class AppApi extends runtime.BaseAPI {
476
480
  * Refresh the app probe
477
481
  */
478
482
  refreshAppProbe(appId: string, instanceId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
483
+ /**
484
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
485
+ * Refresh ephemeral instance token
486
+ */
487
+ refreshInstanceTokenRaw(requestParameters: RefreshInstanceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EphemeralInstanceTokenUio>>;
488
+ /**
489
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
490
+ * Refresh ephemeral instance token
491
+ */
492
+ refreshInstanceToken(appId: string, instanceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EphemeralInstanceTokenUio>;
479
493
  /**
480
494
  * Remove an animation from an app
481
495
  * Remove an animation from an app
@@ -1009,6 +1009,38 @@ class AppApi extends runtime.BaseAPI {
1009
1009
  async refreshAppProbe(appId, instanceId, initOverrides) {
1010
1010
  await this.refreshAppProbeRaw({ appId: appId, instanceId: instanceId }, initOverrides);
1011
1011
  }
1012
+ /**
1013
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
1014
+ * Refresh ephemeral instance token
1015
+ */
1016
+ async refreshInstanceTokenRaw(requestParameters, initOverrides) {
1017
+ if (requestParameters['appId'] == null) {
1018
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling refreshInstanceToken().');
1019
+ }
1020
+ if (requestParameters['instanceId'] == null) {
1021
+ throw new runtime.RequiredError('instanceId', 'Required parameter "instanceId" was null or undefined when calling refreshInstanceToken().');
1022
+ }
1023
+ const queryParameters = {};
1024
+ const headerParameters = {};
1025
+ if (this.configuration && this.configuration.apiKey) {
1026
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
1027
+ }
1028
+ const response = await this.request({
1029
+ path: `/apps/{appId}/instances/{instanceId}/token`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"instanceId"}}`, encodeURIComponent(String(requestParameters['instanceId']))),
1030
+ method: 'POST',
1031
+ headers: headerParameters,
1032
+ query: queryParameters,
1033
+ }, initOverrides);
1034
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EphemeralInstanceTokenUioFromJSON)(jsonValue));
1035
+ }
1036
+ /**
1037
+ * Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
1038
+ * Refresh ephemeral instance token
1039
+ */
1040
+ async refreshInstanceToken(appId, instanceId, initOverrides) {
1041
+ const response = await this.refreshInstanceTokenRaw({ appId: appId, instanceId: instanceId }, initOverrides);
1042
+ return await response.value();
1043
+ }
1012
1044
  /**
1013
1045
  * Remove an animation from an app
1014
1046
  * Remove an animation from an app
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentExecutionUio, ExecutionNodeDetailUio, ExecutionNodeUio, NodeSessionDetailUio, NodeSessionLogsUio, NodeTurnCancelResultUio, SetAgentExecutionRequestUio } from '../models/index';
13
+ import type { AgentExecutionUio, ExecutionNodeDetailUio, ExecutionNodeOrganizationUio, ExecutionNodeSettingsUio, ExecutionNodeUio, NodeSessionDetailUio, NodeSessionLogsUio, NodeTurnCancelResultUio, OrganizationExecutionNodeUio, SetAgentExecutionRequestUio } from '../models/index';
14
+ export interface AssociateExecutionNodeRequest {
15
+ nodeId: string;
16
+ organizationId: string;
17
+ }
14
18
  export interface CancelExecutionNodeSessionRequest {
15
19
  nodeId: string;
16
20
  sessionId: string;
@@ -19,6 +23,10 @@ export interface CancelMessageNodeTurnRequest {
19
23
  conversationId: string;
20
24
  messageId: string;
21
25
  }
26
+ export interface DissociateExecutionNodeRequest {
27
+ nodeId: string;
28
+ organizationId: string;
29
+ }
22
30
  export interface GetAgentExecutionRequest {
23
31
  agentId: string;
24
32
  }
@@ -29,12 +37,18 @@ export interface GetExecutionNodeSessionRequest {
29
37
  nodeId: string;
30
38
  sessionId: string;
31
39
  }
40
+ export interface GetOrganizationExecutionNodeSettingsRequest {
41
+ organizationId: string;
42
+ }
32
43
  export interface ListExecutionNodeSessionLogsRequest {
33
44
  nodeId: string;
34
45
  sessionId: string;
35
46
  afterSeq?: number;
36
47
  limit?: number;
37
48
  }
49
+ export interface ListOrganizationExecutionNodesRequest {
50
+ organizationId: string;
51
+ }
38
52
  export interface RelaunchExecutionNodeSessionRequest {
39
53
  nodeId: string;
40
54
  sessionId: string;
@@ -43,6 +57,10 @@ export interface RelaunchMessageNodeTurnRequest {
43
57
  conversationId: string;
44
58
  messageId: string;
45
59
  }
60
+ export interface RemoveOrganizationExecutionNodeRequest {
61
+ organizationId: string;
62
+ nodeId: string;
63
+ }
46
64
  export interface RevokeExecutionNodeRequest {
47
65
  nodeId: string;
48
66
  }
@@ -50,10 +68,24 @@ export interface SetAgentExecutionRequest {
50
68
  agentId: string;
51
69
  setAgentExecutionRequestUio: SetAgentExecutionRequestUio;
52
70
  }
71
+ export interface UpdateOrganizationExecutionNodeSettingsRequest {
72
+ organizationId: string;
73
+ executionNodeSettingsUio: ExecutionNodeSettingsUio;
74
+ }
53
75
  /**
54
76
  *
55
77
  */
56
78
  export declare class ExecutionNodesApi extends runtime.BaseAPI {
79
+ /**
80
+ * Associe le nœud à l\'organisation, depuis Breign Mate : ses agents pourront y tourner. Réservé au propriétaire du nœud, membre de l\'organisation — ou admin, selon le réglage de l\'organisation. Sans effet sur une association déjà posée.
81
+ * Associate my execution node with an organization
82
+ */
83
+ associateExecutionNodeRaw(requestParameters: AssociateExecutionNodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExecutionNodeOrganizationUio>>;
84
+ /**
85
+ * Associe le nœud à l\'organisation, depuis Breign Mate : ses agents pourront y tourner. Réservé au propriétaire du nœud, membre de l\'organisation — ou admin, selon le réglage de l\'organisation. Sans effet sur une association déjà posée.
86
+ * Associate my execution node with an organization
87
+ */
88
+ associateExecutionNode(nodeId: string, organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExecutionNodeOrganizationUio>;
57
89
  /**
58
90
  * Interrompt le tour ; un tour jamais livré s\'arrête tout de suite.
59
91
  * Stop a turn running on one of my execution nodes
@@ -74,6 +106,16 @@ export declare class ExecutionNodesApi extends runtime.BaseAPI {
74
106
  * Stop the node turn of a message
75
107
  */
76
108
  cancelMessageNodeTurn(conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NodeTurnCancelResultUio>;
109
+ /**
110
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Les autres organisations du nœud ne sont pas touchées.
111
+ * Dissociate my execution node from an organization
112
+ */
113
+ dissociateExecutionNodeRaw(requestParameters: DissociateExecutionNodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
114
+ /**
115
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Les autres organisations du nœud ne sont pas touchées.
116
+ * Dissociate my execution node from an organization
117
+ */
118
+ dissociateExecutionNode(nodeId: string, organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
77
119
  /**
78
120
  * La section Exécution d\'un agent : serveur Breign, ou un runtime sur un nœud ; avec les nœuds de l\'utilisateur qu\'il pourrait choisir.
79
121
  * Get where an agent runs
@@ -102,6 +144,16 @@ export declare class ExecutionNodesApi extends runtime.BaseAPI {
102
144
  * Get a turn run on one of my execution nodes
103
145
  */
104
146
  getExecutionNodeSession(nodeId: string, sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NodeSessionDetailUio>;
147
+ /**
148
+ * Qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
149
+ * Get the execution node settings of an organization
150
+ */
151
+ getOrganizationExecutionNodeSettingsRaw(requestParameters: GetOrganizationExecutionNodeSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExecutionNodeSettingsUio>>;
152
+ /**
153
+ * Qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
154
+ * Get the execution node settings of an organization
155
+ */
156
+ getOrganizationExecutionNodeSettings(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExecutionNodeSettingsUio>;
105
157
  /**
106
158
  * Les lignes de log remontées par le nœud après un curseur `seq`, dans l\'ordre.
107
159
  * Page the log lines of a turn
@@ -122,6 +174,16 @@ export declare class ExecutionNodesApi extends runtime.BaseAPI {
122
174
  * List my Breign Mate execution nodes
123
175
  */
124
176
  listExecutionNodes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ExecutionNodeUio>>;
177
+ /**
178
+ * Les nœuds Breign Mate associés à l\'organisation, avec leur propriétaire, qui les a associés et les agents de l\'organisation qui y tournent. Réservé aux admins de l\'organisation.
179
+ * List the execution nodes of an organization
180
+ */
181
+ listOrganizationExecutionNodesRaw(requestParameters: ListOrganizationExecutionNodesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OrganizationExecutionNodeUio>>>;
182
+ /**
183
+ * Les nœuds Breign Mate associés à l\'organisation, avec leur propriétaire, qui les a associés et les agents de l\'organisation qui y tournent. Réservé aux admins de l\'organisation.
184
+ * List the execution nodes of an organization
185
+ */
186
+ listOrganizationExecutionNodes(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OrganizationExecutionNodeUio>>;
125
187
  /**
126
188
  * Relance un tour interrompu ; il repart en livraison et reprend sa session CLI.
127
189
  * Relaunch an interrupted turn
@@ -142,6 +204,16 @@ export declare class ExecutionNodesApi extends runtime.BaseAPI {
142
204
  * Relaunch the interrupted node turn of a message
143
205
  */
144
206
  relaunchMessageNodeTurn(conversationId: string, messageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
207
+ /**
208
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Le nœud reste associé à ses autres organisations. Réservé aux admins de l\'organisation.
209
+ * Remove an execution node from an organization
210
+ */
211
+ removeOrganizationExecutionNodeRaw(requestParameters: RemoveOrganizationExecutionNodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
212
+ /**
213
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Le nœud reste associé à ses autres organisations. Réservé aux admins de l\'organisation.
214
+ * Remove an execution node from an organization
215
+ */
216
+ removeOrganizationExecutionNode(organizationId: string, nodeId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
145
217
  /**
146
218
  * Révoque le nœud (désappairage) : il est refusé à jamais, ses agents repassent sur le serveur Breign, ses tours ouverts sont interrompus. La clé API n\'est pas révoquée.
147
219
  * Unpair an execution node
@@ -162,4 +234,14 @@ export declare class ExecutionNodesApi extends runtime.BaseAPI {
162
234
  * Set where an agent runs
163
235
  */
164
236
  setAgentExecution(agentId: string, setAgentExecutionRequestUio: SetAgentExecutionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentExecutionUio>;
237
+ /**
238
+ * Change qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
239
+ * Update the execution node settings of an organization
240
+ */
241
+ updateOrganizationExecutionNodeSettingsRaw(requestParameters: UpdateOrganizationExecutionNodeSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExecutionNodeSettingsUio>>;
242
+ /**
243
+ * Change qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
244
+ * Update the execution node settings of an organization
245
+ */
246
+ updateOrganizationExecutionNodeSettings(organizationId: string, executionNodeSettingsUio: ExecutionNodeSettingsUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExecutionNodeSettingsUio>;
165
247
  }
@@ -53,6 +53,38 @@ const index_1 = require("../models/index");
53
53
  *
54
54
  */
55
55
  class ExecutionNodesApi extends runtime.BaseAPI {
56
+ /**
57
+ * Associe le nœud à l\'organisation, depuis Breign Mate : ses agents pourront y tourner. Réservé au propriétaire du nœud, membre de l\'organisation — ou admin, selon le réglage de l\'organisation. Sans effet sur une association déjà posée.
58
+ * Associate my execution node with an organization
59
+ */
60
+ async associateExecutionNodeRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['nodeId'] == null) {
62
+ throw new runtime.RequiredError('nodeId', 'Required parameter "nodeId" was null or undefined when calling associateExecutionNode().');
63
+ }
64
+ if (requestParameters['organizationId'] == null) {
65
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling associateExecutionNode().');
66
+ }
67
+ const queryParameters = {};
68
+ const headerParameters = {};
69
+ if (this.configuration && this.configuration.apiKey) {
70
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
71
+ }
72
+ const response = await this.request({
73
+ path: `/execution-nodes/{nodeId}/organizations/{organizationId}`.replace(`{${"nodeId"}}`, encodeURIComponent(String(requestParameters['nodeId']))).replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
74
+ method: 'PUT',
75
+ headers: headerParameters,
76
+ query: queryParameters,
77
+ }, initOverrides);
78
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExecutionNodeOrganizationUioFromJSON)(jsonValue));
79
+ }
80
+ /**
81
+ * Associe le nœud à l\'organisation, depuis Breign Mate : ses agents pourront y tourner. Réservé au propriétaire du nœud, membre de l\'organisation — ou admin, selon le réglage de l\'organisation. Sans effet sur une association déjà posée.
82
+ * Associate my execution node with an organization
83
+ */
84
+ async associateExecutionNode(nodeId, organizationId, initOverrides) {
85
+ const response = await this.associateExecutionNodeRaw({ nodeId: nodeId, organizationId: organizationId }, initOverrides);
86
+ return await response.value();
87
+ }
56
88
  /**
57
89
  * Interrompt le tour ; un tour jamais livré s\'arrête tout de suite.
58
90
  * Stop a turn running on one of my execution nodes
@@ -117,6 +149,37 @@ class ExecutionNodesApi extends runtime.BaseAPI {
117
149
  const response = await this.cancelMessageNodeTurnRaw({ conversationId: conversationId, messageId: messageId }, initOverrides);
118
150
  return await response.value();
119
151
  }
152
+ /**
153
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Les autres organisations du nœud ne sont pas touchées.
154
+ * Dissociate my execution node from an organization
155
+ */
156
+ async dissociateExecutionNodeRaw(requestParameters, initOverrides) {
157
+ if (requestParameters['nodeId'] == null) {
158
+ throw new runtime.RequiredError('nodeId', 'Required parameter "nodeId" was null or undefined when calling dissociateExecutionNode().');
159
+ }
160
+ if (requestParameters['organizationId'] == null) {
161
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling dissociateExecutionNode().');
162
+ }
163
+ const queryParameters = {};
164
+ const headerParameters = {};
165
+ if (this.configuration && this.configuration.apiKey) {
166
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
167
+ }
168
+ const response = await this.request({
169
+ path: `/execution-nodes/{nodeId}/organizations/{organizationId}`.replace(`{${"nodeId"}}`, encodeURIComponent(String(requestParameters['nodeId']))).replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
170
+ method: 'DELETE',
171
+ headers: headerParameters,
172
+ query: queryParameters,
173
+ }, initOverrides);
174
+ return new runtime.VoidApiResponse(response);
175
+ }
176
+ /**
177
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Les autres organisations du nœud ne sont pas touchées.
178
+ * Dissociate my execution node from an organization
179
+ */
180
+ async dissociateExecutionNode(nodeId, organizationId, initOverrides) {
181
+ await this.dissociateExecutionNodeRaw({ nodeId: nodeId, organizationId: organizationId }, initOverrides);
182
+ }
120
183
  /**
121
184
  * La section Exécution d\'un agent : serveur Breign, ou un runtime sur un nœud ; avec les nœuds de l\'utilisateur qu\'il pourrait choisir.
122
185
  * Get where an agent runs
@@ -205,6 +268,35 @@ class ExecutionNodesApi extends runtime.BaseAPI {
205
268
  const response = await this.getExecutionNodeSessionRaw({ nodeId: nodeId, sessionId: sessionId }, initOverrides);
206
269
  return await response.value();
207
270
  }
271
+ /**
272
+ * Qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
273
+ * Get the execution node settings of an organization
274
+ */
275
+ async getOrganizationExecutionNodeSettingsRaw(requestParameters, initOverrides) {
276
+ if (requestParameters['organizationId'] == null) {
277
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getOrganizationExecutionNodeSettings().');
278
+ }
279
+ const queryParameters = {};
280
+ const headerParameters = {};
281
+ if (this.configuration && this.configuration.apiKey) {
282
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
283
+ }
284
+ const response = await this.request({
285
+ path: `/organizations/{organizationId}/execution-node-settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
286
+ method: 'GET',
287
+ headers: headerParameters,
288
+ query: queryParameters,
289
+ }, initOverrides);
290
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExecutionNodeSettingsUioFromJSON)(jsonValue));
291
+ }
292
+ /**
293
+ * Qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
294
+ * Get the execution node settings of an organization
295
+ */
296
+ async getOrganizationExecutionNodeSettings(organizationId, initOverrides) {
297
+ const response = await this.getOrganizationExecutionNodeSettingsRaw({ organizationId: organizationId }, initOverrides);
298
+ return await response.value();
299
+ }
208
300
  /**
209
301
  * Les lignes de log remontées par le nœud après un curseur `seq`, dans l\'ordre.
210
302
  * Page the log lines of a turn
@@ -269,6 +361,35 @@ class ExecutionNodesApi extends runtime.BaseAPI {
269
361
  const response = await this.listExecutionNodesRaw(initOverrides);
270
362
  return await response.value();
271
363
  }
364
+ /**
365
+ * Les nœuds Breign Mate associés à l\'organisation, avec leur propriétaire, qui les a associés et les agents de l\'organisation qui y tournent. Réservé aux admins de l\'organisation.
366
+ * List the execution nodes of an organization
367
+ */
368
+ async listOrganizationExecutionNodesRaw(requestParameters, initOverrides) {
369
+ if (requestParameters['organizationId'] == null) {
370
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listOrganizationExecutionNodes().');
371
+ }
372
+ const queryParameters = {};
373
+ const headerParameters = {};
374
+ if (this.configuration && this.configuration.apiKey) {
375
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
376
+ }
377
+ const response = await this.request({
378
+ path: `/organizations/{organizationId}/execution-nodes`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
379
+ method: 'GET',
380
+ headers: headerParameters,
381
+ query: queryParameters,
382
+ }, initOverrides);
383
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.OrganizationExecutionNodeUioFromJSON));
384
+ }
385
+ /**
386
+ * Les nœuds Breign Mate associés à l\'organisation, avec leur propriétaire, qui les a associés et les agents de l\'organisation qui y tournent. Réservé aux admins de l\'organisation.
387
+ * List the execution nodes of an organization
388
+ */
389
+ async listOrganizationExecutionNodes(organizationId, initOverrides) {
390
+ const response = await this.listOrganizationExecutionNodesRaw({ organizationId: organizationId }, initOverrides);
391
+ return await response.value();
392
+ }
272
393
  /**
273
394
  * Relance un tour interrompu ; il repart en livraison et reprend sa session CLI.
274
395
  * Relaunch an interrupted turn
@@ -332,6 +453,37 @@ class ExecutionNodesApi extends runtime.BaseAPI {
332
453
  async relaunchMessageNodeTurn(conversationId, messageId, initOverrides) {
333
454
  await this.relaunchMessageNodeTurnRaw({ conversationId: conversationId, messageId: messageId }, initOverrides);
334
455
  }
456
+ /**
457
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Le nœud reste associé à ses autres organisations. Réservé aux admins de l\'organisation.
458
+ * Remove an execution node from an organization
459
+ */
460
+ async removeOrganizationExecutionNodeRaw(requestParameters, initOverrides) {
461
+ if (requestParameters['organizationId'] == null) {
462
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling removeOrganizationExecutionNode().');
463
+ }
464
+ if (requestParameters['nodeId'] == null) {
465
+ throw new runtime.RequiredError('nodeId', 'Required parameter "nodeId" was null or undefined when calling removeOrganizationExecutionNode().');
466
+ }
467
+ const queryParameters = {};
468
+ const headerParameters = {};
469
+ if (this.configuration && this.configuration.apiKey) {
470
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
471
+ }
472
+ const response = await this.request({
473
+ path: `/organizations/{organizationId}/execution-nodes/{nodeId}`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"nodeId"}}`, encodeURIComponent(String(requestParameters['nodeId']))),
474
+ method: 'DELETE',
475
+ headers: headerParameters,
476
+ query: queryParameters,
477
+ }, initOverrides);
478
+ return new runtime.VoidApiResponse(response);
479
+ }
480
+ /**
481
+ * Retire le nœud de l\'organisation : les agents de l\'organisation qui y tournaient repassent sur le serveur Breign, et leurs tours ouverts sur ce nœud sont clos (`node_dissociated`) et annulés sur le poste. Le nœud reste associé à ses autres organisations. Réservé aux admins de l\'organisation.
482
+ * Remove an execution node from an organization
483
+ */
484
+ async removeOrganizationExecutionNode(organizationId, nodeId, initOverrides) {
485
+ await this.removeOrganizationExecutionNodeRaw({ organizationId: organizationId, nodeId: nodeId }, initOverrides);
486
+ }
335
487
  /**
336
488
  * Révoque le nœud (désappairage) : il est refusé à jamais, ses agents repassent sur le serveur Breign, ses tours ouverts sont interrompus. La clé API n\'est pas révoquée.
337
489
  * Unpair an execution node
@@ -395,5 +547,39 @@ class ExecutionNodesApi extends runtime.BaseAPI {
395
547
  const response = await this.setAgentExecutionRaw({ agentId: agentId, setAgentExecutionRequestUio: setAgentExecutionRequestUio }, initOverrides);
396
548
  return await response.value();
397
549
  }
550
+ /**
551
+ * Change qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
552
+ * Update the execution node settings of an organization
553
+ */
554
+ async updateOrganizationExecutionNodeSettingsRaw(requestParameters, initOverrides) {
555
+ if (requestParameters['organizationId'] == null) {
556
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling updateOrganizationExecutionNodeSettings().');
557
+ }
558
+ if (requestParameters['executionNodeSettingsUio'] == null) {
559
+ throw new runtime.RequiredError('executionNodeSettingsUio', 'Required parameter "executionNodeSettingsUio" was null or undefined when calling updateOrganizationExecutionNodeSettings().');
560
+ }
561
+ const queryParameters = {};
562
+ const headerParameters = {};
563
+ headerParameters['Content-Type'] = 'application/json';
564
+ if (this.configuration && this.configuration.apiKey) {
565
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
566
+ }
567
+ const response = await this.request({
568
+ path: `/organizations/{organizationId}/execution-node-settings`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
569
+ method: 'PUT',
570
+ headers: headerParameters,
571
+ query: queryParameters,
572
+ body: (0, index_1.ExecutionNodeSettingsUioToJSON)(requestParameters['executionNodeSettingsUio']),
573
+ }, initOverrides);
574
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ExecutionNodeSettingsUioFromJSON)(jsonValue));
575
+ }
576
+ /**
577
+ * Change qui peut associer un nœud à l\'organisation. Réservé aux admins de l\'organisation.
578
+ * Update the execution node settings of an organization
579
+ */
580
+ async updateOrganizationExecutionNodeSettings(organizationId, executionNodeSettingsUio, initOverrides) {
581
+ const response = await this.updateOrganizationExecutionNodeSettingsRaw({ organizationId: organizationId, executionNodeSettingsUio: executionNodeSettingsUio }, initOverrides);
582
+ return await response.value();
583
+ }
398
584
  }
399
585
  exports.ExecutionNodesApi = ExecutionNodesApi;
@@ -0,0 +1,80 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface EphemeralInstanceTokenUio
16
+ */
17
+ export interface EphemeralInstanceTokenUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EphemeralInstanceTokenUio
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof EphemeralInstanceTokenUio
28
+ */
29
+ appId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof EphemeralInstanceTokenUio
34
+ */
35
+ name: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof EphemeralInstanceTokenUio
40
+ */
41
+ urlWebsite?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof EphemeralInstanceTokenUio
46
+ */
47
+ token: string;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof EphemeralInstanceTokenUio
52
+ */
53
+ active: boolean;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof EphemeralInstanceTokenUio
58
+ */
59
+ createdAt: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof EphemeralInstanceTokenUio
64
+ */
65
+ lastActivity: string;
66
+ /**
67
+ *
68
+ * @type {string}
69
+ * @memberof EphemeralInstanceTokenUio
70
+ */
71
+ expiresAt: string;
72
+ }
73
+ /**
74
+ * Check if a given object implements the EphemeralInstanceTokenUio interface.
75
+ */
76
+ export declare function instanceOfEphemeralInstanceTokenUio(value: object): value is EphemeralInstanceTokenUio;
77
+ export declare function EphemeralInstanceTokenUioFromJSON(json: any): EphemeralInstanceTokenUio;
78
+ export declare function EphemeralInstanceTokenUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EphemeralInstanceTokenUio;
79
+ export declare function EphemeralInstanceTokenUioToJSON(json: any): EphemeralInstanceTokenUio;
80
+ export declare function EphemeralInstanceTokenUioToJSONTyped(value?: EphemeralInstanceTokenUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,80 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfEphemeralInstanceTokenUio = instanceOfEphemeralInstanceTokenUio;
17
+ exports.EphemeralInstanceTokenUioFromJSON = EphemeralInstanceTokenUioFromJSON;
18
+ exports.EphemeralInstanceTokenUioFromJSONTyped = EphemeralInstanceTokenUioFromJSONTyped;
19
+ exports.EphemeralInstanceTokenUioToJSON = EphemeralInstanceTokenUioToJSON;
20
+ exports.EphemeralInstanceTokenUioToJSONTyped = EphemeralInstanceTokenUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the EphemeralInstanceTokenUio interface.
23
+ */
24
+ function instanceOfEphemeralInstanceTokenUio(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('appId' in value) || value['appId'] === undefined)
28
+ return false;
29
+ if (!('name' in value) || value['name'] === undefined)
30
+ return false;
31
+ if (!('token' in value) || value['token'] === undefined)
32
+ return false;
33
+ if (!('active' in value) || value['active'] === undefined)
34
+ return false;
35
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
36
+ return false;
37
+ if (!('lastActivity' in value) || value['lastActivity'] === undefined)
38
+ return false;
39
+ if (!('expiresAt' in value) || value['expiresAt'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function EphemeralInstanceTokenUioFromJSON(json) {
44
+ return EphemeralInstanceTokenUioFromJSONTyped(json, false);
45
+ }
46
+ function EphemeralInstanceTokenUioFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'id': json['id'],
52
+ 'appId': json['appId'],
53
+ 'name': json['name'],
54
+ 'urlWebsite': json['urlWebsite'] == null ? undefined : json['urlWebsite'],
55
+ 'token': json['token'],
56
+ 'active': json['active'],
57
+ 'createdAt': json['createdAt'],
58
+ 'lastActivity': json['lastActivity'],
59
+ 'expiresAt': json['expiresAt'],
60
+ };
61
+ }
62
+ function EphemeralInstanceTokenUioToJSON(json) {
63
+ return EphemeralInstanceTokenUioToJSONTyped(json, false);
64
+ }
65
+ function EphemeralInstanceTokenUioToJSONTyped(value, ignoreDiscriminator = false) {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+ 'id': value['id'],
71
+ 'appId': value['appId'],
72
+ 'name': value['name'],
73
+ 'urlWebsite': value['urlWebsite'],
74
+ 'token': value['token'],
75
+ 'active': value['active'],
76
+ 'createdAt': value['createdAt'],
77
+ 'lastActivity': value['lastActivity'],
78
+ 'expiresAt': value['expiresAt'],
79
+ };
80
+ }
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { ExecutionNodeAgentUio } from './ExecutionNodeAgentUio';
13
13
  import type { ExecutionNodeWorkspaceUio } from './ExecutionNodeWorkspaceUio';
14
+ import type { ExecutionNodeOrganizationUio } from './ExecutionNodeOrganizationUio';
14
15
  import type { ExecutionNodeRuntimeUio } from './ExecutionNodeRuntimeUio';
15
16
  import type { NodeSessionUio } from './NodeSessionUio';
16
17
  /**
@@ -79,6 +80,12 @@ export interface ExecutionNodeDetailUio {
79
80
  * @memberof ExecutionNodeDetailUio
80
81
  */
81
82
  createdAt: string;
83
+ /**
84
+ * Les organisations auxquelles le nœud est associé, par date d'association.
85
+ * @type {Array<ExecutionNodeOrganizationUio>}
86
+ * @memberof ExecutionNodeDetailUio
87
+ */
88
+ organizations: Array<ExecutionNodeOrganizationUio>;
82
89
  /**
83
90
  *
84
91
  * @type {Array<ExecutionNodeAgentUio>}