sarvam-agents-client 0.2.3 → 0.3.1

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 (178) hide show
  1. package/README.md +16 -1
  2. package/dist/apis/AgentsApi.d.ts +4 -4
  3. package/dist/apis/AgentsApi.js +4 -4
  4. package/dist/apis/AppsApi.d.ts +1 -0
  5. package/dist/apis/AppsApi.js +3 -0
  6. package/dist/apis/FunctionToolsApi.d.ts +33 -0
  7. package/dist/apis/FunctionToolsApi.js +65 -0
  8. package/dist/apis/QueueApi.d.ts +1 -0
  9. package/dist/apis/QueueApi.js +3 -0
  10. package/dist/apis/ResponsesApi.d.ts +2 -0
  11. package/dist/apis/ResponsesApi.js +6 -0
  12. package/dist/apis/index.d.ts +1 -0
  13. package/dist/apis/index.js +1 -0
  14. package/dist/compose/agent.d.ts +26 -6
  15. package/dist/compose/agent.js +84 -7
  16. package/dist/compose/deploy.d.ts +3 -2
  17. package/dist/compose/errors.d.ts +22 -1
  18. package/dist/compose/errors.js +21 -1
  19. package/dist/compose/events.d.ts +38 -0
  20. package/dist/compose/events.js +59 -2
  21. package/dist/compose/functionTool.d.ts +101 -0
  22. package/dist/compose/functionTool.js +420 -0
  23. package/dist/compose/index.d.ts +7 -3
  24. package/dist/compose/index.js +3 -1
  25. package/dist/compose/output.d.ts +40 -0
  26. package/dist/compose/output.js +476 -0
  27. package/dist/compose/run.d.ts +44 -15
  28. package/dist/compose/run.js +164 -21
  29. package/dist/compose/runState.d.ts +28 -2
  30. package/dist/compose/runState.js +30 -0
  31. package/dist/compose/settingsTransport.d.ts +23 -3
  32. package/dist/compose/settingsTransport.js +295 -3
  33. package/dist/compose/transport.d.ts +21 -3
  34. package/dist/esm/apis/AgentsApi.d.ts +4 -4
  35. package/dist/esm/apis/AgentsApi.js +4 -4
  36. package/dist/esm/apis/AppsApi.d.ts +1 -0
  37. package/dist/esm/apis/AppsApi.js +3 -0
  38. package/dist/esm/apis/FunctionToolsApi.d.ts +33 -0
  39. package/dist/esm/apis/FunctionToolsApi.js +61 -0
  40. package/dist/esm/apis/QueueApi.d.ts +1 -0
  41. package/dist/esm/apis/QueueApi.js +3 -0
  42. package/dist/esm/apis/ResponsesApi.d.ts +2 -0
  43. package/dist/esm/apis/ResponsesApi.js +6 -0
  44. package/dist/esm/apis/index.d.ts +1 -0
  45. package/dist/esm/apis/index.js +1 -0
  46. package/dist/esm/compose/agent.d.ts +26 -6
  47. package/dist/esm/compose/agent.js +84 -7
  48. package/dist/esm/compose/deploy.d.ts +3 -2
  49. package/dist/esm/compose/errors.d.ts +22 -1
  50. package/dist/esm/compose/errors.js +21 -1
  51. package/dist/esm/compose/events.d.ts +38 -0
  52. package/dist/esm/compose/events.js +58 -2
  53. package/dist/esm/compose/functionTool.d.ts +101 -0
  54. package/dist/esm/compose/functionTool.js +406 -0
  55. package/dist/esm/compose/index.d.ts +7 -3
  56. package/dist/esm/compose/index.js +1 -0
  57. package/dist/esm/compose/output.d.ts +40 -0
  58. package/dist/esm/compose/output.js +466 -0
  59. package/dist/esm/compose/run.d.ts +44 -15
  60. package/dist/esm/compose/run.js +165 -22
  61. package/dist/esm/compose/runState.d.ts +28 -2
  62. package/dist/esm/compose/runState.js +31 -1
  63. package/dist/esm/compose/settingsTransport.d.ts +23 -3
  64. package/dist/esm/compose/settingsTransport.js +298 -7
  65. package/dist/esm/compose/transport.d.ts +21 -3
  66. package/dist/esm/models/AgentConversationDetail.d.ts +7 -0
  67. package/dist/esm/models/AgentConversationDetail.js +3 -0
  68. package/dist/esm/models/AppResource.d.ts +29 -0
  69. package/dist/esm/models/AppResource.js +16 -0
  70. package/dist/esm/models/AppToolsResponse.d.ts +3 -4
  71. package/dist/esm/models/AppToolsResponse.js +3 -2
  72. package/dist/esm/models/AppView.d.ts +48 -0
  73. package/dist/esm/models/AppView.js +23 -0
  74. package/dist/esm/models/ClarifyBody.d.ts +6 -0
  75. package/dist/esm/models/ClarifyBody.js +2 -0
  76. package/dist/esm/models/ConversationDetail.d.ts +7 -0
  77. package/dist/esm/models/ConversationDetail.js +3 -0
  78. package/dist/esm/models/ErrorDetail.d.ts +1 -0
  79. package/dist/esm/models/ErrorDetail.js +2 -1
  80. package/dist/esm/models/FunctionResultBody.d.ts +44 -0
  81. package/dist/esm/models/FunctionResultBody.js +49 -0
  82. package/dist/esm/models/McpSecurityAppealView.d.ts +50 -0
  83. package/dist/esm/models/McpSecurityAppealView.js +47 -0
  84. package/dist/esm/models/McpSecurityView.d.ts +105 -0
  85. package/dist/esm/models/McpSecurityView.js +66 -0
  86. package/dist/esm/models/MessagesResponse.d.ts +6 -0
  87. package/dist/esm/models/MessagesResponse.js +2 -0
  88. package/dist/esm/models/QueueMessageInput.d.ts +23 -0
  89. package/dist/esm/models/QueueMessageInput.js +14 -0
  90. package/dist/esm/models/RequiredAction.d.ts +77 -0
  91. package/dist/esm/models/RequiredAction.js +69 -0
  92. package/dist/esm/models/ResponseDetail.d.ts +40 -0
  93. package/dist/esm/models/ResponseDetail.js +12 -0
  94. package/dist/esm/models/ResponseInput.d.ts +23 -0
  95. package/dist/esm/models/ResponseInput.js +14 -0
  96. package/dist/esm/models/ToolResults200Response.d.ts +38 -0
  97. package/dist/esm/models/ToolResults200Response.js +47 -0
  98. package/dist/esm/models/ToolResultsBody.d.ts +39 -0
  99. package/dist/esm/models/ToolResultsBody.js +48 -0
  100. package/dist/esm/models/index.d.ts +6 -0
  101. package/dist/esm/models/index.js +6 -0
  102. package/dist/esm/streaming.d.ts +14 -2
  103. package/dist/esm/streaming.js +26 -4
  104. package/dist/models/AgentConversationDetail.d.ts +7 -0
  105. package/dist/models/AgentConversationDetail.js +3 -0
  106. package/dist/models/AppResource.d.ts +29 -0
  107. package/dist/models/AppResource.js +17 -1
  108. package/dist/models/AppToolsResponse.d.ts +3 -4
  109. package/dist/models/AppToolsResponse.js +3 -2
  110. package/dist/models/AppView.d.ts +48 -0
  111. package/dist/models/AppView.js +24 -1
  112. package/dist/models/ClarifyBody.d.ts +6 -0
  113. package/dist/models/ClarifyBody.js +2 -0
  114. package/dist/models/ConversationDetail.d.ts +7 -0
  115. package/dist/models/ConversationDetail.js +3 -0
  116. package/dist/models/ErrorDetail.d.ts +1 -0
  117. package/dist/models/ErrorDetail.js +2 -1
  118. package/dist/models/FunctionResultBody.d.ts +44 -0
  119. package/dist/models/FunctionResultBody.js +56 -0
  120. package/dist/models/McpSecurityAppealView.d.ts +50 -0
  121. package/dist/models/McpSecurityAppealView.js +54 -0
  122. package/dist/models/McpSecurityView.d.ts +105 -0
  123. package/dist/models/McpSecurityView.js +73 -0
  124. package/dist/models/MessagesResponse.d.ts +6 -0
  125. package/dist/models/MessagesResponse.js +2 -0
  126. package/dist/models/QueueMessageInput.d.ts +23 -0
  127. package/dist/models/QueueMessageInput.js +15 -1
  128. package/dist/models/RequiredAction.d.ts +77 -0
  129. package/dist/models/RequiredAction.js +77 -0
  130. package/dist/models/ResponseDetail.d.ts +40 -0
  131. package/dist/models/ResponseDetail.js +12 -0
  132. package/dist/models/ResponseInput.d.ts +23 -0
  133. package/dist/models/ResponseInput.js +15 -0
  134. package/dist/models/ToolResults200Response.d.ts +38 -0
  135. package/dist/models/ToolResults200Response.js +54 -0
  136. package/dist/models/ToolResultsBody.d.ts +39 -0
  137. package/dist/models/ToolResultsBody.js +55 -0
  138. package/dist/models/index.d.ts +6 -0
  139. package/dist/models/index.js +6 -0
  140. package/dist/streaming.d.ts +14 -2
  141. package/dist/streaming.js +27 -4
  142. package/package.json +4 -3
  143. package/src/apis/AgentsApi.ts +4 -4
  144. package/src/apis/AppsApi.ts +5 -0
  145. package/src/apis/FunctionToolsApi.ts +102 -0
  146. package/src/apis/QueueApi.ts +5 -0
  147. package/src/apis/ResponsesApi.ts +10 -0
  148. package/src/apis/index.ts +1 -0
  149. package/src/compose/agent.ts +108 -15
  150. package/src/compose/deploy.ts +6 -5
  151. package/src/compose/errors.ts +35 -2
  152. package/src/compose/events.ts +79 -1
  153. package/src/compose/functionTool.ts +441 -0
  154. package/src/compose/index.ts +7 -3
  155. package/src/compose/output.ts +436 -0
  156. package/src/compose/run.ts +208 -39
  157. package/src/compose/runState.ts +46 -6
  158. package/src/compose/settingsTransport.ts +297 -10
  159. package/src/compose/transport.ts +27 -3
  160. package/src/models/AgentConversationDetail.ts +15 -0
  161. package/src/models/AppResource.ts +42 -0
  162. package/src/models/AppToolsResponse.ts +11 -4
  163. package/src/models/AppView.ts +73 -0
  164. package/src/models/ClarifyBody.ts +8 -0
  165. package/src/models/ConversationDetail.ts +15 -0
  166. package/src/models/ErrorDetail.ts +2 -1
  167. package/src/models/FunctionResultBody.ts +83 -0
  168. package/src/models/McpSecurityAppealView.ts +89 -0
  169. package/src/models/McpSecurityView.ts +169 -0
  170. package/src/models/MessagesResponse.ts +8 -0
  171. package/src/models/QueueMessageInput.ts +28 -0
  172. package/src/models/RequiredAction.ts +128 -0
  173. package/src/models/ResponseDetail.ts +48 -0
  174. package/src/models/ResponseInput.ts +30 -0
  175. package/src/models/ToolResults200Response.ts +75 -0
  176. package/src/models/ToolResultsBody.ts +83 -0
  177. package/src/models/index.ts +6 -0
  178. package/src/streaming.ts +39 -3
@@ -13,6 +13,20 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
+ import type { McpSecurityView } from './McpSecurityView.js';
17
+ import {
18
+ McpSecurityViewFromJSON,
19
+ McpSecurityViewFromJSONTyped,
20
+ McpSecurityViewToJSON,
21
+ McpSecurityViewToJSONTyped,
22
+ } from './McpSecurityView.js';
23
+ import type { Scope } from './Scope.js';
24
+ import {
25
+ ScopeFromJSON,
26
+ ScopeFromJSONTyped,
27
+ ScopeToJSON,
28
+ ScopeToJSONTyped,
29
+ } from './Scope.js';
16
30
  import type { AppCategory } from './AppCategory.js';
17
31
  import {
18
32
  AppCategoryFromJSON,
@@ -135,6 +149,42 @@ export interface AppView {
135
149
  * @memberof AppView
136
150
  */
137
151
  connectorMode?: string | null;
152
+ /**
153
+ *
154
+ * @type {boolean}
155
+ * @memberof AppView
156
+ */
157
+ isCustom?: boolean;
158
+ /**
159
+ *
160
+ * @type {boolean}
161
+ * @memberof AppView
162
+ */
163
+ isOwnedByMe?: boolean;
164
+ /**
165
+ *
166
+ * @type {Scope}
167
+ * @memberof AppView
168
+ */
169
+ scope?: Scope | null;
170
+ /**
171
+ *
172
+ * @type {string}
173
+ * @memberof AppView
174
+ */
175
+ createdByName?: string | null;
176
+ /**
177
+ *
178
+ * @type {string}
179
+ * @memberof AppView
180
+ */
181
+ authKind?: AppViewAuthKindEnum | null;
182
+ /**
183
+ *
184
+ * @type {McpSecurityView}
185
+ * @memberof AppView
186
+ */
187
+ security?: McpSecurityView | null;
138
188
  }
139
189
 
140
190
 
@@ -148,6 +198,17 @@ export const AppViewAuthTypeEnum = {
148
198
  } as const;
149
199
  export type AppViewAuthTypeEnum = typeof AppViewAuthTypeEnum[keyof typeof AppViewAuthTypeEnum];
150
200
 
201
+ /**
202
+ * @export
203
+ */
204
+ export const AppViewAuthKindEnum = {
205
+ Oauth: 'oauth',
206
+ ApiKey: 'api_key',
207
+ SharedKey: 'shared_key',
208
+ None: 'none'
209
+ } as const;
210
+ export type AppViewAuthKindEnum = typeof AppViewAuthKindEnum[keyof typeof AppViewAuthKindEnum];
211
+
151
212
 
152
213
  /**
153
214
  * Check if a given object implements the AppView interface.
@@ -194,6 +255,12 @@ export function AppViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
194
255
  'alreadyUsingUrl': json['alreadyUsingUrl'] == null ? undefined : json['alreadyUsingUrl'],
195
256
  'isManagedConnector': json['isManagedConnector'] == null ? undefined : json['isManagedConnector'],
196
257
  'connectorMode': json['connectorMode'] == null ? undefined : json['connectorMode'],
258
+ 'isCustom': json['isCustom'] == null ? undefined : json['isCustom'],
259
+ 'isOwnedByMe': json['isOwnedByMe'] == null ? undefined : json['isOwnedByMe'],
260
+ 'scope': json['scope'] == null ? undefined : ScopeFromJSON(json['scope']),
261
+ 'createdByName': json['createdByName'] == null ? undefined : json['createdByName'],
262
+ 'authKind': json['authKind'] == null ? undefined : json['authKind'],
263
+ 'security': json['security'] == null ? undefined : McpSecurityViewFromJSON(json['security']),
197
264
  };
198
265
  }
199
266
 
@@ -226,6 +293,12 @@ export function AppViewToJSONTyped(value?: AppView | null, ignoreDiscriminator:
226
293
  'alreadyUsingUrl': value['alreadyUsingUrl'],
227
294
  'isManagedConnector': value['isManagedConnector'],
228
295
  'connectorMode': value['connectorMode'],
296
+ 'isCustom': value['isCustom'],
297
+ 'isOwnedByMe': value['isOwnedByMe'],
298
+ 'scope': ScopeToJSON(value['scope']),
299
+ 'createdByName': value['createdByName'],
300
+ 'authKind': value['authKind'],
301
+ 'security': McpSecurityViewToJSON(value['security']),
229
302
  };
230
303
  }
231
304
 
@@ -37,6 +37,12 @@ export interface ClarifyBody {
37
37
  * @memberof ClarifyBody
38
38
  */
39
39
  answers?: { [key: string]: any; };
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ClarifyBody
44
+ */
45
+ endUserId?: string | null;
40
46
  }
