Skip to content

Instantly share code, notes, and snippets.

@works-tabei
Created February 7, 2026 09:24
Show Gist options
  • Select an option

  • Save works-tabei/8a7017cd11da922e8b007e342af1c2ca to your computer and use it in GitHub Desktop.

Select an option

Save works-tabei/8a7017cd11da922e8b007e342af1c2ca to your computer and use it in GitHub Desktop.
// Gnox Integration Types
// --- 共通基底インターフェース ---
export interface GnoxBaseMessage {
msgId: number;
siteCd: string;
siteKey: string;
eventSeq?: number;
eventTime: string; // YYYYMMDDHHMMSS
crn?: string;
refNo?: string;
}
// --- 通話関連イベント (1001, 3001, 3002, 3003 等) ---
export interface CallEvent extends GnoxBaseMessage {
callDirection: "1" | "2"; // 1:Inbound, 2:Outbound
callTp: string;
userTel: string;
centerTel?: string;
centerTelNm?: string;
agentId?: string;
extNo?: string;
skillCd?: string;
skillNm?: string;
// 転送時
transferFromAgentId?: string;
transferFromExt?: string;
// 架電時
callerId?: string;
callStartTime?: string;
callEndTime?: string;
callDuration?: number;
holdCount?: number;
holdDuration?: number;
callResult?: string;
callResultDetail?: string;
}
// --- 録音・要約イベント (3004) ---
export interface RecordingEvent extends GnoxBaseMessage {
userTel: string;
callDirection: string;
recordingUrl: string[];
callSummaryTitle?: string;
callSummary?: string[];
callTranscript?: TranscriptItem[];
}
export interface TranscriptItem {
channel: number; // 0:Agent, 1:Customer
start: number;
end: number;
token: string;
}
// --- エージェント状態イベント (8001) ---
export interface AgentStatusEvent extends GnoxBaseMessage {
agentId: string;
extNo: string;
presenceState: string; // ready, not_ready, logout
lineState: string; // idle, ringing, talking, hold, acw
reason?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment