): void;
/**
*
* Looks for a user account with the provided userId on this NoteStore
* shard and determines whether that account contains a public notebook
* with the given URI. If the account is not found, or no public notebook
* exists with this URI, this will throw an EDAMNotFoundException,
* otherwise this will return the information for that Notebook.
*
*
* If a notebook is visible on the web with a full URL like
* http://www.evernote.com/pub/sethdemo/api
* Then 'sethdemo' is the username that can be used to look up the userId,
* and 'api' is the publicUri.
*
*
* @param userId
* The numeric identifier for the user who owns the public notebook.
* To find this value based on a username string, you can invoke
* UserStore.getPublicUserInfo
*
* @param publicUri
* The uri string for the public notebook, from Notebook.publishing.uri.
*
* @throws EDAMNotFoundException
* - "Publishing.uri" - not found, by URI
*
*
* @throws EDAMSystemException
* - TAKEN_DOWN "PublicNotebook" - The specified public notebook is
* taken down (for all requesters).
* - TAKEN_DOWN "Country" - The specified public notebook is taken
* down for the requester because of an IP-based country lookup.
*
*/
getPublicNotebook(userId: number, publicUri: string, cb: Callback): void;
/**
* Used to construct a shared notebook object. The constructed notebook will
* contain a "share key" which serve as a unique identifer and access token
* for a user to access the notebook of the shared notebook owner.
*
* @param sharedNotebook
* A shared notebook object populated with the email address of the share
* recipient, the notebook guid and the access permissions. All other
* attributes of the shared object are ignored. The SharedNotebook.allowPreview
* field must be explicitly set with either a true or false value.
*
* @return
* The fully populated SharedNotebook object including the server assigned
* share id and shareKey which can both be used to uniquely identify the
* SharedNotebook.
*
* @throws EDAMUserException
* - BAD_DATA_FORMAT "SharedNotebook.email" - if the email was not valid
* - BAD_DATA_FORMAT "requireLogin" - if the SharedNotebook.allowPreview field was
* not set, and the SharedNotebook.requireLogin was also not set or was set to
* false.
* - PERMISSION_DENIED "SharedNotebook.recipientSettings" - if
* recipientSettings is set in the sharedNotebook. Only the recipient
* can set these values via the setSharedNotebookRecipientSettings
* method.
*
*
* @throws EDAMNotFoundException
* - Notebook.guid - if the notebookGuid is not a valid GUID for the user.
*
*
*/
createSharedNotebook(sharedNotebook: SharedNotebook, cb: Callback): void;
/**
* Update a SharedNotebook object.
*
* @param authenticationToken
* Must be an authentication token from the owner or a shared notebook
* authentication token or business authentication token with sufficient
* permissions to change invitations for a notebook.
*
* @param sharedNotebook
* The SharedNotebook object containing the requested changes.
* The "id" of the shared notebook must be set to allow the service
* to identify the SharedNotebook to be updated. In addition, you MUST set
* the email, permission, and allowPreview fields to the desired values.
* All other fields will be ignored if set.
*
* @return
* The Update Serial Number for this change within the account.
*
* @throws EDAMUserException
* - UNSUPPORTED_OPERATION "updateSharedNotebook" - if this service instance does not support shared notebooks.
* - BAD_DATA_FORMAT "SharedNotebook.email" - if the email was not valid.
* - DATA_REQUIRED "SharedNotebook.id" - if the id field was not set.
* - DATA_REQUIRED "SharedNotebook.privilege" - if the privilege field was not set.
* - DATA_REQUIRED "SharedNotebook.allowPreview" - if the allowPreview field was not set.
*
* @throws EDAMNotFoundException
* - SharedNotebook.id - if no shared notebook with the specified ID was found.
*
*/
updateSharedNotebook(sharedNotebook: SharedNotebook, cb: Callback): void;
/**
* Set values for the recipient settings associated with a shared notebook. Having
* update rights to the shared notebook record itself has no effect on this call;
* only the recipient of the shared notebook can can the recipient settings.
*
* If you do not wish to, or cannot, change one of the reminderNotifyEmail or
* reminderNotifyInApp fields, you must leave that field unset in recipientSettings.
* This method will skip that field for updates and leave the existing state as
* it is.
*
* @return The update sequence number of the account to which the shared notebook
* belongs, which is the account from which we are sharing a notebook.
*
* @throws EDAMNotFoundException "sharedNotebookId" - Thrown if the service does not
* have a shared notebook record for the sharedNotebookId on the given shard. If you
* receive this exception, it is probable that the shared notebook record has
* been revoked or expired, or that you accessed the wrong shard.
*
* @throws EDAMUserException
* - PEMISSION_DENIED "authenticationToken" - If you do not have permission to set
* the recipient settings for the shared notebook. Only the recipient has
* permission to do this.
*
- DATA_CONFLICT "recipientSettings.reminderNotifyEmail" - Setting whether
* or not you want to receive reminder e-mail notifications is possible on
* a business notebook in the business to which the user belongs. All
* others can safely unset the reminderNotifyEmail field from the
* recipientSettings parameter.
*
*/
setSharedNotebookRecipientSettings(sharedNotebookId: number, recipientSettings: SharedNotebookRecipientSettings, cb: Callback): void;
/**
* Send a reminder message to some or all of the email addresses that a notebook has been
* shared with. The message includes the current link to view the notebook.
* @param authenticationToken
* The auth token of the user with permissions to share the notebook
* @param notebookGuid
* The guid of the shared notebook
* @param messageText
* User provided text to include in the email
* @param recipients
* The email addresses of the recipients. If this list is empty then all of the
* users that the notebook has been shared with are emailed.
* If an email address doesn't correspond to share invite members then that address
* is ignored.
* @return
* The number of messages sent
* @throws EDAMUserException
* - LIMIT_REACHED "(recipients)" -
* The email can't be sent because this would exceed the user's daily
* email limit.
*
* - PERMISSION_DENIED "Notebook.guid" - The user doesn't have permission to
* send a message for the specified notebook.
*
*
*
* @throws EDAMNotFoundException
* - "Notebook.guid" - not found, by GUID
*
*
*/
sendMessageToSharedNotebookMembers(notebookGuid: string, messageText: string, recipients: string[], cb: Callback): void;
/**
* Lists the collection of shared notebooks for all notebooks in the
* users account.
*
* @return
* The list of all SharedNotebooks for the user
*/
listSharedNotebooks(cb: Callback): void;
/**
* Expunges the SharedNotebooks in the user's account using the
* SharedNotebook.id as the identifier.
*
* NOTE: This function is generally not available to third party applications.
* Calls will result in an EDAMUserException with the error code
* PERMISSION_DENIED.
*
* @param
* sharedNotebookIds - a list of ShardNotebook.id longs identifying the
* objects to delete permanently.
*
* @return
* The account's update sequence number.
*/
expungeSharedNotebooks(sharedNotebookIds: number[], cb: Callback): void;
/**
* Asks the service to make a linked notebook with the provided name, username
* of the owner and identifiers provided. A linked notebook can be either a
* link to a public notebook or to a private shared notebook.
*
* @param linkedNotebook
* The desired fields for the linked notebook must be provided on this
* object. The name of the linked notebook must be set. Either a username
* uri or a shard id and share key must be provided otherwise a
* EDAMUserException is thrown.
*
* @return
* The newly created LinkedNotebook. The server-side id will be
* saved in this object's 'id' field.
*
* @throws EDAMUserException
* - BAD_DATA_FORMAT "LinkedNotebook.name" - invalid length or pattern
*
* - BAD_DATA_FORMAT "LinkedNotebook.username" - bad username format
*
* - BAD_DATA_FORMAT "LinkedNotebook.uri" -
* if public notebook set but bad uri
*
* - BAD_DATA_FORMAT "LinkedNotebook.shareKey" -
* if private notebook set but bad shareKey
*
* - DATA_REQUIRED "LinkedNotebook.shardId" -
* if private notebook but shard id not provided
*
*
*/
createLinkedNotebook(linkedNotebook: LinkedNotebook, cb: Callback): void;
/**
* @param linkedNotebook
* Updates the name of a linked notebook.
*
* @return
* The Update Sequence Number for this change within the account.
*
* @throws EDAMUserException
* - BAD_DATA_FORMAT "LinkedNotebook.name" - invalid length or pattern
*
*
*/
updateLinkedNotebook(linkedNotebook: LinkedNotebook, cb: Callback): void;
/**
* Returns a list of linked notebooks
*/
listLinkedNotebooks(cb: Callback): void;
/**
* Permanently expunges the linked notebook from the account.
*
* NOTE: This function is generally not available to third party applications.
* Calls will result in an EDAMUserException with the error code
* PERMISSION_DENIED.
*
* @param guid
* The LinkedNotebook.guid field of the LinkedNotebook to permanently remove
* from the account.
*/
expungeLinkedNotebook(guid: string, cb: Callback): void;
/**
* Asks the service to produce an authentication token that can be used to
* access the contents of a shared notebook from someone else's account.
* This authenticationToken can be used with the various other NoteStore
* calls to find and retrieve notes, and if the permissions in the shared
* notebook are sufficient, to make changes to the contents of the notebook.
*
* @param shareKey
* The 'shareKey' identifier from the SharedNotebook that was granted to
* some recipient. This string internally encodes the notebook identifier
* and a security signature.
*
* @param authenticationToken
* If a non-empty string is provided, this is the full user-based
* authentication token that identifies the user who is currently logged in
* and trying to access the shared notebook. This may be required if the
* notebook was created with 'requireLogin'.
* If this string is empty, the service will attempt to authenticate to the
* shared notebook without any logged in user.
*
* @throws EDAMSystemException
* - BAD_DATA_FORMAT "shareKey" - invalid shareKey string
*
* - INVALID_AUTH "shareKey" - bad signature on shareKey string
*
*
*
* @throws EDAMNotFoundException
* - "SharedNotebook.id" - the shared notebook no longer exists
*
*
*
* @throws EDAMUserException
* - DATA_REQUIRED "authenticationToken" - the share requires login, and
* no valid authentication token was provided.
*
* - PERMISSION_DENIED "SharedNotebook.username" - share requires login,
* and another username has already been bound to this notebook.
*
*
*/
authenticateToSharedNotebook(shareKey: string, cb: Callback): void;
/**
* This function is used to retrieve extended information about a shared
* notebook by a guest who has already authenticated to access that notebook.
* This requires an 'authenticationToken' parameter which should be the
* resut of a call to authenticateToSharedNotebook(...).
* I.e. this is the token that gives access to the particular shared notebook
* in someone else's account -- it's not the authenticationToken for the
* owner of the notebook itself.
*
* @param authenticationToken
* Should be the authentication token retrieved from the reply of
* authenticateToSharedNotebook(), proving access to a particular shared
* notebook.
*
* @throws EDAMUserException
* - PERMISSION_DENIED "authenticationToken" -
* authentication token doesn't correspond to a valid shared notebook
*
*
*
* @throws EDAMNotFoundException
* - "SharedNotebook.id" - the shared notebook no longer exists
*
*
*/
getSharedNotebookByAuth(cb: Callback): void;
/**
* Attempts to send a single note to one or more email recipients.
*
* NOTE: This function is generally not available to third party applications.
* Calls will result in an EDAMUserException with the error code
* PERMISSION_DENIED.
*
* @param authenticationToken
* The note will be sent as the user logged in via this token, using that
* user's registered email address. If the authenticated user doesn't
* have permission to read that note, the emailing will fail.
*
* @param parameters
* The note must be specified either by GUID (in which case it will be
* sent using the existing data in the service), or else the full Note
* must be passed to this call. This also specifies the additional
* email fields that will be used in the email.
*
* @throws EDAMUserException
* - LIMIT_REACHED "NoteEmailParameters.toAddresses" -
* The email can't be sent because this would exceed the user's daily
* email limit.
*
* - BAD_DATA_FORMAT "(email address)" -
* email address malformed
*
* - DATA_REQUIRED "NoteEmailParameters.toAddresses" -
* if there are no To: or Cc: addresses provided.
*
* - DATA_REQUIRED "Note.title" -
* if the caller provides a Note parameter with no title
*
* - DATA_REQUIRED "Note.content" -
* if the caller provides a Note parameter with no content
*
* - ENML_VALIDATION "*" - note content doesn't validate against DTD
*
* - DATA_REQUIRED "NoteEmailParameters.note" -
* if no guid or note provided
*
* - PERMISSION_DENIED "Note" - private note, user doesn't own
*
*
*
* @throws EDAMNotFoundException
* - "Note.guid" - not found, by GUID
*
*
*/
emailNote(parameters: NoteEmailParameters, cb: Callback): void;
/**
* If this note is not already shared (via its own direct URL), then this
* will start sharing that note.
* This will return the secret "Note Key" for this note that
* can currently be used in conjunction with the Note's GUID to gain direct
* read-only access to the Note.
* If the note is already shared, then this won't make any changes to the
* note, and the existing "Note Key" will be returned. The only way to change
* the Note Key for an existing note is to stopSharingNote first, and then
* call this function.
*
* @param guid
* The GUID of the note to be shared.
*
* @throws EDAMUserException
* - BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
*
* - PERMISSION_DENIED "Note" - private note, user doesn't own
*
*
*
* @throws EDAMNotFoundException
* - "Note.guid" - not found, by GUID
*
*
*/
shareNote(guid: string, cb: Callback): void;
/**
* If this note is not already shared then this will stop sharing that note
* and invalidate its "Note Key", so any existing URLs to access that Note
* will stop working.
* If the Note is not shared, then this function will do nothing.
*
* @param guid
* The GUID of the note to be un-shared.
*
* @throws EDAMUserException
* - BAD_DATA_FORMAT "Note.guid" - if the parameter is missing
*
* - PERMISSION_DENIED "Note" - private note, user doesn't own
*
*
*
* @throws EDAMNotFoundException
* - "Note.guid" - not found, by GUID
*
*
*/
stopSharingNote(guid: string, cb: Callback): void;
/**
* Asks the service to produce an authentication token that can be used to
* access the contents of a single Note which was individually shared
* from someone's account.
* This authenticationToken can be used with the various other NoteStore
* calls to find and retrieve the Note and its directly-referenced children.
*
* @param guid
* The GUID identifying this Note on this shard.
*
* @param noteKey
* The 'noteKey' identifier from the Note that was originally created via
* a call to shareNote() and then given to a recipient to access.
*
* @param authenticationToken
* An optional authenticationToken that identifies the user accessing the
* shared note. This parameter may be required to access some shared notes.
*
* @throws EDAMUserException
* - PERMISSION_DENIED "Note" - the Note with that GUID is either not
* shared, or the noteKey doesn't match the current key for this note
*
* - PERMISSION_DENIED "authenticationToken" - an authentication token is
* required to access this Note, but either no authentication token or a
* "non-owner" authentication token was provided.
*
*
*
* @throws EDAMNotFoundException
* - "guid" - the note with that GUID is not found
*
*
*
* @throws EDAMSystemException
* - TAKEN_DOWN "Note" - The specified shared note is taken down (for
* all requesters).
*
* - TAKEN_DOWN "Country" - The specified shared note is taken down
* for the requester because of an IP-based country lookup.
*
*