at-shared-types 1.1.33 → 1.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/domain/engine.d.ts +54 -0
- package/dist/ai/domain/engine.d.ts.map +1 -0
- package/dist/ai/domain/index.d.ts +4 -0
- package/dist/ai/domain/index.d.ts.map +1 -0
- package/dist/ai/domain/session.d.ts +17 -0
- package/dist/ai/domain/session.d.ts.map +1 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/transport/chat/chat.request.d.ts +7 -0
- package/dist/ai/transport/chat/chat.request.d.ts.map +1 -0
- package/dist/ai/transport/chat/chat.response.d.ts +10 -0
- package/dist/ai/transport/chat/chat.response.d.ts.map +1 -0
- package/dist/ai/transport/chat/chatWithIntent.request.d.ts +7 -0
- package/dist/ai/transport/chat/chatWithIntent.request.d.ts.map +1 -0
- package/dist/ai/transport/chat/chatWithIntent.response.d.ts +6 -0
- package/dist/ai/transport/chat/chatWithIntent.response.d.ts.map +1 -0
- package/dist/ai/transport/chat/index.d.ts +5 -0
- package/dist/ai/transport/chat/index.d.ts.map +1 -0
- package/dist/ai/transport/index.d.ts +4 -0
- package/dist/ai/transport/index.d.ts.map +1 -0
- package/dist/ai/transport/wire.types.d.ts +12 -0
- package/dist/ai/transport/wire.types.d.ts.map +1 -0
- package/dist/at-domain-dto.d.ts +27 -0
- package/dist/at-domain-dto.d.ts.map +1 -0
- package/dist/at-transport-dto.d.ts +29 -0
- package/dist/at-transport-dto.d.ts.map +1 -0
- package/dist/casing/case.runtime.d.ts +5 -0
- package/dist/casing/case.runtime.d.ts.map +1 -0
- package/dist/casing/case.types.d.ts +16 -0
- package/dist/casing/case.types.d.ts.map +1 -0
- package/dist/casing/index.d.ts +6 -0
- package/dist/casing/index.d.ts.map +1 -0
- package/dist/cjs.d.ts +4 -0
- package/dist/cjs.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/transport/errors.d.ts +7 -0
- package/dist/core/transport/errors.d.ts.map +1 -0
- package/dist/core/transport/index.d.ts +3 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/responses.d.ts +11 -0
- package/dist/core/transport/responses.d.ts.map +1 -0
- package/dist/domain.cjs.map +1 -1
- package/dist/domain.d.ts +4 -72
- package/dist/domain.d.ts.map +1 -0
- package/dist/index.d.ts +4 -29
- package/dist/index.d.ts.map +1 -0
- package/dist/transport.cjs.map +1 -1
- package/dist/transport.d.ts +7 -50
- package/dist/transport.d.ts.map +1 -0
- package/package.json +5 -3
- package/dist/domain.d.mts +0 -72
- package/dist/errors-BL8YRY7y.d.mts +0 -31
- package/dist/errors-BL8YRY7y.d.ts +0 -31
- package/dist/index.d.mts +0 -29
- package/dist/transport.d.mts +0 -50
|
@@ -0,0 +1,54 @@
|
|
|
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 AIRequestContextDTO {
|
|
22
|
+
messages?: AIChatMessageDTO[];
|
|
23
|
+
sessionID?: string;
|
|
24
|
+
engine?: string;
|
|
25
|
+
engineType?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AIChatOptionsDTO {
|
|
28
|
+
model?: string;
|
|
29
|
+
temperature?: number;
|
|
30
|
+
maxTokens?: number;
|
|
31
|
+
engineID?: string;
|
|
32
|
+
responseFormat?: AIChatOptionsResponseFormatDTO;
|
|
33
|
+
requestContext?: AIRequestContextDTO;
|
|
34
|
+
}
|
|
35
|
+
export interface AIIntentDTO {
|
|
36
|
+
capabilityID: string;
|
|
37
|
+
params?: object;
|
|
38
|
+
confidence?: number;
|
|
39
|
+
reason?: string;
|
|
40
|
+
output?: unknown;
|
|
41
|
+
}
|
|
42
|
+
export interface AICapabilityDTO {
|
|
43
|
+
id: string;
|
|
44
|
+
description: string;
|
|
45
|
+
}
|
|
46
|
+
export interface AIPageContextDTO {
|
|
47
|
+
location?: string;
|
|
48
|
+
data?: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface AIChatWithIntentOptionsDTO extends AIChatOptionsDTO {
|
|
51
|
+
capabilities?: AICapabilityDTO[];
|
|
52
|
+
pageContext?: AIPageContextDTO | null;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/ai/domain/engine.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAC7B,MAAM,GACN,IAAI,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,uBAAuB,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,uBAAuB,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,8BAA8B,GACpC;IACE,IAAI,EAAE,MAAM,CAAC;CAChB,GACC;IACE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC,CAAC;AAGN,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,8BAA8B,CAAC;IAChD,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACxC;AAED,MAAM,WAAW,WAAW;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAChE,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/domain/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A single role message in a prompt (system, user, assistant, etc.) */
|
|
2
|
+
export interface AIPromptRoleDTO {
|
|
3
|
+
/** Role type: system | user | assistant */
|
|
4
|
+
role: "system" | "user" | "assistant";
|
|
5
|
+
/**
|
|
6
|
+
* Content of the message.
|
|
7
|
+
* Can include placeholders like {{var:name}} or {{prompt:other.prompt.id}}.
|
|
8
|
+
*/
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AISessionConfigDTO {
|
|
12
|
+
id: string;
|
|
13
|
+
messages?: AIPromptRoleDTO[];
|
|
14
|
+
priority?: number;
|
|
15
|
+
slot?: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/ai/domain/session.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC5B,2CAA2C;IAC3C,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IAEtC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AIChatMessageWireDTO, AIChatWithIntentOptionsWireDTO } from "../wire.types";
|
|
2
|
+
export interface AIChatRequestDTO {
|
|
3
|
+
session_id: string;
|
|
4
|
+
messages: AIChatMessageWireDTO[];
|
|
5
|
+
options?: AIChatWithIntentOptionsWireDTO;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=chat.request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.request.d.ts","sourceRoot":"","sources":["../../../../src/ai/transport/chat/chat.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE1F,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,8BAA8B,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.response.d.ts","sourceRoot":"","sources":["../../../../src/ai/transport/chat/chat.response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,KAAK,CAAC,EAAE,GAAG,CAAC;CACf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AIChatMessageWireDTO, AIChatWithIntentOptionsWireDTO } from "../wire.types";
|
|
2
|
+
export interface AIChatWithIntentRequestDTO {
|
|
3
|
+
session_id: string;
|
|
4
|
+
messages: AIChatMessageWireDTO[];
|
|
5
|
+
options?: AIChatWithIntentOptionsWireDTO;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=chatWithIntent.request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatWithIntent.request.d.ts","sourceRoot":"","sources":["../../../../src/ai/transport/chat/chatWithIntent.request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAE1F,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,8BAA8B,CAAC;CAC5C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AIIntentWireDTO } from "../wire.types";
|
|
2
|
+
import type { AIChatResponseDTO } from "./chat.response";
|
|
3
|
+
export interface AIChatWithIntentResponseDTO extends AIChatResponseDTO {
|
|
4
|
+
intents?: AIIntentWireDTO[];
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=chatWithIntent.response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatWithIntent.response.d.ts","sourceRoot":"","sources":["../../../../src/ai/transport/chat/chatWithIntent.response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/transport/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/transport/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DeepSnakeKeys } from "../../casing";
|
|
2
|
+
import type { AIChatMessageDTO, AIChatWithIntentOptionsDTO, AIChatOptionsDTO, AIRequestContextDTO, AIIntentDTO, AICapabilityDTO, AIPageContextDTO } from "../domain/engine";
|
|
3
|
+
import type { AISessionConfigDTO } from "../domain/session";
|
|
4
|
+
export type AIChatMessageWireDTO = DeepSnakeKeys<AIChatMessageDTO>;
|
|
5
|
+
export type AIChatOptionsWireDTO = DeepSnakeKeys<AIChatOptionsDTO>;
|
|
6
|
+
export type AIRequestContextWireDTO = DeepSnakeKeys<AIRequestContextDTO>;
|
|
7
|
+
export type AIChatWithIntentOptionsWireDTO = DeepSnakeKeys<AIChatWithIntentOptionsDTO>;
|
|
8
|
+
export type AIIntentWireDTO = DeepSnakeKeys<AIIntentDTO>;
|
|
9
|
+
export type AICapabilityWireDTO = DeepSnakeKeys<AICapabilityDTO>;
|
|
10
|
+
export type AIPageContextWireDTO = DeepSnakeKeys<AIPageContextDTO>;
|
|
11
|
+
export type AISessionConfigWireDTO = DeepSnakeKeys<AISessionConfigDTO>;
|
|
12
|
+
//# sourceMappingURL=wire.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.types.d.ts","sourceRoot":"","sources":["../../../src/ai/transport/wire.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EACR,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,gBAAgB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;AACnE,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;AACzE,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,0BAA0B,CAAC,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;AACjE,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as Engine from "./ai/domain/engine";
|
|
2
|
+
import type * as Session from "./ai/domain/session";
|
|
3
|
+
/**
|
|
4
|
+
* Runtime value (empty on purpose) so consumers can:
|
|
5
|
+
* import { ATDomainDTO } from "at-shared-types"
|
|
6
|
+
* and then use:
|
|
7
|
+
* ATDomainDTO.SomeType
|
|
8
|
+
*/
|
|
9
|
+
export declare const ATDomainDTO: {};
|
|
10
|
+
/**
|
|
11
|
+
* Namespace holds ONLY types (and could hold values too if you ever need).
|
|
12
|
+
* TS merges this with the const above.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace ATDomainDTO {
|
|
15
|
+
type ATChatMessageContentDTO = Engine.ATChatMessageContentDTO;
|
|
16
|
+
type AIChatMessageDTO = Engine.AIChatMessageDTO;
|
|
17
|
+
type AIChatOptionsResponseFormatDTO = Engine.AIChatOptionsResponseFormatDTO;
|
|
18
|
+
type AIRequestContextDTO = Engine.AIRequestContextDTO;
|
|
19
|
+
type AIChatOptionsDTO = Engine.AIChatOptionsDTO;
|
|
20
|
+
type AIIntentDTO = Engine.AIIntentDTO;
|
|
21
|
+
type AICapabilityDTO = Engine.AICapabilityDTO;
|
|
22
|
+
type AIPageContextDTO = Engine.AIPageContextDTO;
|
|
23
|
+
type AIChatWithIntentOptionsDTO = Engine.AIChatWithIntentOptionsDTO;
|
|
24
|
+
type AIPromptRoleDTO = Session.AIPromptRoleDTO;
|
|
25
|
+
type AISessionConfigDTO = Session.AISessionConfigDTO;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=at-domain-dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"at-domain-dto.d.ts","sourceRoot":"","sources":["../src/at-domain-dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,IAAc,CAAC;AAEvC;;;GAGG;AACH,yBAAiB,WAAW,CAAC;IACzB,KAAY,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,CAAC;IAErE,KAAY,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACvD,KAAY,8BAA8B,GAAG,MAAM,CAAC,8BAA8B,CAAC;IAEnF,KAAY,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAC7D,KAAY,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAEvD,KAAY,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7C,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAEvD,KAAY,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC;IAE3E,KAAY,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IACtD,KAAY,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAC/D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type * as AIWire from "./ai/transport/wire.types";
|
|
2
|
+
import type * as AIChat from "./ai/transport/chat";
|
|
3
|
+
import { type ATAPIErrorCodeDTO as ATAPIErrorCodeType } from "./core/transport/errors";
|
|
4
|
+
import type * as CoreResponses from "./core/transport/responses";
|
|
5
|
+
export declare const ATTransportDTO: {
|
|
6
|
+
readonly ATAPIErrorCodeDTO: {
|
|
7
|
+
readonly AI_SESSION_EXPIRED: 4501;
|
|
8
|
+
readonly AI_SESSION_NOT_FOUND: 4502;
|
|
9
|
+
readonly AI_REQUEST_CONTEXT_MISSING: 4503;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare namespace ATTransportDTO {
|
|
13
|
+
type ATAPIErrorCodeDTO = ATAPIErrorCodeType;
|
|
14
|
+
type ResponseSuccessDTO<T> = CoreResponses.ResponseSuccessDTO<T>;
|
|
15
|
+
type ResponseErrorDTO = CoreResponses.ResponseErrorDTO;
|
|
16
|
+
type AIChatRequestDTO = AIChat.AIChatRequestDTO;
|
|
17
|
+
type AIChatResponseDTO = AIChat.AIChatResponseDTO;
|
|
18
|
+
type AIChatWithIntentRequestDTO = AIChat.AIChatWithIntentRequestDTO;
|
|
19
|
+
type AIChatWithIntentResponseDTO = AIChat.AIChatWithIntentResponseDTO;
|
|
20
|
+
type AIChatMessageWireDTO = AIWire.AIChatMessageWireDTO;
|
|
21
|
+
type AIChatOptionsWireDTO = AIWire.AIChatOptionsWireDTO;
|
|
22
|
+
type AIRequestContextWireDTO = AIWire.AIRequestContextWireDTO;
|
|
23
|
+
type AIChatWithIntentOptionsWireDTO = AIWire.AIChatWithIntentOptionsWireDTO;
|
|
24
|
+
type AIIntentWireDTO = AIWire.AIIntentWireDTO;
|
|
25
|
+
type AICapabilityWireDTO = AIWire.AICapabilityWireDTO;
|
|
26
|
+
type AIPageContextWireDTO = AIWire.AIPageContextWireDTO;
|
|
27
|
+
type AISessionConfigWireDTO = AIWire.AISessionConfigWireDTO;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=at-transport-dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"at-transport-dto.d.ts","sourceRoot":"","sources":["../src/at-transport-dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAEH,KAAK,iBAAiB,IAAI,kBAAkB,EAC/C,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAEjE,eAAO,MAAM,cAAc;;;;;;CAEjB,CAAC;AAEX,yBAAiB,cAAc,CAAC;IAE5B,KAAY,iBAAiB,GAAG,kBAAkB,CAAC;IAGnD,KAAY,kBAAkB,CAAC,CAAC,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACxE,KAAY,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAC;IAG9D,KAAY,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACvD,KAAY,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACzD,KAAY,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC;IAC3E,KAAY,2BAA2B,GAAG,MAAM,CAAC,2BAA2B,CAAC;IAG7E,KAAY,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC/D,KAAY,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAC/D,KAAY,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,CAAC;IACrE,KAAY,8BAA8B,GAAG,MAAM,CAAC,8BAA8B,CAAC;IAEnF,KAAY,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACrD,KAAY,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAC7D,KAAY,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IAE/D,KAAY,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;CACtE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const toSnakeKey: (k: string) => string;
|
|
2
|
+
export declare const toCamelKey: (k: string) => string;
|
|
3
|
+
export declare function toSnakeDeep<T>(value: T, exceptions?: Set<string>): any;
|
|
4
|
+
export declare function toCamelDeep<T>(value: T): any;
|
|
5
|
+
//# sourceMappingURL=case.runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.runtime.d.ts","sourceRoot":"","sources":["../../src/casing/case.runtime.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,WACqB,CAAC;AAE1D,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,WACoB,CAAC;AAEzD,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,cAAoB,GAAG,GAAG,CAY5E;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAW5C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SnakeCase<S extends string> = S extends `${infer H}${infer T}` ? T extends Uncapitalize<T> ? `${Lowercase<H>}${SnakeCase<T>}` : `${Lowercase<H>}_${SnakeCase<Uncapitalize<T>>}` : S;
|
|
2
|
+
export type CamelCase<S extends string> = S extends `${infer A}_${infer B}` ? `${A}${Capitalize<CamelCase<B>>}` : S;
|
|
3
|
+
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
4
|
+
type Builtin = Primitive | Date | RegExp | Error;
|
|
5
|
+
export type DeepSnakeKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
6
|
+
[I in keyof T]: DeepSnakeKeys<T[I]>;
|
|
7
|
+
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepSnakeKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepSnakeKeys<K>, DeepSnakeKeys<V>> : T extends Set<infer U> ? Set<DeepSnakeKeys<U>> : T extends object ? {
|
|
8
|
+
[K in keyof T as K extends string ? SnakeCase<K> : K]: DeepSnakeKeys<T[K]>;
|
|
9
|
+
} : T;
|
|
10
|
+
export type DeepCamelKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
11
|
+
[I in keyof T]: DeepCamelKeys<T[I]>;
|
|
12
|
+
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepCamelKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepCamelKeys<K>, DeepCamelKeys<V>> : T extends Set<infer U> ? Set<DeepCamelKeys<U>> : T extends object ? {
|
|
13
|
+
[K in keyof T as K extends string ? CamelCase<K> : K]: DeepCamelKeys<T[K]>;
|
|
14
|
+
} : T;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=case.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.types.d.ts","sourceRoot":"","sources":["../../src/casing/case.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/casing/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cjs.d.ts","sourceRoot":"","sources":["../src/cjs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const ATAPIErrorCodeDTO: {
|
|
2
|
+
readonly AI_SESSION_EXPIRED: 4501;
|
|
3
|
+
readonly AI_SESSION_NOT_FOUND: 4502;
|
|
4
|
+
readonly AI_REQUEST_CONTEXT_MISSING: 4503;
|
|
5
|
+
};
|
|
6
|
+
export type ATAPIErrorCodeDTO = typeof ATAPIErrorCodeDTO[keyof typeof ATAPIErrorCodeDTO];
|
|
7
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/core/transport/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/core/transport/responses.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;CACX;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB"}
|
package/dist/domain.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/domain.ts"],"sourcesContent":["export type * from \"./ai/domain/engine\";\r\nexport type * from \"./ai/domain/session\";\r\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/domain.ts"],"sourcesContent":["export type * from \"./ai/domain/engine\";\r\nexport type * from \"./ai/domain/session\";\r\n\r\n// named bucket type for auto-import\r\nexport type ATDomainDTO = typeof import(\"./domain\");\r\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/domain.d.ts
CHANGED
|
@@ -1,72 +1,4 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type AIChatMessageDTO = {
|
|
6
|
-
role: "system";
|
|
7
|
-
content: ATChatMessageContentDTO;
|
|
8
|
-
} | {
|
|
9
|
-
role: "user";
|
|
10
|
-
content: ATChatMessageContentDTO;
|
|
11
|
-
} | {
|
|
12
|
-
role: "assistant";
|
|
13
|
-
content: ATChatMessageContentDTO;
|
|
14
|
-
};
|
|
15
|
-
type AIChatOptionsResponseFormatDTO = {
|
|
16
|
-
type: "text";
|
|
17
|
-
} | {
|
|
18
|
-
type: "json";
|
|
19
|
-
jsonSchema?: Record<string, any>;
|
|
20
|
-
};
|
|
21
|
-
interface AIRequestContextDTO {
|
|
22
|
-
messages?: AIChatMessageDTO[];
|
|
23
|
-
sessionID?: string;
|
|
24
|
-
engine?: string;
|
|
25
|
-
engineType?: string;
|
|
26
|
-
}
|
|
27
|
-
interface AIChatOptionsDTO {
|
|
28
|
-
model?: string;
|
|
29
|
-
temperature?: number;
|
|
30
|
-
maxTokens?: number;
|
|
31
|
-
engineID?: string;
|
|
32
|
-
responseFormat?: AIChatOptionsResponseFormatDTO;
|
|
33
|
-
requestContext?: AIRequestContextDTO;
|
|
34
|
-
}
|
|
35
|
-
interface AIIntentDTO {
|
|
36
|
-
capabilityID: string;
|
|
37
|
-
params?: object;
|
|
38
|
-
confidence?: number;
|
|
39
|
-
reason?: string;
|
|
40
|
-
output?: unknown;
|
|
41
|
-
}
|
|
42
|
-
interface AICapabilityDTO {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
}
|
|
46
|
-
interface AIPageContextDTO {
|
|
47
|
-
location?: string;
|
|
48
|
-
data?: unknown;
|
|
49
|
-
}
|
|
50
|
-
interface AIChatWithIntentOptionsDTO extends AIChatOptionsDTO {
|
|
51
|
-
capabilities?: AICapabilityDTO[];
|
|
52
|
-
pageContext?: AIPageContextDTO | null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** A single role message in a prompt (system, user, assistant, etc.) */
|
|
56
|
-
interface AIPromptRoleDTO {
|
|
57
|
-
/** Role type: system | user | assistant */
|
|
58
|
-
role: "system" | "user" | "assistant";
|
|
59
|
-
/**
|
|
60
|
-
* Content of the message.
|
|
61
|
-
* Can include placeholders like {{var:name}} or {{prompt:other.prompt.id}}.
|
|
62
|
-
*/
|
|
63
|
-
content: string;
|
|
64
|
-
}
|
|
65
|
-
interface AISessionConfigDTO {
|
|
66
|
-
id: string;
|
|
67
|
-
messages?: AIPromptRoleDTO[];
|
|
68
|
-
priority?: number;
|
|
69
|
-
slot?: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type { AICapabilityDTO, AIChatMessageDTO, AIChatOptionsDTO, AIChatOptionsResponseFormatDTO, AIChatWithIntentOptionsDTO, AIIntentDTO, AIPageContextDTO, AIPromptRoleDTO, AIRequestContextDTO, AISessionConfigDTO, ATChatMessageContentDTO };
|
|
1
|
+
export type * from "./ai/domain/engine";
|
|
2
|
+
export type * from "./ai/domain/session";
|
|
3
|
+
export type ATDomainDTO = typeof import("./domain");
|
|
4
|
+
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../src/domain.ts"],"names":[],"mappings":"AAAA,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,qBAAqB,CAAC;AAGzC,MAAM,MAAM,WAAW,GAAG,cAAc,UAAU,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const toCamelKey: (k: string) => string;
|
|
6
|
-
declare function toSnakeDeep<T>(value: T, exceptions?: Set<string>): any;
|
|
7
|
-
declare function toCamelDeep<T>(value: T): any;
|
|
8
|
-
|
|
9
|
-
declare const case_runtime_toCamelDeep: typeof toCamelDeep;
|
|
10
|
-
declare const case_runtime_toCamelKey: typeof toCamelKey;
|
|
11
|
-
declare const case_runtime_toSnakeDeep: typeof toSnakeDeep;
|
|
12
|
-
declare const case_runtime_toSnakeKey: typeof toSnakeKey;
|
|
13
|
-
declare namespace case_runtime {
|
|
14
|
-
export { case_runtime_toCamelDeep as toCamelDeep, case_runtime_toCamelKey as toCamelKey, case_runtime_toSnakeDeep as toSnakeDeep, case_runtime_toSnakeKey as toSnakeKey };
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const index_CamelCase: typeof CamelCase;
|
|
18
|
-
declare const index_DeepCamelKeys: typeof DeepCamelKeys;
|
|
19
|
-
declare const index_DeepSnakeKeys: typeof DeepSnakeKeys;
|
|
20
|
-
declare const index_SnakeCase: typeof SnakeCase;
|
|
21
|
-
declare const index_toCamelDeep: typeof toCamelDeep;
|
|
22
|
-
declare const index_toCamelKey: typeof toCamelKey;
|
|
23
|
-
declare const index_toSnakeDeep: typeof toSnakeDeep;
|
|
24
|
-
declare const index_toSnakeKey: typeof toSnakeKey;
|
|
25
|
-
declare namespace index {
|
|
26
|
-
export { index_CamelCase as CamelCase, index_DeepCamelKeys as DeepCamelKeys, index_DeepSnakeKeys as DeepSnakeKeys, case_runtime as Runtime, index_SnakeCase as SnakeCase, case_types as Types, index_toCamelDeep as toCamelDeep, index_toCamelKey as toCamelKey, index_toSnakeDeep as toSnakeDeep, index_toSnakeKey as toSnakeKey };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { index as Casing };
|
|
1
|
+
export * as Casing from "./casing";
|
|
2
|
+
export { ATAPIErrorCodeDTO } from "./core/transport/errors";
|
|
3
|
+
export type { ATAPIErrorCodeDTO as ATAPIErrorCodeDTOType } from "./core/transport/errors";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAGnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/transport.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transport.ts","../src/core/transport/errors.ts"],"sourcesContent":["export type * from \"./ai/transport/wire.types\";\r\nexport type * from \"./ai/transport/chat\";\r\nexport type * from \"./core/transport/responses\";\r\n\r\
|
|
1
|
+
{"version":3,"sources":["../src/transport.ts","../src/core/transport/errors.ts"],"sourcesContent":["export type * from \"./ai/transport/wire.types\";\r\nexport type * from \"./ai/transport/chat\";\r\nexport type * from \"./core/transport/responses\";\r\n\r\nexport { ATAPIErrorCodeDTO } from \"./core/transport/errors\";\r\nexport type { ATAPIErrorCodeDTO as ATAPIErrorCodeDTOType } from \"./core/transport/errors\";\r\n\r\nexport type ATTransportDTO = typeof import(\"./transport\");\r\n","export const ATAPIErrorCodeDTO = {\r\n // 45xx – AI / workflow\r\n AI_SESSION_EXPIRED: 4501,\r\n AI_SESSION_NOT_FOUND: 4502,\r\n AI_REQUEST_CONTEXT_MISSING: 4503,\r\n} as const;\r\n\r\nexport type ATAPIErrorCodeDTO = typeof ATAPIErrorCodeDTO[keyof typeof ATAPIErrorCodeDTO];"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,oBAAoB;AAAA;AAAA,EAE7B,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,4BAA4B;AAChC;","names":[]}
|
package/dist/transport.d.ts
CHANGED
|
@@ -1,50 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
type AIChatWithIntentOptionsWireDTO = DeepSnakeKeys<AIChatWithIntentOptionsDTO>;
|
|
9
|
-
type AIIntentWireDTO = DeepSnakeKeys<AIIntentDTO>;
|
|
10
|
-
type AICapabilityWireDTO = DeepSnakeKeys<AICapabilityDTO>;
|
|
11
|
-
type AIPageContextWireDTO = DeepSnakeKeys<AIPageContextDTO>;
|
|
12
|
-
type AISessionConfigWireDTO = DeepSnakeKeys<AISessionConfigDTO>;
|
|
13
|
-
|
|
14
|
-
interface AIChatRequestDTO {
|
|
15
|
-
session_id: string;
|
|
16
|
-
messages: AIChatMessageWireDTO[];
|
|
17
|
-
options?: AIChatWithIntentOptionsWireDTO;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface AIChatResponseDTO {
|
|
21
|
-
message: AIChatMessageWireDTO;
|
|
22
|
-
usage?: {
|
|
23
|
-
tokens?: number;
|
|
24
|
-
};
|
|
25
|
-
raw?: any;
|
|
26
|
-
debug?: any;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface AIChatWithIntentRequestDTO {
|
|
30
|
-
session_id: string;
|
|
31
|
-
messages: AIChatMessageWireDTO[];
|
|
32
|
-
options?: AIChatWithIntentOptionsWireDTO;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface AIChatWithIntentResponseDTO extends AIChatResponseDTO {
|
|
36
|
-
intents?: AIIntentWireDTO[];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface ResponseSuccessDTO<T> {
|
|
40
|
-
code: number;
|
|
41
|
-
data: T;
|
|
42
|
-
}
|
|
43
|
-
interface ResponseErrorDTO {
|
|
44
|
-
code: number;
|
|
45
|
-
message: string;
|
|
46
|
-
errors?: any[];
|
|
47
|
-
timestamp: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type { AICapabilityWireDTO, AIChatMessageWireDTO, AIChatOptionsWireDTO, AIChatRequestDTO, AIChatResponseDTO, AIChatWithIntentOptionsWireDTO, AIChatWithIntentRequestDTO, AIChatWithIntentResponseDTO, AIIntentWireDTO, AIPageContextWireDTO, AIRequestContextWireDTO, AISessionConfigWireDTO, ResponseErrorDTO, ResponseSuccessDTO };
|
|
1
|
+
export type * from "./ai/transport/wire.types";
|
|
2
|
+
export type * from "./ai/transport/chat";
|
|
3
|
+
export type * from "./core/transport/responses";
|
|
4
|
+
export { ATAPIErrorCodeDTO } from "./core/transport/errors";
|
|
5
|
+
export type { ATAPIErrorCodeDTO as ATAPIErrorCodeDTOType } from "./core/transport/errors";
|
|
6
|
+
export type ATTransportDTO = typeof import("./transport");
|
|
7
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,4BAA4B,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE1F,MAAM,MAAM,cAAc,GAAG,cAAc,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "at-shared-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.34",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"import": "./dist/index.mjs"
|
|
12
12
|
},
|
|
13
13
|
"./domain": {
|
|
14
|
-
"types": "./dist/domain.d.ts"
|
|
14
|
+
"types": "./dist/domain.d.ts",
|
|
15
|
+
"require": "./dist/domain.cjs",
|
|
16
|
+
"import": "./dist/domain.mjs"
|
|
15
17
|
},
|
|
16
18
|
"./transport": {
|
|
17
19
|
"types": "./dist/transport.d.ts",
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
"sideEffects": false,
|
|
26
28
|
"scripts": {
|
|
27
29
|
"clean": "rimraf dist",
|
|
28
|
-
"build": "npm run clean && tsup",
|
|
30
|
+
"build": "npm run clean && tsup && tsc -p tsconfig.types.json",
|
|
29
31
|
"prepublishOnly": "npm run build"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
package/dist/domain.d.mts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
type ATChatMessageContentDTO = string | null;
|
|
2
|
-
/**
|
|
3
|
-
* Internal representation — can include nulls for assistant messages, etc.
|
|
4
|
-
*/
|
|
5
|
-
type AIChatMessageDTO = {
|
|
6
|
-
role: "system";
|
|
7
|
-
content: ATChatMessageContentDTO;
|
|
8
|
-
} | {
|
|
9
|
-
role: "user";
|
|
10
|
-
content: ATChatMessageContentDTO;
|
|
11
|
-
} | {
|
|
12
|
-
role: "assistant";
|
|
13
|
-
content: ATChatMessageContentDTO;
|
|
14
|
-
};
|
|
15
|
-
type AIChatOptionsResponseFormatDTO = {
|
|
16
|
-
type: "text";
|
|
17
|
-
} | {
|
|
18
|
-
type: "json";
|
|
19
|
-
jsonSchema?: Record<string, any>;
|
|
20
|
-
};
|
|
21
|
-
interface AIRequestContextDTO {
|
|
22
|
-
messages?: AIChatMessageDTO[];
|
|
23
|
-
sessionID?: string;
|
|
24
|
-
engine?: string;
|
|
25
|
-
engineType?: string;
|
|
26
|
-
}
|
|
27
|
-
interface AIChatOptionsDTO {
|
|
28
|
-
model?: string;
|
|
29
|
-
temperature?: number;
|
|
30
|
-
maxTokens?: number;
|
|
31
|
-
engineID?: string;
|
|
32
|
-
responseFormat?: AIChatOptionsResponseFormatDTO;
|
|
33
|
-
requestContext?: AIRequestContextDTO;
|
|
34
|
-
}
|
|
35
|
-
interface AIIntentDTO {
|
|
36
|
-
capabilityID: string;
|
|
37
|
-
params?: object;
|
|
38
|
-
confidence?: number;
|
|
39
|
-
reason?: string;
|
|
40
|
-
output?: unknown;
|
|
41
|
-
}
|
|
42
|
-
interface AICapabilityDTO {
|
|
43
|
-
id: string;
|
|
44
|
-
description: string;
|
|
45
|
-
}
|
|
46
|
-
interface AIPageContextDTO {
|
|
47
|
-
location?: string;
|
|
48
|
-
data?: unknown;
|
|
49
|
-
}
|
|
50
|
-
interface AIChatWithIntentOptionsDTO extends AIChatOptionsDTO {
|
|
51
|
-
capabilities?: AICapabilityDTO[];
|
|
52
|
-
pageContext?: AIPageContextDTO | null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** A single role message in a prompt (system, user, assistant, etc.) */
|
|
56
|
-
interface AIPromptRoleDTO {
|
|
57
|
-
/** Role type: system | user | assistant */
|
|
58
|
-
role: "system" | "user" | "assistant";
|
|
59
|
-
/**
|
|
60
|
-
* Content of the message.
|
|
61
|
-
* Can include placeholders like {{var:name}} or {{prompt:other.prompt.id}}.
|
|
62
|
-
*/
|
|
63
|
-
content: string;
|
|
64
|
-
}
|
|
65
|
-
interface AISessionConfigDTO {
|
|
66
|
-
id: string;
|
|
67
|
-
messages?: AIPromptRoleDTO[];
|
|
68
|
-
priority?: number;
|
|
69
|
-
slot?: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type { AICapabilityDTO, AIChatMessageDTO, AIChatOptionsDTO, AIChatOptionsResponseFormatDTO, AIChatWithIntentOptionsDTO, AIIntentDTO, AIPageContextDTO, AIPromptRoleDTO, AIRequestContextDTO, AISessionConfigDTO, ATChatMessageContentDTO };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type SnakeCase<S extends string> = S extends `${infer H}${infer T}` ? T extends Uncapitalize<T> ? `${Lowercase<H>}${SnakeCase<T>}` : `${Lowercase<H>}_${SnakeCase<Uncapitalize<T>>}` : S;
|
|
2
|
-
type CamelCase<S extends string> = S extends `${infer A}_${infer B}` ? `${A}${Capitalize<CamelCase<B>>}` : S;
|
|
3
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
4
|
-
type Builtin = Primitive | Date | RegExp | Error;
|
|
5
|
-
type DeepSnakeKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
6
|
-
[I in keyof T]: DeepSnakeKeys<T[I]>;
|
|
7
|
-
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepSnakeKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepSnakeKeys<K>, DeepSnakeKeys<V>> : T extends Set<infer U> ? Set<DeepSnakeKeys<U>> : T extends object ? {
|
|
8
|
-
[K in keyof T as K extends string ? SnakeCase<K> : K]: DeepSnakeKeys<T[K]>;
|
|
9
|
-
} : T;
|
|
10
|
-
type DeepCamelKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
11
|
-
[I in keyof T]: DeepCamelKeys<T[I]>;
|
|
12
|
-
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepCamelKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepCamelKeys<K>, DeepCamelKeys<V>> : T extends Set<infer U> ? Set<DeepCamelKeys<U>> : T extends object ? {
|
|
13
|
-
[K in keyof T as K extends string ? CamelCase<K> : K]: DeepCamelKeys<T[K]>;
|
|
14
|
-
} : T;
|
|
15
|
-
|
|
16
|
-
type case_types_CamelCase<S extends string> = CamelCase<S>;
|
|
17
|
-
type case_types_DeepCamelKeys<T> = DeepCamelKeys<T>;
|
|
18
|
-
type case_types_DeepSnakeKeys<T> = DeepSnakeKeys<T>;
|
|
19
|
-
type case_types_SnakeCase<S extends string> = SnakeCase<S>;
|
|
20
|
-
declare namespace case_types {
|
|
21
|
-
export type { case_types_CamelCase as CamelCase, case_types_DeepCamelKeys as DeepCamelKeys, case_types_DeepSnakeKeys as DeepSnakeKeys, case_types_SnakeCase as SnakeCase };
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare const ATAPIErrorCodeDTO: {
|
|
25
|
-
readonly AI_SESSION_EXPIRED: 4501;
|
|
26
|
-
readonly AI_SESSION_NOT_FOUND: 4502;
|
|
27
|
-
readonly AI_REQUEST_CONTEXT_MISSING: 4503;
|
|
28
|
-
};
|
|
29
|
-
type ATAPIErrorCodeDTO = typeof ATAPIErrorCodeDTO[keyof typeof ATAPIErrorCodeDTO];
|
|
30
|
-
|
|
31
|
-
export { ATAPIErrorCodeDTO as A, type CamelCase as C, type DeepCamelKeys as D, type SnakeCase as S, type DeepSnakeKeys as a, case_types as c };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
type SnakeCase<S extends string> = S extends `${infer H}${infer T}` ? T extends Uncapitalize<T> ? `${Lowercase<H>}${SnakeCase<T>}` : `${Lowercase<H>}_${SnakeCase<Uncapitalize<T>>}` : S;
|
|
2
|
-
type CamelCase<S extends string> = S extends `${infer A}_${infer B}` ? `${A}${Capitalize<CamelCase<B>>}` : S;
|
|
3
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
4
|
-
type Builtin = Primitive | Date | RegExp | Error;
|
|
5
|
-
type DeepSnakeKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
6
|
-
[I in keyof T]: DeepSnakeKeys<T[I]>;
|
|
7
|
-
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepSnakeKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepSnakeKeys<K>, DeepSnakeKeys<V>> : T extends Set<infer U> ? Set<DeepSnakeKeys<U>> : T extends object ? {
|
|
8
|
-
[K in keyof T as K extends string ? SnakeCase<K> : K]: DeepSnakeKeys<T[K]>;
|
|
9
|
-
} : T;
|
|
10
|
-
type DeepCamelKeys<T> = T extends Builtin ? T : T extends (...args: any[]) => any ? T : T extends readonly [any, ...any[]] ? {
|
|
11
|
-
[I in keyof T]: DeepCamelKeys<T[I]>;
|
|
12
|
-
} : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepCamelKeys<U>> : T extends Map<infer K, infer V> ? Map<DeepCamelKeys<K>, DeepCamelKeys<V>> : T extends Set<infer U> ? Set<DeepCamelKeys<U>> : T extends object ? {
|
|
13
|
-
[K in keyof T as K extends string ? CamelCase<K> : K]: DeepCamelKeys<T[K]>;
|
|
14
|
-
} : T;
|
|
15
|
-
|
|
16
|
-
type case_types_CamelCase<S extends string> = CamelCase<S>;
|
|
17
|
-
type case_types_DeepCamelKeys<T> = DeepCamelKeys<T>;
|
|
18
|
-
type case_types_DeepSnakeKeys<T> = DeepSnakeKeys<T>;
|
|
19
|
-
type case_types_SnakeCase<S extends string> = SnakeCase<S>;
|
|
20
|
-
declare namespace case_types {
|
|
21
|
-
export type { case_types_CamelCase as CamelCase, case_types_DeepCamelKeys as DeepCamelKeys, case_types_DeepSnakeKeys as DeepSnakeKeys, case_types_SnakeCase as SnakeCase };
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare const ATAPIErrorCodeDTO: {
|
|
25
|
-
readonly AI_SESSION_EXPIRED: 4501;
|
|
26
|
-
readonly AI_SESSION_NOT_FOUND: 4502;
|
|
27
|
-
readonly AI_REQUEST_CONTEXT_MISSING: 4503;
|
|
28
|
-
};
|
|
29
|
-
type ATAPIErrorCodeDTO = typeof ATAPIErrorCodeDTO[keyof typeof ATAPIErrorCodeDTO];
|
|
30
|
-
|
|
31
|
-
export { ATAPIErrorCodeDTO as A, type CamelCase as C, type DeepCamelKeys as D, type SnakeCase as S, type DeepSnakeKeys as a, case_types as c };
|
package/dist/index.d.mts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { C as CamelCase, D as DeepCamelKeys, a as DeepSnakeKeys, S as SnakeCase, c as case_types } from './errors-BL8YRY7y.mjs';
|
|
2
|
-
export { A as ATAPIErrorCodeDTO, A as ATAPIErrorCodeDTOType } from './errors-BL8YRY7y.mjs';
|
|
3
|
-
|
|
4
|
-
declare const toSnakeKey: (k: string) => string;
|
|
5
|
-
declare const toCamelKey: (k: string) => string;
|
|
6
|
-
declare function toSnakeDeep<T>(value: T, exceptions?: Set<string>): any;
|
|
7
|
-
declare function toCamelDeep<T>(value: T): any;
|
|
8
|
-
|
|
9
|
-
declare const case_runtime_toCamelDeep: typeof toCamelDeep;
|
|
10
|
-
declare const case_runtime_toCamelKey: typeof toCamelKey;
|
|
11
|
-
declare const case_runtime_toSnakeDeep: typeof toSnakeDeep;
|
|
12
|
-
declare const case_runtime_toSnakeKey: typeof toSnakeKey;
|
|
13
|
-
declare namespace case_runtime {
|
|
14
|
-
export { case_runtime_toCamelDeep as toCamelDeep, case_runtime_toCamelKey as toCamelKey, case_runtime_toSnakeDeep as toSnakeDeep, case_runtime_toSnakeKey as toSnakeKey };
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const index_CamelCase: typeof CamelCase;
|
|
18
|
-
declare const index_DeepCamelKeys: typeof DeepCamelKeys;
|
|
19
|
-
declare const index_DeepSnakeKeys: typeof DeepSnakeKeys;
|
|
20
|
-
declare const index_SnakeCase: typeof SnakeCase;
|
|
21
|
-
declare const index_toCamelDeep: typeof toCamelDeep;
|
|
22
|
-
declare const index_toCamelKey: typeof toCamelKey;
|
|
23
|
-
declare const index_toSnakeDeep: typeof toSnakeDeep;
|
|
24
|
-
declare const index_toSnakeKey: typeof toSnakeKey;
|
|
25
|
-
declare namespace index {
|
|
26
|
-
export { index_CamelCase as CamelCase, index_DeepCamelKeys as DeepCamelKeys, index_DeepSnakeKeys as DeepSnakeKeys, case_runtime as Runtime, index_SnakeCase as SnakeCase, case_types as Types, index_toCamelDeep as toCamelDeep, index_toCamelKey as toCamelKey, index_toSnakeDeep as toSnakeDeep, index_toSnakeKey as toSnakeKey };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { index as Casing };
|
package/dist/transport.d.mts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { a as DeepSnakeKeys } from './errors-BL8YRY7y.mjs';
|
|
2
|
-
export { A as ATAPIErrorCodeDTO, A as ATAPIErrorCodeDTOType } from './errors-BL8YRY7y.mjs';
|
|
3
|
-
import { AIChatMessageDTO, AIChatOptionsDTO, AIRequestContextDTO, AIChatWithIntentOptionsDTO, AIIntentDTO, AICapabilityDTO, AIPageContextDTO, AISessionConfigDTO } from './domain.mjs';
|
|
4
|
-
|
|
5
|
-
type AIChatMessageWireDTO = DeepSnakeKeys<AIChatMessageDTO>;
|
|
6
|
-
type AIChatOptionsWireDTO = DeepSnakeKeys<AIChatOptionsDTO>;
|
|
7
|
-
type AIRequestContextWireDTO = DeepSnakeKeys<AIRequestContextDTO>;
|
|
8
|
-
type AIChatWithIntentOptionsWireDTO = DeepSnakeKeys<AIChatWithIntentOptionsDTO>;
|
|
9
|
-
type AIIntentWireDTO = DeepSnakeKeys<AIIntentDTO>;
|
|
10
|
-
type AICapabilityWireDTO = DeepSnakeKeys<AICapabilityDTO>;
|
|
11
|
-
type AIPageContextWireDTO = DeepSnakeKeys<AIPageContextDTO>;
|
|
12
|
-
type AISessionConfigWireDTO = DeepSnakeKeys<AISessionConfigDTO>;
|
|
13
|
-
|
|
14
|
-
interface AIChatRequestDTO {
|
|
15
|
-
session_id: string;
|
|
16
|
-
messages: AIChatMessageWireDTO[];
|
|
17
|
-
options?: AIChatWithIntentOptionsWireDTO;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface AIChatResponseDTO {
|
|
21
|
-
message: AIChatMessageWireDTO;
|
|
22
|
-
usage?: {
|
|
23
|
-
tokens?: number;
|
|
24
|
-
};
|
|
25
|
-
raw?: any;
|
|
26
|
-
debug?: any;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface AIChatWithIntentRequestDTO {
|
|
30
|
-
session_id: string;
|
|
31
|
-
messages: AIChatMessageWireDTO[];
|
|
32
|
-
options?: AIChatWithIntentOptionsWireDTO;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface AIChatWithIntentResponseDTO extends AIChatResponseDTO {
|
|
36
|
-
intents?: AIIntentWireDTO[];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface ResponseSuccessDTO<T> {
|
|
40
|
-
code: number;
|
|
41
|
-
data: T;
|
|
42
|
-
}
|
|
43
|
-
interface ResponseErrorDTO {
|
|
44
|
-
code: number;
|
|
45
|
-
message: string;
|
|
46
|
-
errors?: any[];
|
|
47
|
-
timestamp: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type { AICapabilityWireDTO, AIChatMessageWireDTO, AIChatOptionsWireDTO, AIChatRequestDTO, AIChatResponseDTO, AIChatWithIntentOptionsWireDTO, AIChatWithIntentRequestDTO, AIChatWithIntentResponseDTO, AIIntentWireDTO, AIPageContextWireDTO, AIRequestContextWireDTO, AISessionConfigWireDTO, ResponseErrorDTO, ResponseSuccessDTO };
|