sarvam-agents-client 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/apis/AgentConversationsApi.d.ts +2 -2
  2. package/dist/apis/AgentConversationsApi.js +2 -2
  3. package/dist/apis/AgentsApi.d.ts +195 -5
  4. package/dist/apis/AgentsApi.js +478 -5
  5. package/dist/apis/ArtifactsApi.d.ts +8 -4
  6. package/dist/apis/ArtifactsApi.js +8 -4
  7. package/dist/apis/ConversationsApi.d.ts +2 -0
  8. package/dist/apis/ConversationsApi.js +6 -0
  9. package/dist/compose/deploy.d.ts +33 -7
  10. package/dist/compose/deploy.js +97 -19
  11. package/dist/compose/errors.d.ts +1 -1
  12. package/dist/compose/errors.js +1 -1
  13. package/dist/compose/index.d.ts +1 -1
  14. package/dist/compose/index.js +2 -1
  15. package/dist/compose/run.d.ts +5 -1
  16. package/dist/compose/run.js +9 -9
  17. package/dist/compose/settingsTransport.d.ts +9 -0
  18. package/dist/compose/settingsTransport.js +82 -8
  19. package/dist/compose/transport.d.ts +11 -0
  20. package/dist/compose/transport.js +3 -0
  21. package/dist/esm/apis/AgentConversationsApi.d.ts +2 -2
  22. package/dist/esm/apis/AgentConversationsApi.js +2 -2
  23. package/dist/esm/apis/AgentsApi.d.ts +195 -5
  24. package/dist/esm/apis/AgentsApi.js +478 -5
  25. package/dist/esm/apis/ArtifactsApi.d.ts +8 -4
  26. package/dist/esm/apis/ArtifactsApi.js +8 -4
  27. package/dist/esm/apis/ConversationsApi.d.ts +2 -0
  28. package/dist/esm/apis/ConversationsApi.js +6 -0
  29. package/dist/esm/compose/deploy.d.ts +33 -7
  30. package/dist/esm/compose/deploy.js +97 -20
  31. package/dist/esm/compose/errors.d.ts +1 -1
  32. package/dist/esm/compose/errors.js +1 -1
  33. package/dist/esm/compose/index.d.ts +1 -1
  34. package/dist/esm/compose/index.js +1 -1
  35. package/dist/esm/compose/run.d.ts +5 -1
  36. package/dist/esm/compose/run.js +9 -9
  37. package/dist/esm/compose/settingsTransport.d.ts +9 -0
  38. package/dist/esm/compose/settingsTransport.js +82 -8
  39. package/dist/esm/compose/transport.d.ts +11 -0
  40. package/dist/esm/compose/transport.js +2 -1
  41. package/dist/esm/models/AgentAttachmentDiff.d.ts +50 -0
  42. package/dist/esm/models/AgentAttachmentDiff.js +55 -0
  43. package/dist/esm/models/AgentContentsResource.d.ts +71 -0
  44. package/dist/esm/models/AgentContentsResource.js +70 -0
  45. package/dist/esm/models/AgentDeploy.d.ts +33 -0
  46. package/dist/esm/models/AgentDeploy.js +41 -0
  47. package/dist/esm/models/AgentDraftResource.d.ts +51 -0
  48. package/dist/esm/models/AgentDraftResource.js +52 -0
  49. package/dist/esm/models/AgentFileContent.d.ts +38 -0
  50. package/dist/esm/models/AgentFileContent.js +47 -0
  51. package/dist/esm/models/AgentHistoryResource.d.ts +71 -0
  52. package/dist/esm/models/AgentHistoryResource.js +66 -0
  53. package/dist/esm/models/AgentResource.d.ts +21 -0
  54. package/dist/esm/models/AgentResource.js +12 -0
  55. package/dist/esm/models/AgentSkillFilePin.d.ts +44 -0
  56. package/dist/esm/models/AgentSkillFilePin.js +51 -0
  57. package/dist/esm/models/AgentSubagentEntry.d.ts +38 -0
  58. package/dist/esm/models/AgentSubagentEntry.js +47 -0
  59. package/dist/esm/models/AgentVersionCreate.d.ts +32 -0
  60. package/dist/esm/models/AgentVersionCreate.js +41 -0
  61. package/dist/esm/models/AgentVersionDiffResource.d.ts +87 -0
  62. package/dist/esm/models/AgentVersionDiffResource.js +78 -0
  63. package/dist/esm/models/AgentVersionPick.d.ts +32 -0
  64. package/dist/esm/models/AgentVersionPick.js +43 -0
  65. package/dist/esm/models/AgentVersionResource.d.ts +56 -0
  66. package/dist/esm/models/AgentVersionResource.js +57 -0
  67. package/dist/esm/models/AppResource.d.ts +12 -0
  68. package/dist/esm/models/AppResource.js +4 -0
  69. package/dist/esm/models/ResponseInput.d.ts +6 -0
  70. package/dist/esm/models/ResponseInput.js +2 -0
  71. package/dist/esm/models/SkillUpdateResource.d.ts +38 -0
  72. package/dist/esm/models/SkillUpdateResource.js +47 -0
  73. package/dist/esm/models/index.d.ts +13 -0
  74. package/dist/esm/models/index.js +13 -0
  75. package/dist/models/AgentAttachmentDiff.d.ts +50 -0
  76. package/dist/models/AgentAttachmentDiff.js +62 -0
  77. package/dist/models/AgentContentsResource.d.ts +71 -0
  78. package/dist/models/AgentContentsResource.js +77 -0
  79. package/dist/models/AgentDeploy.d.ts +33 -0
  80. package/dist/models/AgentDeploy.js +48 -0
  81. package/dist/models/AgentDraftResource.d.ts +51 -0
  82. package/dist/models/AgentDraftResource.js +59 -0
  83. package/dist/models/AgentFileContent.d.ts +38 -0
  84. package/dist/models/AgentFileContent.js +54 -0
  85. package/dist/models/AgentHistoryResource.d.ts +71 -0
  86. package/dist/models/AgentHistoryResource.js +74 -0
  87. package/dist/models/AgentResource.d.ts +21 -0
  88. package/dist/models/AgentResource.js +13 -1
  89. package/dist/models/AgentSkillFilePin.d.ts +44 -0
  90. package/dist/models/AgentSkillFilePin.js +58 -0
  91. package/dist/models/AgentSubagentEntry.d.ts +38 -0
  92. package/dist/models/AgentSubagentEntry.js +54 -0
  93. package/dist/models/AgentVersionCreate.d.ts +32 -0
  94. package/dist/models/AgentVersionCreate.js +48 -0
  95. package/dist/models/AgentVersionDiffResource.d.ts +87 -0
  96. package/dist/models/AgentVersionDiffResource.js +85 -0
  97. package/dist/models/AgentVersionPick.d.ts +32 -0
  98. package/dist/models/AgentVersionPick.js +50 -0
  99. package/dist/models/AgentVersionResource.d.ts +56 -0
  100. package/dist/models/AgentVersionResource.js +64 -0
  101. package/dist/models/AppResource.d.ts +12 -0
  102. package/dist/models/AppResource.js +4 -0
  103. package/dist/models/ResponseInput.d.ts +6 -0
  104. package/dist/models/ResponseInput.js +2 -0
  105. package/dist/models/SkillUpdateResource.d.ts +38 -0
  106. package/dist/models/SkillUpdateResource.js +54 -0
  107. package/dist/models/index.d.ts +13 -0
  108. package/dist/models/index.js +13 -0
  109. package/package.json +1 -1
  110. package/src/apis/AgentConversationsApi.ts +2 -2
  111. package/src/apis/AgentsApi.ts +737 -6
  112. package/src/apis/ArtifactsApi.ts +8 -4
  113. package/src/apis/ConversationsApi.ts +10 -0
  114. package/src/compose/deploy.ts +113 -20
  115. package/src/compose/errors.ts +1 -1
  116. package/src/compose/index.ts +1 -1
  117. package/src/compose/run.ts +6 -2
  118. package/src/compose/settingsTransport.ts +81 -9
  119. package/src/compose/transport.ts +12 -0
  120. package/src/models/AgentAttachmentDiff.ts +93 -0
  121. package/src/models/AgentContentsResource.ts +142 -0
  122. package/src/models/AgentDeploy.ts +66 -0
  123. package/src/models/AgentDraftResource.ts +99 -0
  124. package/src/models/AgentFileContent.ts +75 -0
  125. package/src/models/AgentHistoryResource.ts +121 -0
  126. package/src/models/AgentResource.ts +26 -0
  127. package/src/models/AgentSkillFilePin.ts +84 -0
  128. package/src/models/AgentSubagentEntry.ts +75 -0
  129. package/src/models/AgentVersionCreate.ts +65 -0
  130. package/src/models/AgentVersionDiffResource.ts +154 -0
  131. package/src/models/AgentVersionPick.ts +66 -0
  132. package/src/models/AgentVersionResource.ts +101 -0
  133. package/src/models/AppResource.ts +16 -0
  134. package/src/models/ResponseInput.ts +8 -0
  135. package/src/models/SkillUpdateResource.ts +75 -0
  136. package/src/models/index.ts +13 -0
