@illalabs/interfaces 0.0.0 → 0.1.0-canary.9fc2c20f

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 (117) hide show
  1. package/LICENSE +17 -2
  2. package/README.md +98 -1
  3. package/dist/errors/endpoints/chat/ChatBaseError.d.ts +8 -0
  4. package/dist/errors/endpoints/chat/ChatBaseError.d.ts.map +1 -0
  5. package/dist/errors/endpoints/chat/ChatBaseError.js +2 -0
  6. package/dist/errors/endpoints/chat/ChatBaseError.js.map +1 -0
  7. package/dist/errors/endpoints/chat/index.d.ts +6 -0
  8. package/dist/errors/endpoints/chat/index.d.ts.map +1 -0
  9. package/dist/errors/endpoints/chat/index.js +2 -0
  10. package/dist/errors/endpoints/chat/index.js.map +1 -0
  11. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.d.ts +10 -0
  12. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.d.ts.map +1 -0
  13. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.js +2 -0
  14. package/dist/errors/endpoints/executionChecker/ExecutionCheckerBaseError.js.map +1 -0
  15. package/dist/errors/endpoints/executionChecker/index.d.ts +3 -0
  16. package/dist/errors/endpoints/executionChecker/index.d.ts.map +1 -0
  17. package/dist/errors/endpoints/executionChecker/index.js +2 -0
  18. package/dist/errors/endpoints/executionChecker/index.js.map +1 -0
  19. package/dist/errors/index.d.ts +5 -0
  20. package/dist/errors/index.d.ts.map +1 -0
  21. package/dist/errors/index.js +3 -0
  22. package/dist/errors/index.js.map +1 -0
  23. package/dist/external.d.ts +4 -0
  24. package/dist/external.d.ts.map +1 -0
  25. package/dist/external.js +4 -0
  26. package/dist/external.js.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +2 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/interfaces/autoRouter.d.ts +34 -0
  32. package/dist/interfaces/autoRouter.d.ts.map +1 -0
  33. package/dist/interfaces/autoRouter.js +2 -0
  34. package/dist/interfaces/autoRouter.js.map +1 -0
  35. package/dist/interfaces/base.d.ts +15 -0
  36. package/dist/interfaces/base.d.ts.map +1 -0
  37. package/dist/interfaces/base.js +2 -0
  38. package/dist/interfaces/base.js.map +1 -0
  39. package/dist/interfaces/chat/index.d.ts +3 -0
  40. package/dist/interfaces/chat/index.d.ts.map +1 -0
  41. package/dist/interfaces/chat/index.js +3 -0
  42. package/dist/interfaces/chat/index.js.map +1 -0
  43. package/dist/interfaces/chat/request.d.ts +11 -0
  44. package/dist/interfaces/chat/request.d.ts.map +1 -0
  45. package/dist/interfaces/chat/request.js +2 -0
  46. package/dist/interfaces/chat/request.js.map +1 -0
  47. package/dist/interfaces/chat/response.d.ts +22 -0
  48. package/dist/interfaces/chat/response.d.ts.map +1 -0
  49. package/dist/interfaces/chat/response.js +2 -0
  50. package/dist/interfaces/chat/response.js.map +1 -0
  51. package/dist/interfaces/executionChecker/index.d.ts +3 -0
  52. package/dist/interfaces/executionChecker/index.d.ts.map +1 -0
  53. package/dist/interfaces/executionChecker/index.js +3 -0
  54. package/dist/interfaces/executionChecker/index.js.map +1 -0
  55. package/dist/interfaces/executionChecker/request.d.ts +16 -0
  56. package/dist/interfaces/executionChecker/request.d.ts.map +1 -0
  57. package/dist/interfaces/executionChecker/request.js +3 -0
  58. package/dist/interfaces/executionChecker/request.js.map +1 -0
  59. package/dist/interfaces/executionChecker/response.d.ts +32 -0
  60. package/dist/interfaces/executionChecker/response.d.ts.map +1 -0
  61. package/dist/interfaces/executionChecker/response.js +2 -0
  62. package/dist/interfaces/executionChecker/response.js.map +1 -0
  63. package/dist/interfaces/index.d.ts +4 -0
  64. package/dist/interfaces/index.d.ts.map +1 -0
  65. package/dist/interfaces/index.js +4 -0
  66. package/dist/interfaces/index.js.map +1 -0
  67. package/dist/internal.d.ts +5 -0
  68. package/dist/internal.d.ts.map +1 -0
  69. package/dist/internal.js +5 -0
  70. package/dist/internal.js.map +1 -0
  71. package/dist/schemas/chatContext.d.ts +337 -0
  72. package/dist/schemas/chatContext.d.ts.map +1 -0
  73. package/dist/schemas/chatContext.js +7 -0
  74. package/dist/schemas/chatContext.js.map +1 -0
  75. package/dist/schemas/chatRequestBody.d.ts +324 -0
  76. package/dist/schemas/chatRequestBody.d.ts.map +1 -0
  77. package/dist/schemas/chatRequestBody.js +14 -0
  78. package/dist/schemas/chatRequestBody.js.map +1 -0
  79. package/dist/schemas/executionCheckerQueryParams.d.ts +40 -0
  80. package/dist/schemas/executionCheckerQueryParams.d.ts.map +1 -0
  81. package/dist/schemas/executionCheckerQueryParams.js +18 -0
  82. package/dist/schemas/executionCheckerQueryParams.js.map +1 -0
  83. package/dist/schemas/index.d.ts +8 -0
  84. package/dist/schemas/index.d.ts.map +1 -0
  85. package/dist/schemas/index.js +8 -0
  86. package/dist/schemas/index.js.map +1 -0
  87. package/dist/schemas/messages.d.ts +252 -0
  88. package/dist/schemas/messages.d.ts.map +1 -0
  89. package/dist/schemas/messages.js +65 -0
  90. package/dist/schemas/messages.js.map +1 -0
  91. package/dist/schemas/toolAutorouter.d.ts +156 -0
  92. package/dist/schemas/toolAutorouter.d.ts.map +1 -0
  93. package/dist/schemas/toolAutorouter.js +37 -0
  94. package/dist/schemas/toolAutorouter.js.map +1 -0
  95. package/dist/schemas/userContext.d.ts +11 -0
  96. package/dist/schemas/userContext.d.ts.map +1 -0
  97. package/dist/schemas/userContext.js +8 -0
  98. package/dist/schemas/userContext.js.map +1 -0
  99. package/dist/types/index.d.ts +3 -0
  100. package/dist/types/index.d.ts.map +1 -0
  101. package/dist/types/index.js +3 -0
  102. package/dist/types/index.js.map +1 -0
  103. package/dist/types/messages.d.ts +9 -0
  104. package/dist/types/messages.d.ts.map +1 -0
  105. package/dist/types/messages.js +2 -0
  106. package/dist/types/messages.js.map +1 -0
  107. package/dist/types/toolAutorouter.d.ts +7 -0
  108. package/dist/types/toolAutorouter.d.ts.map +1 -0
  109. package/dist/types/toolAutorouter.js +2 -0
  110. package/dist/types/toolAutorouter.js.map +1 -0
  111. package/dist/utils/constants.d.ts +78 -0
  112. package/dist/utils/constants.d.ts.map +1 -0
  113. package/dist/utils/constants.js +57 -0
  114. package/dist/utils/constants.js.map +1 -0
  115. package/package.json +40 -5
  116. package/index.d.ts +0 -1
  117. package/index.js +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,21 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025
