feat(core): add shared types, config validation, and error utilities
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
82
src/types/sage.ts
Normal file
82
src/types/sage.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
export interface SageConfig {
|
||||
url: string;
|
||||
user: string;
|
||||
password: string;
|
||||
endpoint: string;
|
||||
poolAlias: string;
|
||||
language: string;
|
||||
rejectUnauthorized: boolean;
|
||||
}
|
||||
|
||||
export interface RestQueryOptions {
|
||||
entity: string;
|
||||
representation?: string;
|
||||
where?: string;
|
||||
orderBy?: string;
|
||||
count?: number;
|
||||
nextUrl?: string;
|
||||
select?: string;
|
||||
}
|
||||
|
||||
export interface RestQueryResult {
|
||||
records: unknown[];
|
||||
pagination: {
|
||||
returned: number;
|
||||
hasMore: boolean;
|
||||
nextUrl?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface RestDetailResult {
|
||||
record: unknown;
|
||||
}
|
||||
|
||||
export interface SoapCallContext {
|
||||
codeLang: string;
|
||||
poolAlias: string;
|
||||
poolId: string;
|
||||
requestConfig: string;
|
||||
}
|
||||
|
||||
export interface SoapReadOptions {
|
||||
publicName: string;
|
||||
objectName?: string;
|
||||
key: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface SoapQueryOptions {
|
||||
publicName: string;
|
||||
objectName?: string;
|
||||
listSize?: number;
|
||||
inputXml?: string;
|
||||
}
|
||||
|
||||
export interface SoapResult {
|
||||
status: number;
|
||||
data: unknown;
|
||||
messages: SoapMessage[];
|
||||
technicalInfos: SoapTechInfo[];
|
||||
}
|
||||
|
||||
export interface SoapMessage {
|
||||
type: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface SoapTechInfo {
|
||||
type: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ToolResponse {
|
||||
records?: unknown[];
|
||||
record?: unknown;
|
||||
pagination?: { returned: number; hasMore: boolean; nextUrl?: string };
|
||||
error?: string;
|
||||
hint?: string;
|
||||
}
|
||||
|
||||
export interface HealthStatus {
|
||||
rest: { status: string; latencyMs: number; endpoint: string };
|
||||
soap: { status: string; latencyMs: number; poolAlias: string };
|
||||
}
|
||||
Reference in New Issue
Block a user