diff options
author | Maximilian Krambach <[email protected]> | 2018-07-10 12:32:26 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-07-10 12:32:26 +0000 |
commit | 4015f5b4983c8a4590aa71776880d8bc42c7918d (patch) | |
tree | 2a4b6bd7a5e791a46cfca9143559ff8e8b20234e /lang/js/src/permittedOperations.js | |
parent | js: fix verify result reporting (diff) | |
download | gpgme-4015f5b4983c8a4590aa71776880d8bc42c7918d.tar.gz gpgme-4015f5b4983c8a4590aa71776880d8bc42c7918d.zip |
js: documentation
--
* Fixed errors:
- src/Message.js post(): Set chunksize to defined default value instead
of hardcoded
- src/Keys.js: added getHasSecret() to refreshKey operation.
* Reviewed and updated the documentation
* non-documentation changes which do not affect functionality:
- src/Errors: disabled a console.warn that is only useful for debugging
- helpers.js: renamed "string" to "value" in isFingerprint and isLongId
to avoid confusion
- src/Keyring: prepare_sync, search are both explicitly set to false by
default
Diffstat (limited to '')
-rw-r--r-- | lang/js/src/permittedOperations.js | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/lang/js/src/permittedOperations.js b/lang/js/src/permittedOperations.js index e7f53965..0b9c891f 100644 --- a/lang/js/src/permittedOperations.js +++ b/lang/js/src/permittedOperations.js @@ -22,27 +22,30 @@ */ /** - * Definition of the possible interactions with gpgme-json. - * operation: <Object> - required: Array<Object> - <String> name The name of the property - allowed: Array of allowed types. Currently accepted values: - ['number', 'string', 'boolean', 'Uint8Array'] - array_allowed: Boolean. If the value can be an array of the above - allowed_data: <Array> If present, restricts to the given value - optional: Array<Object> - see 'required', with these parameters not being mandatory for a - complete message - pinentry: boolean If a pinentry dialog is expected, and a timeout of - 5000 ms would be too short - answer: <Object> - type: <String< The content type of answer expected - data: <Object> - the properties expected and their type, eg: {'data':'string'} - } - } -*/ + * @typedef {Object} messageProperty + * A message Property is defined by it's key. + * @property {Array<String>} allowed Array of allowed types. + * Currently accepted values are 'number', 'string', 'boolean'. + * @property {Boolean} array_allowed If the value can be an array of types + * defined in allowed + * @property {<Array>} allowed_data (optional) restricts to the given values + */ +/** + * Definition of the possible interactions with gpgme-json. + * @param {Object} operation Each operation is named by a key and contains + * the following properties: + * @property {messageProperty} required An object with all required parameters + * @property {messageProperty} optional An object with all optional parameters + * @property {Boolean} pinentry (optional) If true, a password dialog is + * expected, thus a connection tuimeout is not advisable + * @property {Object} answer The definition on what to expect as answer, if the + * answer is not an error + * @property {Array<String>} answer.type the type(s) as reported by gpgme-json. + * @property {Object} answer.data key-value combinations of expected properties + * of an answer and their type ('boolean', 'string', object) + @const +*/ export const permittedOperations = { encrypt: { pinentry: true, //TODO only with signing_keys |