3
+ Copyright (c) 2025 Wonderland
4
+
4
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
6
  of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction...
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,100 @@
1
1
  # @illalabs/interfaces
2
2
 
3
- Reserved package name. Actual code will be published in a later version.
3
+ A published TypeScript package that provides shared type definitions and interfaces for ILLA applications.
4
+
5
+ ## Overview
6
+
7
+ The Shared Interfaces package is a **published npm package** that serves as a centralized library of TypeScript interfaces and types used across the ILLA platform, providing:
8
+
9
+ - Auto router configuration types for DeFi and Bridge operations
10
+ - Standardized types for cross-application consistency
11
+ - Endpoints interfaces definitions
12
+
13
+ ## Requirements
14
+
15
+ - Node.js >= 22
16
+ - PNPM >= 9.5.0
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install @illalabs/interfaces
22
+ # or
23
+ yarn add @illalabs/interfaces
24
+ # or
25
+ pnpm add @illalabs/interfaces
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```typescript
31
+ import type { AutoRouterConfig, DeFiConfig, LendingProvider } from "@illalabs/interfaces";
32
+
33
+ // Define a DeFi configuration
34
+ const actionsConfig: DeFiConfig = {
35
+ supply: "aave",
36
+ withdraw: "default-config",
37
+ borrow: "aave",
38
+ };
39
+
40
+ // Complete auto router configuration
41
+ const autoRouterConfig: AutoRouterConfig = {
42
+ defi: actionsConfig,
43
+ swapBridge: "lifi",
44
+ };
45
+ ```
46
+
47
+ ## Available Scripts
48
+
49
+ | Script | Description |
50
+ | ------------- | --------------------------- |
51
+ | `build` | Build the package using TSC |
52
+ | `dev` | Build with watch mode |
53
+ | `test` | Run tests |
54
+ | `test:cov` | Run tests with coverage |
55
+ | `lint` | Run ESLint |
56
+ | `lint:fix` | Run linter and fix issues |
57
+ | `format` | Check code formatting |
58
+ | `format:fix` | Fix code formatting |
59
+ | `check-types` | Check TypeScript types |
60
+ | `clean` | Remove dist folder |
61
+
62
+ ## Project Structure
63
+
64
+ ```text
65
+ src/
66
+ ├── errors/ # Custom error classes for endpoints and domain
67
+ ├── interfaces/ # Shared interfaces used across services
68
+ ├── schemas/ # Runtime validation (e.g., zod) schemas
69
+ ├── types/ # Reusable type aliases and enums
70
+ ├── external.ts # Public surface area (re-exported by package entry)
71
+ ├── internal.ts # Internal exports only for internal consumers
72
+ └── index.ts # Source entry point
73
+
74
+ test/ # Unit tests
75
+ dist/ # Compiled build output
76
+ ```
77
+
78
+ ## Versioning
79
+
80
+ This package follows [Semantic Versioning](https://semver.org/):
81
+
82
+ - **MAJOR**: Breaking changes to interfaces
83
+ - **MINOR**: New interfaces or optional properties
84
+ - **PATCH**: Bug fixes and documentation updates
85
+
86
+ ## Contributing
87
+
88
+ 1. Create a feature branch
89
+ 2. Make your changes
90
+ 3. Add or update tests
91
+ 4. Run linting and type checks
92
+ 5. Submit a pull request
93
+
94
+ ## License
95
+
96
+ MIT - See [LICENSE](../../LICENSE) file for details.
97
+
98
+ ## Repository
99
+
100
+ This published package is part of the [ILLA API monorepo](https://github.com/IllaLabs/api).
@@ -0,0 +1,8 @@
1
+ export type ChatBaseWithContextError = {
2
+ name: string;
3
+ message: string;
4
+ statusCode: number;
5
+ details?: unknown;
6
+ ctx?: unknown;
7
+ };
8
+ //# sourceMappingURL=ChatBaseError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatBaseError.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/ChatBaseError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChatBaseError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatBaseError.js","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/ChatBaseError.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { ChatBaseWithContextError } from "./ChatBaseError.js";
2
+ /**
3
+ * Union type of all chat errors
4
+ */
5
+ export type ChatError = ChatBaseWithContextError;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/errors/endpoints/chat/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export type ExecutionCheckerBaseWithContextError = {
2
+ name: string;
3
+ message: string;
4
+ statusCode: number;
5
+ details?: unknown;
6
+ ctx?: {
7
+ [key: string]: unknown;
8
+ };
9
+ };
10
+ //# sourceMappingURL=ExecutionCheckerBaseError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionCheckerBaseError.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/executionChecker/ExecutionCheckerBaseError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oCAAoC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ExecutionCheckerBaseError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionCheckerBaseError.js","sourceRoot":"","sources":["../../../../src/errors/endpoints/executionChecker/ExecutionCheckerBaseError.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { ExecutionCheckerBaseWithContextError } from "./ExecutionCheckerBaseError.js";
2
+ export type ExecutionCheckerError = ExecutionCheckerBaseWithContextError;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/errors/endpoints/executionChecker/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,gCAAgC,CAAC;AAE3F,MAAM,MAAM,qBAAqB,GAAG,oCAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/errors/endpoints/executionChecker/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from "./endpoints/chat/index.js";
2
+ export * from "./endpoints/executionChecker/index.js";
3
+ export type { ChatError } from "./endpoints/chat/index.js";
4
+ export type { ExecutionCheckerError } from "./endpoints/executionChecker/index.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,YAAY,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./endpoints/chat/index.js";
2
+ export * from "./endpoints/executionChecker/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./schemas/index.js";
2
+ export * from "./interfaces/index.js";
3
+ export * from "./types/index.js";
4
+ //# sourceMappingURL=external.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../src/external.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./schemas/index.js";
2
+ export * from "./interfaces/index.js";
3
+ export * from "./types/index.js";
4
+ //# sourceMappingURL=external.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external.js","sourceRoot":"","sources":["../src/external.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./external.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./external.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { SupportedLendingProvider, SupportedSwapBridgeProvider } from "../utils/constants.js";
2
+ /**
3
+ * Lending provider type
4
+ */
5
+ export type LendingProvider = SupportedLendingProvider;
6
+ /**
7
+ * Configuration for lending only operations
8
+ */
9
+ export type LendingOnly = {
10
+ lending: LendingProvider;
11
+ };
12
+ /**
13
+ * Configuration for specific DeFi actions
14
+ */
15
+ export type ActionsOnly = {
16
+ supply: LendingProvider;
17
+ withdraw: LendingProvider;
18
+ };
19
+ /**
20
+ * DeFi configuration union type
21
+ */
22
+ export type DeFiConfig = LendingOnly | ActionsOnly;
23
+ /**
24
+ * Swap and bridge provider type
25
+ */
26
+ export type SwapBridgeProvider = SupportedSwapBridgeProvider;
27
+ /**
28
+ * Auto router configuration interface
29
+ */
30
+ export interface AutoRouterConfig {
31
+ DeFi?: DeFiConfig;
32
+ SwapBridge?: SwapBridgeProvider;
33
+ }
34
+ //# sourceMappingURL=autoRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoRouter.d.ts","sourceRoot":"","sources":["../../src/interfaces/autoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=autoRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoRouter.js","sourceRoot":"","sources":["../../src/interfaces/autoRouter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ interface BaseApiResponse {
2
+ readonly status: number;
3
+ }
4
+ export interface BaseApiErrorResponse extends BaseApiResponse {
5
+ readonly status: 400 | 401 | 403 | 429 | 500;
6
+ readonly error: string;
7
+ }
8
+ export interface BaseApiSuccessResponse extends BaseApiResponse {
9
+ readonly status: 200;
10
+ }
11
+ export interface CoreApiAuthHeaders {
12
+ readonly "x-api-key"?: string;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/interfaces/base.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IACzD,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC3D,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/interfaces/base.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./request.js";
2
+ export * from "./response.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./request.js";
2
+ export * from "./response.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { TypeOf } from "zod";
2
+ import type { CoreApiAuthHeaders } from "../base.js";
3
+ import { CoreApiChatBodyRequestSchema } from "../../schemas/chatRequestBody.js";
4
+ export type CoreApiChatBodyRequest = TypeOf<typeof CoreApiChatBodyRequestSchema>;
5
+ export interface CoreApiChatRequest {
6
+ readonly path: "/api/v1/chat";
7
+ readonly method: "POST";
8
+ readonly headers: CoreApiAuthHeaders;
9
+ readonly body: CoreApiChatBodyRequest;
10
+ }
11
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/interfaces/chat/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAEhF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAGjF,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;CACzC"}
@@ -0,0 +1,2 @@
1
+ import { CoreApiChatBodyRequestSchema } from "../../schemas/chatRequestBody.js";
2
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/interfaces/chat/request.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ChatError } from "../../errors/endpoints/chat/index.js";
2
+ import type { MessageHistoryType, ToolCallType, ToolErrorPartType, ToolIncompletePartType } from "../../types/messages.js";
3
+ import type { BaseApiSuccessResponse } from "../base.js";
4
+ /**
5
+ * Success response for chat endpoint
6
+ */
7
+ export interface CoreApiChatSuccessResponse extends BaseApiSuccessResponse {
8
+ readonly messages: MessageHistoryType;
9
+ readonly text: string;
10
+ readonly pendingTools?: ReadonlyArray<ToolCallType>;
11
+ readonly incompleteTools?: ReadonlyArray<ToolIncompletePartType>;
12
+ readonly toolErrors?: ReadonlyArray<ToolErrorPartType>;
13
+ }
14
+ /**
15
+ * Union type of all possible chat error responses
16
+ */
17
+ export type CoreApiChatErrorResponse = ChatError;
18
+ /**
19
+ * Union type of all possible chat responses
20
+ */
21
+ export type CoreApiChatResponse = CoreApiChatSuccessResponse | CoreApiChatErrorResponse;
22
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/interfaces/chat/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,KAAK,EACR,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACpD,QAAQ,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC1D;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,GAAG,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/interfaces/chat/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./response.js";
2
+ export * from "./request.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./response.js";
2
+ export * from "./request.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ import type { CoreApiAuthHeaders } from "../../internal.js";
3
+ import { BaseLongPollingArgsSchema } from "../../internal.js";
4
+ export type BaseLongPollingArgs = z.infer<typeof BaseLongPollingArgsSchema>;
5
+ export type LongPollingActionParams<T extends BaseLongPollingArgs = BaseLongPollingArgs> = {
6
+ readonly toolName: string;
7
+ readonly protocol: string;
8
+ readonly args: T;
9
+ };
10
+ export interface LongPollingActionRequest<T extends BaseLongPollingArgs = BaseLongPollingArgs> {
11
+ readonly path: "/api/v1/actions/check";
12
+ readonly method: "GET";
13
+ readonly headers: CoreApiAuthHeaders;
14
+ readonly params: LongPollingActionParams<T>;
15
+ }
16
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,IAAI;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB;IACzF,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;CAC/C"}
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ import { BaseLongPollingArgsSchema } from "../../internal.js";
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { ExecutionCheckerError } from "../../errors/endpoints/executionChecker/index.js";
2
+ import type { BaseApiSuccessResponse } from "../base.js";
3
+ export type ExecutionActionStatus = "pending" | "failed" | "success";
4
+ interface LongPollingActionBaseResponse extends BaseApiSuccessResponse {
5
+ readonly pollStatus: ExecutionActionStatus;
6
+ readonly toolName: string;
7
+ readonly protocol: string;
8
+ }
9
+ export interface LongPollingActionPending extends LongPollingActionBaseResponse {
10
+ readonly pollStatus: "pending";
11
+ readonly message?: string;
12
+ }
13
+ export interface LongPollingActionErrored extends LongPollingActionBaseResponse {
14
+ readonly pollStatus: "failed";
15
+ readonly error: unknown;
16
+ readonly details?: unknown;
17
+ }
18
+ export interface LongPollingActionSucceeded<TPayload = unknown> extends LongPollingActionBaseResponse {
19
+ readonly pollStatus: "success";
20
+ readonly payload: TPayload;
21
+ }
22
+ export type LongPollingActionSuccessResponse<TPayload = unknown> = LongPollingActionPending | LongPollingActionErrored | LongPollingActionSucceeded<TPayload>;
23
+ export type LongPollingActionErrorResponse = ExecutionCheckerError;
24
+ export type LongPollingActionResponse<TPayload = unknown> = LongPollingActionSuccessResponse<TPayload> | LongPollingActionErrorResponse;
25
+ /**
26
+ * Normalized action status representation combining pending, failed, and succeeded states.
27
+ */
28
+ export type ActionStatus<TPayload = unknown, TError = unknown> = LongPollingActionPending | (LongPollingActionErrored & {
29
+ readonly error: TError;
30
+ }) | LongPollingActionSucceeded<TPayload>;
31
+ export {};
32
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAErE,UAAU,6BAA8B,SAAQ,sBAAsB;IAClE,QAAQ,CAAC,UAAU,EAAE,qBAAqB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC3E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAyB,SAAQ,6BAA6B;IAC3E,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,0BAA0B,CAAC,QAAQ,GAAG,OAAO,CAC1D,SAAQ,6BAA6B;IACrC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;CAC9B;AAED,MAAM,MAAM,gCAAgC,CAAC,QAAQ,GAAG,OAAO,IACzD,wBAAwB,GACxB,wBAAwB,GACxB,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAE3C,MAAM,MAAM,8BAA8B,GAAG,qBAAqB,CAAC;AAEnE,MAAM,MAAM,yBAAyB,CAAC,QAAQ,GAAG,OAAO,IAClD,gCAAgC,CAAC,QAAQ,CAAC,GAC1C,8BAA8B,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,QAAQ,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,IACvD,wBAAwB,GACxB,CAAC,wBAAwB,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACvD,0BAA0B,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/interfaces/executionChecker/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from "./chat/index.js";
2
+ export * from "./executionChecker/index.js";
3
+ export * from "./base.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./chat/index.js";
2
+ export * from "./executionChecker/index.js";
3
+ export * from "./base.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./schemas/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./interfaces/index.js";
4
+ export * from "./types/index.js";
5
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./schemas/index.js";
2
+ export * from "./errors/index.js";
3
+ export * from "./interfaces/index.js";
4
+ export * from "./types/index.js";
5
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}