144 lines
4.9 KiB
TypeScript
144 lines
4.9 KiB
TypeScript
export namespace main {
|
|
|
|
export class AfterSalesFileAttachment {
|
|
name: string;
|
|
path: string;
|
|
ref: string;
|
|
content: string;
|
|
extractStatus: string;
|
|
sourceMessageId: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AfterSalesFileAttachment(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.name = source["name"];
|
|
this.path = source["path"];
|
|
this.ref = source["ref"];
|
|
this.content = source["content"];
|
|
this.extractStatus = source["extractStatus"];
|
|
this.sourceMessageId = source["sourceMessageId"];
|
|
}
|
|
}
|
|
export class AfterSalesHistoryImportRequest {
|
|
conversationId: string;
|
|
roomName: string;
|
|
rawText: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AfterSalesHistoryImportRequest(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.conversationId = source["conversationId"];
|
|
this.roomName = source["roomName"];
|
|
this.rawText = source["rawText"];
|
|
}
|
|
}
|
|
export class AfterSalesIssue {
|
|
id: string;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
conversationId: string;
|
|
roomName: string;
|
|
sourceClientId: number;
|
|
sourceAccountUserId: string;
|
|
sourceAccountName: string;
|
|
customerUserId: string;
|
|
customerName: string;
|
|
issueContent: string;
|
|
imagePaths: string[];
|
|
imageRefs: string[];
|
|
fileAttachments: AfterSalesFileAttachment[];
|
|
aiSuggestion: string;
|
|
status: string;
|
|
sourceMessageIds: string[];
|
|
fingerprint: string;
|
|
collectBatchId: string;
|
|
aiConfidence: number;
|
|
aiSuggestionEdited: boolean;
|
|
assignedEngineerId: string;
|
|
assignedEngineerName: string;
|
|
dispatchStatus: string;
|
|
dispatchReason: string;
|
|
dispatchRuleId: string;
|
|
dispatchConfidence: number;
|
|
dispatchSource: string;
|
|
notifyStatus: string;
|
|
lastNotifiedAt: number;
|
|
notifyError: string;
|
|
notifyCount: number;
|
|
resolutionContent: string;
|
|
resolvedAt: string;
|
|
knowledgeArchivedAt: string;
|
|
knowledgeSourcePath: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new AfterSalesIssue(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.id = source["id"];
|
|
this.createdAt = source["createdAt"];
|
|
this.updatedAt = source["updatedAt"];
|
|
this.conversationId = source["conversationId"];
|
|
this.roomName = source["roomName"];
|
|
this.sourceClientId = source["sourceClientId"];
|
|
this.sourceAccountUserId = source["sourceAccountUserId"];
|
|
this.sourceAccountName = source["sourceAccountName"];
|
|
this.customerUserId = source["customerUserId"];
|
|
this.customerName = source["customerName"];
|
|
this.issueContent = source["issueContent"];
|
|
this.imagePaths = source["imagePaths"];
|
|
this.imageRefs = source["imageRefs"];
|
|
this.fileAttachments = this.convertValues(source["fileAttachments"], AfterSalesFileAttachment);
|
|
this.aiSuggestion = source["aiSuggestion"];
|
|
this.status = source["status"];
|
|
this.sourceMessageIds = source["sourceMessageIds"];
|
|
this.fingerprint = source["fingerprint"];
|
|
this.collectBatchId = source["collectBatchId"];
|
|
this.aiConfidence = source["aiConfidence"];
|
|
this.aiSuggestionEdited = source["aiSuggestionEdited"];
|
|
this.assignedEngineerId = source["assignedEngineerId"];
|
|
this.assignedEngineerName = source["assignedEngineerName"];
|
|
this.dispatchStatus = source["dispatchStatus"];
|
|
this.dispatchReason = source["dispatchReason"];
|
|
this.dispatchRuleId = source["dispatchRuleId"];
|
|
this.dispatchConfidence = source["dispatchConfidence"];
|
|
this.dispatchSource = source["dispatchSource"];
|
|
this.notifyStatus = source["notifyStatus"];
|
|
this.lastNotifiedAt = source["lastNotifiedAt"];
|
|
this.notifyError = source["notifyError"];
|
|
this.notifyCount = source["notifyCount"];
|
|
this.resolutionContent = source["resolutionContent"];
|
|
this.resolvedAt = source["resolvedAt"];
|
|
this.knowledgeArchivedAt = source["knowledgeArchivedAt"];
|
|
this.knowledgeSourcePath = source["knowledgeSourcePath"];
|
|
}
|
|
|
|
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
|
if (!a) {
|
|
return a;
|
|
}
|
|
if (a.slice && a.map) {
|
|
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
|
} else if ("object" === typeof a) {
|
|
if (asMap) {
|
|
for (const key of Object.keys(a)) {
|
|
a[key] = new classs(a[key]);
|
|
}
|
|
return a;
|
|
}
|
|
return new classs(a);
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
|
|
}
|
|
|