41
47
 
42
48
  /**
@@ -60,6 +66,7 @@ export function ClarifyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean
60
66
  'requestId': json['requestId'],
61
67
  'action': json['action'] == null ? undefined : json['action'],
62
68
  'answers': json['answers'] == null ? undefined : json['answers'],
69
+ 'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
63
70
  };
64
71
  }
65
72
 
@@ -77,6 +84,7 @@ export function ClarifyBodyToJSONTyped(value?: ClarifyBody | null, ignoreDiscrim
77
84
  'requestId': value['requestId'],
78
85
  'action': value['action'],
79
86
  'answers': value['answers'],
87
+ 'endUserId': value['endUserId'],
80
88
  };
81
89
  }
82
90
 
@@ -27,6 +27,13 @@ import {
27
27
  FieldHighlightToJSON,
28
28
  FieldHighlightToJSONTyped,
29
29
  } from './FieldHighlight.js';
30
+ import type { RequiredAction } from './RequiredAction.js';
31
+ import {
32
+ RequiredActionFromJSON,
33
+ RequiredActionFromJSONTyped,
34
+ RequiredActionToJSON,
35
+ RequiredActionToJSONTyped,
36
+ } from './RequiredAction.js';
30
37
  import type { QueuedTurnView } from './QueuedTurnView.js';
31
38
  import {
32
39
  QueuedTurnViewFromJSON,
@@ -156,6 +163,12 @@ export interface ConversationDetail {
156
163
  * @memberof ConversationDetail
157
164
  */
