mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 00:43:48 +03:00
5336032088
so users can easily take their email out of somewhere else, and import it into mox. this goes a little way to give feedback as the import progresses: upload progress is shown (surprisingly, browsers aren't doing this...), imported mailboxes/messages are counted (batched) and import issues/warnings are displayed, all sent over an SSE connection. an import token is stored in sessionstorage. if you reload the page (e.g. after a connection error), the browser will reconnect to the running import and show its progress again. and you can just abort the import before it is finished and committed, and nothing will have changed. this also imports flags/keywords from mbox files.
181 lines
3.7 KiB
JSON
181 lines
3.7 KiB
JSON
{
|
|
"Name": "Account",
|
|
"Docs": "Account exports web API functions for the account web interface. All its\nmethods are exported under /api/. Function calls require valid HTTP\nAuthentication credentials of a user.",
|
|
"Functions": [
|
|
{
|
|
"Name": "SetPassword",
|
|
"Docs": "SetPassword saves a new password for the account, invalidating the previous password.\nSessions are not interrupted, and will keep working. New login attempts must use the new password.\nPassword must be at least 8 characters.",
|
|
"Params": [
|
|
{
|
|
"Name": "password",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
}
|
|
],
|
|
"Returns": []
|
|
},
|
|
{
|
|
"Name": "Destinations",
|
|
"Docs": "Destinations returns the default domain, and the destinations (keys are email\naddresses, or localparts to the default domain).\ntodo: replace with a function that returns the whole account, when sherpadoc understands unnamed struct fields.",
|
|
"Params": [],
|
|
"Returns": [
|
|
{
|
|
"Name": "r0",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
},
|
|
{
|
|
"Name": "r1",
|
|
"Typewords": [
|
|
"{}",
|
|
"Destination"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"Name": "DestinationSave",
|
|
"Docs": "DestinationSave updates a destination.\nOldDest is compared against the current destination. If it does not match, an\nerror is returned. Otherwise newDest is saved and the configuration reloaded.",
|
|
"Params": [
|
|
{
|
|
"Name": "destName",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "oldDest",
|
|
"Typewords": [
|
|
"Destination"
|
|
]
|
|
},
|
|
{
|
|
"Name": "newDest",
|
|
"Typewords": [
|
|
"Destination"
|
|
]
|
|
}
|
|
],
|
|
"Returns": []
|
|
},
|
|
{
|
|
"Name": "ImportAbort",
|
|
"Docs": "ImportAbort aborts an import that is in progress. If the import exists and isn't\nfinished, no changes will have been made by the import.",
|
|
"Params": [
|
|
{
|
|
"Name": "importToken",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
}
|
|
],
|
|
"Returns": []
|
|
}
|
|
],
|
|
"Sections": [],
|
|
"Structs": [
|
|
{
|
|
"Name": "Domain",
|
|
"Docs": "Domain is a domain name, with one or more labels, with at least an ASCII\nrepresentation, and for IDNA non-ASCII domains a unicode representation.\nThe ASCII string must be used for DNS lookups.",
|
|
"Fields": [
|
|
{
|
|
"Name": "ASCII",
|
|
"Docs": "A non-unicode domain, e.g. with A-labels (xn--...) or NR-LDH (non-reserved letters/digits/hyphens) labels. Always in lower case.",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "Unicode",
|
|
"Docs": "Name as U-labels. Empty if this is an ASCII-only domain.",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"Name": "Destination",
|
|
"Docs": "",
|
|
"Fields": [
|
|
{
|
|
"Name": "Mailbox",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "Rulesets",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"[]",
|
|
"Ruleset"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"Name": "Ruleset",
|
|
"Docs": "",
|
|
"Fields": [
|
|
{
|
|
"Name": "SMTPMailFromRegexp",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "VerifiedDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "HeadersRegexp",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"{}",
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "ListAllowDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "Mailbox",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"string"
|
|
]
|
|
},
|
|
{
|
|
"Name": "VerifiedDNSDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
},
|
|
{
|
|
"Name": "ListAllowDNSDomain",
|
|
"Docs": "",
|
|
"Typewords": [
|
|
"Domain"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Ints": [],
|
|
"Strings": [],
|
|
"SherpaVersion": 0,
|
|
"SherpadocVersion": 1
|
|
}
|