sarvam-agents-client 0.1.2 → 0.2.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.
- package/README.md +15 -0
- package/dist/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/apis/AgentConversationsApi.js +104 -1
- package/dist/apis/AgentsApi.d.ts +77 -5
- package/dist/apis/AgentsApi.js +163 -5
- package/dist/apis/AppsApi.d.ts +43 -1
- package/dist/apis/AppsApi.js +108 -0
- package/dist/apis/ArtifactsApi.d.ts +31 -1
- package/dist/apis/ArtifactsApi.js +82 -0
- package/dist/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/apis/CustomAPIsApi.js +305 -0
- package/dist/apis/ModelsApi.d.ts +26 -0
- package/dist/apis/ModelsApi.js +52 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/compose/agent.d.ts +44 -0
- package/dist/compose/agent.js +222 -0
- package/dist/compose/builtins.d.ts +4 -0
- package/dist/compose/builtins.js +22 -0
- package/dist/compose/deploy.d.ts +30 -0
- package/dist/compose/deploy.js +146 -0
- package/dist/compose/errors.d.ts +48 -0
- package/dist/compose/errors.js +68 -0
- package/dist/compose/events.d.ts +63 -0
- package/dist/compose/events.js +100 -0
- package/dist/compose/fingerprint.d.ts +6 -0
- package/dist/compose/fingerprint.js +83 -0
- package/dist/compose/index.d.ts +13 -0
- package/dist/compose/index.js +33 -0
- package/dist/compose/run.d.ts +100 -0
- package/dist/compose/run.js +536 -0
- package/dist/compose/runState.d.ts +26 -0
- package/dist/compose/runState.js +79 -0
- package/dist/compose/settingsTransport.d.ts +24 -0
- package/dist/compose/settingsTransport.js +280 -0
- package/dist/compose/tools.d.ts +17 -0
- package/dist/compose/tools.js +44 -0
- package/dist/compose/transport.d.ts +34 -0
- package/dist/compose/transport.js +2 -0
- package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/esm/apis/AgentConversationsApi.js +104 -1
- package/dist/esm/apis/AgentsApi.d.ts +77 -5
- package/dist/esm/apis/AgentsApi.js +163 -5
- package/dist/esm/apis/AppsApi.d.ts +43 -1
- package/dist/esm/apis/AppsApi.js +109 -1
- package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
- package/dist/esm/apis/ArtifactsApi.js +83 -1
- package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/esm/apis/CustomAPIsApi.js +301 -0
- package/dist/esm/apis/ModelsApi.d.ts +26 -0
- package/dist/esm/apis/ModelsApi.js +48 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/compose/agent.d.ts +44 -0
- package/dist/esm/compose/agent.js +218 -0
- package/dist/esm/compose/builtins.d.ts +4 -0
- package/dist/esm/compose/builtins.js +18 -0
- package/dist/esm/compose/deploy.d.ts +30 -0
- package/dist/esm/compose/deploy.js +137 -0
- package/dist/esm/compose/errors.d.ts +48 -0
- package/dist/esm/compose/errors.js +53 -0
- package/dist/esm/compose/events.d.ts +63 -0
- package/dist/esm/compose/events.js +97 -0
- package/dist/esm/compose/fingerprint.d.ts +6 -0
- package/dist/esm/compose/fingerprint.js +78 -0
- package/dist/esm/compose/index.d.ts +13 -0
- package/dist/esm/compose/index.js +8 -0
- package/dist/esm/compose/run.d.ts +100 -0
- package/dist/esm/compose/run.js +530 -0
- package/dist/esm/compose/runState.d.ts +26 -0
- package/dist/esm/compose/runState.js +75 -0
- package/dist/esm/compose/settingsTransport.d.ts +24 -0
- package/dist/esm/compose/settingsTransport.js +276 -0
- package/dist/esm/compose/tools.d.ts +17 -0
- package/dist/esm/compose/tools.js +34 -0
- package/dist/esm/compose/transport.d.ts +34 -0
- package/dist/esm/compose/transport.js +1 -0
- package/dist/esm/models/AgentChannelRef.d.ts +1 -0
- package/dist/esm/models/AgentChannelRef.js +2 -1
- package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
- package/dist/esm/models/AgentConversationDetail.js +6 -4
- package/dist/esm/models/AgentConversationView.d.ts +11 -5
- package/dist/esm/models/AgentConversationView.js +4 -4
- package/dist/esm/models/AgentCreate.d.ts +8 -0
- package/dist/esm/models/AgentCreate.js +2 -0
- package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
- package/dist/esm/models/AgentCustomApiList.js +44 -0
- package/dist/esm/models/AgentResource.d.ts +14 -0
- package/dist/esm/models/AgentResource.js +4 -0
- package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/esm/models/AgentSettingsResponse.js +52 -0
- package/dist/esm/models/AgentUpdate.d.ts +8 -0
- package/dist/esm/models/AgentUpdate.js +2 -0
- package/dist/esm/models/AppAccountView.d.ts +88 -0
- package/dist/esm/models/AppAccountView.js +79 -0
- package/dist/esm/models/AppAccountsView.d.ts +66 -0
- package/dist/esm/models/AppAccountsView.js +60 -0
- package/dist/esm/models/AppResource.d.ts +36 -0
- package/dist/esm/models/AppResource.js +12 -0
- package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
- package/dist/esm/models/AppResourceCheckView.js +63 -0
- package/dist/esm/models/AppResourceView.d.ts +68 -0
- package/dist/esm/models/AppResourceView.js +67 -0
- package/dist/esm/models/AppResourcesView.d.ts +54 -0
- package/dist/esm/models/AppResourcesView.js +56 -0
- package/dist/esm/models/AppToolsResponse.d.ts +14 -0
- package/dist/esm/models/AppToolsResponse.js +4 -0
- package/dist/esm/models/AppView.d.ts +42 -0
- package/dist/esm/models/AppView.js +14 -0
- package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/esm/models/ArtifactVersionResponse.js +80 -0
- package/dist/esm/models/AttachedAgent.d.ts +44 -0
- package/dist/esm/models/AttachedAgent.js +49 -0
- package/dist/esm/models/Auth.d.ts +30 -0
- package/dist/esm/models/Auth.js +52 -0
- package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
- package/dist/esm/models/BindCustomApiBody.js +43 -0
- package/dist/esm/models/ConversationArtifact.d.ts +14 -0
- package/dist/esm/models/ConversationArtifact.js +9 -0
- package/dist/esm/models/CustomApi.d.ts +102 -0
- package/dist/esm/models/CustomApi.js +90 -0
- package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/esm/models/CustomApiBasicAuth.js +57 -0
- package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/esm/models/CustomApiBearerAuth.js +53 -0
- package/dist/esm/models/CustomApiCreate.d.ts +57 -0
- package/dist/esm/models/CustomApiCreate.js +56 -0
- package/dist/esm/models/CustomApiHeader.d.ts +44 -0
- package/dist/esm/models/CustomApiHeader.js +47 -0
- package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
- package/dist/esm/models/CustomApiList.d.ts +64 -0
- package/dist/esm/models/CustomApiList.js +64 -0
- package/dist/esm/models/CustomApiName.d.ts +44 -0
- package/dist/esm/models/CustomApiName.js +49 -0
- package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
- package/dist/esm/models/CustomApiUpdate.js +50 -0
- package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
- package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
- package/dist/esm/models/ListModels403Response.d.ts +23 -0
- package/dist/esm/models/ListModels403Response.js +45 -0
- package/dist/esm/models/ModelEndpointView.d.ts +38 -0
- package/dist/esm/models/ModelEndpointView.js +45 -0
- package/dist/esm/models/ModelView.d.ts +69 -0
- package/dist/esm/models/ModelView.js +56 -0
- package/dist/esm/models/ModelsResponse.d.ts +33 -0
- package/dist/esm/models/ModelsResponse.js +44 -0
- package/dist/esm/models/SettingsIssueView.d.ts +44 -0
- package/dist/esm/models/SettingsIssueView.js +51 -0
- package/dist/esm/models/VersionCommitBody.d.ts +44 -0
- package/dist/esm/models/VersionCommitBody.js +51 -0
- package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/esm/models/VersionUploadUrlBody.js +43 -0
- package/dist/esm/models/index.d.ts +28 -0
- package/dist/esm/models/index.js +28 -0
- package/dist/models/AgentChannelRef.d.ts +1 -0
- package/dist/models/AgentChannelRef.js +2 -1
- package/dist/models/AgentConversationDetail.d.ts +15 -2
- package/dist/models/AgentConversationDetail.js +6 -4
- package/dist/models/AgentConversationView.d.ts +11 -5
- package/dist/models/AgentConversationView.js +4 -4
- package/dist/models/AgentCreate.d.ts +8 -0
- package/dist/models/AgentCreate.js +2 -0
- package/dist/models/AgentCustomApiList.d.ts +33 -0
- package/dist/models/AgentCustomApiList.js +51 -0
- package/dist/models/AgentResource.d.ts +14 -0
- package/dist/models/AgentResource.js +4 -0
- package/dist/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/models/AgentSettingsResponse.js +59 -0
- package/dist/models/AgentUpdate.d.ts +8 -0
- package/dist/models/AgentUpdate.js +2 -0
- package/dist/models/AppAccountView.d.ts +88 -0
- package/dist/models/AppAccountView.js +87 -0
- package/dist/models/AppAccountsView.d.ts +66 -0
- package/dist/models/AppAccountsView.js +68 -0
- package/dist/models/AppResource.d.ts +36 -0
- package/dist/models/AppResource.js +12 -0
- package/dist/models/AppResourceCheckView.d.ts +74 -0
- package/dist/models/AppResourceCheckView.js +71 -0
- package/dist/models/AppResourceView.d.ts +68 -0
- package/dist/models/AppResourceView.js +74 -0
- package/dist/models/AppResourcesView.d.ts +54 -0
- package/dist/models/AppResourcesView.js +64 -0
- package/dist/models/AppToolsResponse.d.ts +14 -0
- package/dist/models/AppToolsResponse.js +4 -0
- package/dist/models/AppView.d.ts +42 -0
- package/dist/models/AppView.js +14 -0
- package/dist/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/models/ArtifactVersionResponse.js +88 -0
- package/dist/models/AttachedAgent.d.ts +44 -0
- package/dist/models/AttachedAgent.js +56 -0
- package/dist/models/Auth.d.ts +30 -0
- package/dist/models/Auth.js +58 -0
- package/dist/models/BindCustomApiBody.d.ts +32 -0
- package/dist/models/BindCustomApiBody.js +50 -0
- package/dist/models/ConversationArtifact.d.ts +14 -0
- package/dist/models/ConversationArtifact.js +10 -0
- package/dist/models/CustomApi.d.ts +102 -0
- package/dist/models/CustomApi.js +98 -0
- package/dist/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/models/CustomApiBasicAuth.js +65 -0
- package/dist/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/models/CustomApiBearerAuth.js +61 -0
- package/dist/models/CustomApiCreate.d.ts +57 -0
- package/dist/models/CustomApiCreate.js +63 -0
- package/dist/models/CustomApiHeader.d.ts +44 -0
- package/dist/models/CustomApiHeader.js +54 -0
- package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/models/CustomApiHeadersAuth.js +62 -0
- package/dist/models/CustomApiList.d.ts +64 -0
- package/dist/models/CustomApiList.js +71 -0
- package/dist/models/CustomApiName.d.ts +44 -0
- package/dist/models/CustomApiName.js +56 -0
- package/dist/models/CustomApiUpdate.d.ts +58 -0
- package/dist/models/CustomApiUpdate.js +57 -0
- package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/models/CustomApiUpdateAuth.js +58 -0
- package/dist/models/ErrorDetailItem.d.ts +5 -0
- package/dist/models/ListModels403Response.d.ts +23 -0
- package/dist/models/ListModels403Response.js +51 -0
- package/dist/models/ModelEndpointView.d.ts +38 -0
- package/dist/models/ModelEndpointView.js +52 -0
- package/dist/models/ModelView.d.ts +69 -0
- package/dist/models/ModelView.js +63 -0
- package/dist/models/ModelsResponse.d.ts +33 -0
- package/dist/models/ModelsResponse.js +51 -0
- package/dist/models/SettingsIssueView.d.ts +44 -0
- package/dist/models/SettingsIssueView.js +58 -0
- package/dist/models/VersionCommitBody.d.ts +44 -0
- package/dist/models/VersionCommitBody.js +58 -0
- package/dist/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/models/VersionUploadUrlBody.js +50 -0
- package/dist/models/index.d.ts +28 -0
- package/dist/models/index.js +28 -0
- package/package.json +15 -2
- package/src/apis/AgentConversationsApi.ts +172 -3
- package/src/apis/AgentsApi.ts +242 -7
- package/src/apis/AppsApi.ts +174 -3
- package/src/apis/ArtifactsApi.ts +144 -0
- package/src/apis/ClarifyApi.ts +3 -3
- package/src/apis/CollectionsApi.ts +3 -3
- package/src/apis/ConversationsApi.ts +3 -3
- package/src/apis/CronsApi.ts +3 -3
- package/src/apis/CustomAPIsApi.ts +471 -0
- package/src/apis/MessagesApi.ts +3 -3
- package/src/apis/ModelsApi.ts +70 -0
- package/src/apis/QueueApi.ts +3 -3
- package/src/apis/ResponsesApi.ts +3 -3
- package/src/apis/SkillsApi.ts +3 -3
- package/src/apis/index.ts +2 -0
- package/src/compose/agent.ts +254 -0
- package/src/compose/builtins.ts +19 -0
- package/src/compose/deploy.ts +168 -0
- package/src/compose/errors.ts +66 -0
- package/src/compose/events.ts +122 -0
- package/src/compose/fingerprint.ts +74 -0
- package/src/compose/index.ts +13 -0
- package/src/compose/run.ts +601 -0
- package/src/compose/runState.ts +95 -0
- package/src/compose/settingsTransport.ts +299 -0
- package/src/compose/tools.ts +42 -0
- package/src/compose/transport.ts +48 -0
- package/src/models/AgentChannelRef.ts +2 -1
- package/src/models/AgentConversationDetail.ts +21 -5
- package/src/models/AgentConversationView.ts +15 -8
- package/src/models/AgentCreate.ts +8 -0
- package/src/models/AgentCustomApiList.ts +74 -0
- package/src/models/AgentResource.ts +16 -0
- package/src/models/AgentSettingsResponse.ts +99 -0
- package/src/models/AgentUpdate.ts +8 -0
- package/src/models/AppAccountView.ts +143 -0
- package/src/models/AppAccountsView.ts +118 -0
- package/src/models/AppResource.ts +48 -0
- package/src/models/AppResourceCheckView.ts +117 -0
- package/src/models/AppResourceView.ts +120 -0
- package/src/models/AppResourcesView.ts +102 -0
- package/src/models/AppToolsResponse.ts +16 -0
- package/src/models/AppView.ts +56 -0
- package/src/models/ArtifactVersionResponse.ts +155 -0
- package/src/models/AttachedAgent.ts +83 -0
- package/src/models/Auth.ts +84 -0
- package/src/models/BindCustomApiBody.ts +66 -0
- package/src/models/ConversationArtifact.ts +19 -0
- package/src/models/CustomApi.ts +175 -0
- package/src/models/CustomApiBasicAuth.ts +94 -0
- package/src/models/CustomApiBearerAuth.ts +85 -0
- package/src/models/CustomApiCreate.ts +108 -0
- package/src/models/CustomApiHeader.ts +82 -0
- package/src/models/CustomApiHeadersAuth.ts +93 -0
- package/src/models/CustomApiList.ts +120 -0
- package/src/models/CustomApiName.ts +83 -0
- package/src/models/CustomApiUpdate.ts +106 -0
- package/src/models/CustomApiUpdateAuth.ts +84 -0
- package/src/models/ErrorDetailItem.ts +5 -0
- package/src/models/ListModels403Response.ts +73 -0
- package/src/models/ModelEndpointView.ts +74 -0
- package/src/models/ModelView.ts +122 -0
- package/src/models/ModelsResponse.ts +74 -0
- package/src/models/SettingsIssueView.ts +84 -0
- package/src/models/VersionCommitBody.ts +84 -0
- package/src/models/VersionUploadUrlBody.ts +66 -0
- package/src/models/index.ts +28 -0
package/dist/apis/AppsApi.d.ts
CHANGED
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { ApiKeyBody, AppCategory, AppConnectResponse, AppToolsResponse, ConnectBody, EntityListAppResource, PageAppView, Scope } from '../models/index.js';
|
|
13
|
+
import type { ApiKeyBody, AppAccountsView, AppCategory, AppConnectResponse, AppResourceCheckView, AppResourcesView, AppToolsResponse, ConnectBody, EntityListAppResource, PageAppView, Scope } from '../models/index.js';
|
|
14
14
|
export interface BindAppRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
mcpId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface CheckAppResourceRequest {
|
|
19
|
+
integrationId: string;
|
|
20
|
+
namespace: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
18
23
|
export interface ConnectAppRequest {
|
|
19
24
|
integrationId: string;
|
|
20
25
|
connectBody?: ConnectBody;
|
|
@@ -26,9 +31,16 @@ export interface ConnectAppApikeyRequest {
|
|
|
26
31
|
export interface DisconnectAppRequest {
|
|
27
32
|
integrationId: string;
|
|
28
33
|
}
|
|
34
|
+
export interface GetAppAccountsRequest {
|
|
35
|
+
integrationId: string;
|
|
36
|
+
}
|
|
29
37
|
export interface ListAgentAppsRequest {
|
|
30
38
|
agentId: string;
|
|
31
39
|
}
|
|
40
|
+
export interface ListAppResourcesRequest {
|
|
41
|
+
integrationId: string;
|
|
42
|
+
q?: string | null;
|
|
43
|
+
}
|
|
32
44
|
export interface ListAppToolsRequest {
|
|
33
45
|
integrationId: string;
|
|
34
46
|
}
|
|
@@ -56,6 +68,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
56
68
|
* Bind App
|
|
57
69
|
*/
|
|
58
70
|
bindApp(requestParameters: BindAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
73
|
+
* Check App Resource
|
|
74
|
+
*/
|
|
75
|
+
checkAppResourceRaw(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourceCheckView>>;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
78
|
+
* Check App Resource
|
|
79
|
+
*/
|
|
80
|
+
checkAppResource(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourceCheckView>;
|
|
59
81
|
/**
|
|
60
82
|
* Start the OAuth connect flow for a connector. ``integration_id`` accepts either the human slug (``github``, ``composio-notion``) or the MCP ULID (``01MCPGH…``) — the database id. Resolution matches on both (see :func:`_resolve_mcp`). The ULID is the preferred identifier: it is what ``GET /v1/apps`` returns as ``mcpId`` and what ``GET /v2/apps`` returns as ``id``, so a caller that already holds the connector row never needs to resolve a slug.
|
|
61
83
|
* Connect App
|
|
@@ -86,6 +108,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
86
108
|
* Disconnect App
|
|
87
109
|
*/
|
|
88
110
|
disconnectApp(requestParameters: DisconnectAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
113
|
+
* Get App Accounts
|
|
114
|
+
*/
|
|
115
|
+
getAppAccountsRaw(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppAccountsView>>;
|
|
116
|
+
/**
|
|
117
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
118
|
+
* Get App Accounts
|
|
119
|
+
*/
|
|
120
|
+
getAppAccounts(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppAccountsView>;
|
|
89
121
|
/**
|
|
90
122
|
* List Agent Apps
|
|
91
123
|
*/
|
|
@@ -94,6 +126,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
94
126
|
* List Agent Apps
|
|
95
127
|
*/
|
|
96
128
|
listAgentApps(requestParameters: ListAgentAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageAppView>;
|
|
129
|
+
/**
|
|
130
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
131
|
+
* List App Resources
|
|
132
|
+
*/
|
|
133
|
+
listAppResourcesRaw(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourcesView>>;
|
|
134
|
+
/**
|
|
135
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
136
|
+
* List App Resources
|
|
137
|
+
*/
|
|
138
|
+
listAppResources(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourcesView>;
|
|
97
139
|
/**
|
|
98
140
|
* List the MCP tools for one connector. ``integration_id`` accepts the same slug-or-ULID forms as :func:`connect_app`. The FE holds ``AppResource.id`` (the MCP ULID) from ``GET /v2/apps`` and passes it here. Visibility is the catalog list — unknown or out-of-scope ids are a validation error, not a gateway 404, so a caller cannot probe ids they cannot see. Raises: ChatServiceError: - CHAT_VALIDATION: unknown or out-of-scope integration - CHAT_UPSTREAM: gateway / mcp-gateway failure
|
|
99
141
|
* List App Tools
|
package/dist/apis/AppsApi.js
CHANGED
|
@@ -53,6 +53,45 @@ class AppsApi extends runtime.BaseAPI {
|
|
|
53
53
|
async bindApp(requestParameters, initOverrides) {
|
|
54
54
|
await this.bindAppRaw(requestParameters, initOverrides);
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
58
|
+
* Check App Resource
|
|
59
|
+
*/
|
|
60
|
+
async checkAppResourceRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['integrationId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling checkAppResource().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['namespace'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling checkAppResource().');
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['name'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling checkAppResource().');
|
|
69
|
+
}
|
|
70
|
+
const queryParameters = {};
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
73
|
+
const token = this.configuration.accessToken;
|
|
74
|
+
const tokenString = await token("bearerAuth", []);
|
|
75
|
+
if (tokenString) {
|
|
76
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const response = await this.request({
|
|
80
|
+
path: `/v1/apps/{integrationId}/resources/{namespace}/{name}`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])).replace(`{${"namespace"}}`, runtime.encodePathParam('namespace', requestParameters['namespace'])).replace(`{${"name"}}`, runtime.encodePathParam('name', requestParameters['name'])),
|
|
81
|
+
method: 'GET',
|
|
82
|
+
headers: headerParameters,
|
|
83
|
+
query: queryParameters,
|
|
84
|
+
}, initOverrides);
|
|
85
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.AppResourceCheckViewFromJSON)(jsonValue));
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
89
|
+
* Check App Resource
|
|
90
|
+
*/
|
|
91
|
+
async checkAppResource(requestParameters, initOverrides) {
|
|
92
|
+
const response = await this.checkAppResourceRaw(requestParameters, initOverrides);
|
|
93
|
+
return await response.value();
|
|
94
|
+
}
|
|
56
95
|
/**
|
|
57
96
|
* Start the OAuth connect flow for a connector. ``integration_id`` accepts either the human slug (``github``, ``composio-notion``) or the MCP ULID (``01MCPGH…``) — the database id. Resolution matches on both (see :func:`_resolve_mcp`). The ULID is the preferred identifier: it is what ``GET /v1/apps`` returns as ``mcpId`` and what ``GET /v2/apps`` returns as ``id``, so a caller that already holds the connector row never needs to resolve a slug.
|
|
58
97
|
* Connect App
|
|
@@ -157,6 +196,39 @@ class AppsApi extends runtime.BaseAPI {
|
|
|
157
196
|
async disconnectApp(requestParameters, initOverrides) {
|
|
158
197
|
await this.disconnectAppRaw(requestParameters, initOverrides);
|
|
159
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
201
|
+
* Get App Accounts
|
|
202
|
+
*/
|
|
203
|
+
async getAppAccountsRaw(requestParameters, initOverrides) {
|
|
204
|
+
if (requestParameters['integrationId'] == null) {
|
|
205
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling getAppAccounts().');
|
|
206
|
+
}
|
|
207
|
+
const queryParameters = {};
|
|
208
|
+
const headerParameters = {};
|
|
209
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
210
|
+
const token = this.configuration.accessToken;
|
|
211
|
+
const tokenString = await token("bearerAuth", []);
|
|
212
|
+
if (tokenString) {
|
|
213
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const response = await this.request({
|
|
217
|
+
path: `/v1/apps/{integrationId}/accounts`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
|
|
218
|
+
method: 'GET',
|
|
219
|
+
headers: headerParameters,
|
|
220
|
+
query: queryParameters,
|
|
221
|
+
}, initOverrides);
|
|
222
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.AppAccountsViewFromJSON)(jsonValue));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
226
|
+
* Get App Accounts
|
|
227
|
+
*/
|
|
228
|
+
async getAppAccounts(requestParameters, initOverrides) {
|
|
229
|
+
const response = await this.getAppAccountsRaw(requestParameters, initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
160
232
|
/**
|
|
161
233
|
* List Agent Apps
|
|
162
234
|
*/
|
|
@@ -188,6 +260,42 @@ class AppsApi extends runtime.BaseAPI {
|
|
|
188
260
|
const response = await this.listAgentAppsRaw(requestParameters, initOverrides);
|
|
189
261
|
return await response.value();
|
|
190
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
265
|
+
* List App Resources
|
|
266
|
+
*/
|
|
267
|
+
async listAppResourcesRaw(requestParameters, initOverrides) {
|
|
268
|
+
if (requestParameters['integrationId'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling listAppResources().');
|
|
270
|
+
}
|
|
271
|
+
const queryParameters = {};
|
|
272
|
+
if (requestParameters['q'] != null) {
|
|
273
|
+
queryParameters['q'] = requestParameters['q'];
|
|
274
|
+
}
|
|
275
|
+
const headerParameters = {};
|
|
276
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
+
const token = this.configuration.accessToken;
|
|
278
|
+
const tokenString = await token("bearerAuth", []);
|
|
279
|
+
if (tokenString) {
|
|
280
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const response = await this.request({
|
|
284
|
+
path: `/v1/apps/{integrationId}/resources`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
|
|
285
|
+
method: 'GET',
|
|
286
|
+
headers: headerParameters,
|
|
287
|
+
query: queryParameters,
|
|
288
|
+
}, initOverrides);
|
|
289
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.AppResourcesViewFromJSON)(jsonValue));
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
293
|
+
* List App Resources
|
|
294
|
+
*/
|
|
295
|
+
async listAppResources(requestParameters, initOverrides) {
|
|
296
|
+
const response = await this.listAppResourcesRaw(requestParameters, initOverrides);
|
|
297
|
+
return await response.value();
|
|
298
|
+
}
|
|
191
299
|
/**
|
|
192
300
|
* List the MCP tools for one connector. ``integration_id`` accepts the same slug-or-ULID forms as :func:`connect_app`. The FE holds ``AppResource.id`` (the MCP ULID) from ``GET /v2/apps`` and passes it here. Visibility is the catalog list — unknown or out-of-scope ids are a validation error, not a gateway 404, so a caller cannot probe ids they cannot see. Raises: ChatServiceError: - CHAT_VALIDATION: unknown or out-of-scope integration - CHAT_UPSTREAM: gateway / mcp-gateway failure
|
|
193
301
|
* List App Tools
|
|
@@ -10,10 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { ArtifactResponse, CommitBody, ConversationArtifactsResponse, DownloadUrlResponse, ExportBody, ExportResponse, UploadUrlBody, UploadUrlResponse } from '../models/index.js';
|
|
13
|
+
import type { ArtifactResponse, ArtifactVersionResponse, CommitBody, ConversationArtifactsResponse, DownloadUrlResponse, ExportBody, ExportResponse, UploadUrlBody, UploadUrlResponse, VersionCommitBody, VersionUploadUrlBody } from '../models/index.js';
|
|
14
14
|
export interface CommitArtifactRequest {
|
|
15
15
|
commitBody: CommitBody;
|
|
16
16
|
}
|
|
17
|
+
export interface CommitVersionRequest {
|
|
18
|
+
conversationId: string;
|
|
19
|
+
artifactId: string;
|
|
20
|
+
versionCommitBody: VersionCommitBody;
|
|
21
|
+
}
|
|
17
22
|
export interface DeleteArtifactRequest {
|
|
18
23
|
conversationId: string;
|
|
19
24
|
artifactId: string;
|
|
@@ -35,6 +40,11 @@ export interface ListConversationArtifactsRequest {
|
|
|
35
40
|
export interface MintUploadUrlRequest {
|
|
36
41
|
uploadUrlBody: UploadUrlBody;
|
|
37
42
|
}
|
|
43
|
+
export interface MintVersionUploadUrlRequest {
|
|
44
|
+
conversationId: string;
|
|
45
|
+
artifactId: string;
|
|
46
|
+
versionUploadUrlBody: VersionUploadUrlBody;
|
|
47
|
+
}
|
|
38
48
|
/**
|
|
39
49
|
*
|
|
40
50
|
*/
|
|
@@ -47,6 +57,16 @@ export declare class ArtifactsApi extends runtime.BaseAPI {
|
|
|
47
57
|
* Commit Artifact Route
|
|
48
58
|
*/
|
|
49
59
|
commitArtifact(requestParameters: CommitArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ArtifactResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Save a staged edit of ``artifact_id`` as the next version of the same file. Writes no message: the new version reaches clients through the artifact list (``GET /v1/conversations/:id/artifacts``) and the agent through ``/scratch/saved/<name>``.
|
|
62
|
+
* Commit Version Route
|
|
63
|
+
*/
|
|
64
|
+
commitVersionRaw(requestParameters: CommitVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ArtifactVersionResponse>>;
|
|
65
|
+
/**
|
|
66
|
+
* Save a staged edit of ``artifact_id`` as the next version of the same file. Writes no message: the new version reaches clients through the artifact list (``GET /v1/conversations/:id/artifacts``) and the agent through ``/scratch/saved/<name>``.
|
|
67
|
+
* Commit Version Route
|
|
68
|
+
*/
|
|
69
|
+
commitVersion(requestParameters: CommitVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ArtifactVersionResponse>;
|
|
50
70
|
/**
|
|
51
71
|
* Detach a file the user removed from a composer before sending. Uploads commit on attach, so a removed chip would otherwise leave a committed artifact nobody references: invisible in the UI (both panes derive from messages) but real in storage, and never TTL\'d because user uploads are PERSISTENT. The gateway hard-deletes the blob and soft-deletes the row. ``conversation_id`` is an ownership gate, not artifact scoping: the gateway authorizes on ``(tenant_id, owner_user_id)`` and never checks that the artifact belongs to this conversation. That is sound because a caller can only ever delete artifacts they uploaded themselves, but it does mean this route will happily delete a caller\'s artifact via any conversation they own. Deleting the file also withdraws every link to it. The share rows would otherwise outlive the blob: the viewer\'s resolve already fails safe (the gateway 404s on a soft-deleted artefact, and the public route answers 404), but the **owner** would keep seeing live links in their share dialog for a file that no longer exists, and could re-scope or copy one. This is the only writer of ``revoked_reason = \'artifact_deleted\'``, which is what distinguishes \"the file went away\" from \"someone unshared it\" in an audit.
|
|
52
72
|
* Delete Artifact Route
|
|
@@ -93,6 +113,16 @@ export declare class ArtifactsApi extends runtime.BaseAPI {
|
|
|
93
113
|
* Mint Upload Url Route
|
|
94
114
|
*/
|
|
95
115
|
mintUploadUrl(requestParameters: MintUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadUrlResponse>;
|
|
116
|
+
/**
|
|
117
|
+
* Presign the PUT for a user\'s edit of ``artifact_id``, saved as its next version. ``artifact_id`` is the version the client edited. 409 ``CHAT_CONFLICT`` (``details[0].latest_artifact_id`` / ``latest_version``) when a newer one has landed; 422 when the artifact has no version chain (uploads, exports).
|
|
118
|
+
* Mint Version Upload Url Route
|
|
119
|
+
*/
|
|
120
|
+
mintVersionUploadUrlRaw(requestParameters: MintVersionUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadUrlResponse>>;
|
|
121
|
+
/**
|
|
122
|
+
* Presign the PUT for a user\'s edit of ``artifact_id``, saved as its next version. ``artifact_id`` is the version the client edited. 409 ``CHAT_CONFLICT`` (``details[0].latest_artifact_id`` / ``latest_version``) when a newer one has landed; 422 when the artifact has no version chain (uploads, exports).
|
|
123
|
+
* Mint Version Upload Url Route
|
|
124
|
+
*/
|
|
125
|
+
mintVersionUploadUrl(requestParameters: MintVersionUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadUrlResponse>;
|
|
96
126
|
}
|
|
97
127
|
/**
|
|
98
128
|
* @export
|
|
@@ -53,6 +53,47 @@ class ArtifactsApi extends runtime.BaseAPI {
|
|
|
53
53
|
const response = await this.commitArtifactRaw(requestParameters, initOverrides);
|
|
54
54
|
return await response.value();
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Save a staged edit of ``artifact_id`` as the next version of the same file. Writes no message: the new version reaches clients through the artifact list (``GET /v1/conversations/:id/artifacts``) and the agent through ``/scratch/saved/<name>``.
|
|
58
|
+
* Commit Version Route
|
|
59
|
+
*/
|
|
60
|
+
async commitVersionRaw(requestParameters, initOverrides) {
|
|
61
|
+
if (requestParameters['conversationId'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling commitVersion().');
|
|
63
|
+
}
|
|
64
|
+
if (requestParameters['artifactId'] == null) {
|
|
65
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling commitVersion().');
|
|
66
|
+
}
|
|
67
|
+
if (requestParameters['versionCommitBody'] == null) {
|
|
68
|
+
throw new runtime.RequiredError('versionCommitBody', 'Required parameter "versionCommitBody" was null or undefined when calling commitVersion().');
|
|
69
|
+
}
|
|
70
|
+
const queryParameters = {};
|
|
71
|
+
const headerParameters = {};
|
|
72
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
74
|
+
const token = this.configuration.accessToken;
|
|
75
|
+
const tokenString = await token("bearerAuth", []);
|
|
76
|
+
if (tokenString) {
|
|
77
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const response = await this.request({
|
|
81
|
+
path: `/v1/conversations/{conversationId}/artifacts/{artifactId}/versions`.replace(`{${"conversationId"}}`, runtime.encodePathParam('conversationId', requestParameters['conversationId'])).replace(`{${"artifactId"}}`, runtime.encodePathParam('artifactId', requestParameters['artifactId'])),
|
|
82
|
+
method: 'POST',
|
|
83
|
+
headers: headerParameters,
|
|
84
|
+
query: queryParameters,
|
|
85
|
+
body: (0, index_js_1.VersionCommitBodyToJSON)(requestParameters['versionCommitBody']),
|
|
86
|
+
}, initOverrides);
|
|
87
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.ArtifactVersionResponseFromJSON)(jsonValue));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Save a staged edit of ``artifact_id`` as the next version of the same file. Writes no message: the new version reaches clients through the artifact list (``GET /v1/conversations/:id/artifacts``) and the agent through ``/scratch/saved/<name>``.
|
|
91
|
+
* Commit Version Route
|
|
92
|
+
*/
|
|
93
|
+
async commitVersion(requestParameters, initOverrides) {
|
|
94
|
+
const response = await this.commitVersionRaw(requestParameters, initOverrides);
|
|
95
|
+
return await response.value();
|
|
96
|
+
}
|
|
56
97
|
/**
|
|
57
98
|
* Detach a file the user removed from a composer before sending. Uploads commit on attach, so a removed chip would otherwise leave a committed artifact nobody references: invisible in the UI (both panes derive from messages) but real in storage, and never TTL\'d because user uploads are PERSISTENT. The gateway hard-deletes the blob and soft-deletes the row. ``conversation_id`` is an ownership gate, not artifact scoping: the gateway authorizes on ``(tenant_id, owner_user_id)`` and never checks that the artifact belongs to this conversation. That is sound because a caller can only ever delete artifacts they uploaded themselves, but it does mean this route will happily delete a caller\'s artifact via any conversation they own. Deleting the file also withdraws every link to it. The share rows would otherwise outlive the blob: the viewer\'s resolve already fails safe (the gateway 404s on a soft-deleted artefact, and the public route answers 404), but the **owner** would keep seeing live links in their share dialog for a file that no longer exists, and could re-scope or copy one. This is the only writer of ``revoked_reason = \'artifact_deleted\'``, which is what distinguishes \"the file went away\" from \"someone unshared it\" in an audit.
|
|
58
99
|
* Delete Artifact Route
|
|
@@ -235,6 +276,47 @@ class ArtifactsApi extends runtime.BaseAPI {
|
|
|
235
276
|
const response = await this.mintUploadUrlRaw(requestParameters, initOverrides);
|
|
236
277
|
return await response.value();
|
|
237
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Presign the PUT for a user\'s edit of ``artifact_id``, saved as its next version. ``artifact_id`` is the version the client edited. 409 ``CHAT_CONFLICT`` (``details[0].latest_artifact_id`` / ``latest_version``) when a newer one has landed; 422 when the artifact has no version chain (uploads, exports).
|
|
281
|
+
* Mint Version Upload Url Route
|
|
282
|
+
*/
|
|
283
|
+
async mintVersionUploadUrlRaw(requestParameters, initOverrides) {
|
|
284
|
+
if (requestParameters['conversationId'] == null) {
|
|
285
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling mintVersionUploadUrl().');
|
|
286
|
+
}
|
|
287
|
+
if (requestParameters['artifactId'] == null) {
|
|
288
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling mintVersionUploadUrl().');
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['versionUploadUrlBody'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('versionUploadUrlBody', 'Required parameter "versionUploadUrlBody" was null or undefined when calling mintVersionUploadUrl().');
|
|
292
|
+
}
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
296
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
297
|
+
const token = this.configuration.accessToken;
|
|
298
|
+
const tokenString = await token("bearerAuth", []);
|
|
299
|
+
if (tokenString) {
|
|
300
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
const response = await this.request({
|
|
304
|
+
path: `/v1/conversations/{conversationId}/artifacts/{artifactId}/versions/upload-url`.replace(`{${"conversationId"}}`, runtime.encodePathParam('conversationId', requestParameters['conversationId'])).replace(`{${"artifactId"}}`, runtime.encodePathParam('artifactId', requestParameters['artifactId'])),
|
|
305
|
+
method: 'POST',
|
|
306
|
+
headers: headerParameters,
|
|
307
|
+
query: queryParameters,
|
|
308
|
+
body: (0, index_js_1.VersionUploadUrlBodyToJSON)(requestParameters['versionUploadUrlBody']),
|
|
309
|
+
}, initOverrides);
|
|
310
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.UploadUrlResponseFromJSON)(jsonValue));
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Presign the PUT for a user\'s edit of ``artifact_id``, saved as its next version. ``artifact_id`` is the version the client edited. 409 ``CHAT_CONFLICT`` (``details[0].latest_artifact_id`` / ``latest_version``) when a newer one has landed; 422 when the artifact has no version chain (uploads, exports).
|
|
314
|
+
* Mint Version Upload Url Route
|
|
315
|
+
*/
|
|
316
|
+
async mintVersionUploadUrl(requestParameters, initOverrides) {
|
|
317
|
+
const response = await this.mintVersionUploadUrlRaw(requestParameters, initOverrides);
|
|
318
|
+
return await response.value();
|
|
319
|
+
}
|
|
238
320
|
}
|
|
239
321
|
exports.ArtifactsApi = ArtifactsApi;
|
|
240
322
|
/**
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sarvam Agents API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
* Contact: support@sarvam.ai
|
|
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.js';
|
|
13
|
+
import type { AgentCustomApiList, BindCustomApiBody, CustomApi, CustomApiCreate, CustomApiList, CustomApiUpdate, Scope } from '../models/index.js';
|
|
14
|
+
export interface BindCustomApiRequest {
|
|
15
|
+
agentId: string;
|
|
16
|
+
bindCustomApiBody: BindCustomApiBody;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateCustomApiRequest {
|
|
19
|
+
customApiCreate: CustomApiCreate;
|
|
20
|
+
}
|
|
21
|
+
export interface DeleteCustomApiRequest {
|
|
22
|
+
customApiId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetCustomApiRequest {
|
|
25
|
+
customApiId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ListAgentCustomApisRequest {
|
|
28
|
+
agentId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ListCustomApisRequest {
|
|
31
|
+
scope?: Scope | null;
|
|
32
|
+
q?: string | null;
|
|
33
|
+
limit?: number;
|
|
34
|
+
offset?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface UnbindCustomApiRequest {
|
|
37
|
+
agentId: string;
|
|
38
|
+
customApiId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface UpdateCustomApiRequest {
|
|
41
|
+
customApiId: string;
|
|
42
|
+
customApiUpdate: CustomApiUpdate;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export declare class CustomAPIsApi extends runtime.BaseAPI {
|
|
48
|
+
/**
|
|
49
|
+
* Attach one of the caller\'s own Custom APIs to an agent they own.
|
|
50
|
+
* Bind Custom Api
|
|
51
|
+
*/
|
|
52
|
+
bindCustomApiRaw(requestParameters: BindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
53
|
+
/**
|
|
54
|
+
* Attach one of the caller\'s own Custom APIs to an agent they own.
|
|
55
|
+
* Bind Custom Api
|
|
56
|
+
*/
|
|
57
|
+
bindCustomApi(requestParameters: BindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Create a Custom API; with ``enabledForChats`` (default) it is also attached to the caller\'s personal chats. Never attached to other agents. If that attach hits the personal-chat rules, the API is still saved, disabled, with ``enabledForChatsError`` saying why.
|
|
60
|
+
* Create Custom Api
|
|
61
|
+
*/
|
|
62
|
+
createCustomApiRaw(requestParameters: CreateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>>;
|
|
63
|
+
/**
|
|
64
|
+
* Create a Custom API; with ``enabledForChats`` (default) it is also attached to the caller\'s personal chats. Never attached to other agents. If that attach hits the personal-chat rules, the API is still saved, disabled, with ``enabledForChatsError`` saying why.
|
|
65
|
+
* Create Custom Api
|
|
66
|
+
*/
|
|
67
|
+
createCustomApi(requestParameters: CreateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi>;
|
|
68
|
+
/**
|
|
69
|
+
* Delete the API and every attachment (agents and personal chats).
|
|
70
|
+
* Delete Custom Api
|
|
71
|
+
*/
|
|
72
|
+
deleteCustomApiRaw(requestParameters: DeleteCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete the API and every attachment (agents and personal chats).
|
|
75
|
+
* Delete Custom Api
|
|
76
|
+
*/
|
|
77
|
+
deleteCustomApi(requestParameters: DeleteCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Get Custom Api
|
|
80
|
+
*/
|
|
81
|
+
getCustomApiRaw(requestParameters: GetCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>>;
|
|
82
|
+
/**
|
|
83
|
+
* Get Custom Api
|
|
84
|
+
*/
|
|
85
|
+
getCustomApi(requestParameters: GetCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi>;
|
|
86
|
+
/**
|
|
87
|
+
* Names of the Custom APIs attached to an agent — for any viewer of it. The host is filled only for the caller\'s own APIs.
|
|
88
|
+
* List Agent Custom Apis
|
|
89
|
+
*/
|
|
90
|
+
listAgentCustomApisRaw(requestParameters: ListAgentCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentCustomApiList>>;
|
|
91
|
+
/**
|
|
92
|
+
* Names of the Custom APIs attached to an agent — for any viewer of it. The host is filled only for the caller\'s own APIs.
|
|
93
|
+
* List Agent Custom Apis
|
|
94
|
+
*/
|
|
95
|
+
listAgentCustomApis(requestParameters: ListAgentCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentCustomApiList>;
|
|
96
|
+
/**
|
|
97
|
+
* The caller\'s own Custom APIs, newest first. ``q`` matches name, description or host; ``scope`` is ignored (the list is owner-only).
|
|
98
|
+
* List Custom Apis
|
|
99
|
+
*/
|
|
100
|
+
listCustomApisRaw(requestParameters: ListCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApiList>>;
|
|
101
|
+
/**
|
|
102
|
+
* The caller\'s own Custom APIs, newest first. ``q`` matches name, description or host; ``scope`` is ignored (the list is owner-only).
|
|
103
|
+
* List Custom Apis
|
|
104
|
+
*/
|
|
105
|
+
listCustomApis(requestParameters?: ListCustomApisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApiList>;
|
|
106
|
+
/**
|
|
107
|
+
* Unbind Custom Api
|
|
108
|
+
*/
|
|
109
|
+
unbindCustomApiRaw(requestParameters: UnbindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
110
|
+
/**
|
|
111
|
+
* Unbind Custom Api
|
|
112
|
+
*/
|
|
113
|
+
unbindCustomApi(requestParameters: UnbindCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Edit details and/or replace credentials. Attachments are kept.
|
|
116
|
+
* Update Custom Api
|
|
117
|
+
*/
|
|
118
|
+
updateCustomApiRaw(requestParameters: UpdateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomApi>>;
|
|
119
|
+
/**
|
|
120
|
+
* Edit details and/or replace credentials. Attachments are kept.
|
|
121
|
+
* Update Custom Api
|
|
122
|
+
*/
|
|
123
|
+
updateCustomApi(requestParameters: UpdateCustomApiRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomApi>;
|
|
124
|
+
}
|