@@ -0,0 +1,87 @@
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 type { AgentAttachmentDiff } from './AgentAttachmentDiff.js';
13
+ /**
14
+ * What ``toVersion`` changes relative to ``fromVersion`` (-2 = draft).
15
+ * @export
16
+ * @interface AgentVersionDiffResource
17
+ */
18
+ export interface AgentVersionDiffResource {
19
+ /**
20
+ *
21
+ * @type {number}
22
+ * @memberof AgentVersionDiffResource
23
+ */
24
+ fromVersion?: number | null;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof AgentVersionDiffResource
29
+ */
30
+ toVersion: number;
31
+ /**
32
+ *
33
+ * @type {Array<string>}
34
+ * @memberof AgentVersionDiffResource
35
+ */
36
+ filesAdded: Array<string>;
37
+ /**
38
+ *
39
+ * @type {Array<string>}
40
+ * @memberof AgentVersionDiffResource
41
+ */
42
+ filesRemoved: Array<string>;
43
+ /**
44
+ *
45
+ * @type {Array<string>}
46
+ * @memberof AgentVersionDiffResource
47
+ */
48
+ filesChanged: Array<string>;
49
+ /**
50
+ *
51
+ * @type {AgentAttachmentDiff}
52
+ * @memberof AgentVersionDiffResource
53
+ */
54
+ skills: AgentAttachmentDiff;
55
+ /**
56
+ *
57
+ * @type {AgentAttachmentDiff}
58
+ * @memberof AgentVersionDiffResource
59
+ */
60
+ apps: AgentAttachmentDiff;
61
+ /**
62
+ *
63
+ * @type {AgentAttachmentDiff}
64
+ * @memberof AgentVersionDiffResource
65
+ */
66
+ collections: AgentAttachmentDiff;
67
+ /**
68
+ *
69
+ * @type {AgentAttachmentDiff}
70
+ * @memberof AgentVersionDiffResource
71
+ */
72
+ subagents: AgentAttachmentDiff;
73
+ /**
74
+ *
75
+ * @type {Array<string>}
76
+ * @memberof AgentVersionDiffResource
77
+ */
78
+ skillsUpdated: Array<string>;
79
+ }
80
+ /**
81
+ * Check if a given object implements the AgentVersionDiffResource interface.
82
+ */
83
+ export declare function instanceOfAgentVersionDiffResource(value: object): value is AgentVersionDiffResource;
84
+ export declare function AgentVersionDiffResourceFromJSON(json: any): AgentVersionDiffResource;
85
+ export declare function AgentVersionDiffResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentVersionDiffResource;
86
+ export declare function AgentVersionDiffResourceToJSON(json: any): AgentVersionDiffResource;
87
+ export declare function AgentVersionDiffResourceToJSONTyped(value?: AgentVersionDiffResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sarvam Agents API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: support@sarvam.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentVersionDiffResource = instanceOfAgentVersionDiffResource;
17
+ exports.AgentVersionDiffResourceFromJSON = AgentVersionDiffResourceFromJSON;
18
+ exports.AgentVersionDiffResourceFromJSONTyped = AgentVersionDiffResourceFromJSONTyped;
19
+ exports.AgentVersionDiffResourceToJSON = AgentVersionDiffResourceToJSON;
20
+ exports.AgentVersionDiffResourceToJSONTyped = AgentVersionDiffResourceToJSONTyped;
21
+ const AgentAttachmentDiff_js_1 = require("./AgentAttachmentDiff.js");
22
+ /**
23
+ * Check if a given object implements the AgentVersionDiffResource interface.
24
+ */
25
+ function instanceOfAgentVersionDiffResource(value) {
26
+ if (!('toVersion' in value) || value['toVersion'] === undefined)
27
+ return false;
28
+ if (!('filesAdded' in value) || value['filesAdded'] === undefined)
29
+ return false;
30
+ if (!('filesRemoved' in value) || value['filesRemoved'] === undefined)
31
+ return false;
32
+ if (!('filesChanged' in value) || value['filesChanged'] === undefined)
33
+ return false;
34
+ if (!('skills' in value) || value['skills'] === undefined)
35
+ return false;
36
+ if (!('apps' in value) || value['apps'] === undefined)
37
+ return false;
38
+ if (!('collections' in value) || value['collections'] === undefined)
39
+ return false;
40
+ if (!('subagents' in value) || value['subagents'] === undefined)
41
+ return false;
42
+ if (!('skillsUpdated' in value) || value['skillsUpdated'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ function AgentVersionDiffResourceFromJSON(json) {
47
+ return AgentVersionDiffResourceFromJSONTyped(json, false);
48
+ }
49
+ function AgentVersionDiffResourceFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'fromVersion': json['fromVersion'] == null ? undefined : json['fromVersion'],
55
+ 'toVersion': json['toVersion'],
56
+ 'filesAdded': json['filesAdded'],
57
+ 'filesRemoved': json['filesRemoved'],
58
+ 'filesChanged': json['filesChanged'],
59
+ 'skills': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffFromJSON)(json['skills']),
60
+ 'apps': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffFromJSON)(json['apps']),
61
+ 'collections': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffFromJSON)(json['collections']),
62
+ 'subagents': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffFromJSON)(json['subagents']),
63
+ 'skillsUpdated': json['skillsUpdated'],
64
+ };
65
+ }
66
+ function AgentVersionDiffResourceToJSON(json) {
67
+ return AgentVersionDiffResourceToJSONTyped(json, false);
68
+ }
69
+ function AgentVersionDiffResourceToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'fromVersion': value['fromVersion'],
75
+ 'toVersion': value['toVersion'],
76
+ 'filesAdded': value['filesAdded'],
77
+ 'filesRemoved': value['filesRemoved'],
78
+ 'filesChanged': value['filesChanged'],
79
+ 'skills': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffToJSON)(value['skills']),
80
+ 'apps': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffToJSON)(value['apps']),
81
+ 'collections': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffToJSON)(value['collections']),
82
+ 'subagents': (0, AgentAttachmentDiff_js_1.AgentAttachmentDiffToJSON)(value['subagents']),
83
+ 'skillsUpdated': value['skillsUpdated'],
84
+ };
85
+ }
@@ -0,0 +1,32 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AgentVersionPick
16
+ */
17
+ export interface AgentVersionPick {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof AgentVersionPick
22
+ */
23
+ version: number;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AgentVersionPick interface.
27
+ */
28
+ export declare function instanceOfAgentVersionPick(value: object): value is AgentVersionPick;
29
+ export declare function AgentVersionPickFromJSON(json: any): AgentVersionPick;
30
+ export declare function AgentVersionPickFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentVersionPick;
31
+ export declare function AgentVersionPickToJSON(json: any): AgentVersionPick;
32
+ export declare function AgentVersionPickToJSONTyped(value?: AgentVersionPick | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sarvam Agents API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: support@sarvam.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentVersionPick = instanceOfAgentVersionPick;
17
+ exports.AgentVersionPickFromJSON = AgentVersionPickFromJSON;
18
+ exports.AgentVersionPickFromJSONTyped = AgentVersionPickFromJSONTyped;
19
+ exports.AgentVersionPickToJSON = AgentVersionPickToJSON;
20
+ exports.AgentVersionPickToJSONTyped = AgentVersionPickToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentVersionPick interface.
23
+ */
24
+ function instanceOfAgentVersionPick(value) {
25
+ if (!('version' in value) || value['version'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AgentVersionPickFromJSON(json) {
30
+ return AgentVersionPickFromJSONTyped(json, false);
31
+ }
32
+ function AgentVersionPickFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'version': json['version'],
38
+ };
39
+ }
40
+ function AgentVersionPickToJSON(json) {
41
+ return AgentVersionPickToJSONTyped(json, false);
42
+ }
43
+ function AgentVersionPickToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'version': value['version'],
49
+ };
50
+ }
@@ -0,0 +1,56 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AgentVersionResource
16
+ */
17
+ export interface AgentVersionResource {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof AgentVersionResource
22
+ */
23
+ version: number;
24
+ /**
25
+ *
26
+ * @type {Date}
27
+ * @memberof AgentVersionResource
28
+ */
29
+ committedAt: Date;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AgentVersionResource
34
+ */
35
+ note: string;
36
+ /**
37
+ *
38
+ * @type {boolean}
39
+ * @memberof AgentVersionResource
40
+ */
41
+ everLive: boolean;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof AgentVersionResource
46
+ */
47
+ createdBy?: string | null;
48
+ }
49
+ /**
50
+ * Check if a given object implements the AgentVersionResource interface.
51
+ */
52
+ export declare function instanceOfAgentVersionResource(value: object): value is AgentVersionResource;
53
+ export declare function AgentVersionResourceFromJSON(json: any): AgentVersionResource;
54
+ export declare function AgentVersionResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentVersionResource;
55
+ export declare function AgentVersionResourceToJSON(json: any): AgentVersionResource;
56
+ export declare function AgentVersionResourceToJSONTyped(value?: AgentVersionResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sarvam Agents API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: support@sarvam.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAgentVersionResource = instanceOfAgentVersionResource;
17
+ exports.AgentVersionResourceFromJSON = AgentVersionResourceFromJSON;
18
+ exports.AgentVersionResourceFromJSONTyped = AgentVersionResourceFromJSONTyped;
19
+ exports.AgentVersionResourceToJSON = AgentVersionResourceToJSON;
20
+ exports.AgentVersionResourceToJSONTyped = AgentVersionResourceToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AgentVersionResource interface.
23
+ */
24
+ function instanceOfAgentVersionResource(value) {
25
+ if (!('version' in value) || value['version'] === undefined)
26
+ return false;
27
+ if (!('committedAt' in value) || value['committedAt'] === undefined)
28
+ return false;
29
+ if (!('note' in value) || value['note'] === undefined)
30
+ return false;
31
+ if (!('everLive' in value) || value['everLive'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function AgentVersionResourceFromJSON(json) {
36
+ return AgentVersionResourceFromJSONTyped(json, false);
37
+ }
38
+ function AgentVersionResourceFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'version': json['version'],
44
+ 'committedAt': (new Date(json['committedAt'])),
45
+ 'note': json['note'],
46
+ 'everLive': json['everLive'],
47
+ 'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
48
+ };
49
+ }
50
+ function AgentVersionResourceToJSON(json) {
51
+ return AgentVersionResourceToJSONTyped(json, false);
52
+ }
53
+ function AgentVersionResourceToJSONTyped(value, ignoreDiscriminator = false) {
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'version': value['version'],
59
+ 'committedAt': ((value['committedAt']).toISOString()),
60
+ 'note': value['note'],
61
+ 'everLive': value['everLive'],
62
+ 'createdBy': value['createdBy'],
63
+ };
64
+ }
@@ -106,6 +106,18 @@ export interface AppResource {
106
106
  * @memberof AppResource
107
107
  */
108
108
  requiresConnection: boolean;
109
+ /**
110
+ *
111
+ * @type {string}
112
+ * @memberof AppResource
113
+ */
114
+ accountLabel?: string | null;
115
+ /**
116
+ *
117
+ * @type {string}
118
+ * @memberof AppResource
119
+ */
120
+ serverUrl?: string | null;
109
121
  /**
110
122
  *
111
123
  * @type {boolean}
@@ -89,6 +89,8 @@ function AppResourceFromJSONTyped(json, ignoreDiscriminator) {
89
89
  'highlight': json['highlight'] == null ? undefined : (json['highlight'].map(FieldHighlight_js_1.FieldHighlightFromJSON)),
90
90
  'connected': json['connected'],
91
91
  'requiresConnection': json['requiresConnection'],
92
+ 'accountLabel': json['accountLabel'] == null ? undefined : json['accountLabel'],
93
+ 'serverUrl': json['serverUrl'] == null ? undefined : json['serverUrl'],
92
94
  'boundToAgent': json['boundToAgent'] == null ? undefined : json['boundToAgent'],
93
95
  'iconUrl': json['iconUrl'] == null ? undefined : json['iconUrl'],
94
96
  'category': json['category'] == null ? undefined : (0, AppCategory_js_1.AppCategoryFromJSON)(json['category']),
@@ -126,6 +128,8 @@ function AppResourceToJSONTyped(value, ignoreDiscriminator = false) {
126
128
  'highlight': value['highlight'] == null ? undefined : (value['highlight'].map(FieldHighlight_js_1.FieldHighlightToJSON)),
127
129
  'connected': value['connected'],
128
130
  'requiresConnection': value['requiresConnection'],
131
+ 'accountLabel': value['accountLabel'],
132
+ 'serverUrl': value['serverUrl'],
129
133
  'boundToAgent': value['boundToAgent'],
130
134
  'iconUrl': value['iconUrl'],
131
135
  'category': (0, AppCategory_js_1.AppCategoryToJSON)(value['category']),
@@ -70,6 +70,12 @@ export interface ResponseInput {
70
70
  * @memberof ResponseInput
71
71
  */
72
72
  endUserId?: string | null;
73
+ /**
74
+ *
75
+ * @type {number}
76
+ * @memberof ResponseInput
77
+ */
78
+ agentVersion?: number | null;
73
79
  }
74
80
  /**
75
81
  * @export
@@ -57,6 +57,7 @@ function ResponseInputFromJSONTyped(json, ignoreDiscriminator) {
57
57
  'retryOf': json['retryOf'] == null ? undefined : json['retryOf'],
58
58
  'surface': json['surface'] == null ? undefined : json['surface'],
59
59
  'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
60
+ 'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
60
61
  };
61
62
  }
62
63
  function ResponseInputToJSON(json) {
@@ -76,5 +77,6 @@ function ResponseInputToJSONTyped(value, ignoreDiscriminator = false) {
76
77
  'retryOf': value['retryOf'],
77
78
  'surface': value['surface'],
78
79
  'endUserId': value['endUserId'],
80
+ 'agentVersion': value['agentVersion'],
79
81
  };
80
82
  }
@@ -0,0 +1,38 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SkillUpdateResource
16
+ */
17
+ export interface SkillUpdateResource {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SkillUpdateResource
22
+ */
23
+ skillId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SkillUpdateResource
28
+ */
29
+ name: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the SkillUpdateResource interface.
33
+ */
34
+ export declare function instanceOfSkillUpdateResource(value: object): value is SkillUpdateResource;
35
+ export declare function SkillUpdateResourceFromJSON(json: any): SkillUpdateResource;
36
+ export declare function SkillUpdateResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillUpdateResource;
37
+ export declare function SkillUpdateResourceToJSON(json: any): SkillUpdateResource;
38
+ export declare function SkillUpdateResourceToJSONTyped(value?: SkillUpdateResource | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sarvam Agents API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: support@sarvam.ai
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSkillUpdateResource = instanceOfSkillUpdateResource;
17
+ exports.SkillUpdateResourceFromJSON = SkillUpdateResourceFromJSON;
18
+ exports.SkillUpdateResourceFromJSONTyped = SkillUpdateResourceFromJSONTyped;
19
+ exports.SkillUpdateResourceToJSON = SkillUpdateResourceToJSON;
20
+ exports.SkillUpdateResourceToJSONTyped = SkillUpdateResourceToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SkillUpdateResource interface.
23
+ */
24
+ function instanceOfSkillUpdateResource(value) {
25
+ if (!('skillId' in value) || value['skillId'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function SkillUpdateResourceFromJSON(json) {
32
+ return SkillUpdateResourceFromJSONTyped(json, false);
33
+ }
34
+ function SkillUpdateResourceFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'skillId': json['skillId'],
40
+ 'name': json['name'],
41
+ };
42
+ }
43
+ function SkillUpdateResourceToJSON(json) {
44
+ return SkillUpdateResourceToJSONTyped(json, false);
45
+ }
46
+ function SkillUpdateResourceToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'skillId': value['skillId'],
52
+ 'name': value['name'],
53
+ };
54
+ }
@@ -1,15 +1,27 @@
1
1
  export * from './AddMessageBody.js';
2
2
  export * from './AddMessageBodyPartsInner.js';
3
+ export * from './AgentAttachmentDiff.js';
3
4
  export * from './AgentChannelRef.js';
5
+ export * from './AgentContentsResource.js';
4
6
  export * from './AgentConversationDetail.js';
5
7
  export * from './AgentConversationView.js';
6
8
  export * from './AgentCreate.js';
7
9
  export * from './AgentCustomApiList.js';
10
+ export * from './AgentDeploy.js';
11
+ export * from './AgentDraftResource.js';
12
+ export * from './AgentFileContent.js';
13
+ export * from './AgentHistoryResource.js';
8
14
  export * from './AgentResource.js';
9
15
  export * from './AgentSearchChannel.js';
10
16
  export * from './AgentSettingsResponse.js';
17
+ export * from './AgentSkillFilePin.js';
18
+ export * from './AgentSubagentEntry.js';
11
19
  export * from './AgentTemplateResource.js';
12
20
  export * from './AgentUpdate.js';
21
+ export * from './AgentVersionCreate.js';
22
+ export * from './AgentVersionDiffResource.js';
23
+ export * from './AgentVersionPick.js';
24
+ export * from './AgentVersionResource.js';
13
25
  export * from './ApiKeyBody.js';
14
26
  export * from './AppAccountView.js';
15
27
  export * from './AppAccountsView.js';
@@ -146,6 +158,7 @@ export * from './SettingsIssueView.js';
146
158
  export * from './SkillDetailView.js';
147
159
  export * from './SkillResource.js';
148
160
  export * from './SkillUpdate.js';
161
+ export * from './SkillUpdateResource.js';
149
162
  export * from './SkillUploadDescriptor.js';
150
163
  export * from './SkillUploadResponse.js';
151
164
  export * from './SkillView.js';
@@ -18,16 +18,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AddMessageBody.js"), exports);
20
20
  __exportStar(require("./AddMessageBodyPartsInner.js"), exports);
21
+ __exportStar(require("./AgentAttachmentDiff.js"), exports);
21
22
  __exportStar(require("./AgentChannelRef.js"), exports);
23
+ __exportStar(require("./AgentContentsResource.js"), exports);
22
24
  __exportStar(require("./AgentConversationDetail.js"), exports);
23
25
  __exportStar(require("./AgentConversationView.js"), exports);
24
26
  __exportStar(require("./AgentCreate.js"), exports);
25
27
  __exportStar(require("./AgentCustomApiList.js"), exports);
28
+ __exportStar(require("./AgentDeploy.js"), exports);
29
+ __exportStar(require("./AgentDraftResource.js"), exports);
30
+ __exportStar(require("./AgentFileContent.js"), exports);
31
+ __exportStar(require("./AgentHistoryResource.js"), exports);
26
32
  __exportStar(require("./AgentResource.js"), exports);
27
33
  __exportStar(require("./AgentSearchChannel.js"), exports);
28
34
  __exportStar(require("./AgentSettingsResponse.js"), exports);
35
+ __exportStar(require("./AgentSkillFilePin.js"), exports);
36
+ __exportStar(require("./AgentSubagentEntry.js"), exports);
29
37
  __exportStar(require("./AgentTemplateResource.js"), exports);
30
38
  __exportStar(require("./AgentUpdate.js"), exports);
39
+ __exportStar(require("./AgentVersionCreate.js"), exports);
40
+ __exportStar(require("./AgentVersionDiffResource.js"), exports);
41
+ __exportStar(require("./AgentVersionPick.js"), exports);
42
+ __exportStar(require("./AgentVersionResource.js"), exports);
31
43
  __exportStar(require("./ApiKeyBody.js"), exports);
32
44
  __exportStar(require("./AppAccountView.js"), exports);
33
45
  __exportStar(require("./AppAccountsView.js"), exports);
@@ -164,6 +176,7 @@ __exportStar(require("./SettingsIssueView.js"), exports);
164
176
  __exportStar(require("./SkillDetailView.js"), exports);
165
177
  __exportStar(require("./SkillResource.js"), exports);
166
178
  __exportStar(require("./SkillUpdate.js"), exports);
179
+ __exportStar(require("./SkillUpdateResource.js"), exports);
167
180
  __exportStar(require("./SkillUploadDescriptor.js"), exports);
168
181
  __exportStar(require("./SkillUploadResponse.js"), exports);
169
182
  __exportStar(require("./SkillView.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvam-agents-client",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Client for the Sarvam Agents API: chat with an agent, exchange files with it, and set it up from your own code.",
5
5
  "author": "Sarvam AI <support@sarvam.ai>",
6
6
  "license": "MIT",
@@ -77,7 +77,7 @@ export interface ListAgentConversationsRequest {
77
77
  export class AgentConversationsApi extends runtime.BaseAPI {
78
78
 
79
79
  /**
80
- * Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign through the owner-identity route the share links use. The gateway still checks the ids against the artifact\'s real owner.
80
+ * Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign with the owner\'s identity, as share links do. The artifact service still checks the ids against the artifact\'s real owner. The URL is a presigned S3 URL while the file is plaintext; clients that can follow file-gateway URLs use the v2 route.
81
81
  * Agent Conversation Artifact Download Url Route
82
82
  */
83
83
  async agentConversationArtifactDownloadUrlRaw(requestParameters: AgentConversationArtifactDownloadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadUrlResponse>> {
@@ -133,7 +133,7 @@ export class AgentConversationsApi extends runtime.BaseAPI {
133
133
  }
134
134
 
135
135
  /**
136
- * Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign through the owner-identity route the share links use. The gateway still checks the ids against the artifact\'s real owner.
136
+ * Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign with the owner\'s identity, as share links do. The artifact service still checks the ids against the artifact\'s real owner. The URL is a presigned S3 URL while the file is plaintext; clients that can follow file-gateway URLs use the v2 route.
137
137
  * Agent Conversation Artifact Download Url Route
138
138
  */
139
139
  async agentConversationArtifactDownloadUrl(requestParameters: AgentConversationArtifactDownloadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadUrlResponse> {