@@ -124,6 +124,53 @@ class LogAPI {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Call `importLog(input)` mutation, returns multpile logs.
|
||||
*
|
||||
* @param {{importer:"MircLike"|"ForumLog", date?:Date|string|number, channel:string, timezone:string, data:string}} input
|
||||
* @returns {Promise<Log[]>}
|
||||
*/
|
||||
import(input) {
|
||||
return query(`
|
||||
mutation ImportLog($input: LogImportInput!) {
|
||||
importLog(input: $input) {
|
||||
id
|
||||
shortId
|
||||
date
|
||||
title
|
||||
eventName
|
||||
description
|
||||
open
|
||||
channel {
|
||||
name
|
||||
logged
|
||||
hub
|
||||
eventName
|
||||
locationName
|
||||
}
|
||||
characters {
|
||||
id
|
||||
nicks
|
||||
author
|
||||
name
|
||||
shortName
|
||||
description
|
||||
}
|
||||
posts {
|
||||
id
|
||||
position
|
||||
time
|
||||
kind
|
||||
nick
|
||||
text
|
||||
}
|
||||
}
|
||||
}
|
||||
`, {input}, {permissions: ["log.add"]}).then(({importLog}) => {
|
||||
return importLog.map(d => Log.fromData(d))
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Call `editLog(input)` mutation, returns the id and all editable fields.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user