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
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AppResourceView
|
|
20
|
+
*/
|
|
21
|
+
export interface AppResourceView {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AppResourceView
|
|
26
|
+
*/
|
|
27
|
+
displayName: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AppResourceView
|
|
32
|
+
*/
|
|
33
|
+
namespace: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AppResourceView
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof AppResourceView
|
|
44
|
+
*/
|
|
45
|
+
_private: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof AppResourceView
|
|
50
|
+
*/
|
|
51
|
+
resourceId: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof AppResourceView
|
|
56
|
+
*/
|
|
57
|
+
ownerId: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof AppResourceView
|
|
62
|
+
*/
|
|
63
|
+
accountId: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the AppResourceView interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfAppResourceView(value: object): value is AppResourceView {
|
|
70
|
+
if (!('displayName' in value) || value['displayName'] === undefined) return false;
|
|
71
|
+
if (!('namespace' in value) || value['namespace'] === undefined) return false;
|
|
72
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
73
|
+
if (!('_private' in value) || value['_private'] === undefined) return false;
|
|
74
|
+
if (!('resourceId' in value) || value['resourceId'] === undefined) return false;
|
|
75
|
+
if (!('ownerId' in value) || value['ownerId'] === undefined) return false;
|
|
76
|
+
if (!('accountId' in value) || value['accountId'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function AppResourceViewFromJSON(json: any): AppResourceView {
|
|
81
|
+
return AppResourceViewFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function AppResourceViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppResourceView {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'displayName': json['displayName'],
|
|
91
|
+
'namespace': json['namespace'],
|
|
92
|
+
'name': json['name'],
|
|
93
|
+
'_private': json['private'],
|
|
94
|
+
'resourceId': json['resourceId'],
|
|
95
|
+
'ownerId': json['ownerId'],
|
|
96
|
+
'accountId': json['accountId'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function AppResourceViewToJSON(json: any): AppResourceView {
|
|
101
|
+
return AppResourceViewToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function AppResourceViewToJSONTyped(value?: AppResourceView | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'displayName': value['displayName'],
|
|
112
|
+
'namespace': value['namespace'],
|
|
113
|
+
'name': value['name'],
|
|
114
|
+
'private': value['_private'],
|
|
115
|
+
'resourceId': value['resourceId'],
|
|
116
|
+
'ownerId': value['ownerId'],
|
|
117
|
+
'accountId': value['accountId'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { AppResourceView } from './AppResourceView.js';
|
|
17
|
+
import {
|
|
18
|
+
AppResourceViewFromJSON,
|
|
19
|
+
AppResourceViewFromJSONTyped,
|
|
20
|
+
AppResourceViewToJSON,
|
|
21
|
+
AppResourceViewToJSONTyped,
|
|
22
|
+
} from './AppResourceView.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* ``GET /v1/apps/{integration_id}/resources`` — resources in the caller's accounts.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AppResourcesView
|
|
28
|
+
*/
|
|
29
|
+
export interface AppResourcesView {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AppResourcesView
|
|
34
|
+
*/
|
|
35
|
+
connection: AppResourcesViewConnectionEnum;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<AppResourceView>}
|
|
39
|
+
* @memberof AppResourcesView
|
|
40
|
+
*/
|
|
41
|
+
resources?: Array<AppResourceView>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof AppResourcesView
|
|
46
|
+
*/
|
|
47
|
+
truncated?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const AppResourcesViewConnectionEnum = {
|
|
55
|
+
Connected: 'connected',
|
|
56
|
+
NotConnected: 'not_connected',
|
|
57
|
+
ReconnectRequired: 'reconnect_required'
|
|
58
|
+
} as const;
|
|
59
|
+
export type AppResourcesViewConnectionEnum = typeof AppResourcesViewConnectionEnum[keyof typeof AppResourcesViewConnectionEnum];
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the AppResourcesView interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfAppResourcesView(value: object): value is AppResourcesView {
|
|
66
|
+
if (!('connection' in value) || value['connection'] === undefined) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function AppResourcesViewFromJSON(json: any): AppResourcesView {
|
|
71
|
+
return AppResourcesViewFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function AppResourcesViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppResourcesView {
|
|
75
|
+
if (json == null) {
|
|
76
|
+
return json;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'connection': json['connection'],
|
|
81
|
+
'resources': json['resources'] == null ? undefined : ((json['resources'] as Array<any>).map(AppResourceViewFromJSON)),
|
|
82
|
+
'truncated': json['truncated'] == null ? undefined : json['truncated'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function AppResourcesViewToJSON(json: any): AppResourcesView {
|
|
87
|
+
return AppResourcesViewToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function AppResourcesViewToJSONTyped(value?: AppResourcesView | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'connection': value['connection'],
|
|
98
|
+
'resources': value['resources'] == null ? undefined : ((value['resources'] as Array<any>).map(AppResourceViewToJSON)),
|
|
99
|
+
'truncated': value['truncated'],
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -51,6 +51,18 @@ export interface AppToolsResponse {
|
|
|
51
51
|
* @memberof AppToolsResponse
|
|
52
52
|
*/
|
|
53
53
|
tools: Array<AppToolView>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {{ [key: string]: any; }}
|
|
57
|
+
* @memberof AppToolsResponse
|
|
58
|
+
*/
|
|
59
|
+
security?: { [key: string]: any; } | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof AppToolsResponse
|
|
64
|
+
*/
|
|
65
|
+
trust?: string | null;
|
|
54
66
|
}
|
|
55
67
|
|
|
56
68
|
|
|
@@ -90,6 +102,8 @@ export function AppToolsResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
90
102
|
'name': json['name'],
|
|
91
103
|
'authStatus': json['authStatus'],
|
|
92
104
|
'tools': ((json['tools'] as Array<any>).map(AppToolViewFromJSON)),
|
|
105
|
+
'security': json['security'] == null ? undefined : json['security'],
|
|
106
|
+
'trust': json['trust'] == null ? undefined : json['trust'],
|
|
93
107
|
};
|
|
94
108
|
}
|
|
95
109
|
|
|
@@ -108,6 +122,8 @@ export function AppToolsResponseToJSONTyped(value?: AppToolsResponse | null, ign
|
|
|
108
122
|
'name': value['name'],
|
|
109
123
|
'authStatus': value['authStatus'],
|
|
110
124
|
'tools': ((value['tools'] as Array<any>).map(AppToolViewToJSON)),
|
|
125
|
+
'security': value['security'],
|
|
126
|
+
'trust': value['trust'],
|
|
111
127
|
};
|
|
112
128
|
}
|
|
113
129
|
|
package/src/models/AppView.ts
CHANGED
|
@@ -93,6 +93,48 @@ export interface AppView {
|
|
|
93
93
|
* @memberof AppView
|
|
94
94
|
*/
|
|
95
95
|
authType: AppViewAuthTypeEnum;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
* @memberof AppView
|
|
100
|
+
*/
|
|
101
|
+
setupRequired?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof AppView
|
|
106
|
+
*/
|
|
107
|
+
canEditSetup?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @memberof AppView
|
|
112
|
+
*/
|
|
113
|
+
orgWide?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @memberof AppView
|
|
118
|
+
*/
|
|
119
|
+
orgName?: string | null;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof AppView
|
|
124
|
+
*/
|
|
125
|
+
alreadyUsingUrl?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @type {boolean}
|
|
129
|
+
* @memberof AppView
|
|
130
|
+
*/
|
|
131
|
+
isManagedConnector?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @memberof AppView
|
|
136
|
+
*/
|
|
137
|
+
connectorMode?: string | null;
|
|
96
138
|
}
|
|
97
139
|
|
|
98
140
|
|
|
@@ -145,6 +187,13 @@ export function AppViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
|
|
|
145
187
|
'iconUrl': json['iconUrl'],
|
|
146
188
|
'category': json['category'] == null ? undefined : AppCategoryFromJSON(json['category']),
|
|
147
189
|
'authType': json['authType'],
|
|
190
|
+
'setupRequired': json['setupRequired'] == null ? undefined : json['setupRequired'],
|
|
191
|
+
'canEditSetup': json['canEditSetup'] == null ? undefined : json['canEditSetup'],
|
|
192
|
+
'orgWide': json['orgWide'] == null ? undefined : json['orgWide'],
|
|
193
|
+
'orgName': json['orgName'] == null ? undefined : json['orgName'],
|
|
194
|
+
'alreadyUsingUrl': json['alreadyUsingUrl'] == null ? undefined : json['alreadyUsingUrl'],
|
|
195
|
+
'isManagedConnector': json['isManagedConnector'] == null ? undefined : json['isManagedConnector'],
|
|
196
|
+
'connectorMode': json['connectorMode'] == null ? undefined : json['connectorMode'],
|
|
148
197
|
};
|
|
149
198
|
}
|
|
150
199
|
|
|
@@ -170,6 +219,13 @@ export function AppViewToJSONTyped(value?: AppView | null, ignoreDiscriminator:
|
|
|
170
219
|
'iconUrl': value['iconUrl'],
|
|
171
220
|
'category': AppCategoryToJSON(value['category']),
|
|
172
221
|
'authType': value['authType'],
|
|
222
|
+
'setupRequired': value['setupRequired'],
|
|
223
|
+
'canEditSetup': value['canEditSetup'],
|
|
224
|
+
'orgWide': value['orgWide'],
|
|
225
|
+
'orgName': value['orgName'],
|
|
226
|
+
'alreadyUsingUrl': value['alreadyUsingUrl'],
|
|
227
|
+
'isManagedConnector': value['isManagedConnector'],
|
|
228
|
+
'connectorMode': value['connectorMode'],
|
|
173
229
|
};
|
|
174
230
|
}
|
|
175
231
|
|
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ArtifactVersionResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ArtifactVersionResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ArtifactVersionResponse
|
|
26
|
+
*/
|
|
27
|
+
artifactId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ArtifactVersionResponse
|
|
32
|
+
*/
|
|
33
|
+
originalName: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ArtifactVersionResponse
|
|
38
|
+
*/
|
|
39
|
+
mimeType: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ArtifactVersionResponse
|
|
44
|
+
*/
|
|
45
|
+
sizeBytes: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ArtifactVersionResponse
|
|
50
|
+
*/
|
|
51
|
+
origin: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ArtifactVersionResponse
|
|
56
|
+
*/
|
|
57
|
+
kind?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof ArtifactVersionResponse
|
|
62
|
+
*/
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof ArtifactVersionResponse
|
|
68
|
+
*/
|
|
69
|
+
version?: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof ArtifactVersionResponse
|
|
74
|
+
*/
|
|
75
|
+
htmlStage?: ArtifactVersionResponseHtmlStageEnum | null;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof ArtifactVersionResponse
|
|
80
|
+
*/
|
|
81
|
+
created: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export const ArtifactVersionResponseHtmlStageEnum = {
|
|
89
|
+
Deck: 'deck',
|
|
90
|
+
Doc: 'doc'
|
|
91
|
+
} as const;
|
|
92
|
+
export type ArtifactVersionResponseHtmlStageEnum = typeof ArtifactVersionResponseHtmlStageEnum[keyof typeof ArtifactVersionResponseHtmlStageEnum];
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the ArtifactVersionResponse interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfArtifactVersionResponse(value: object): value is ArtifactVersionResponse {
|
|
99
|
+
if (!('artifactId' in value) || value['artifactId'] === undefined) return false;
|
|
100
|
+
if (!('originalName' in value) || value['originalName'] === undefined) return false;
|
|
101
|
+
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
102
|
+
if (!('sizeBytes' in value) || value['sizeBytes'] === undefined) return false;
|
|
103
|
+
if (!('origin' in value) || value['origin'] === undefined) return false;
|
|
104
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
105
|
+
if (!('created' in value) || value['created'] === undefined) return false;
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function ArtifactVersionResponseFromJSON(json: any): ArtifactVersionResponse {
|
|
110
|
+
return ArtifactVersionResponseFromJSONTyped(json, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function ArtifactVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactVersionResponse {
|
|
114
|
+
if (json == null) {
|
|
115
|
+
return json;
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
|
|
119
|
+
'artifactId': json['artifactId'],
|
|
120
|
+
'originalName': json['originalName'],
|
|
121
|
+
'mimeType': json['mimeType'],
|
|
122
|
+
'sizeBytes': json['sizeBytes'],
|
|
123
|
+
'origin': json['origin'],
|
|
124
|
+
'kind': json['kind'] == null ? undefined : json['kind'],
|
|
125
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
126
|
+
'version': json['version'] == null ? undefined : json['version'],
|
|
127
|
+
'htmlStage': json['htmlStage'] == null ? undefined : json['htmlStage'],
|
|
128
|
+
'created': json['created'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function ArtifactVersionResponseToJSON(json: any): ArtifactVersionResponse {
|
|
133
|
+
return ArtifactVersionResponseToJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function ArtifactVersionResponseToJSONTyped(value?: ArtifactVersionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
137
|
+
if (value == null) {
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
|
|
143
|
+
'artifactId': value['artifactId'],
|
|
144
|
+
'originalName': value['originalName'],
|
|
145
|
+
'mimeType': value['mimeType'],
|
|
146
|
+
'sizeBytes': value['sizeBytes'],
|
|
147
|
+
'origin': value['origin'],
|
|
148
|
+
'kind': value['kind'],
|
|
149
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
150
|
+
'version': value['version'],
|
|
151
|
+
'htmlStage': value['htmlStage'],
|
|
152
|
+
'created': value['created'],
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
@@ -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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AttachedAgent
|
|
20
|
+
*/
|
|
21
|
+
export interface AttachedAgent {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AttachedAgent
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AttachedAgent
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AttachedAgent
|
|
38
|
+
*/
|
|
39
|
+
description?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the AttachedAgent interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfAttachedAgent(value: object): value is AttachedAgent {
|
|
46
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function AttachedAgentFromJSON(json: any): AttachedAgent {
|
|
52
|
+
return AttachedAgentFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function AttachedAgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttachedAgent {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'id': json['id'],
|
|
62
|
+
'name': json['name'],
|
|
63
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function AttachedAgentToJSON(json: any): AttachedAgent {
|
|
68
|
+
return AttachedAgentToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function AttachedAgentToJSONTyped(value?: AttachedAgent | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'id': value['id'],
|
|
79
|
+
'name': value['name'],
|
|
80
|
+
'description': value['description'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
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 type { CustomApiBasicAuth } from './CustomApiBasicAuth.js';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfCustomApiBasicAuth,
|
|
18
|
+
CustomApiBasicAuthFromJSON,
|
|
19
|
+
CustomApiBasicAuthFromJSONTyped,
|
|
20
|
+
CustomApiBasicAuthToJSON,
|
|
21
|
+
} from './CustomApiBasicAuth.js';
|
|
22
|
+
import type { CustomApiBearerAuth } from './CustomApiBearerAuth.js';
|
|
23
|
+
import {
|
|
24
|
+
instanceOfCustomApiBearerAuth,
|
|
25
|
+
CustomApiBearerAuthFromJSON,
|
|
26
|
+
CustomApiBearerAuthFromJSONTyped,
|
|
27
|
+
CustomApiBearerAuthToJSON,
|
|
28
|
+
} from './CustomApiBearerAuth.js';
|
|
29
|
+
import type { CustomApiHeadersAuth } from './CustomApiHeadersAuth.js';
|
|
30
|
+
import {
|
|
31
|
+
instanceOfCustomApiHeadersAuth,
|
|
32
|
+
CustomApiHeadersAuthFromJSON,
|
|
33
|
+
CustomApiHeadersAuthFromJSONTyped,
|
|
34
|
+
CustomApiHeadersAuthToJSON,
|
|
35
|
+
} from './CustomApiHeadersAuth.js';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type Auth
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
*/
|
|
42
|
+
export type Auth = { type: 'basic' } & CustomApiBasicAuth | { type: 'bearer' } & CustomApiBearerAuth | { type: 'headers' } & CustomApiHeadersAuth;
|
|
43
|
+
|
|
44
|
+
export function AuthFromJSON(json: any): Auth {
|
|
45
|
+
return AuthFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function AuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): Auth {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
switch (json['type']) {
|
|
53
|
+
case 'basic':
|
|
54
|
+
return Object.assign({}, CustomApiBasicAuthFromJSONTyped(json, true), { type: 'basic' } as const);
|
|
55
|
+
case 'bearer':
|
|
56
|
+
return Object.assign({}, CustomApiBearerAuthFromJSONTyped(json, true), { type: 'bearer' } as const);
|
|
57
|
+
case 'headers':
|
|
58
|
+
return Object.assign({}, CustomApiHeadersAuthFromJSONTyped(json, true), { type: 'headers' } as const);
|
|
59
|
+
default:
|
|
60
|
+
throw new Error(`No variant of Auth exists with 'type=${json['type']}'`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function AuthToJSON(json: any): any {
|
|
65
|
+
return AuthToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function AuthToJSONTyped(value?: Auth | null, ignoreDiscriminator: boolean = false): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
switch (value['type']) {
|
|
73
|
+
case 'basic':
|
|
74
|
+
return Object.assign({}, CustomApiBasicAuthToJSON(value), { type: 'basic' } as const);
|
|
75
|
+
case 'bearer':
|
|
76
|
+
return Object.assign({}, CustomApiBearerAuthToJSON(value), { type: 'bearer' } as const);
|
|
77
|
+
case 'headers':
|
|
78
|
+
return Object.assign({}, CustomApiHeadersAuthToJSON(value), { type: 'headers' } as const);
|
|
79
|
+
default:
|
|
80
|
+
throw new Error(`No variant of Auth exists with 'type=${value['type']}'`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
|