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,66 @@
|
|
|
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 BindCustomApiBody
|
|
20
|
+
*/
|
|
21
|
+
export interface BindCustomApiBody {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof BindCustomApiBody
|
|
26
|
+
*/
|
|
27
|
+
customApiId: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the BindCustomApiBody interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfBindCustomApiBody(value: object): value is BindCustomApiBody {
|
|
34
|
+
if (!('customApiId' in value) || value['customApiId'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function BindCustomApiBodyFromJSON(json: any): BindCustomApiBody {
|
|
39
|
+
return BindCustomApiBodyFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function BindCustomApiBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): BindCustomApiBody {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'customApiId': json['customApiId'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function BindCustomApiBodyToJSON(json: any): BindCustomApiBody {
|
|
53
|
+
return BindCustomApiBodyToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function BindCustomApiBodyToJSONTyped(value?: BindCustomApiBody | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'customApiId': value['customApiId'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -67,8 +67,25 @@ export interface ConversationArtifact {
|
|
|
67
67
|
* @memberof ConversationArtifact
|
|
68
68
|
*/
|
|
69
69
|
version?: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof ConversationArtifact
|
|
74
|
+
*/
|
|
75
|
+
htmlStage?: ConversationArtifactHtmlStageEnum | null;
|
|
70
76
|
}
|
|
71
77
|
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const ConversationArtifactHtmlStageEnum = {
|
|
83
|
+
Deck: 'deck',
|
|
84
|
+
Doc: 'doc'
|
|
85
|
+
} as const;
|
|
86
|
+
export type ConversationArtifactHtmlStageEnum = typeof ConversationArtifactHtmlStageEnum[keyof typeof ConversationArtifactHtmlStageEnum];
|
|
87
|
+
|
|
88
|
+
|
|
72
89
|
/**
|
|
73
90
|
* Check if a given object implements the ConversationArtifact interface.
|
|
74
91
|
*/
|
|
@@ -100,6 +117,7 @@ export function ConversationArtifactFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
100
117
|
'kind': json['kind'] == null ? undefined : json['kind'],
|
|
101
118
|
'createdAt': (new Date(json['createdAt'])),
|
|
102
119
|
'version': json['version'] == null ? undefined : json['version'],
|
|
120
|
+
'htmlStage': json['htmlStage'] == null ? undefined : json['htmlStage'],
|
|
103
121
|
};
|
|
104
122
|
}
|
|
105
123
|
|
|
@@ -122,6 +140,7 @@ export function ConversationArtifactToJSONTyped(value?: ConversationArtifact | n
|
|
|
122
140
|
'kind': value['kind'],
|
|
123
141
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
124
142
|
'version': value['version'],
|
|
143
|
+
'htmlStage': value['htmlStage'],
|
|
125
144
|
};
|
|
126
145
|
}
|
|
127
146
|
|
|
@@ -0,0 +1,175 @@
|
|
|
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 { AttachedAgent } from './AttachedAgent.js';
|
|
17
|
+
import {
|
|
18
|
+
AttachedAgentFromJSON,
|
|
19
|
+
AttachedAgentFromJSONTyped,
|
|
20
|
+
AttachedAgentToJSON,
|
|
21
|
+
AttachedAgentToJSONTyped,
|
|
22
|
+
} from './AttachedAgent.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A Custom API as its owner sees it. Never carries a secret.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CustomApi
|
|
28
|
+
*/
|
|
29
|
+
export interface CustomApi {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CustomApi
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CustomApi
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CustomApi
|
|
46
|
+
*/
|
|
47
|
+
description: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CustomApi
|
|
52
|
+
*/
|
|
53
|
+
host: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof CustomApi
|
|
58
|
+
*/
|
|
59
|
+
authType: CustomApiAuthTypeEnum;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Array<string>}
|
|
63
|
+
* @memberof CustomApi
|
|
64
|
+
*/
|
|
65
|
+
headerNames: Array<string>;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof CustomApi
|
|
70
|
+
*/
|
|
71
|
+
enabledForChats: boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {Array<AttachedAgent>}
|
|
75
|
+
* @memberof CustomApi
|
|
76
|
+
*/
|
|
77
|
+
agents: Array<AttachedAgent>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof CustomApi
|
|
82
|
+
*/
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {Date}
|
|
87
|
+
* @memberof CustomApi
|
|
88
|
+
*/
|
|
89
|
+
credentialsUpdatedAt: Date;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof CustomApi
|
|
94
|
+
*/
|
|
95
|
+
enabledForChatsError?: string | null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @export
|
|
101
|
+
*/
|
|
102
|
+
export const CustomApiAuthTypeEnum = {
|
|
103
|
+
Bearer: 'bearer',
|
|
104
|
+
Basic: 'basic',
|
|
105
|
+
Headers: 'headers'
|
|
106
|
+
} as const;
|
|
107
|
+
export type CustomApiAuthTypeEnum = typeof CustomApiAuthTypeEnum[keyof typeof CustomApiAuthTypeEnum];
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Check if a given object implements the CustomApi interface.
|
|
112
|
+
*/
|
|
113
|
+
export function instanceOfCustomApi(value: object): value is CustomApi {
|
|
114
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
115
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
116
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
117
|
+
if (!('host' in value) || value['host'] === undefined) return false;
|
|
118
|
+
if (!('authType' in value) || value['authType'] === undefined) return false;
|
|
119
|
+
if (!('headerNames' in value) || value['headerNames'] === undefined) return false;
|
|
120
|
+
if (!('enabledForChats' in value) || value['enabledForChats'] === undefined) return false;
|
|
121
|
+
if (!('agents' in value) || value['agents'] === undefined) return false;
|
|
122
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
123
|
+
if (!('credentialsUpdatedAt' in value) || value['credentialsUpdatedAt'] === undefined) return false;
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function CustomApiFromJSON(json: any): CustomApi {
|
|
128
|
+
return CustomApiFromJSONTyped(json, false);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function CustomApiFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApi {
|
|
132
|
+
if (json == null) {
|
|
133
|
+
return json;
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
|
|
137
|
+
'id': json['id'],
|
|
138
|
+
'name': json['name'],
|
|
139
|
+
'description': json['description'],
|
|
140
|
+
'host': json['host'],
|
|
141
|
+
'authType': json['authType'],
|
|
142
|
+
'headerNames': json['headerNames'],
|
|
143
|
+
'enabledForChats': json['enabledForChats'],
|
|
144
|
+
'agents': ((json['agents'] as Array<any>).map(AttachedAgentFromJSON)),
|
|
145
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
146
|
+
'credentialsUpdatedAt': (new Date(json['credentialsUpdatedAt'])),
|
|
147
|
+
'enabledForChatsError': json['enabledForChatsError'] == null ? undefined : json['enabledForChatsError'],
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function CustomApiToJSON(json: any): CustomApi {
|
|
152
|
+
return CustomApiToJSONTyped(json, false);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function CustomApiToJSONTyped(value?: CustomApi | null, ignoreDiscriminator: boolean = false): any {
|
|
156
|
+
if (value == null) {
|
|
157
|
+
return value;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
|
|
162
|
+
'id': value['id'],
|
|
163
|
+
'name': value['name'],
|
|
164
|
+
'description': value['description'],
|
|
165
|
+
'host': value['host'],
|
|
166
|
+
'authType': value['authType'],
|
|
167
|
+
'headerNames': value['headerNames'],
|
|
168
|
+
'enabledForChats': value['enabledForChats'],
|
|
169
|
+
'agents': ((value['agents'] as Array<any>).map(AttachedAgentToJSON)),
|
|
170
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
171
|
+
'credentialsUpdatedAt': ((value['credentialsUpdatedAt']).toISOString()),
|
|
172
|
+
'enabledForChatsError': value['enabledForChatsError'],
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
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 CustomApiBasicAuth
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomApiBasicAuth {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CustomApiBasicAuth
|
|
26
|
+
*/
|
|
27
|
+
type: CustomApiBasicAuthTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CustomApiBasicAuth
|
|
32
|
+
*/
|
|
33
|
+
username: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CustomApiBasicAuth
|
|
38
|
+
*/
|
|
39
|
+
password: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const CustomApiBasicAuthTypeEnum = {
|
|
47
|
+
Basic: 'basic'
|
|
48
|
+
} as const;
|
|
49
|
+
export type CustomApiBasicAuthTypeEnum = typeof CustomApiBasicAuthTypeEnum[keyof typeof CustomApiBasicAuthTypeEnum];
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the CustomApiBasicAuth interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfCustomApiBasicAuth(value: object): value is CustomApiBasicAuth {
|
|
56
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
57
|
+
if (!('username' in value) || value['username'] === undefined) return false;
|
|
58
|
+
if (!('password' in value) || value['password'] === undefined) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CustomApiBasicAuthFromJSON(json: any): CustomApiBasicAuth {
|
|
63
|
+
return CustomApiBasicAuthFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CustomApiBasicAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiBasicAuth {
|
|
67
|
+
if (json == null) {
|
|
68
|
+
return json;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'type': json['type'],
|
|
73
|
+
'username': json['username'],
|
|
74
|
+
'password': json['password'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function CustomApiBasicAuthToJSON(json: any): CustomApiBasicAuth {
|
|
79
|
+
return CustomApiBasicAuthToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function CustomApiBasicAuthToJSONTyped(value?: CustomApiBasicAuth | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'type': value['type'],
|
|
90
|
+
'username': value['username'],
|
|
91
|
+
'password': value['password'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
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 CustomApiBearerAuth
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomApiBearerAuth {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CustomApiBearerAuth
|
|
26
|
+
*/
|
|
27
|
+
type: CustomApiBearerAuthTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CustomApiBearerAuth
|
|
32
|
+
*/
|
|
33
|
+
token: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export const CustomApiBearerAuthTypeEnum = {
|
|
41
|
+
Bearer: 'bearer'
|
|
42
|
+
} as const;
|
|
43
|
+
export type CustomApiBearerAuthTypeEnum = typeof CustomApiBearerAuthTypeEnum[keyof typeof CustomApiBearerAuthTypeEnum];
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the CustomApiBearerAuth interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfCustomApiBearerAuth(value: object): value is CustomApiBearerAuth {
|
|
50
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
51
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function CustomApiBearerAuthFromJSON(json: any): CustomApiBearerAuth {
|
|
56
|
+
return CustomApiBearerAuthFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function CustomApiBearerAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiBearerAuth {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'type': json['type'],
|
|
66
|
+
'token': json['token'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CustomApiBearerAuthToJSON(json: any): CustomApiBearerAuth {
|
|
71
|
+
return CustomApiBearerAuthToJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function CustomApiBearerAuthToJSONTyped(value?: CustomApiBearerAuth | null, ignoreDiscriminator: boolean = false): any {
|
|
75
|
+
if (value == null) {
|
|
76
|
+
return value;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'type': value['type'],
|
|
82
|
+
'token': value['token'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { Auth } from './Auth.js';
|
|
17
|
+
import {
|
|
18
|
+
AuthFromJSON,
|
|
19
|
+
AuthFromJSONTyped,
|
|
20
|
+
AuthToJSON,
|
|
21
|
+
AuthToJSONTyped,
|
|
22
|
+
} from './Auth.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CustomApiCreate
|
|
28
|
+
*/
|
|
29
|
+
export interface CustomApiCreate {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CustomApiCreate
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CustomApiCreate
|
|
40
|
+
*/
|
|
41
|
+
description?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CustomApiCreate
|
|
46
|
+
*/
|
|
47
|
+
host: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Auth}
|
|
51
|
+
* @memberof CustomApiCreate
|
|
52
|
+
*/
|
|
53
|
+
auth: Auth;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof CustomApiCreate
|
|
58
|
+
*/
|
|
59
|
+
enabledForChats?: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the CustomApiCreate interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfCustomApiCreate(value: object): value is CustomApiCreate {
|
|
66
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
67
|
+
if (!('host' in value) || value['host'] === undefined) return false;
|
|
68
|
+
if (!('auth' in value) || value['auth'] === undefined) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CustomApiCreateFromJSON(json: any): CustomApiCreate {
|
|
73
|
+
return CustomApiCreateFromJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CustomApiCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiCreate {
|
|
77
|
+
if (json == null) {
|
|
78
|
+
return json;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'name': json['name'],
|
|
83
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
84
|
+
'host': json['host'],
|
|
85
|
+
'auth': AuthFromJSON(json['auth']),
|
|
86
|
+
'enabledForChats': json['enabledForChats'] == null ? undefined : json['enabledForChats'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function CustomApiCreateToJSON(json: any): CustomApiCreate {
|
|
91
|
+
return CustomApiCreateToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function CustomApiCreateToJSONTyped(value?: CustomApiCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'name': value['name'],
|
|
102
|
+
'description': value['description'],
|
|
103
|
+
'host': value['host'],
|
|
104
|
+
'auth': AuthToJSON(value['auth']),
|
|
105
|
+
'enabledForChats': value['enabledForChats'],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
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 CustomApiHeader
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomApiHeader {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CustomApiHeader
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CustomApiHeader
|
|
32
|
+
*/
|
|
33
|
+
value?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CustomApiHeader
|
|
38
|
+
*/
|
|
39
|
+
previousName?: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CustomApiHeader interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCustomApiHeader(value: object): value is CustomApiHeader {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CustomApiHeaderFromJSON(json: any): CustomApiHeader {
|
|
51
|
+
return CustomApiHeaderFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function CustomApiHeaderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomApiHeader {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'name': json['name'],
|
|
61
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
62
|
+
'previousName': json['previousName'] == null ? undefined : json['previousName'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CustomApiHeaderToJSON(json: any): CustomApiHeader {
|
|
67
|
+
return CustomApiHeaderToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function CustomApiHeaderToJSONTyped(value?: CustomApiHeader | null, ignoreDiscriminator: boolean = false): any {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'name': value['name'],
|
|
78
|
+
'value': value['value'],
|
|
79
|
+
'previousName': value['previousName'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|