@cognigy/rest-api-client 2026.2.0-rc1 → 2026.3.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 (37) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +0 -15
  3. package/build/apigroups/ResourcesAPIGroup_2_0.js +384 -134
  4. package/build/shared/errors/ErrorCode.js +1 -2
  5. package/build/shared/errors/ErrorCollection.js +0 -1
  6. package/build/shared/interfaces/handover.js +0 -1
  7. package/build/shared/interfaces/resources/IAuditEvent.js +13 -1
  8. package/build/shared/interfaces/resources/TResourceType.js +2 -0
  9. package/build/shared/interfaces/user.js +2 -0
  10. package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +384 -134
  11. package/dist/esm/shared/errors/ErrorCode.js +1 -2
  12. package/dist/esm/shared/errors/ErrorCollection.js +0 -1
  13. package/dist/esm/shared/interfaces/handover.js +0 -1
  14. package/dist/esm/shared/interfaces/resources/IAuditEvent.js +13 -1
  15. package/dist/esm/shared/interfaces/resources/TResourceType.js +2 -0
  16. package/dist/esm/shared/interfaces/user.js +2 -0
  17. package/package.json +3 -6
  18. package/types/index.d.ts +44 -425
  19. package/build/apigroups/aiAgentsV2/agent.js +0 -3
  20. package/build/apigroups/aiAgentsV2/agentAPI.js +0 -38
  21. package/build/apigroups/aiAgentsV2/agentPersona.js +0 -3
  22. package/build/apigroups/aiAgentsV2/agentPersonaAPI.js +0 -38
  23. package/build/apigroups/aiAgentsV2/tool.js +0 -3
  24. package/build/apigroups/aiAgentsV2/toolAPI.js +0 -35
  25. package/build/apigroups/aiAgentsV2/toolDescriptor.js +0 -3
  26. package/build/apigroups/aiAgentsV2/toolDescriptorAPI.js +0 -13
  27. package/build/spec/aiAgentV2.spec.js +0 -564
  28. package/dist/esm/apigroups/aiAgentsV2/agent.js +0 -2
  29. package/dist/esm/apigroups/aiAgentsV2/agentAPI.js +0 -24
  30. package/dist/esm/apigroups/aiAgentsV2/agentPersona.js +0 -2
  31. package/dist/esm/apigroups/aiAgentsV2/agentPersonaAPI.js +0 -24
  32. package/dist/esm/apigroups/aiAgentsV2/aiAgentV2API.js +0 -2
  33. package/dist/esm/apigroups/aiAgentsV2/tool.js +0 -2
  34. package/dist/esm/apigroups/aiAgentsV2/toolAPI.js +0 -21
  35. package/dist/esm/apigroups/aiAgentsV2/toolDescriptor.js +0 -2
  36. package/dist/esm/apigroups/aiAgentsV2/toolDescriptorAPI.js +0 -9
  37. package/dist/esm/spec/aiAgentV2.spec.js +0 -563
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.addAgentAPIs = void 0;
15
- const GenericAPIFn_1 = require("../../GenericAPIFn");
16
- const rest_1 = require("../../shared/helper/rest");
17
- function addAgentAPIs(self) {
18
- return {
19
- // see: https://github.com/Cognigy/ai-agents-v2/blob/0caffdf5fd517a899aca6ca1ad800915e746b2c3/cmd/api/main.go#L169
20
- indexAgents: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agents?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
21
- // see: https://github.com/Cognigy/ai-agents-v2/blob/0caffdf5fd517a899aca6ca1ad800915e746b2c3/cmd/api/main.go#L169
22
- createAgent: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/api/v1/agents", "POST", self)(args, options),
23
- // see: https://github.com/Cognigy/ai-agents-v2/blob/0caffdf5fd517a899aca6ca1ad800915e746b2c3/cmd/api/main.go#L169
24
- readAgent: (_a, options) => {
25
- var { agentId } = _a, args = __rest(_a, ["agentId"]);
26
- return (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agents/${agentId}?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
27
- },
28
- // see: https://github.com/Cognigy/ai-agents-v2/blob/0caffdf5fd517a899aca6ca1ad800915e746b2c3/cmd/api/main.go#L169
29
- deleteAgent: ({ agentId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agents/${agentId}`, "DELETE", self)(undefined, options),
30
- // see: https://github.com/Cognigy/ai-agents-v2/blob/0caffdf5fd517a899aca6ca1ad800915e746b2c3/cmd/api/main.go#L169
31
- updateAgent: (_a, options) => {
32
- var { agentId } = _a, args = __rest(_a, ["agentId"]);
33
- return (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agents/${agentId}`, "PATCH", self)(args, options);
34
- }
35
- };
36
- }
37
- exports.addAgentAPIs = addAgentAPIs;
38
- //# sourceMappingURL=agentAPI.js.map
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=agentPersona.js.map
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.addAgentPersonaAPIs = void 0;
15
- const GenericAPIFn_1 = require("../../GenericAPIFn");
16
- const rest_1 = require("../../shared/helper/rest");
17
- function addAgentPersonaAPIs(self) {
18
- return {
19
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/agentpersonas/api.go#L78
20
- indexAgentPersonas: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agentpersonas?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
21
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/agentpersonas/api.go#L184
22
- createAgentPersona: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/api/v1/agentpersonas", "POST", self)(args, options),
23
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/agentpersonas/api.go#L259
24
- readAgentPersona: (_a, options) => {
25
- var { agentPersonaId } = _a, args = __rest(_a, ["agentPersonaId"]);
26
- return (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agentpersonas/${agentPersonaId}?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
27
- },
28
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/agentpersonas/api.go#L411
29
- deleteAgentPersona: ({ agentPersonaId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agentpersonas/${agentPersonaId}`, "DELETE", self)(undefined, options),
30
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/agentpersonas/api.go#L334
31
- updateAgentPersona: (_a, options) => {
32
- var { agentPersonaId } = _a, args = __rest(_a, ["agentPersonaId"]);
33
- return (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/agentpersonas/${agentPersonaId}`, "PATCH", self)(args, options);
34
- }
35
- };
36
- }
37
- exports.addAgentPersonaAPIs = addAgentPersonaAPIs;
38
- //# sourceMappingURL=agentPersonaAPI.js.map
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tool.js.map
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.addToolAPIs = void 0;
15
- const GenericAPIFn_1 = require("../../GenericAPIFn");
16
- const rest_1 = require("../../shared/helper/rest");
17
- function addToolAPIs(self) {
18
- return {
19
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/api.go#L46
20
- indexTools: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/tools?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
21
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/api.go#L138
22
- createTool: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/api/v1/tools", "POST", self)(args, options),
23
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/api.go#L203
24
- readTool: (_a, options) => {
25
- var { toolId } = _a, args = __rest(_a, ["toolId"]);
26
- return (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/tools/${toolId}?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
27
- },
28
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/api.go#L349
29
- updateTool: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/tools/${args.toolId}`, "PATCH", self)(args, options),
30
- // see: https://github.com/Cognigy/ai-agents-v2/blob/b268349a3d9dac9ad436dd785ceb50f8de33eca0/internal/tools/api.go#L300
31
- deleteTool: ({ toolId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/api/v1/tools/${toolId}`, "DELETE", self)(undefined, options)
32
- };
33
- }
34
- exports.addToolAPIs = addToolAPIs;
35
- //# sourceMappingURL=toolAPI.js.map
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=toolDescriptor.js.map
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addToolDescriptorAPIs = void 0;
4
- const GenericAPIFn_1 = require("../../GenericAPIFn");
5
- const rest_1 = require("../../shared/helper/rest");
6
- function addToolDescriptorAPIs(self) {
7
- return {
8
- // see: https://cognigy.visualstudio.com/Cognigy.AI/_git/cognigy?path=/services/service-resources/src/toolDescriptors/controllers/restAPI.ts&version=GBmain&line=110&lineEnd=111&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents
9
- indexToolDescriptors: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/v1/tools/descriptors?${(0, rest_1.stringifyQuery)(args)}`, "GET", self)(undefined, options)
10
- };
11
- }
12
- exports.addToolDescriptorAPIs = addToolDescriptorAPIs;
13
- //# sourceMappingURL=toolDescriptorAPI.js.map