158
165
  queuedTurns?: Array<QueuedTurnView>;
166
+ /**
167
+ *
168
+ * @type {Array<RequiredAction>}
169
+ * @memberof ConversationDetail
170
+ */
171
+ requiredActions?: Array<RequiredAction>;
159
172
  }
160
173
 
161
174
  /**
@@ -209,6 +222,7 @@ export function ConversationDetailFromJSONTyped(json: any, ignoreDiscriminator:
209
222
  'hasMore': json['hasMore'] == null ? undefined : json['hasMore'],
210
223
  'nextBeforeCursor': json['nextBeforeCursor'] == null ? undefined : json['nextBeforeCursor'],
211
224
  'queuedTurns': json['queuedTurns'] == null ? undefined : ((json['queuedTurns'] as Array<any>).map(QueuedTurnViewFromJSON)),
225
+ 'requiredActions': json['requiredActions'] == null ? undefined : ((json['requiredActions'] as Array<any>).map(RequiredActionFromJSON)),
212
226
  };
213
227
  }
214
228
 
@@ -242,6 +256,7 @@ export function ConversationDetailToJSONTyped(value?: ConversationDetail | null,
242
256
  'hasMore': value['hasMore'],
243
257
  'nextBeforeCursor': value['nextBeforeCursor'],
244
258
  'queuedTurns': value['queuedTurns'] == null ? undefined : ((value['queuedTurns'] as Array<any>).map(QueuedTurnViewToJSON)),
259
+ 'requiredActions': value['requiredActions'] == null ? undefined : ((value['requiredActions'] as Array<any>).map(RequiredActionToJSON)),
245
260
  };
246
261
  }
247
262
 
@@ -70,7 +70,8 @@ export const ErrorDetailCodeEnum = {
70
70
  RateLimit: 'CHAT_RATE_LIMIT',
71
71
  Unavailable: 'CHAT_UNAVAILABLE',
72
72
  Upstream: 'CHAT_UPSTREAM',
73
- Internal: 'CHAT_INTERNAL'
73
+ Internal: 'CHAT_INTERNAL',
74
+ BalanceExhausted: 'CHAT_BALANCE_EXHAUSTED'
74
75
  } as const;
75
76
  export type ErrorDetailCodeEnum = typeof ErrorDetailCodeEnum[keyof typeof ErrorDetailCodeEnum];
76
77
 
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * One call's result, as the app ran it.
18
+ * @export
19
+ * @interface FunctionResultBody
20
+ */
21
+ export interface FunctionResultBody {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof FunctionResultBody
26
+ */
27
+ toolCallId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof FunctionResultBody
32
+ */
33
+ output: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof FunctionResultBody
38
+ */
39
+ isError?: boolean;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the FunctionResultBody interface.
44
+ */
45
+ export function instanceOfFunctionResultBody(value: object): value is FunctionResultBody {
46
+ if (!('toolCallId' in value) || value['toolCallId'] === undefined) return false;
47
+ if (!('output' in value) || value['output'] === undefined) return false;
48
+ return true;
49
+ }
50
+
51
+ export function FunctionResultBodyFromJSON(json: any): FunctionResultBody {
52
+ return FunctionResultBodyFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function FunctionResultBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionResultBody {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'toolCallId': json['toolCallId'],
62
+ 'output': json['output'],
63
+ 'isError': json['isError'] == null ? undefined : json['isError'],
64
+ };
65
+ }
66
+
67
+ export function FunctionResultBodyToJSON(json: any): FunctionResultBody {
68
+ return FunctionResultBodyToJSONTyped(json, false);
69
+ }
70
+
71
+ export function FunctionResultBodyToJSONTyped(value?: FunctionResultBody | null, ignoreDiscriminator: boolean = false): any {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+
76
+ return {
77
+
78
+ 'toolCallId': value['toolCallId'],
79
+ 'output': value['output'],
80
+ 'isError': value['isError'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,89 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * Appeal metadata on a BYO security projection. Status ``none`` when idle.
18
+ * @export
19
+ * @interface McpSecurityAppealView
20
+ */
21
+ export interface McpSecurityAppealView {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof McpSecurityAppealView
26
+ */
27
+ status?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof McpSecurityAppealView
32
+ */
33
+ contactEmail?: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof McpSecurityAppealView
38
+ */
39
+ contactPhone?: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof McpSecurityAppealView
44
+ */
45
+ denialReason?: string | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the McpSecurityAppealView interface.
50
+ */
51
+ export function instanceOfMcpSecurityAppealView(value: object): value is McpSecurityAppealView {
52
+ return true;
53
+ }
54
+
55
+ export function McpSecurityAppealViewFromJSON(json: any): McpSecurityAppealView {
56
+ return McpSecurityAppealViewFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function McpSecurityAppealViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): McpSecurityAppealView {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'status': json['status'] == null ? undefined : json['status'],
66
+ 'contactEmail': json['contactEmail'] == null ? undefined : json['contactEmail'],
67
+ 'contactPhone': json['contactPhone'] == null ? undefined : json['contactPhone'],
68
+ 'denialReason': json['denialReason'] == null ? undefined : json['denialReason'],
69
+ };
70
+ }
71
+
72
+ export function McpSecurityAppealViewToJSON(json: any): McpSecurityAppealView {
73
+ return McpSecurityAppealViewToJSONTyped(json, false);
74
+ }
75
+
76
+ export function McpSecurityAppealViewToJSONTyped(value?: McpSecurityAppealView | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'status': value['status'],
84
+ 'contactEmail': value['contactEmail'],
85
+ 'contactPhone': value['contactPhone'],
86
+ 'denialReason': value['denialReason'],
87
+ };
88
+ }
89
+
@@ -0,0 +1,169 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sarvam Agents API
5
+ * Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: support@sarvam.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { McpSecurityAppealView } from './McpSecurityAppealView.js';
17
+ import {
18
+ McpSecurityAppealViewFromJSON,
19
+ McpSecurityAppealViewFromJSONTyped,
20
+ McpSecurityAppealViewToJSON,
21
+ McpSecurityAppealViewToJSONTyped,
22
+ } from './McpSecurityAppealView.js';
23
+
24
+ /**
25
+ * Card-facing BYO security object (list, agent-bound apps, catalog, tools).
26
+ * @export
27
+ * @interface McpSecurityView
28
+ */
29
+ export interface McpSecurityView {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof McpSecurityView
34
+ */
35
+ state?: string | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof McpSecurityView
40
+ */
41
+ progress?: string | null;
42
+ /**
43
+ *
44
+ * @type {boolean}
45
+ * @memberof McpSecurityView
46
+ */
47
+ blocking?: boolean;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof McpSecurityView
52
+ */
53
+ enforced?: boolean;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof McpSecurityView
58
+ */
59
+ lastFailure?: string | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof McpSecurityView
64
+ */
65
+ message?: string | null;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof McpSecurityView
70
+ */
71
+ ownerActionRequired?: boolean | null;
72
+ /**
73
+ *
74
+ * @type {boolean}
75
+ * @memberof McpSecurityView
76
+ */
77
+ unverifiable?: boolean | null;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof McpSecurityView
82
+ */
83
+ auditAttempts?: number;
84
+ /**
85
+ *
86
+ * @type {number}
87
+ * @memberof McpSecurityView
88
+ */
89
+ auditAttemptLimit?: number;
90
+ /**
91
+ *
92
+ * @type {number}
93
+ * @memberof McpSecurityView
94
+ */
95
+ attemptsRemaining?: number;
96
+ /**
97
+ *
98
+ * @type {Array<string>}
99
+ * @memberof McpSecurityView
100
+ */
101
+ lastHoldReasons?: Array<string>;
102
+ /**
103
+ *
104
+ * @type {McpSecurityAppealView}
105
+ * @memberof McpSecurityView
106
+ */
107
+ appeal?: McpSecurityAppealView | null;
108
+ }
109
+
110
+ /**
111
+ * Check if a given object implements the McpSecurityView interface.
112
+ */
113
+ export function instanceOfMcpSecurityView(value: object): value is McpSecurityView {
114
+ return true;
115
+ }
116
+
117
+ export function McpSecurityViewFromJSON(json: any): McpSecurityView {
118
+ return McpSecurityViewFromJSONTyped(json, false);
119
+ }
120
+
121
+ export function McpSecurityViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): McpSecurityView {
122
+ if (json == null) {
123
+ return json;
124
+ }
125
+ return {
126
+
127
+ 'state': json['state'] == null ? undefined : json['state'],
128
+ 'progress': json['progress'] == null ? undefined : json['progress'],
129
+ 'blocking': json['blocking'] == null ? undefined : json['blocking'],
130
+ 'enforced': json['enforced'] == null ? undefined : json['enforced'],
131
+ 'lastFailure': json['lastFailure'] == null ? undefined : json['lastFailure'],
132
+ 'message': json['message'] == null ? undefined : json['message'],
133
+ 'ownerActionRequired': json['ownerActionRequired'] == null ? undefined : json['ownerActionRequired'],
134
+ 'unverifiable': json['unverifiable'] == null ? undefined : json['unverifiable'],
135
+ 'auditAttempts': json['auditAttempts'] == null ? undefined : json['auditAttempts'],
136
+ 'auditAttemptLimit': json['auditAttemptLimit'] == null ? undefined : json['auditAttemptLimit'],
137
+ 'attemptsRemaining': json['attemptsRemaining'] == null ? undefined : json['attemptsRemaining'],
138
+ 'lastHoldReasons': json['lastHoldReasons'] == null ? undefined : json['lastHoldReasons'],
139
+ 'appeal': json['appeal'] == null ? undefined : McpSecurityAppealViewFromJSON(json['appeal']),
140
+ };
141
+ }
142
+
143
+ export function McpSecurityViewToJSON(json: any): McpSecurityView {
144
+ return McpSecurityViewToJSONTyped(json, false);
145
+ }
146
+
147
+ export function McpSecurityViewToJSONTyped(value?: McpSecurityView | null, ignoreDiscriminator: boolean = false): any {
148
+ if (value == null) {
149
+ return value;
150
+ }
151
+
152
+ return {
153
+
154
+ 'state': value['state'],
155
+ 'progress': value['progress'],
156
+ 'blocking': value['blocking'],
157
+ 'enforced': value['enforced'],
158
+ 'lastFailure': value['lastFailure'],
159
+ 'message': value['message'],
160
+ 'ownerActionRequired': value['ownerActionRequired'],
161
+ 'unverifiable': value['unverifiable'],
162
+ 'auditAttempts': value['auditAttempts'],
163
+ 'auditAttemptLimit': value['auditAttemptLimit'],
164
+ 'attemptsRemaining': value['attemptsRemaining'],
165
+ 'lastHoldReasons': value['lastHoldReasons'],
166
+ 'appeal': McpSecurityAppealViewToJSON(value['appeal']),
167
+ };
168
+ }
169
+
@@ -82,6 +82,12 @@ export interface MessagesResponse {
82
82
  * @memberof MessagesResponse
83
83
  */
84
84
  nextBeforeCursor?: string | null;
85
+ /**
86
+ *
87
+ * @type {string}
88
+ * @memberof MessagesResponse
89
+ */
90
+ resumeCursor?: string | null;
85
91
  /**
86
92
  *
87
93
  * @type {Array<QueuedTurnView>}
@@ -117,6 +123,7 @@ export function MessagesResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
117
123
  'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
118
124
  'activeResponseId': json['activeResponseId'] == null ? undefined : json['activeResponseId'],
119
125
  'nextBeforeCursor': json['nextBeforeCursor'] == null ? undefined : json['nextBeforeCursor'],
126
+ 'resumeCursor': json['resumeCursor'] == null ? undefined : json['resumeCursor'],
120
127
  'queuedTurns': json['queuedTurns'] == null ? undefined : ((json['queuedTurns'] as Array<any>).map(QueuedTurnViewFromJSON)),
121
128
  };
122
129
  }
@@ -140,6 +147,7 @@ export function MessagesResponseToJSONTyped(value?: MessagesResponse | null, ign
140
147
  'nextCursor': value['nextCursor'],
141
148
  'activeResponseId': value['activeResponseId'],
142
149
  'nextBeforeCursor': value['nextBeforeCursor'],
150
+ 'resumeCursor': value['resumeCursor'],
143
151
  'queuedTurns': value['queuedTurns'] == null ? undefined : ((value['queuedTurns'] as Array<any>).map(QueuedTurnViewToJSON)),
144
152
  };
145
153
  }
@@ -51,6 +51,18 @@ export interface QueueMessageInput {
51
51
  * @memberof QueueMessageInput
52
52
  */
53
53
  retryOf?: string | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof QueueMessageInput
58
+ */
59
+ surface?: QueueMessageInputSurfaceEnum | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof QueueMessageInput
64
+ */
65
+ endUserId?: string | null;
54
66
  }
55
67
 
56
68
 
@@ -63,6 +75,18 @@ export const QueueMessageInputDeliveryEnum = {
63
75
  } as const;
64
76
  export type QueueMessageInputDeliveryEnum = typeof QueueMessageInputDeliveryEnum[keyof typeof QueueMessageInputDeliveryEnum];
65
77
 
78
+ /**
79
+ * @export
80
+ */
81
+ export const QueueMessageInputSurfaceEnum = {
82
+ Builder: 'builder',
83
+ Playground: 'playground',
84
+ Tests: 'tests',
85
+ Evals: 'evals',
86
+ Cowork: 'cowork'
87
+ } as const;
88
+ export type QueueMessageInputSurfaceEnum = typeof QueueMessageInputSurfaceEnum[keyof typeof QueueMessageInputSurfaceEnum];
89
+
66
90
 
67
91
  /**
68
92
  * Check if a given object implements the QueueMessageInput interface.
@@ -86,6 +110,8 @@ export function QueueMessageInputFromJSONTyped(json: any, ignoreDiscriminator: b
86
110
  'delivery': json['delivery'] == null ? undefined : json['delivery'],
87
111
  'agentId': json['agentId'] == null ? undefined : json['agentId'],
88
112
  'retryOf': json['retryOf'] == null ? undefined : json['retryOf'],
113
+ 'surface': json['surface'] == null ? undefined : json['surface'],
114
+ 'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
89
115
  };
90
116
  }
91
117
 
@@ -104,6 +130,8 @@ export function QueueMessageInputToJSONTyped(value?: QueueMessageInput | null, i
104
130
  'delivery': value['delivery'],
105
131
  'agentId': value['agentId'],
106
132
  'retryOf': value['retryOf'],
133
+ 'surface': value['surface'],
134
+ 'endUserId': value['endUserId'],
107
135
  };
108
136
  }
109
137