at-shared-types 1.1.2 → 1.1.3

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 (61) hide show
  1. package/dist/cjs/ai/chat/chatRequestDTO.js +2 -0
  2. package/dist/cjs/ai/chat/chatResponseDTO.js +2 -0
  3. package/dist/cjs/ai/chat/chatWithIntentRequestDTO.js +2 -0
  4. package/dist/cjs/ai/chat/chatWithIntentResponseDTO.js +2 -0
  5. package/dist/cjs/ai/chat/index.js +20 -0
  6. package/dist/cjs/ai/engine.js +2 -0
  7. package/dist/cjs/ai/index.js +19 -0
  8. package/dist/cjs/ai/session/index.js +17 -0
  9. package/dist/cjs/ai/session/sessionsDTO.js +2 -0
  10. package/dist/cjs/core/errors/errorCodeDTO.js +8 -0
  11. package/dist/cjs/core/errors/index.js +17 -0
  12. package/dist/cjs/core/index.js +18 -0
  13. package/dist/cjs/core/routes/formattedResponseDTO.js +2 -0
  14. package/dist/cjs/core/routes/index.js +17 -0
  15. package/dist/cjs/index.js +18 -0
  16. package/dist/esm/ai/chat/chatRequestDTO.d.ts +6 -0
  17. package/dist/esm/ai/chat/chatResponseDTO.d.ts +9 -0
  18. package/dist/esm/ai/chat/chatWithIntentRequestDTO.d.ts +6 -0
  19. package/dist/esm/ai/chat/chatWithIntentResponseDTO.d.ts +5 -0
  20. package/dist/esm/ai/chat/index.js +4 -0
  21. package/dist/esm/ai/engine.d.ts +40 -0
  22. package/dist/esm/ai/index.js +3 -0
  23. package/dist/esm/ai/session/index.js +1 -0
  24. package/dist/esm/core/errors/errorCodeDTO.d.ts +5 -0
  25. package/dist/esm/core/errors/index.js +1 -0
  26. package/dist/esm/core/index.js +2 -0
  27. package/dist/esm/core/routes/formattedResponseDTO.d.ts +10 -0
  28. package/dist/esm/core/routes/index.js +1 -0
  29. package/dist/esm/index.js +2 -0
  30. package/package.json +20 -15
  31. /package/dist/{ai → cjs/ai}/chat/chatRequestDTO.d.ts +0 -0
  32. /package/dist/{ai → cjs/ai}/chat/chatResponseDTO.d.ts +0 -0
  33. /package/dist/{ai → cjs/ai}/chat/chatWithIntentRequestDTO.d.ts +0 -0
  34. /package/dist/{ai → cjs/ai}/chat/chatWithIntentResponseDTO.d.ts +0 -0
  35. /package/dist/{ai → cjs/ai}/chat/index.d.ts +0 -0
  36. /package/dist/{ai → cjs/ai}/engine.d.ts +0 -0
  37. /package/dist/{ai → cjs/ai}/index.d.ts +0 -0
  38. /package/dist/{ai → cjs/ai}/session/index.d.ts +0 -0
  39. /package/dist/{ai → cjs/ai}/session/sessionsDTO.d.ts +0 -0
  40. /package/dist/{core → cjs/core}/errors/errorCodeDTO.d.ts +0 -0
  41. /package/dist/{core → cjs/core}/errors/index.d.ts +0 -0
  42. /package/dist/{core → cjs/core}/index.d.ts +0 -0
  43. /package/dist/{core → cjs/core}/routes/formattedResponseDTO.d.ts +0 -0
  44. /package/dist/{core → cjs/core}/routes/index.d.ts +0 -0
  45. /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  46. /package/dist/{ai → esm/ai}/chat/chatRequestDTO.js +0 -0
  47. /package/dist/{ai → esm/ai}/chat/chatResponseDTO.js +0 -0
  48. /package/dist/{ai → esm/ai}/chat/chatWithIntentRequestDTO.js +0 -0
  49. /package/dist/{ai → esm/ai}/chat/chatWithIntentResponseDTO.js +0 -0
  50. /package/dist/{ai/chat/index.js → esm/ai/chat/index.d.ts} +0 -0
  51. /package/dist/{ai → esm/ai}/engine.js +0 -0
  52. /package/dist/{ai/index.js → esm/ai/index.d.ts} +0 -0
  53. /package/dist/{ai/session/index.js → esm/ai/session/index.d.ts} +0 -0
  54. /package/dist/{ai/session/session.d.ts → esm/ai/session/sessionsDTO.d.ts} +0 -0
  55. /package/dist/{ai → esm/ai}/session/sessionsDTO.js +0 -0
  56. /package/dist/{core → esm/core}/errors/errorCodeDTO.js +0 -0
  57. /package/dist/{core/errors/index.js → esm/core/errors/index.d.ts} +0 -0
  58. /package/dist/{core/index.js → esm/core/index.d.ts} +0 -0
  59. /package/dist/{core → esm/core}/routes/formattedResponseDTO.js +0 -0
  60. /package/dist/{core/routes/index.js → esm/core/routes/index.d.ts} +0 -0
  61. /package/dist/{index.js → esm/index.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./chatRequestDTO"), exports);
18
+ __exportStar(require("./chatResponseDTO"), exports);
19
+ __exportStar(require("./chatWithIntentRequestDTO"), exports);
20
+ __exportStar(require("./chatWithIntentResponseDTO"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./engine"), exports);
18
+ __exportStar(require("./chat/index"), exports);
19
+ __exportStar(require("./session/index"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./sessionsDTO"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ATAPIErrorCodeDTO = void 0;
4
+ exports.ATAPIErrorCodeDTO = {
5
+ // 45xx – AI / workflow
6
+ AI_SESSION_EXPIRED: 4501,
7
+ AI_SESSION_NOT_FOUND: 4502,
8
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./errorCodeDTO"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./routes/index"), exports);
18
+ __exportStar(require("./errors/index"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./formattedResponseDTO"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ai/index"), exports);
18
+ __exportStar(require("./core/index"), exports);
@@ -0,0 +1,6 @@
1
+ import { AIChatMessageDTO, AIChatWithIntentOptionsDTO } from "../engine";
2
+ export interface AIChatRequestDTO {
3
+ session_id: string;
4
+ messages: AIChatMessageDTO[];
5
+ options?: AIChatWithIntentOptionsDTO;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { AIChatMessageDTO } from "../engine";
2
+ export interface AIChatResponseDTO {
3
+ message: AIChatMessageDTO;
4
+ usage?: {
5
+ tokens?: number;
6
+ };
7
+ raw?: any;
8
+ debug?: any;
9
+ }
@@ -0,0 +1,6 @@
1
+ import { AIChatMessageDTO, AIChatWithIntentOptionsDTO } from "../engine";
2
+ export interface AIChatWithIntentRequestDTO {
3
+ session_id: string;
4
+ messages: AIChatMessageDTO[];
5
+ options?: AIChatWithIntentOptionsDTO;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { AIIntentDTO } from "../engine";
2
+ import { AIChatResponseDTO } from "./chatResponseDTO";
3
+ export interface AIChatWithIntentResponseDTO extends AIChatResponseDTO {
4
+ intents?: AIIntentDTO[];
5
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./chatRequestDTO";
2
+ export * from "./chatResponseDTO";
3
+ export * from "./chatWithIntentRequestDTO";
4
+ export * from "./chatWithIntentResponseDTO";
@@ -0,0 +1,40 @@
1
+ export type ATChatMessageContentDTO = string | null;
2
+ /**
3
+ * Internal representation — can include nulls for assistant messages, etc.
4
+ */
5
+ export type AIChatMessageDTO = {
6
+ role: "system";
7
+ content: ATChatMessageContentDTO;
8
+ } | {
9
+ role: "user";
10
+ content: ATChatMessageContentDTO;
11
+ } | {
12
+ role: "assistant";
13
+ content: ATChatMessageContentDTO;
14
+ };
15
+ export type AIChatOptionsResponseFormatDTO = {
16
+ type: "text";
17
+ } | {
18
+ type: "json";
19
+ jsonSchema?: Record<string, any>;
20
+ };
21
+ export interface AIChatOptionsDTO {
22
+ model?: string;
23
+ temperature?: number;
24
+ maxTokens?: number;
25
+ engineID?: string;
26
+ responseFormat?: AIChatOptionsResponseFormatDTO;
27
+ }
28
+ export interface AIIntentDTO {
29
+ capabilityID: string;
30
+ params?: object;
31
+ confidence?: number;
32
+ reason?: string;
33
+ }
34
+ export interface AICapabilityDTO {
35
+ id: string;
36
+ description: string;
37
+ }
38
+ export interface AIChatWithIntentOptionsDTO extends AIChatOptionsDTO {
39
+ capabilities?: AICapabilityDTO[];
40
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./engine";
2
+ export * from "./chat/index";
3
+ export * from "./session/index";
@@ -0,0 +1 @@
1
+ export * from "./sessionsDTO";
@@ -0,0 +1,5 @@
1
+ export declare const ATAPIErrorCodeDTO: {
2
+ readonly AI_SESSION_EXPIRED: 4501;
3
+ readonly AI_SESSION_NOT_FOUND: 4502;
4
+ };
5
+ export type ATAPIErrorCodeDTO = typeof ATAPIErrorCodeDTO[keyof typeof ATAPIErrorCodeDTO];
@@ -0,0 +1 @@
1
+ export * from "./errorCodeDTO";
@@ -0,0 +1,2 @@
1
+ export * from "./routes/index";
2
+ export * from "./errors/index";
@@ -0,0 +1,10 @@
1
+ export interface ResponseSuccessDTO<T> {
2
+ code: number;
3
+ data: T;
4
+ }
5
+ export interface ResponseErrorDTO {
6
+ code: number;
7
+ message: string;
8
+ errors?: any[];
9
+ timestamp: string;
10
+ }
@@ -0,0 +1 @@
1
+ export * from "./formattedResponseDTO";
@@ -0,0 +1,2 @@
1
+ export * from "./ai/index";
2
+ export * from "./core/index";
package/package.json CHANGED
@@ -1,28 +1,33 @@
1
1
  {
2
2
  "name": "at-shared-types",
3
- "version": "1.1.2",
4
- "type": "module",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
3
+ "version": "1.1.3",
4
+ "main": "./dist/cjs/index.js",
5
+ "module": "./dist/esm/index.js",
6
+ "types": "./dist/esm/index.d.ts",
7
7
  "files": [
8
- "dist"
8
+ "dist/esm",
9
+ "dist/cjs"
9
10
  ],
11
+ "scripts": {
12
+ "build:cjs": "tsc --project tsconfig.cjs.json",
13
+ "build:esm": "tsc --project tsconfig.json",
14
+ "build": "npm run build:cjs && npm run build:esm"
15
+ },
10
16
  "exports": {
11
17
  ".": {
12
- "import": "./dist/index.js",
13
- "types": "./dist/index.d.ts"
18
+ "import": "./dist/esm/index.js",
19
+ "require": "./dist/cjs/index.js",
20
+ "types": "./dist/esm/index.d.ts"
14
21
  },
15
22
  "./ai": {
16
- "import": "./dist/ai/index.js",
17
- "types": "./dist/ai/index.d.ts"
23
+ "import": "./dist/esm/ai/index.js",
24
+ "require": "./dist/cjs/ai/index.js",
25
+ "types": "./dist/esm/ai/index.d.ts"
18
26
  },
19
27
  "./core": {
20
- "import": "./dist/core/index.js",
21
- "types": "./dist/core/index.d.ts"
28
+ "import": "./dist/esm/core/index.js",
29
+ "require": "./dist/cjs/core/index.js",
30
+ "types": "./dist/esm/core/index.d.ts"
22
31
  }
23
- },
24
- "scripts": {
25
- "build": "tsc",
26
- "prepublishOnly": "npm run build"
27
32
  }
28
33
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes