├── README.md ├── LICENSE └── src ├── Errors.thrift ├── UserStore.thrift ├── Limits.thrift └── Types.thrift /README.md: -------------------------------------------------------------------------------- 1 | # Evernote Cloud API Thrift IDL files version 1.29 2 | 3 | This repository contains the Thrift interface definition files for the Evernote Cloud API. Most developers won't need these, but they can be helpful if you're generating your own Thrift code for some reason. 4 | 5 | See https://dev.evernote.com/doc/ for full Cloud API documentation. 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007-2016 by Evernote Corporation, All rights reserved. 3 | * 4 | * Use of the source code and binary libraries included in this package 5 | * is permitted under the following terms: 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | -------------------------------------------------------------------------------- /src/Errors.thrift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2018 Evernote Corporation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /* 27 | * This file contains the definitions of the Evernote-related errors that 28 | * can occur when making calls to EDAM services. 29 | */ 30 | 31 | include "Types.thrift" 32 | 33 | namespace as3 com.evernote.edam.error 34 | namespace java com.evernote.edam.error 35 | namespace csharp Evernote.EDAM.Error 36 | namespace py evernote.edam.error 37 | namespace cpp evernote.edam 38 | namespace rb Evernote.EDAM.Error 39 | namespace php EDAM.Error 40 | namespace perl EDAMErrors 41 | namespace go edam 42 | 43 | /** 44 | * Numeric codes indicating the type of error that occurred on the 45 | * service. 46 | *
47 | *
UNKNOWN
48 | *
No information available about the error
49 | *
BAD_DATA_FORMAT
50 | *
The format of the request data was incorrect
51 | *
PERMISSION_DENIED
52 | *
Not permitted to perform action
53 | *
INTERNAL_ERROR
54 | *
Unexpected problem with the service
55 | *
DATA_REQUIRED
56 | *
A required parameter/field was absent
57 | *
LIMIT_REACHED
58 | *
Operation denied due to data model limit
59 | *
QUOTA_REACHED
60 | *
Operation denied due to user storage limit
61 | *
INVALID_AUTH
62 | *
Username and/or password incorrect
63 | *
AUTH_EXPIRED
64 | *
Authentication token expired
65 | *
DATA_CONFLICT
66 | *
Change denied due to data model conflict
67 | *
ENML_VALIDATION
68 | *
Content of submitted note was malformed
69 | *
SHARD_UNAVAILABLE
70 | *
Service shard with account data is temporarily down
71 | *
LEN_TOO_SHORT
72 | *
Operation denied due to data model limit, where something such 73 | * as a string length was too short
74 | *
LEN_TOO_LONG
75 | *
Operation denied due to data model limit, where something such 76 | * as a string length was too long
77 | *
TOO_FEW
78 | *
Operation denied due to data model limit, where there were 79 | * too few of something.
80 | *
TOO_MANY
81 | *
Operation denied due to data model limit, where there were 82 | * too many of something.
83 | *
UNSUPPORTED_OPERATION
84 | *
Operation denied because it is currently unsupported.
85 | *
TAKEN_DOWN
86 | *
Operation denied because access to the corresponding object is 87 | * prohibited in response to a take-down notice.
88 | *
RATE_LIMIT_REACHED
89 | *
Operation denied because the calling application has reached 90 | * its hourly API call limit for this user.
91 | *
BUSINESS_SECURITY_LOGIN_REQUIRED
92 | *
Access to a business account has been denied because the user must complete 93 | * additional steps in order to comply with business security requirements.
94 | *
DEVICE_LIMIT_REACHED
95 | *
Operation denied because the user has exceeded their maximum allowed 96 | * number of devices.
97 | *
OPENID_ALREADY_TAKEN
98 | *
Operation failed because the Open ID is already associated with another user.
99 | *
INVALID_OPENID_TOKEN
100 | *
Operation denied because the Open ID token is invalid. Please re-issue a valid 101 | * token.
102 | *
USER_NOT_REGISTERED
103 | *
There is no Evernote user associated with this OpenID account, 104 | * and no Evernote user with a matching email
105 | *
USER_NOT_ASSOCIATED
106 | *
There is no Evernote user associated with this OpenID account, 107 | * but Evernote user with matching email exists
108 | *
USER_ALREADY_ASSOCIATED
109 | *
Evernote user is already associated with this provider 110 | * using a different email address.
111 | *
ACCOUNT_CLEAR
112 | *
The user's account has been disabled. Clients should deal with this errorCode 113 | * by logging the user out and purging all locally saved content, including local 114 | * edits not yet pushed to the server.
115 | *
SSO_AUTHENTICATION_REQUIRED
116 | *
SSO authentication is the only tyoe of authentication allowed for the user's 117 | * account. This error is thrown when the user attempts to authenticate by another 118 | * method (password, OpenId, etc).
119 | *
120 | */ 121 | enum EDAMErrorCode { 122 | UNKNOWN = 1, 123 | BAD_DATA_FORMAT = 2, 124 | PERMISSION_DENIED = 3, 125 | INTERNAL_ERROR = 4, 126 | DATA_REQUIRED = 5, 127 | LIMIT_REACHED = 6, 128 | QUOTA_REACHED = 7, 129 | INVALID_AUTH = 8, 130 | AUTH_EXPIRED = 9, 131 | DATA_CONFLICT = 10, 132 | ENML_VALIDATION = 11, 133 | SHARD_UNAVAILABLE = 12, 134 | LEN_TOO_SHORT = 13, 135 | LEN_TOO_LONG = 14, 136 | TOO_FEW = 15, 137 | TOO_MANY = 16, 138 | UNSUPPORTED_OPERATION = 17, 139 | TAKEN_DOWN = 18, 140 | RATE_LIMIT_REACHED = 19, 141 | BUSINESS_SECURITY_LOGIN_REQUIRED = 20, 142 | DEVICE_LIMIT_REACHED = 21, 143 | OPENID_ALREADY_TAKEN = 22, 144 | INVALID_OPENID_TOKEN = 23, 145 | USER_NOT_ASSOCIATED = 24, 146 | USER_NOT_REGISTERED = 25, 147 | USER_ALREADY_ASSOCIATED = 26, 148 | ACCOUNT_CLEAR = 27, 149 | SSO_AUTHENTICATION_REQUIRED = 28 150 | } 151 | 152 | 153 | /** 154 | * An enumeration that provides a reason for why a given contact was invalid, for example, 155 | * as thrown via an EDAMInvalidContactsException. 156 | * 157 | *
158 | *
BAD_ADDRESS
159 | *
The contact information does not represent a valid address for a recipient. 160 | * Clients should be validating and normalizing contacts, so receiving this 161 | * error code commonly represents a client error. 162 | *
163 | *
DUPLICATE_CONTACT
164 | *
If the method throwing this exception accepts a list of contacts, this error 165 | * code indicates that the given contact is a duplicate of another contact in 166 | * the list. Note that the server may clean up contacts, and that this cleanup 167 | * occurs before checking for duplication. Receiving this error is commonly 168 | * an indication of a client issue, since client should be normalizing contacts 169 | * and removing duplicates. All instances that are duplicates are returned. For 170 | * example, if a list of 5 contacts has the same e-mail address twice, the two 171 | * conflicting e-mail address contacts will be returned. 172 | *
173 | *
NO_CONNECTION
174 | *
Indicates that the given contact, an Evernote type contact, is not connected 175 | * to the user for which the call is being made. It is possible that clients are 176 | * out of sync with the server and should re-synchronize their identities and 177 | * business user state. See Identity.userConnected for more information on user 178 | * connections. 179 | *
180 | *
181 | * 182 | * Note that if multiple reasons may apply, only one is returned. The precedence order 183 | * is BAD_ADDRESS, DUPLICATE_CONTACT, NO_CONNECTION, meaning that if a contact has a bad 184 | * address and is also duplicated, it will be returned as a BAD_ADDRESS. 185 | */ 186 | enum EDAMInvalidContactReason { 187 | BAD_ADDRESS, 188 | DUPLICATE_CONTACT, 189 | NO_CONNECTION 190 | } 191 | 192 | 193 | /** 194 | * This exception is thrown by EDAM procedures when a call fails as a result of 195 | * a problem that a caller may be able to resolve. For example, if the user 196 | * attempts to add a note to their account which would exceed their storage 197 | * quota, this type of exception may be thrown to indicate the source of the 198 | * error so that they can choose an alternate action. 199 | * 200 | * This exception would not be used for internal system errors that do not 201 | * reflect user actions, but rather reflect a problem within the service that 202 | * the user cannot resolve. 203 | * 204 | * errorCode: The numeric code indicating the type of error that occurred. 205 | * must be one of the values of EDAMErrorCode. 206 | * 207 | * parameter: If the error applied to a particular input parameter, this will 208 | * indicate which parameter. For some errors (USER_NOT_ASSOCIATED, USER_NOT_REGISTERED, 209 | * SSO_AUTHENTICATION_REQUIRED), this is the user's email. 210 | */ 211 | exception EDAMUserException { 212 | 1: required EDAMErrorCode errorCode, 213 | 2: optional string parameter 214 | } 215 | 216 | 217 | /** 218 | * This exception is thrown by EDAM procedures when a call fails as a result of 219 | * a problem in the service that could not be changed through caller action. 220 | * 221 | * errorCode: The numeric code indicating the type of error that occurred. 222 | * must be one of the values of EDAMErrorCode. 223 | * 224 | * message: This may contain additional information about the error 225 | * 226 | * rateLimitDuration: Indicates the minimum number of seconds that an application should 227 | * expect subsequent API calls for this user to fail. The application should not retry 228 | * API requests for the user until at least this many seconds have passed. Present only 229 | * when errorCode is RATE_LIMIT_REACHED, 230 | */ 231 | exception EDAMSystemException { 232 | 1: required EDAMErrorCode errorCode, 233 | 2: optional string message, 234 | 3: optional i32 rateLimitDuration 235 | } 236 | 237 | 238 | /** 239 | * This exception is thrown by EDAM procedures when a caller asks to perform 240 | * an operation on an object that does not exist. This may be thrown based on an invalid 241 | * primary identifier (e.g. a bad GUID), or when the caller refers to an object 242 | * by another unique identifier (e.g. a User's email address). 243 | * 244 | * identifier: A description of the object that was not found on the server. 245 | * For example, "Note.notebookGuid" when a caller attempts to create a note in a 246 | * notebook that does not exist in the user's account. 247 | * 248 | * key: The value passed from the client in the identifier, which was not 249 | * found. For example, the GUID that was not found. 250 | */ 251 | exception EDAMNotFoundException { 252 | 1: optional string identifier, 253 | 2: optional string key 254 | } 255 | 256 | /** 257 | * An exception thrown when the provided Contacts fail validation. For instance, 258 | * email domains could be invalid, phone numbers might not be valid for SMS, 259 | * etc. 260 | * 261 | * We will not provide individual reasons for each Contact's validation failure. 262 | * The presence of the Contact in this exception means that the user must figure 263 | * out how to take appropriate action to fix this Contact. 264 | * 265 | *
266 | *
contacts
267 | *
The list of Contacts that are considered invalid by the service
268 | * 269 | *
parameter
270 | *
If the error applied to a particular input parameter, this will 271 | * indicate which parameter.
272 | * 273 | *
reasons
274 | *
If supplied, the list of reasons why the server considered a contact invalid, 275 | * matching, in order, the list returned in the contacts field.
276 | *
277 | */ 278 | exception EDAMInvalidContactsException { 279 | 1: required list contacts, 280 | 2: optional string parameter, 281 | 3: optional list reasons 282 | } 283 | -------------------------------------------------------------------------------- /src/UserStore.thrift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2018 Evernote Corporation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /* 27 | * This file contains the EDAM protocol interface for operations to query 28 | * and/or authenticate users. 29 | */ 30 | 31 | include "Types.thrift" 32 | include "Errors.thrift" 33 | 34 | namespace as3 com.evernote.edam.userstore 35 | namespace java com.evernote.edam.userstore 36 | namespace csharp Evernote.EDAM.UserStore 37 | namespace py evernote.edam.userstore 38 | namespace cpp evernote.edam 39 | namespace rb Evernote.EDAM.UserStore 40 | namespace php EDAM.UserStore 41 | namespace cocoa EDAM 42 | namespace perl EDAMUserStore 43 | namespace go edam 44 | 45 | 46 | /** 47 | * The major version number for the current revision of the EDAM protocol. 48 | * Clients pass this to the service using UserStore.checkVersion at the 49 | * beginning of a session to confirm that they are not out of date. 50 | */ 51 | const i16 EDAM_VERSION_MAJOR = 1 52 | 53 | /** 54 | * The minor version number for the current revision of the EDAM protocol. 55 | * Clients pass this to the service using UserStore.checkVersion at the 56 | * beginning of a session to confirm that they are not out of date. 57 | */ 58 | const i16 EDAM_VERSION_MINOR = 28 59 | 60 | //============================= Enumerations ================================== 61 | 62 | /** 63 | * This structure is used to provide publicly-available user information 64 | * about a particular account. 65 | *
66 | *
userId:
67 | *
68 | * The unique numeric user identifier for the user account. 69 | *
70 | *
serviceLevel:
71 | *
72 | * The service level of the account. 73 | *
74 | *
noteStoreUrl:
75 | *
76 | * This field will contain the full URL that clients should use to make 77 | * NoteStore requests to the server shard that contains that user's data. 78 | * I.e. this is the URL that should be used to create the Thrift HTTP client 79 | * transport to send messages to the NoteStore service for the account. 80 | *
81 | *
webApiUrlPrefix:
82 | *
83 | * This field will contain the initial part of the URLs that should be used 84 | * to make requests to Evernote's thin client "web API", which provide 85 | * optimized operations for clients that aren't capable of manipulating 86 | * the full contents of accounts via the full Thrift data model. Clients 87 | * should concatenate the relative path for the various servlets onto the 88 | * end of this string to construct the full URL, as documented on our 89 | * developer web site. 90 | *
91 | *
92 | */ 93 | struct PublicUserInfo { 94 | 1: required Types.UserID userId, 95 | 7: optional Types.ServiceLevel serviceLevel, 96 | 4: optional string username, 97 | 5: optional string noteStoreUrl, 98 | 6: optional string webApiUrlPrefix 99 | } 100 | 101 | /** 102 | *
103 | *
noteStoreUrl:
104 | *
105 | * This field will contain the full URL that clients should use to make 106 | * NoteStore requests to the server shard that contains that user's data. 107 | * I.e. this is the URL that should be used to create the Thrift HTTP client 108 | * transport to send messages to the NoteStore service for the account. 109 | *
110 | *
webApiUrlPrefix:
111 | *
112 | * This field will contain the initial part of the URLs that should be used 113 | * to make requests to Evernote's thin client "web API", which provide 114 | * optimized operations for clients that aren't capable of manipulating 115 | * the full contents of accounts via the full Thrift data model. Clients 116 | * should concatenate the relative path for the various servlets onto the 117 | * end of this string to construct the full URL, as documented on our 118 | * developer web site. 119 | *
120 | *
userStoreUrl:
121 | *
122 | * This field will contain the full URL that clients should use to make UserStore 123 | * requests after successfully authenticating. I.e. this is the URL that should be used 124 | * to create the Thrift HTTP client transport to send messages to the UserStore service 125 | * for this account. 126 | *
127 | *
utilityUrl:
128 | *
129 | * This field will contain the full URL that clients should use to make Utility requests 130 | * to the server shard that contains that user's data. I.e. this is the URL that should 131 | * be used to create the Thrift HTTP client transport to send messages to the Utility 132 | * service for the account. 133 | *
134 | *
messageStoreUrl:
135 | *
136 | * This field will contain the full URL that clients should use to make MessageStore 137 | * requests to the server. I.e. this is the URL that should be used to create the 138 | * Thrift HTTP client transport to send messages to the MessageStore service for the 139 | * account. 140 | *
141 | *
userWebSocketUrl:
142 | *
143 | * This field will contain the full URL that clients should use when opening a 144 | * persistent web socket to recieve notification of events for the authenticated user. 145 | *
146 | *
147 | */ 148 | struct UserUrls { 149 | 1: optional string noteStoreUrl, 150 | 2: optional string webApiUrlPrefix, 151 | 3: optional string userStoreUrl, 152 | 4: optional string utilityUrl, 153 | 5: optional string messageStoreUrl, 154 | 6: optional string userWebSocketUrl 155 | } 156 | 157 | /** 158 | * When an authentication (or re-authentication) is performed, this structure 159 | * provides the result to the client. 160 | *
161 | *
currentTime:
162 | *
163 | * The server-side date and time when this result was 164 | * generated. 165 | *
166 | *
authenticationToken:
167 | *
168 | * Holds an opaque, ASCII-encoded token that can be 169 | * used by the client to perform actions on a NoteStore. 170 | *
171 | *
expiration:
172 | *
173 | * Holds the server-side date and time when the 174 | * authentication token will expire. 175 | * This time can be compared to "currentTime" to produce an expiration 176 | * time that can be reconciled with the client's local clock. 177 | *
178 | *
user:
179 | *
180 | * Holds the information about the account which was 181 | * authenticated if this was a full authentication. May be absent if this 182 | * particular authentication did not require user information. 183 | *
184 | *
publicUserInfo:
185 | *
186 | * If this authentication result was achieved without full permissions to 187 | * access the full User structure, this field may be set to give back 188 | * a more limited public set of data. 189 | *
190 | *
noteStoreUrl:
191 | *
192 | * DEPRECATED - Client applications should use urls.noteStoreUrl. 193 | *
194 | *
webApiUrlPrefix:
195 | *
196 | * DEPRECATED - Client applications should use urls.webApiUrlPrefix. 197 | *
198 | *
secondFactorRequired:
199 | *
200 | * If set to true, this field indicates that the user has enabled two-factor 201 | * authentication and must enter their second factor in order to complete 202 | * authentication. In this case the value of authenticationResult will be 203 | * a short-lived authentication token that may only be used to make a 204 | * subsequent call to completeTwoFactorAuthentication. 205 | *
206 | *
secondFactorDeliveryHint:
207 | *
208 | * When secondFactorRequired is set to true, this field may contain a string 209 | * describing the second factor delivery method that the user has configured. 210 | * This will typically be an obfuscated mobile device number, such as 211 | * "(xxx) xxx-x095". This string can be displayed to the user to remind them 212 | * how to obtain the required second factor. 213 | *
214 | *
urls
215 | *
216 | * This structure will contain all of the URLs that clients need to make requests to the 217 | * Evernote service on behalf of the authenticated User. 218 | *
219 | *
220 | */ 221 | struct AuthenticationResult { 222 | 1: required Types.Timestamp currentTime, 223 | 2: required string authenticationToken, 224 | 3: required Types.Timestamp expiration, 225 | 4: optional Types.User user, 226 | 5: optional PublicUserInfo publicUserInfo, 227 | 6: optional string noteStoreUrl, 228 | 7: optional string webApiUrlPrefix, 229 | 8: optional bool secondFactorRequired, 230 | 9: optional string secondFactorDeliveryHint, 231 | 10: optional UserUrls urls 232 | } 233 | 234 | /** 235 | * This structure describes a collection of bootstrap settings. 236 | *
237 | *
serviceHost:
238 | *
239 | * The hostname and optional port for composing Evernote web service URLs. 240 | * This URL can be used to access the UserStore and related services, 241 | * but must not be used to compose the NoteStore URL. Client applications 242 | * must handle serviceHost values that include only the hostname 243 | * (e.g. www.evernote.com) or both the hostname and port (e.g. www.evernote.com:8080). 244 | * If no port is specified, or if port 443 is specified, client applications must 245 | * use the scheme "https" when composing URLs. Otherwise, a client must use the 246 | * scheme "http". 247 | *
248 | *
marketingUrl:
249 | *
250 | * The URL stem for the Evernote corporate marketing website, e.g. http://www.evernote.com. 251 | * This stem can be used to compose website URLs. For example, the URL of the Evernote 252 | * Trunk is composed by appending "/about/trunk/" to the value of marketingUrl. 253 | *
254 | *
supportUrl:
255 | *
256 | * The full URL for the Evernote customer support website, e.g. https://support.evernote.com. 257 | *
258 | *
accountEmailDomain:
259 | *
260 | * The domain used for an Evernote user's incoming email address, which allows notes to 261 | * be emailed into an account. E.g. m.evernote.com. 262 | *
263 | *
enableFacebookSharing:
264 | *
265 | * Whether the client application should enable sharing of notes on Facebook. 266 | *
267 | *
enableGiftSubscriptions:
268 | *
269 | * Whether the client application should enable gift subscriptions. 270 | *
271 | *
enableSupportTickets:
272 | *
273 | * Whether the client application should enable in-client creation of support tickets. 274 | *
275 | *
enableSharedNotebooks:
276 | *
277 | * Whether the client application should enable shared notebooks. 278 | *
279 | *
enableSingleNoteSharing:
280 | *
281 | * Whether the client application should enable single note sharing. 282 | *
283 | *
enableSponsoredAccounts:
284 | *
285 | * Whether the client application should enable sponsored accounts. 286 | *
287 | *
enableTwitterSharing:
288 | *
289 | * Whether the client application should enable sharing of notes on Twitter. 290 | *
291 | *
enableGoogle:
292 | *
293 | * Whether the client application should enable authentication with Google, 294 | * for example to allow integration with a user's Gmail contacts. 295 | *
296 | */ 297 | struct BootstrapSettings { 298 | 1: required string serviceHost, 299 | 2: required string marketingUrl, 300 | 3: required string supportUrl, 301 | 4: required string accountEmailDomain, 302 | 5: optional bool enableFacebookSharing, 303 | 6: optional bool enableGiftSubscriptions, 304 | 7: optional bool enableSupportTickets, 305 | 8: optional bool enableSharedNotebooks, 306 | 9: optional bool enableSingleNoteSharing, 307 | 10: optional bool enableSponsoredAccounts, 308 | 11: optional bool enableTwitterSharing, 309 | 12: optional bool enableLinkedInSharing, 310 | 13: optional bool enablePublicNotebooks, 311 | 16: optional bool enableGoogle 312 | } 313 | 314 | /** 315 | * This structure describes a collection of bootstrap settings. 316 | *
317 | *
name:
318 | *
319 | * The unique name of the profile, which is guaranteed to remain consistent across 320 | * calls to getBootstrapInfo. 321 | *
322 | *
settings:
323 | *
324 | * The settings for this profile. 325 | *
326 | *
327 | */ 328 | struct BootstrapProfile { 329 | 1: required string name, 330 | 2: required BootstrapSettings settings, 331 | } 332 | 333 | /** 334 | * This structure describes a collection of bootstrap profiles. 335 | *
336 | *
profiles:
337 | *
338 | * List of one or more bootstrap profiles, in descending 339 | * preference order. 340 | *
341 | *
342 | */ 343 | struct BootstrapInfo { 344 | 1: required list profiles 345 | } 346 | 347 | /** 348 | * Service: UserStore 349 | *

350 | * The UserStore service is primarily used by EDAM clients to establish 351 | * authentication via username and password over a trusted connection (e.g. 352 | * SSL). A client's first call to this interface should be checkVersion() to 353 | * ensure that the client's software is up to date. 354 | *

355 | * All calls which require an authenticationToken may throw an 356 | * EDAMUserException for the following reasons: 357 | *
    358 | *
  • AUTH_EXPIRED "authenticationToken" - token has expired 359 | *
  • BAD_DATA_FORMAT "authenticationToken" - token is malformed 360 | *
  • DATA_REQUIRED "authenticationToken" - token is empty 361 | *
  • INVALID_AUTH "authenticationToken" - token signature is invalid 362 | *
  • PERMISSION_DENIED "authenticationToken" - token does not convey sufficient 363 | * privileges 364 | *
365 | */ 366 | service UserStore { 367 | 368 | /** 369 | * This should be the first call made by a client to the EDAM service. It 370 | * tells the service what protocol version is used by the client. The 371 | * service will then return true if the client is capable of talking to 372 | * the service, and false if the client's protocol version is incompatible 373 | * with the service, so the client must upgrade. If a client receives a 374 | * false value, it should report the incompatibility to the user and not 375 | * continue with any more EDAM requests (UserStore or NoteStore). 376 | * 377 | * @param clientName 378 | * This string provides some information about the client for 379 | * tracking/logging on the service. It should provide information about 380 | * the client's software and platform. The structure should be: 381 | * application/version; platform/version; [ device/version ] 382 | * E.g. "Evernote Windows/3.0.1; Windows/XP SP3". 383 | * 384 | * @param edamVersionMajor 385 | * This should be the major protocol version that was compiled by the 386 | * client. This should be the current value of the EDAM_VERSION_MAJOR 387 | * constant for the client. 388 | * 389 | * @param edamVersionMinor 390 | * This should be the major protocol version that was compiled by the 391 | * client. This should be the current value of the EDAM_VERSION_MINOR 392 | * constant for the client. 393 | */ 394 | bool checkVersion(1: string clientName, 395 | 2: i16 edamVersionMajor = EDAM_VERSION_MAJOR, 396 | 3: i16 edamVersionMinor = EDAM_VERSION_MINOR), 397 | 398 | /** 399 | * This provides bootstrap information to the client. Various bootstrap 400 | * profiles and settings may be used by the client to configure itself. 401 | * 402 | * @param locale 403 | * The client's current locale, expressed in language[_country] 404 | * format. E.g., "en_US". See ISO-639 and ISO-3166 for valid 405 | * language and country codes. 406 | * 407 | * @return 408 | * The bootstrap information suitable for this client. 409 | */ 410 | BootstrapInfo getBootstrapInfo(1: string locale), 411 | 412 | /** 413 | * This is used to check a username and password in order to create a 414 | * long-lived authentication token that can be used for further actions. 415 | * 416 | * This function is not available to most third party applications, 417 | * which typically authenticate using OAuth as 418 | * described at 419 | * dev.evernote.com. 420 | * If you believe that your application requires permission to authenticate 421 | * using username and password instead of OAuth, please contact Evernote 422 | * developer support by visiting 423 | * dev.evernote.com. 424 | * 425 | * @param username 426 | * The username or registered email address of the account to 427 | * authenticate against. 428 | * 429 | * @param password 430 | * The plaintext password to check against the account. Since 431 | * this is not protected by the EDAM protocol, this information must be 432 | * provided over a protected transport (i.e. SSL). 433 | * 434 | * @param consumerKey 435 | * The "consumer key" portion of the API key issued to the client application 436 | * by Evernote. 437 | * 438 | * @param consumerSecret 439 | * The "consumer secret" portion of the API key issued to the client application 440 | * by Evernote. 441 | * 442 | * @param deviceIdentifier 443 | * An optional string that uniquely identifies the device from which the 444 | * authentication is being performed. This string allows the service to return the 445 | * same authentication token when a given application requests authentication 446 | * repeatedly from the same device. This may happen when the user logs out of an 447 | * application and then logs back in, or when the application is uninstalled 448 | * and later reinstalled. If no reliable device identifier can be created, 449 | * this value should be omitted. If set, the device identifier must be between 450 | * 1 and EDAM_DEVICE_ID_LEN_MAX characters long and must match the regular expression 451 | * EDAM_DEVICE_ID_REGEX. 452 | * 453 | * @param deviceDescription 454 | * A description of the device from which the authentication is being performed. 455 | * This field is displayed to the user in a list of authorized applications to 456 | * allow them to distinguish between multiple tokens issued to the same client 457 | * application on different devices. For example, the Evernote iOS client on 458 | * a user's iPhone and iPad might pass the iOS device names "Bob's iPhone" and 459 | * "Bob's iPad". The device description must be between 1 and 460 | * EDAM_DEVICE_DESCRIPTION_LEN_MAX characters long and must match the regular 461 | * expression EDAM_DEVICE_DESCRIPTION_REGEX. 462 | * 463 | * @param supportsTwoFactor 464 | * Whether the calling application supports two-factor authentication. If this 465 | * parameter is false, this method will fail with the error code INVALID_AUTH and the 466 | * parameter "password" when called for a user who has enabled two-factor 467 | * authentication. 468 | * 469 | * @return 470 | *

The result of the authentication. The level of detail provided in the returned 471 | * AuthenticationResult.User structure depends on the access level granted by 472 | * calling application's API key.

473 | *

If the user has two-factor authentication enabled, 474 | * AuthenticationResult.secondFactorRequired will be set and 475 | * AuthenticationResult.authenticationToken will contain a short-lived token 476 | * that may only be used to complete the two-factor authentication process by calling 477 | * UserStore.completeTwoFactorAuthentication.

478 | * 479 | * @throws EDAMUserException
    480 | *
  • DATA_REQUIRED "username" - username is empty 481 | *
  • DATA_REQUIRED "password" - password is empty 482 | *
  • DATA_REQUIRED "consumerKey" - consumerKey is empty 483 | *
  • DATA_REQUIRED "consumerSecret" - consumerSecret is empty 484 | *
  • DATA_REQUIRED "deviceDescription" - deviceDescription is empty 485 | *
  • BAD_DATA_FORMAT "deviceDescription" - deviceDescription is not valid. 486 | *
  • BAD_DATA_FORMAT "deviceIdentifier" - deviceIdentifier is not valid. 487 | *
  • INVALID_AUTH "username" - username not found 488 | *
  • INVALID_AUTH "password" - password did not match 489 | *
  • INVALID_AUTH "consumerKey" - consumerKey is not authorized 490 | *
  • INVALID_AUTH "consumerSecret" - consumerSecret is incorrect 491 | *
  • INVALID_AUTH "businessOnly" - the user is a business-only account 492 | *
  • PERMISSION_DENIED "User.active" - user account is closed 493 | *
  • PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has 494 | * failed authentication too often 495 | *
  • AUTH_EXPIRED "password" - user password is expired 496 | *
497 | */ 498 | AuthenticationResult authenticateLongSession(1: string username, 499 | 2: string password, 500 | 3: string consumerKey, 501 | 4: string consumerSecret, 502 | 5: string deviceIdentifier, 503 | 6: string deviceDescription, 504 | 7: bool supportsTwoFactor) 505 | throws (1: Errors.EDAMUserException userException, 506 | 2: Errors.EDAMSystemException systemException), 507 | 508 | /** 509 | * Complete the authentication process when a second factor is required. This 510 | * call is made after a successful call to authenticate or authenticateLongSession 511 | * when the authenticating user has enabled two-factor authentication. 512 | * 513 | * @param authenticationToken An authentication token returned by a previous 514 | * call to UserStore.authenticate or UserStore.authenticateLongSession that 515 | * could not be completed in a single call because a second factor was required. 516 | * 517 | * @param oneTimeCode The one time code entered by the user. This value is delivered 518 | * out-of-band, typically via SMS or an authenticator application. 519 | * 520 | * @param deviceIdentifier See the corresponding parameter in authenticateLongSession. 521 | * 522 | * @param deviceDescription See the corresponding parameter in authenticateLongSession. 523 | * 524 | * @return 525 | * The result of the authentication. The level of detail provided in the returned 526 | * AuthenticationResult.User structure depends on the access level granted by the 527 | * calling application's API key. If the initial authentication call was made to 528 | * authenticateLongSession, the AuthenticationResult will contain a long-lived 529 | * authentication token. 530 | * 531 | * @throws EDAMUserException
    532 | *
  • DATA_REQUIRED "authenticationToken" - authenticationToken is empty 533 | *
  • DATA_REQUIRED "oneTimeCode" - oneTimeCode is empty 534 | *
  • BAD_DATA_FORMAT "deviceIdentifier" - deviceIdentifier is not valid 535 | *
  • BAD_DATA_FORMAT "authenticationToken" - authenticationToken is not well formed 536 | *
  • INVALID_AUTH "oneTimeCode" - oneTimeCode did not match 537 | *
  • AUTH_EXPIRED "authenticationToken" - authenticationToken has expired 538 | *
  • PERMISSION_DENIED "authenticationToken" - authenticationToken is not valid 539 | *
  • PERMISSION_DENIED "User.active" - user account is closed 540 | *
  • PERMISSION_DENIED "User.tooManyFailuresTryAgainLater" - user has 541 | * failed authentication too often 542 | *
  • DATA_CONFLICT "User.twoFactorAuthentication" - The user has not enabled 543 | * two-factor authentication.
  • 544 | *
545 | */ 546 | AuthenticationResult completeTwoFactorAuthentication(1: string authenticationToken, 547 | 2: string oneTimeCode, 548 | 3: string deviceIdentifier, 549 | 4: string deviceDescription) 550 | throws (1: Errors.EDAMUserException userException, 551 | 2: Errors.EDAMSystemException systemException), 552 | 553 | /** 554 | * Revoke an existing long lived authentication token. This can be used to 555 | * revoke OAuth tokens or tokens created by calling authenticateLongSession, 556 | * and allows a user to effectively log out of Evernote from the perspective 557 | * of the application that holds the token. The authentication token that is 558 | * passed is immediately revoked and may not be used to call any authenticated 559 | * EDAM function. 560 | * 561 | * @param authenticationToken the authentication token to revoke. 562 | * 563 | * @throws EDAMUserException
    564 | *
  • DATA_REQUIRED "authenticationToken" - no authentication token provided 565 | *
  • BAD_DATA_FORMAT "authenticationToken" - the authentication token is not well formed 566 | *
  • INVALID_AUTH "authenticationToken" - the authentication token is invalid 567 | *
  • AUTH_EXPIRED "authenticationToken" - the authentication token is expired or 568 | * is already revoked. 569 | *
570 | */ 571 | void revokeLongSession(1: string authenticationToken) 572 | throws (1: Errors.EDAMUserException userException, 573 | 2: Errors.EDAMSystemException systemException), 574 | 575 | /** 576 | * This is used to take an existing authentication token that grants access 577 | * to an individual user account (returned from 'authenticate', 578 | * 'authenticateLongSession' or an OAuth authorization) and obtain an additional 579 | * authentication token that may be used to access business notebooks if the user 580 | * is a member of an Evernote Business account. 581 | * 582 | * The resulting authentication token may be used to make NoteStore API calls 583 | * against the business using the NoteStore URL returned in the result. 584 | * 585 | * @param authenticationToken 586 | * The authentication token for the user. This may not be a shared authentication 587 | * token (returned by NoteStore.authenticateToSharedNotebook or 588 | * NoteStore.authenticateToSharedNote) or a business authentication token. 589 | * 590 | * @return 591 | * The result of the authentication, with the token granting access to the 592 | * business in the result's 'authenticationToken' field. The URL that must 593 | * be used to access the business account NoteStore will be returned in the 594 | * result's 'noteStoreUrl' field. The 'User' field will 595 | * not be set in the result. 596 | * 597 | * @throws EDAMUserException
    598 | *
  • PERMISSION_DENIED "authenticationToken" - the provided authentication token 599 | * is a shared or business authentication token.
  • 600 | *
  • PERMISSION_DENIED "Business" - the user identified by the provided 601 | * authentication token is not currently a member of a business.
  • 602 | *
  • PERMISSION_DENIED "Business.status" - the business that the user is a 603 | * member of is not currently in an active status.
  • 604 | *
  • BUSINESS_SECURITY_LOGIN_REQUIRED "sso" - the user must complete single 605 | * sign-on before authenticating to the business. 606 | *
607 | */ 608 | AuthenticationResult authenticateToBusiness(1: string authenticationToken) 609 | throws (1: Errors.EDAMUserException userException, 610 | 2: Errors.EDAMSystemException systemException), 611 | 612 | /** 613 | * Returns the User corresponding to the provided authentication token, 614 | * or throws an exception if this token is not valid. 615 | * The level of detail provided in the returned User structure depends on 616 | * the access level granted by the token, so a web service client may receive 617 | * fewer fields than an integrated desktop client. 618 | */ 619 | Types.User getUser(1: string authenticationToken) 620 | throws (1: Errors.EDAMUserException userException, 621 | 2: Errors.EDAMSystemException systemException), 622 | 623 | /** 624 | * Asks the UserStore about the publicly available location information for 625 | * a particular username. 626 | * 627 | * @throws EDAMUserException
    628 | *
  • DATA_REQUIRED "username" - username is empty 629 | *
630 | */ 631 | PublicUserInfo getPublicUserInfo(1: string username) 632 | throws (1: Errors.EDAMNotFoundException notFoundException, 633 | 2: Errors.EDAMSystemException systemException, 634 | 3: Errors.EDAMUserException userException), 635 | 636 | /** 637 | *

Returns the URLs that should be used when sending requests to the service on 638 | * behalf of the account represented by the provided authenticationToken.

639 | * 640 | *

This method isn't needed by most clients, who can retreive the correct set of 641 | * UserUrls from the AuthenticationResult returned from 642 | * UserStore#authenticateLongSession(). This method is typically only needed to look up 643 | * the correct URLs for an existing long-lived authentication token.

644 | */ 645 | 646 | UserUrls getUserUrls(1: string authenticationToken) 647 | throws (1: Errors.EDAMUserException userException, 648 | 2: Errors.EDAMSystemException systemException), 649 | 650 | /** 651 | * Invite a user to join an Evernote Business account. 652 | * 653 | * Behavior will depend on the auth token.
    654 | *
  1. 655 | * auth token with privileges to manage Evernote Business membership. 656 | * "External Provisioning" - The user will receive an email inviting 657 | * them to join the business. They do not need to have an existing Evernote 658 | * account. If the user has already been invited, a new invitation email 659 | * will be sent. 660 | *
  2. 661 | *
  3. 662 | * business auth token issued to an admin user. Only for first-party clients: 663 | * "Approve Invitation" - If there has been a request to invite the email, 664 | * approve it. Invited user will receive email with a link to join business. 665 | * "Invite User" - If no invitation for the email exists, create an approved 666 | * invitation for the email. An email will be sent to the emailAddress with 667 | * a link to join the caller's business. 668 | *
  4. 669 | * 670 | * business auth token: 671 | * "Request Invitation" - If no invitation exists, create a request to 672 | * invite the user to the business. These requests do not count towards a 673 | * business' max active user limit. 674 | * 675 | *
676 | * 677 | * @param authenticationToken 678 | * the authentication token with sufficient privileges to manage Evernote Business 679 | * membership or a business auth token. 680 | * 681 | * @param emailAddress 682 | * the email address of the user to invite to join the Evernote Business account. 683 | * 684 | * @throws EDAMUserException
    685 | *
  • DATA_REQUIRED "email" - if no email address was provided
  • 686 | *
  • BAD_DATA_FORMAT "email" - if the email address is not well formed
  • 687 | *
  • DATA_CONFLICT "BusinessUser.email" - if there is already a user in the business 688 | * whose business email address matches the specified email address.
  • 689 | *
  • LIMIT_REACHED "Business.maxActiveUsers" - if the business has reached its 690 | * user limit.
  • 691 | *
692 | */ 693 | void inviteToBusiness(1: string authenticationToken, 694 | 2: string emailAddress) 695 | throws (1: Errors.EDAMUserException userException, 696 | 2: Errors.EDAMSystemException systemException), 697 | 698 | /** 699 | * Remove a user from an Evernote Business account. Once removed, the user will no 700 | * longer be able to access content within the Evernote Business account. 701 | * 702 | *

The email address of the user to remove from the business must match the email 703 | * address used to invite a user to join the business via UserStore.inviteToBusiness. 704 | * This function will only remove users who were invited by external provisioning

705 | * 706 | * @param authenticationToken 707 | * An authentication token with sufficient privileges to manage Evernote Business 708 | * membership. 709 | * 710 | * @param emailAddress 711 | * The email address of the user to remove from the Evernote Business account. 712 | * 713 | * @throws EDAMUserException
    714 | *
  • DATA_REQUIRED "email" - if no email address was provided
  • 715 | *
  • BAD_DATA_FORMAT "email" - The email address is not well formed
  • 716 | *
717 | * @throws EDAMNotFoundException
    718 | *
  • "email" - If there is no user with the specified email address in the 719 | * business or that user was not invited via external provisioning.
  • 720 | *
721 | */ 722 | void removeFromBusiness(1: string authenticationToken, 723 | 2: string emailAddress) 724 | throws (1: Errors.EDAMUserException userException, 725 | 2: Errors.EDAMSystemException systemException, 726 | 3: Errors.EDAMNotFoundException notFoundException), 727 | 728 | /** 729 | * Update the email address used to uniquely identify an Evernote Business user. 730 | * 731 | * This will update the identifier for a user who was previously invited using 732 | * inviteToBusiness, ensuring that caller and the Evernote service maintain an 733 | * agreed-upon identifier for a specific user. 734 | * 735 | * For example, the following sequence of calls would invite a user to join 736 | * a business, update their email address, and then remove the user 737 | * from the business using the updated email address. 738 | * 739 | * inviteToBusiness("foo@bar.com") 740 | * updateBusinessUserIdentifier("foo@bar.com", "baz@bar.com") 741 | * removeFromBusiness("baz@bar.com") 742 | * 743 | * @param authenticationToken 744 | * An authentication token with sufficient privileges to manage Evernote Business 745 | * membership. 746 | * 747 | * @param oldEmailAddress 748 | * The existing email address used to uniquely identify the user. 749 | * 750 | * @param newEmailAddress 751 | * The new email address used to uniquely identify the user. 752 | * 753 | * @throws EDAMUserException
    754 | *
  • DATA_REQUIRED "oldEmailAddress" - No old email address was provided
  • 755 | *
  • DATA_REQUIRED "newEmailAddress" - No new email address was provided
  • 756 | *
  • BAD_DATA_FORMAT "oldEmailAddress" - The old email address is not well formed
  • 757 | *
  • BAD_DATA_FORMAT "newEmailAddress" - The new email address is not well formed
  • 758 | *
  • DATA_CONFLICT "oldEmailAddress" - The old and new email addresses were the same
  • 759 | *
  • DATA_CONFLICT "newEmailAddress" - There is already an invitation or registered user with 760 | * the provided new email address.
  • 761 | *
  • DATA_CONFLICT "invitation.externallyProvisioned" - The user identified by 762 | * oldEmailAddress was not added via UserStore.inviteToBusiness and therefore cannot be 763 | * updated.
  • 764 | *
765 | * @throws EDAMNotFoundException
    766 | *
  • "oldEmailAddress" - If there is no user or invitation with the specified oldEmailAddress 767 | * in the business.
  • 768 | *
769 | */ 770 | void updateBusinessUserIdentifier(1: string authenticationToken, 771 | 2: string oldEmailAddress, 772 | 3: string newEmailAddress) 773 | throws (1: Errors.EDAMUserException userException, 774 | 2: Errors.EDAMSystemException systemException, 775 | 3: Errors.EDAMNotFoundException notFoundException), 776 | 777 | /** 778 | * Returns a list of active business users in a given business. 779 | * 780 | * Clients are required to cache this information and re-fetch no more than once per day 781 | * or when they encountered a user ID or username that was not known to them. 782 | * 783 | * To avoid excessive look ups, clients should also track user IDs and usernames that belong 784 | * to users who are not in the business, since they will not be included in the result. 785 | * 786 | * I.e., when a client encounters a previously unknown user ID as a note's creator, it may query 787 | * listBusinessUsers to find information about this user. If the user is not in the resulting 788 | * list, the client should track that fact and not re-query the service the next time that it sees 789 | * this user on a note. 790 | * 791 | * @param authenticationToken 792 | * A business authentication token returned by authenticateToBusiness or with sufficient 793 | * privileges to manage Evernote Business membership. 794 | */ 795 | list listBusinessUsers(1: string authenticationToken) 796 | throws (1: Errors.EDAMUserException userException, 797 | 2: Errors.EDAMSystemException systemException), 798 | 799 | /** 800 | * Returns a list of outstanding invitations to join an Evernote Business account. 801 | * 802 | * Only outstanding invitations are returned by this function. Users who have accepted an 803 | * invitation and joined a business are listed using listBusinessUsers. 804 | * 805 | * @param authenticationToken 806 | * An authentication token with sufficient privileges to manage Evernote Business membership. 807 | * 808 | * @param includeRequestedInvitations 809 | * If true, invitations with a status of BusinessInvitationStatus.REQUESTED will be included 810 | * in the returned list. If false, only invitations with a status of 811 | * BusinessInvitationStatus.APPROVED will be included. 812 | */ 813 | list listBusinessInvitations(1: string authenticationToken, 814 | 2: bool includeRequestedInvitations) 815 | throws (1: Errors.EDAMUserException userException, 816 | 2: Errors.EDAMSystemException systemException), 817 | 818 | /** 819 | * Retrieve the standard account limits for a given service level. This should only be 820 | * called when necessary, e.g. to determine if a higher level is available should the 821 | * user upgrade, and should be cached for long periods (e.g. 30 days) as the values are 822 | * not expected to fluctuate frequently. 823 | * 824 | * @throws EDAMUserException
    825 | *
  • DATA_REQUIRED "serviceLevel" - serviceLevel is null
  • 826 | *
827 | */ 828 | Types.AccountLimits getAccountLimits(1: Types.ServiceLevel serviceLevel) 829 | throws (1: Errors.EDAMUserException userException), 830 | } 831 | -------------------------------------------------------------------------------- /src/Limits.thrift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2018 Evernote Corporation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /* 27 | * This file contains the allowable limits for the various fields and 28 | * collections that make up the EDAM data model. 29 | */ 30 | 31 | namespace as3 com.evernote.edam.limits 32 | namespace java com.evernote.edam.limits 33 | namespace csharp Evernote.EDAM.Limits 34 | namespace py evernote.edam.limits 35 | namespace cpp evernote.limits 36 | namespace rb Evernote.EDAM.Limits 37 | namespace php EDAM.Limits 38 | namespace cocoa EDAM 39 | namespace perl EDAMLimits 40 | namespace go edam 41 | 42 | 43 | // ========================== string field limits ============================== 44 | 45 | /** 46 | * Minimum length of any string-based attribute, in Unicode chars 47 | */ 48 | const i32 EDAM_ATTRIBUTE_LEN_MIN = 1; 49 | /** 50 | * Maximum length of any string-based attribute, in Unicode chars 51 | */ 52 | const i32 EDAM_ATTRIBUTE_LEN_MAX = 4096; 53 | /** 54 | * Any string-based attribute must match the provided regular expression. 55 | * This excludes all Unicode line endings and control characters. 56 | */ 57 | const string EDAM_ATTRIBUTE_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,4096}$"; 58 | 59 | /** 60 | * The maximum number of values that can be stored in a list-based attribute 61 | * (e.g. see UserAttributes.recentMailedAddresses) 62 | */ 63 | const i32 EDAM_ATTRIBUTE_LIST_MAX = 100; 64 | 65 | /** 66 | * The maximum number of entries that can be stored in a map-based attribute 67 | * such as applicationData fields in Resources and Notes. 68 | */ 69 | const i32 EDAM_ATTRIBUTE_MAP_MAX = 100; 70 | 71 | /** 72 | * The minimum length of a GUID generated by the Evernote service 73 | */ 74 | const i32 EDAM_GUID_LEN_MIN = 36; 75 | /** 76 | * The maximum length of a GUID generated by the Evernote service 77 | */ 78 | const i32 EDAM_GUID_LEN_MAX = 36; 79 | /** 80 | * GUIDs generated by the Evernote service will match the provided pattern 81 | */ 82 | const string EDAM_GUID_REGEX = 83 | "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"; 84 | 85 | /** 86 | * The minimum length of any email address 87 | */ 88 | const i32 EDAM_EMAIL_LEN_MIN = 6; 89 | /** 90 | * The maximum length of any email address 91 | */ 92 | const i32 EDAM_EMAIL_LEN_MAX = 255; 93 | /** 94 | * A regular expression that matches the part of an email address before 95 | * the '@' symbol. 96 | */ 97 | const string EDAM_EMAIL_LOCAL_REGEX = 98 | "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*$"; 99 | /** 100 | * A regular expression that matches the part of an email address after 101 | * the '@' symbol. 102 | */ 103 | const string EDAM_EMAIL_DOMAIN_REGEX = 104 | "^[A-Za-z0-9-]*[A-Za-z0-9](\\.[A-Za-z0-9-]*[A-Za-z0-9])*\\.([A-Za-z]{2,})$"; 105 | /** 106 | * A regular expression that must match any email address given to Evernote. 107 | * Email addresses must comply with RFC 2821 and 2822. 108 | */ 109 | const string EDAM_EMAIL_REGEX = 110 | "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[A-Za-z0-9-]*[A-Za-z0-9](\\.[A-Za-z0-9-]*[A-Za-z0-9])*\\.([A-Za-z]{2,})$"; 111 | 112 | /** 113 | * A regular expression that must match any VAT ID given to Evernote. 114 | * ref http://en.wikipedia.org/wiki/VAT_identification_number 115 | * ref http://my.safaribooksonline.com/book/programming/regular-expressions/9780596802837/4dot-validation-and-formatting/id2995136 116 | */ 117 | const string EDAM_VAT_REGEX = 118 | "^(AT)?U[0-9]{8}$|^(BE)?0?[0-9]{9}$|^(BG)?[0-9]{9,10}$|^(CY)?[0-9]{8}L$|^(CZ)?[0-9]{8,10}$|^(DE)?[0-9]{9}$|^(DK)?[0-9]{8}$|^(EE)?[0-9]{9}$|^(EL|GR)?[0-9]{9}$|^(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]$|^(FI)?[0-9]{8}$|^(FR)?[0-9A-Z]{2}[0-9]{9}$|^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$|^(HU)?[0-9]{8}$|^(IE)?[0-9]{7}[A-Z]{1,2}$|^(IT)?[0-9]{11}$|^(LT)?([0-9]{9}|[0-9]{12})$|^(LU)?[0-9]{8}$|^(LV)?[0-9]{11}$|^(MT)?[0-9]{8}$|^(NL)?[0-9]{9}B[0-9]{2}$|^(PL)?[0-9]{10}$|^(PT)?[0-9]{9}$|^(RO)?[0-9]{2,10}$|^(SE)?[0-9]{12}$|^(SI)?[0-9]{8}$|^(SK)?[0-9]{10}$|^[0-9]{9}MVA$|^[0-9]{6}$|^CHE[0-9]{9}(TVA|MWST|IVA)$"; 119 | 120 | /** 121 | * The minimum length of a timezone specification string 122 | */ 123 | const i32 EDAM_TIMEZONE_LEN_MIN = 1; 124 | /** 125 | * The maximum length of a timezone specification string 126 | */ 127 | const i32 EDAM_TIMEZONE_LEN_MAX = 32; 128 | /** 129 | * Any timezone string given to Evernote must match the provided pattern. 130 | * This permits either a locale-based standard timezone or a GMT offset. 131 | * E.g.:
    132 | *
  • America/Los_Angeles
  • 133 | *
  • GMT+08:00
  • 134 | *
135 | */ 136 | const string EDAM_TIMEZONE_REGEX = 137 | "^([A-Za-z_-]+(/[A-Za-z_-]+)*)|(GMT(-|\\+)[0-9]{1,2}(:[0-9]{2})?)$"; 138 | 139 | /** 140 | * The minimum length of any MIME type string given to Evernote 141 | */ 142 | const i32 EDAM_MIME_LEN_MIN = 3; 143 | /** 144 | * The maximum length of any MIME type string given to Evernote 145 | */ 146 | const i32 EDAM_MIME_LEN_MAX = 255; 147 | /** 148 | * Any MIME type string given to Evernote must match the provided pattern. 149 | * E.g.: image/gif 150 | */ 151 | const string EDAM_MIME_REGEX = "^[A-Za-z]+/[A-Za-z0-9._+-]+$"; 152 | 153 | /** Canonical MIME type string for GIF image resources */ 154 | const string EDAM_MIME_TYPE_GIF = "image/gif"; 155 | /** Canonical MIME type string for JPEG image resources */ 156 | const string EDAM_MIME_TYPE_JPEG = "image/jpeg"; 157 | /** Canonical MIME type string for PNG image resources */ 158 | const string EDAM_MIME_TYPE_PNG = "image/png"; 159 | /** Canonical MIME type string for TIFF image resources */ 160 | const string EDAM_MIME_TYPE_TIFF = "image/tiff"; 161 | /** Canonical MIME type string for BMP image resources */ 162 | const string EDAM_MIME_TYPE_BMP = "image/bmp"; 163 | /** Canonical MIME type string for WAV audio resources */ 164 | const string EDAM_MIME_TYPE_WAV = "audio/wav"; 165 | /** Canonical MIME type string for MP3 audio resources */ 166 | const string EDAM_MIME_TYPE_MP3 = "audio/mpeg"; 167 | /** Canonical MIME type string for AMR audio resources */ 168 | const string EDAM_MIME_TYPE_AMR = "audio/amr"; 169 | /** Canonical MIME type string for AAC audio resources */ 170 | const string EDAM_MIME_TYPE_AAC = "audio/aac"; 171 | /** Canonical MIME type string for MP4 audio resources */ 172 | const string EDAM_MIME_TYPE_M4A = "audio/mp4"; 173 | /** Canonical MIME type string for MP4 video resources */ 174 | const string EDAM_MIME_TYPE_MP4_VIDEO = "video/mp4"; 175 | /** Canonical MIME type string for Evernote Ink resources */ 176 | const string EDAM_MIME_TYPE_INK = "application/vnd.evernote.ink"; 177 | /** Canonical MIME type string for PDF resources */ 178 | const string EDAM_MIME_TYPE_PDF = "application/pdf"; 179 | /** MIME type used for attachments of an unspecified type */ 180 | const string EDAM_MIME_TYPE_DEFAULT = "application/octet-stream"; 181 | 182 | /** 183 | * The set of resource MIME types that are expected to be handled 184 | * correctly by all of the major Evernote client applications. 185 | */ 186 | const set EDAM_MIME_TYPES = [ 187 | EDAM_MIME_TYPE_GIF, 188 | EDAM_MIME_TYPE_JPEG, 189 | EDAM_MIME_TYPE_PNG, 190 | EDAM_MIME_TYPE_WAV, 191 | EDAM_MIME_TYPE_MP3, 192 | EDAM_MIME_TYPE_AMR, 193 | EDAM_MIME_TYPE_INK, 194 | EDAM_MIME_TYPE_PDF, 195 | EDAM_MIME_TYPE_MP4_VIDEO, 196 | EDAM_MIME_TYPE_AAC, 197 | EDAM_MIME_TYPE_M4A 198 | ]; 199 | 200 | /** 201 | * The set of MIME types that Evernote will parse and index for 202 | * searching. With exception of images, PDFs and plain text files, 203 | * which are handled in a different way. 204 | */ 205 | const set EDAM_INDEXABLE_RESOURCE_MIME_TYPES = [ 206 | "application/msword", 207 | "application/mspowerpoint", 208 | "application/excel", 209 | "application/vnd.ms-word", 210 | "application/vnd.ms-powerpoint", 211 | "application/vnd.ms-excel", 212 | "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 213 | "application/vnd.openxmlformats-officedocument.presentationml.presentation", 214 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 215 | "application/vnd.apple.pages", 216 | "application/vnd.apple.numbers", 217 | "application/vnd.apple.keynote", 218 | "application/x-iwork-pages-sffpages", 219 | "application/x-iwork-numbers-sffnumbers", 220 | "application/x-iwork-keynote-sffkey" 221 | ]; 222 | 223 | /** 224 | * The set of plain text MIME types that Evernote will parse and index 225 | * for searching. The MIME types which start with "text/" will be handled 226 | * separately by each client (i.e. hard-coded in each client). 227 | */ 228 | const set EDAM_INDEXABLE_PLAINTEXT_MIME_TYPES = [ 229 | "application/x-sh", 230 | "application/x-bsh", 231 | "application/sql", 232 | "application/x-sql" 233 | ]; 234 | 235 | /** 236 | * The minimum length of a user search query string in Unicode chars 237 | */ 238 | const i32 EDAM_SEARCH_QUERY_LEN_MIN = 0; 239 | /** 240 | * The maximum length of a user search query string in Unicode chars 241 | */ 242 | const i32 EDAM_SEARCH_QUERY_LEN_MAX = 1024; 243 | /** 244 | * Search queries must match the provided pattern. This is used for 245 | * both ad-hoc queries and SavedSearch.query fields. 246 | * This excludes all control characters and line/paragraph separators. 247 | */ 248 | const string EDAM_SEARCH_QUERY_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{0,1024}$"; 249 | 250 | /** 251 | * The exact length of a MD5 hash checksum, in binary bytes. 252 | * This is the exact length that must be matched for any binary hash 253 | * value. 254 | */ 255 | const i32 EDAM_HASH_LEN = 16; 256 | 257 | /** 258 | * The minimum length of an Evernote username 259 | */ 260 | const i32 EDAM_USER_USERNAME_LEN_MIN = 1; 261 | /** 262 | * The maximum length of an Evernote username 263 | */ 264 | const i32 EDAM_USER_USERNAME_LEN_MAX = 64; 265 | /** 266 | * Any Evernote User.username field must match this pattern. This 267 | * restricts usernames to a format that could permit use as a domain 268 | * name component. E.g. "username.whatever.evernote.com" 269 | */ 270 | const string EDAM_USER_USERNAME_REGEX = "^[a-z0-9]([a-z0-9_-]{0,62}[a-z0-9])?$"; 271 | 272 | /** 273 | * Minimum length of the User.name field 274 | */ 275 | const i32 EDAM_USER_NAME_LEN_MIN = 1; 276 | /** 277 | * Maximum length of the User.name field 278 | */ 279 | const i32 EDAM_USER_NAME_LEN_MAX = 255; 280 | /** 281 | * The User.name field must match this pattern, which excludes line 282 | * endings and control characters. 283 | */ 284 | const string EDAM_USER_NAME_REGEX = "^[^\\p{Cc}\\p{Zl}\\p{Zp}]{1,255}$"; 285 | 286 | /** 287 | * The minimum length of a Tag.name, in Unicode characters 288 | */ 289 | const i32 EDAM_TAG_NAME_LEN_MIN = 1; 290 | /** 291 | * The maximum length of a Tag.name, in Unicode characters 292 | */ 293 | const i32 EDAM_TAG_NAME_LEN_MAX = 100; 294 | /** 295 | * All Tag.name fields must match this pattern. 296 | * This excludes control chars, commas or line/paragraph separators. 297 | * The string may not begin or end with whitespace. 298 | */ 299 | const string EDAM_TAG_NAME_REGEX = 300 | "^[^,\\p{Cc}\\p{Z}]([^,\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^,\\p{Cc}\\p{Z}])?$"; 301 | 302 | /** 303 | * The minimum length of a Note.title, in Unicode characters 304 | */ 305 | const i32 EDAM_NOTE_TITLE_LEN_MIN = 1; 306 | /** 307 | * The maximum length of a Note.title, in Unicode characters 308 | */ 309 | const i32 EDAM_NOTE_TITLE_LEN_MAX = 255; 310 | /** 311 | * All Note.title fields must match this pattern. 312 | * This excludes control chars or line/paragraph separators. 313 | * The string may not begin or end with whitespace. 314 | */ 315 | const string EDAM_NOTE_TITLE_REGEX = 316 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,253}[^\\p{Cc}\\p{Z}])?$"; 317 | 318 | /** 319 | * Minimum length of a Note.content field. 320 | * Note.content fields must comply with the ENML DTD. 321 | */ 322 | const i32 EDAM_NOTE_CONTENT_LEN_MIN = 0; 323 | /** 324 | * Maximum length of a Note.content field 325 | * Note.content fields must comply with the ENML DTD. 326 | */ 327 | const i32 EDAM_NOTE_CONTENT_LEN_MAX = 5242880; 328 | 329 | /** 330 | * Minimum length of an application name, which is the key in an 331 | * applicationData LazyMap found in entities such as Resources and 332 | * Notes. 333 | */ 334 | const i32 EDAM_APPLICATIONDATA_NAME_LEN_MIN = 3; 335 | /** 336 | * Maximum length of an application name, which is the key in an 337 | * applicationData LazyMap found in entities such as Resources and 338 | * Notes. 339 | */ 340 | const i32 EDAM_APPLICATIONDATA_NAME_LEN_MAX = 32; 341 | /** 342 | * Minimum length of an applicationData value in a LazyMap, found 343 | * in entities such as Resources and Notes. 344 | */ 345 | const i32 EDAM_APPLICATIONDATA_VALUE_LEN_MIN = 0; 346 | /** 347 | * Maximum length of an applicationData value in a LazyMap, found 348 | * in entities such as Resources and Notes. Note, however, that 349 | * the sum of the size of hte key and value is constrained by 350 | * EDAM_APPLICATIONDATA_ENTRY_LEN_MAX, so the maximum length, in 351 | * practice, depends upon the key value being used. 352 | */ 353 | const i32 EDAM_APPLICATIONDATA_VALUE_LEN_MAX = 4092; 354 | /** 355 | * The total length of an entry in an applicationData LazyMap, which 356 | * is the sum of the length of the key and the value for the entry. 357 | */ 358 | const i32 EDAM_APPLICATIONDATA_ENTRY_LEN_MAX = 4095; 359 | /** 360 | * An application name must match this regex. An application 361 | * name is the key portion of an entry in an applicationData 362 | * map as found in entities such as Resources and Notes. 363 | * Note that even if both the name and value regexes match, 364 | * it is still necessary to check the sum of the lengths 365 | * against EDAM_APPLICATIONDATA_ENTRY_LEN_MAX. 366 | */ 367 | const string EDAM_APPLICATIONDATA_NAME_REGEX = "^[A-Za-z0-9_.-]{3,32}$"; 368 | /** 369 | * An applicationData map value must match this regex. 370 | * Note that even if both the name and value regexes match, 371 | * it is still necessary to check the sum of the lengths 372 | * against EDAM_APPLICATIONDATA_ENTRY_LEN_MAX. 373 | */ 374 | const string EDAM_APPLICATIONDATA_VALUE_REGEX = "^[\\p{Space}[^\\p{Cc}]]{0,4092}$"; 375 | 376 | /** 377 | * The minimum length of a Notebook.name, in Unicode characters 378 | */ 379 | const i32 EDAM_NOTEBOOK_NAME_LEN_MIN = 1; 380 | /** 381 | * The maximum length of a Notebook.name, in Unicode characters 382 | */ 383 | const i32 EDAM_NOTEBOOK_NAME_LEN_MAX = 100; 384 | /** 385 | * All Notebook.name fields must match this pattern. 386 | * This excludes control chars or line/paragraph separators. 387 | * The string may not begin or end with whitespace. 388 | */ 389 | const string EDAM_NOTEBOOK_NAME_REGEX = 390 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"; 391 | 392 | /** 393 | * The minimum length of a Notebook.stack, in Unicode characters 394 | */ 395 | const i32 EDAM_NOTEBOOK_STACK_LEN_MIN = 1; 396 | /** 397 | * The maximum length of a Notebook.stack, in Unicode characters 398 | */ 399 | const i32 EDAM_NOTEBOOK_STACK_LEN_MAX = 100; 400 | /** 401 | * All Notebook.stack fields must match this pattern. 402 | * This excludes control chars or line/paragraph separators. 403 | * The string may not begin or end with whitespace. 404 | */ 405 | const string EDAM_NOTEBOOK_STACK_REGEX = 406 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"; 407 | 408 | /** 409 | * The minimum length of a Workspace.name, in Unicode characters 410 | */ 411 | const i32 EDAM_WORKSPACE_NAME_LEN_MIN = 1; 412 | 413 | /** 414 | * The maximum length of a Workspace.name, in Unicode characters 415 | */ 416 | const i32 EDAM_WORKSPACE_NAME_LEN_MAX = 100; 417 | 418 | /** 419 | * The maximum length of a Workspace.description, in Unicode characters 420 | */ 421 | const i32 EDAM_WORKSPACE_DESCRIPTION_LEN_MAX = 600; 422 | 423 | /** 424 | * All Workspace.name fields must match this pattern. 425 | * This excludes control chars or line/paragraph separators. 426 | * The string may not begin or end with whitespace. 427 | */ 428 | const string EDAM_WORKSPACE_NAME_REGEX = 429 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"; 430 | 431 | /** 432 | * The minimum length of a public notebook URI component 433 | */ 434 | const i32 EDAM_PUBLISHING_URI_LEN_MIN = 1; 435 | /** 436 | * The maximum length of a public notebook URI component 437 | */ 438 | const i32 EDAM_PUBLISHING_URI_LEN_MAX = 255; 439 | /** 440 | * A public notebook URI component must match the provided pattern 441 | */ 442 | const string EDAM_PUBLISHING_URI_REGEX = "^[a-zA-Z0-9.~_+-]{1,255}$"; 443 | /** 444 | * The set of strings that may not be used as a publishing URI 445 | */ 446 | const set EDAM_PUBLISHING_URI_PROHIBITED = [ ".", ".." ]; 447 | 448 | /** 449 | * The minimum length of a Publishing.publicDescription field. 450 | */ 451 | const i32 EDAM_PUBLISHING_DESCRIPTION_LEN_MIN = 1; 452 | /** 453 | * The maximum length of a Publishing.publicDescription field. 454 | */ 455 | const i32 EDAM_PUBLISHING_DESCRIPTION_LEN_MAX = 200; 456 | /** 457 | * Any public notebook's Publishing.publicDescription field must match 458 | * this pattern. 459 | * No control chars or line/paragraph separators, and can't start or 460 | * end with whitespace. 461 | */ 462 | const string EDAM_PUBLISHING_DESCRIPTION_REGEX = 463 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?$"; 464 | 465 | /** 466 | * The minimum length of a SavedSearch.name field 467 | */ 468 | const i32 EDAM_SAVED_SEARCH_NAME_LEN_MIN = 1; 469 | /** 470 | * The maximum length of a SavedSearch.name field 471 | */ 472 | const i32 EDAM_SAVED_SEARCH_NAME_LEN_MAX = 100; 473 | /** 474 | * SavedSearch.name fields must match this pattern. 475 | * No control chars or line/paragraph separators, and can't start or 476 | * end with whitespace. 477 | */ 478 | const string EDAM_SAVED_SEARCH_NAME_REGEX = 479 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,98}[^\\p{Cc}\\p{Z}])?$"; 480 | 481 | /** 482 | * The minimum length of an Evernote user password 483 | */ 484 | const i32 EDAM_USER_PASSWORD_LEN_MIN = 6; 485 | /** 486 | * The maximum length of an Evernote user password 487 | */ 488 | const i32 EDAM_USER_PASSWORD_LEN_MAX = 64; 489 | /** 490 | * Evernote user passwords must match this regular expression 491 | */ 492 | const string EDAM_USER_PASSWORD_REGEX = 493 | "^[A-Za-z0-9!#$%&'()*+,./:;<=>?@^_`{|}~\\[\\]\\\\-]{6,64}$"; 494 | 495 | /** 496 | * The maximum length of an Evernote Business URI 497 | */ 498 | const i32 EDAM_BUSINESS_URI_LEN_MAX = 32; 499 | 500 | /** 501 | * Valid Evernote Business marketing code / affiliate code format. 502 | */ 503 | const string EDAM_BUSINESS_MARKETING_CODE_REGEX_PATTERN = "[A-Za-z0-9-]{1,128}"; 504 | 505 | // ==================== data model collection limits =========================== 506 | 507 | /** 508 | * The maximum number of Tags per Note 509 | */ 510 | const i32 EDAM_NOTE_TAGS_MAX = 100; 511 | 512 | /** 513 | * The maximum number of Resources per Note 514 | */ 515 | const i32 EDAM_NOTE_RESOURCES_MAX = 1000; 516 | 517 | /** 518 | * Maximum number of Tags per account 519 | */ 520 | const i32 EDAM_USER_TAGS_MAX = 100000; 521 | 522 | /** 523 | * Maximum number of Tags per business account. 524 | */ 525 | const i32 EDAM_BUSINESS_TAGS_MAX = 100000; 526 | 527 | /** 528 | * Maximum number of SavedSearches per account 529 | */ 530 | const i32 EDAM_USER_SAVED_SEARCHES_MAX = 100; 531 | 532 | /** 533 | * Maximum number of Notes per user 534 | */ 535 | const i32 EDAM_USER_NOTES_MAX = 100000; 536 | 537 | /** 538 | * Maximum number of Notes per business account 539 | */ 540 | const i32 EDAM_BUSINESS_NOTES_MAX = 500000; 541 | 542 | /** 543 | * Maximum number of Notebooks per user 544 | */ 545 | const i32 EDAM_USER_NOTEBOOKS_MAX = 250; 546 | 547 | /** 548 | * Maximum number of Workspaces per user 549 | */ 550 | const i32 EDAM_USER_WORKSPACES_MAX = 0; 551 | 552 | /** 553 | * Maximum number of Notebooks in a business account 554 | */ 555 | const i32 EDAM_BUSINESS_NOTEBOOKS_MAX = 10000; 556 | 557 | /** 558 | * Maximum number of Workspaces in a business account 559 | */ 560 | const i32 EDAM_BUSINESS_WORKSPACES_MAX = 1000; 561 | 562 | /** 563 | * Maximum number of recent email addresses that are maintained 564 | * (see UserAttributes.recentMailedAddresses) 565 | */ 566 | const i32 EDAM_USER_RECENT_MAILED_ADDRESSES_MAX = 10; 567 | 568 | /** 569 | * The number of emails of any type that can be sent by a user with a Free 570 | * account from the service per day. If an email is sent to two different 571 | * recipients, this counts as two emails. 572 | */ 573 | const i32 EDAM_USER_MAIL_LIMIT_DAILY_FREE = 50; 574 | 575 | /** 576 | * The number of emails of any type that can be sent by a user with a Premium 577 | * account from the service per day. If an email is sent to two different 578 | * recipients, this counts as two emails. 579 | */ 580 | const i32 EDAM_USER_MAIL_LIMIT_DAILY_PREMIUM = 200; 581 | 582 | /** 583 | * The number of bytes of new data that may be uploaded to a Free user's 584 | * account each month. 585 | */ 586 | const i64 EDAM_USER_UPLOAD_LIMIT_FREE = 62914560; 587 | 588 | /** 589 | * The number of bytes of new data that may be uploaded to a Premium user's 590 | * account each month. 591 | */ 592 | const i64 EDAM_USER_UPLOAD_LIMIT_PREMIUM = 10737418240; 593 | 594 | /** 595 | * The number of bytes of new data that may be uploaded to new business 596 | * account during the first month. 50GB. 597 | */ 598 | const i64 EDAM_USER_UPLOAD_LIMIT_BUSINESS_FIRST_MONTH = 53687091200; 599 | 600 | /** 601 | * The number of bytes of new data that may be uploaded to a business 602 | * account for the next month. 20GB. 603 | */ 604 | const i64 EDAM_USER_UPLOAD_LIMIT_BUSINESS_NEXT_MONTH = 21474836480; 605 | 606 | /** 607 | * The number of bytes of new data that may be uploaded each month to an account at 608 | * a Plus service level. 609 | */ 610 | const i64 EDAM_USER_UPLOAD_LIMIT_PLUS = 1073741824; 611 | 612 | /** 613 | * The number of bytes of new data uploaded in a monthly quota cycle at which point 614 | * users should be prompted with a survey to gather information on how they are using 615 | * Evernote. 616 | */ 617 | const i64 EDAM_USER_UPLOAD_SURVEY_THRESHOLD = 5368709120; 618 | 619 | /** 620 | * The number of bytes of new data that may be uploaded to a Business user's 621 | * personal account each month. Note that content uploaded into the Business 622 | * notebooks by the user does not count against this limit. 623 | */ 624 | const i64 EDAM_USER_UPLOAD_LIMIT_BUSINESS = 10737418240; 625 | 626 | /** 627 | * The number of bytes of new data that may be uploaded to a Business for each 628 | * member of the business per month. The total bytes available can be determined 629 | * by multiplying this with the number of business users. 630 | */ 631 | const i64 EDAM_USER_UPLOAD_LIMIT_BUSINESS_PER_USER = 2147483647; 632 | 633 | /** 634 | * Maximum total size of a Note that can be added to a Free account. 635 | * The size of a note is calculated as: 636 | * ENML content length (in Unicode characters) plus the sum of all resource 637 | * sizes (in bytes). 638 | */ 639 | const i32 EDAM_NOTE_SIZE_MAX_FREE = 26214400; 640 | 641 | /** 642 | * Maximum total size of a Note that can be added to a Premium account. 643 | * The size of a note is calculated as: 644 | * ENML content length (in Unicode characters) plus the sum of all resource 645 | * sizes (in bytes). 646 | */ 647 | const i32 EDAM_NOTE_SIZE_MAX_PREMIUM = 209715200; 648 | 649 | /** 650 | * Maximum size of a resource, in bytes, for Free accounts 651 | */ 652 | const i32 EDAM_RESOURCE_SIZE_MAX_FREE = 26214400; 653 | 654 | /** 655 | * Maximum size of a resource, in bytes, for Premium accounts 656 | */ 657 | const i32 EDAM_RESOURCE_SIZE_MAX_PREMIUM = 209715200; 658 | 659 | /** 660 | * Maximum number of linked notebooks per account, for a free 661 | * account. 662 | */ 663 | const i32 EDAM_USER_LINKED_NOTEBOOK_MAX = 100; 664 | 665 | /** 666 | * Maximum number of linked notebooks per account, for a premium 667 | * account. Users who are part of an active business are also 668 | * covered under "premium". 669 | */ 670 | const i32 EDAM_USER_LINKED_NOTEBOOK_MAX_PREMIUM = 500; 671 | 672 | /** 673 | * Maximum number of shared notebooks per business notebook 674 | */ 675 | const i32 EDAM_NOTEBOOK_BUSINESS_SHARED_NOTEBOOK_MAX = 5000; 676 | /** 677 | * Maximum number of shared notebooks per personal notebook 678 | */ 679 | const i32 EDAM_NOTEBOOK_PERSONAL_SHARED_NOTEBOOK_MAX = 500; 680 | 681 | /** 682 | * Maximum number of SharedNote records per business note 683 | */ 684 | const i32 EDAM_NOTE_BUSINESS_SHARED_NOTE_MAX = 1000; 685 | /** 686 | * Maximum number of SharedNote records per personal note 687 | */ 688 | const i32 EDAM_NOTE_PERSONAL_SHARED_NOTE_MAX = 100; 689 | 690 | /** 691 | * The minimum length of the content class attribute of a note. 692 | */ 693 | const i32 EDAM_NOTE_CONTENT_CLASS_LEN_MIN = 3; 694 | /** 695 | * The maximum length of the content class attribute of a note. 696 | */ 697 | const i32 EDAM_NOTE_CONTENT_CLASS_LEN_MAX = 32; 698 | /** 699 | * The regular expression that the content class of a note must match 700 | * to be valid. 701 | */ 702 | const string EDAM_NOTE_CONTENT_CLASS_REGEX = "^[A-Za-z0-9_.-]{3,32}$"; 703 | /** 704 | * The content class prefix used for all notes created by Evernote Hello. 705 | * This prefix can be used to assemble individual content class strings, 706 | * or can be used to create a wildcard search to get all notes created by 707 | * Hello. When performing a wildcard search via filtered sync chunks or 708 | * search strings, the * character must be appended to this constant. 709 | */ 710 | const string EDAM_HELLO_APP_CONTENT_CLASS_PREFIX = "evernote.hello."; 711 | /** 712 | * The content class prefix used for all notes created by Evernote Food. 713 | * This prefix can be used to assemble individual content class strings, 714 | * or can be used to create a wildcard search to get all notes created by 715 | * Food. When performing a wildcard search via filtered sync chunks or 716 | * search strings, the * character must be appended to this constant. 717 | */ 718 | const string EDAM_FOOD_APP_CONTENT_CLASS_PREFIX = "evernote.food."; 719 | /** 720 | * The content class prefix used for structured notes created by Evernote 721 | * Hello that represents an encounter with a person. When performing a 722 | * wildcard search via filtered sync chunks or search strings, the * 723 | * character must be appended to this constant. 724 | */ 725 | const string EDAM_CONTENT_CLASS_HELLO_ENCOUNTER = "evernote.hello.encounter"; 726 | /** 727 | * The content class prefix used for structured notes created by Evernote 728 | * Hello that represents the user's profile. When performing a 729 | * wildcard search via filtered sync chunks or search strings, the * 730 | * character must be appended to this constant. 731 | */ 732 | const string EDAM_CONTENT_CLASS_HELLO_PROFILE = "evernote.hello.profile"; 733 | /** 734 | * The content class prefix used for structured notes created by 735 | * Evernote Food that captures the experience of a particular meal. 736 | * When performing a wildcard search via filtered sync chunks or search 737 | * strings, the * character must be appended to this constant. 738 | */ 739 | const string EDAM_CONTENT_CLASS_FOOD_MEAL = "evernote.food.meal"; 740 | 741 | /** 742 | * The content class prefix used for structured notes created by Evernote 743 | * Skitch. When performing a wildcard search via filtered sync chunks 744 | * or search strings, the * character must be appended to this constant. 745 | */ 746 | const string EDAM_CONTENT_CLASS_SKITCH_PREFIX = "evernote.skitch"; 747 | 748 | /** 749 | * The content class value used for structured image notes created by Evernote 750 | * Skitch. 751 | */ 752 | const string EDAM_CONTENT_CLASS_SKITCH = "evernote.skitch"; 753 | 754 | /** 755 | * The content class value used for structured PDF notes created by Evernote 756 | * Skitch. 757 | */ 758 | const string EDAM_CONTENT_CLASS_SKITCH_PDF = "evernote.skitch.pdf"; 759 | 760 | /** 761 | * The content class prefix used for structured notes created by Evernote 762 | * Penultimate. When performing a wildcard search via filtered sync chunks 763 | * or search strings, the * character must be appended to this constant. 764 | */ 765 | const string EDAM_CONTENT_CLASS_PENULTIMATE_PREFIX = "evernote.penultimate."; 766 | 767 | /** 768 | * The content class value used for structured notes created by Evernote 769 | * Penultimate that represents a Penultimate notebook. 770 | */ 771 | const string EDAM_CONTENT_CLASS_PENULTIMATE_NOTEBOOK = "evernote.penultimate.notebook"; 772 | 773 | /** 774 | * The NoteAttributes.sourceApplication value used for notes captured by the Post-it 775 | * camera. 776 | */ 777 | const string EDAM_SOURCE_APPLICATION_POSTIT = "postit"; 778 | 779 | /** 780 | * The NoteAttributes.sourceApplication value used for notes captured by the Moleskine 781 | * page camera. 782 | */ 783 | const string EDAM_SOURCE_APPLICATION_MOLESKINE = "moleskine"; 784 | 785 | /** 786 | * The NoteAttributes.sourceApplication value used for notes captured by 787 | * PFU ScanSnap Evernote Edition. 788 | */ 789 | const string EDAM_SOURCE_APPLICATION_EN_SCANSNAP = "scanner.scansnap.evernote"; 790 | 791 | /** 792 | * The NoteAttributes.sourceApplication value used for notes captured with the Embedded 793 | * Web Clipper. 794 | */ 795 | const string EDAM_SOURCE_APPLICATION_EWC = "clipncite.web"; 796 | 797 | /** 798 | * The NoteAttributes.sourceApplication value used for notes captured with the Android 799 | * share extension. 800 | */ 801 | const string EDAM_SOURCE_APPLICATION_ANDROID_SHARE_EXTENSION = "android.clipper.evernote"; 802 | 803 | /** 804 | * The NoteAttributes.sourceApplication value used for notes captured with the iOS share 805 | * extension. 806 | */ 807 | const string EDAM_SOURCE_APPLICATION_IOS_SHARE_EXTENSION = "ios.clipper.evernote"; 808 | 809 | /** 810 | * The NoteAttributes.sourceApplication value used for notes captured with the Evernote 811 | * Web Clipper. 812 | */ 813 | const string EDAM_SOURCE_APPLICATION_WEB_CLIPPER = "webclipper.evernote"; 814 | 815 | /** 816 | * The NoteAttributes.source value used for notes captured by the Microsoft Outlook clipper. 817 | */ 818 | const string EDAM_SOURCE_OUTLOOK_CLIPPER = "app.ms.outlook"; 819 | 820 | /** 821 | * A NoteAttributes.noteTitleQuality value indicating that a note has no meaningful title, 822 | * only a placeholder value such as "Untitled Note". 823 | */ 824 | const i32 EDAM_NOTE_TITLE_QUALITY_UNTITLED = 0; 825 | 826 | /** 827 | * A NoteAttributes.noteTitleQuality value indicating that the quality of an automatically 828 | * generated note title is low. Examples of low quality titles include those based on a 829 | * note's type and location, such as "Snapshot from 123 Sesame Street in New York". 830 | */ 831 | const i32 EDAM_NOTE_TITLE_QUALITY_LOW = 1; 832 | 833 | /** 834 | * A NoteAttributes.noteTitleQuality value indicating that the quality of an automatically 835 | * generated note title is medium. Examples of medium quality titles include those based on a 836 | * calendar entry, such as "Note from Weekly Staff Meeting". 837 | */ 838 | const i32 EDAM_NOTE_TITLE_QUALITY_MEDIUM = 2; 839 | 840 | /** 841 | * A NoteAttributes.noteTitleQuality value indicating that the quality of an automatically 842 | * generated note title is high. Examples of high quality titles include those based on a 843 | * scanned business card, such as "John Doe - Scanned Business Card". 844 | */ 845 | const i32 EDAM_NOTE_TITLE_QUALITY_HIGH = 3; 846 | 847 | /** 848 | * The minimum length of the plain text in a findRelated query, assuming that 849 | * plaintext is being provided. 850 | */ 851 | const i32 EDAM_RELATED_PLAINTEXT_LEN_MIN = 1; 852 | 853 | /** 854 | * The maximum length of the plain text in a findRelated query, assuming that 855 | * plaintext is being provided. 856 | */ 857 | const i32 EDAM_RELATED_PLAINTEXT_LEN_MAX = 131072; 858 | 859 | /** 860 | * The maximum number of notes that will be returned from a findRelated() 861 | * query. 862 | */ 863 | const i32 EDAM_RELATED_MAX_NOTES = 25; 864 | 865 | /** 866 | * The maximum number of notebooks that will be returned from a findRelated() 867 | * query. 868 | */ 869 | const i32 EDAM_RELATED_MAX_NOTEBOOKS = 1; 870 | 871 | /** 872 | * The maximum number of tags that will be returned from a findRelated() query. 873 | */ 874 | const i32 EDAM_RELATED_MAX_TAGS = 25; 875 | 876 | /** 877 | * The maximum number of experts that will be returned from a findRelated() query 878 | */ 879 | const i32 EDAM_RELATED_MAX_EXPERTS = 10; 880 | 881 | /** 882 | * The maximum number of related content snippets that will be returned from a 883 | * findRelated() query. 884 | */ 885 | const i32 EDAM_RELATED_MAX_RELATED_CONTENT = 10; 886 | 887 | /** 888 | * The minimum length, in Unicode characters, of a description for a business 889 | * notebook. 890 | */ 891 | const i32 EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN = 1; 892 | 893 | /** 894 | * The maximum length, in Unicode characters, of a description for a business 895 | * notebook. 896 | */ 897 | const i32 EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX = 200; 898 | /** 899 | * All business notebook descriptions must match this pattern. 900 | * This excludes control chars or line/paragraph separators. 901 | * The string may not begin or end with whitespace. 902 | */ 903 | const string EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX = 904 | "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,198}[^\\p{Cc}\\p{Z}])?$"; 905 | 906 | /** 907 | * The maximum length of a business phone number. 908 | */ 909 | const i32 EDAM_BUSINESS_PHONE_NUMBER_LEN_MAX = 20; 910 | 911 | /** 912 | * Minimum length of a preference name 913 | */ 914 | const i32 EDAM_PREFERENCE_NAME_LEN_MIN = 3; 915 | /** 916 | * Maximum length of a preference name 917 | */ 918 | const i32 EDAM_PREFERENCE_NAME_LEN_MAX = 32; 919 | /** 920 | * Minimum length of a preference value 921 | */ 922 | const i32 EDAM_PREFERENCE_VALUE_LEN_MIN = 1; 923 | /** 924 | * Maximum length of a preference value 925 | */ 926 | const i32 EDAM_PREFERENCE_VALUE_LEN_MAX = 1024; 927 | /** 928 | * Maximum number of name/value pairs allowed 929 | */ 930 | const i32 EDAM_MAX_PREFERENCES = 100; 931 | /** 932 | * Maximum number of values per preference name when using 933 | * values of size no greater than EDAM_PREFERENCE_VALUE_LEN_MAX. 934 | */ 935 | const i32 EDAM_MAX_VALUES_PER_PREFERENCE = 256; 936 | /** 937 | * The maximum length of a preference value if you only use one value 938 | * per preference rather than up to EDAM_MAX_VALUES_PER_PREFERENCE. 939 | * This option is useful if you want a single string that is larger 940 | * than EDAM_PREFERENCE_VALUE_LEN_MAX and would otherwise need to 941 | * split the string into multiple pieces to store it. 942 | */ 943 | const i32 EDAM_PREFERENCE_ONLY_ONE_VALUE_LEN_MAX = 16384; 944 | /** 945 | * A preference name must match this regex. 946 | */ 947 | const string EDAM_PREFERENCE_NAME_REGEX = "^[A-Za-z0-9_.-]{3,32}$"; 948 | /** 949 | * A preference value must match this regex if you are using more 950 | * than a single value for a preference. 951 | */ 952 | const string EDAM_PREFERENCE_VALUE_REGEX = "^[^\\p{Cc}]{1,1024}$"; 953 | /** 954 | * A preference value must match this regex if you are using a single 955 | * value for a preference. 956 | */ 957 | const string EDAM_PREFERENCE_ONLY_ONE_VALUE_REGEX = "^[^\\p{Cc}]{1,16384}$"; 958 | /** 959 | * The name of the preferences entry that contains shortcuts. 960 | */ 961 | const string EDAM_PREFERENCE_SHORTCUTS = "evernote.shortcuts"; 962 | /** 963 | * The name of the preferences entry that contains the notebook GUID (not the linked notebook) of 964 | * the default business notebook. It must be in the format EDAM_GUID_REGEX. 965 | * If a default business notebook is not set and the user is a business user 966 | * the user should be prompted to set the default business notebook. 967 | * The default business notebook must be a read/write notebook. 968 | * Whenever the default business notebook guid is used, it must be revalidiated as a writable 969 | * notebook. If it is not valid, the user should be re-prompted to set the value. 970 | * This value is used by clients only. 971 | */ 972 | const string EDAM_PREFERENCE_BUSINESS_DEFAULT_NOTEBOOK = "evernote.business.notebook"; 973 | /** 974 | * The name of the preferences entry that contains a boolean indicating that default 975 | * quicknotes should go into a business notebook. The EDAM_PREFERENCE_BUSINESS_DEFAULT_NOTEBOOK 976 | * must be set correctly for this preference to be honored. 977 | * The quicknote preferences should only be set to "true", if quicknote should use a business 978 | * notebook. 979 | * Any value other than "true" (or the omission of a value) should be treated as "false". 980 | * In this case, quicknotes should be created in in the user's personal default notebook. 981 | * The interface should not allow users to set quicknote to a business notebook 982 | * without a valid default business notebook selected, however, clients should handle the edge 983 | * case of an invalid business notebook guid. If a user stops being a business user or 984 | * does not have write access to any business notebooks the quicknote preference should be 985 | * ignored. 986 | */ 987 | const string EDAM_PREFERENCE_BUSINESS_QUICKNOTE = "evernote.business.quicknote"; 988 | /** 989 | * The maximum number of shortcuts that a user may have. 990 | */ 991 | const i32 EDAM_PREFERENCE_SHORTCUTS_MAX_VALUES = 250; 992 | /** 993 | * Maximum length of the device identifier string associated with long sessions. 994 | */ 995 | const i32 EDAM_DEVICE_ID_LEN_MAX = 32; 996 | /** 997 | * Regular expression for device identifier strings associated with long sessions. 998 | */ 999 | const string EDAM_DEVICE_ID_REGEX = "^[^\\p{Cc}]{1,32}$"; 1000 | /** 1001 | * Maximum length of the device description string associated with long sessions. 1002 | */ 1003 | const i32 EDAM_DEVICE_DESCRIPTION_LEN_MAX = 64; 1004 | /** 1005 | * Regular expression for device description strings associated with long sessions. 1006 | */ 1007 | const string EDAM_DEVICE_DESCRIPTION_REGEX = "^[^\\p{Cc}]{1,64}$"; 1008 | 1009 | /** 1010 | * Maximum number of search suggestions that can be returned 1011 | */ 1012 | const i32 EDAM_SEARCH_SUGGESTIONS_MAX = 10; 1013 | 1014 | /** 1015 | * Maximum length of the search suggestion prefix 1016 | */ 1017 | const i32 EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MAX = 1024; 1018 | 1019 | /** 1020 | * Minimum length of the search suggestion prefix 1021 | */ 1022 | const i32 EDAM_SEARCH_SUGGESTIONS_PREFIX_LEN_MIN = 2; 1023 | 1024 | /** 1025 | * Default maximum number of results the service will return for findContact 1026 | */ 1027 | const i32 EDAM_FIND_CONTACT_DEFAULT_MAX_RESULTS = 100; 1028 | 1029 | /** 1030 | * Absolute maximum number of results the service will return for findContact 1031 | */ 1032 | const i32 EDAM_FIND_CONTACT_MAX_RESULTS = 256; 1033 | 1034 | /** 1035 | * The maximum number of separate notes that may be queried in a single call to 1036 | * NoteStore.getViewersForNotes. 1037 | */ 1038 | const i32 EDAM_NOTE_LOCK_VIEWERS_NOTES_MAX = 150; 1039 | 1040 | /** 1041 | * Absolute maximum number of results the servce will return for PersistentInternalMarket.getOrders() 1042 | */ 1043 | const i32 EDAM_GET_ORDERS_MAX_RESULTS = 2000; 1044 | 1045 | /** 1046 | * The maximum length of a message body in unicode characters. 1047 | */ 1048 | const i32 EDAM_MESSAGE_BODY_LEN_MAX = 2048; 1049 | 1050 | /** 1051 | * The regex to validate message.body against 1052 | */ 1053 | const string EDAM_MESSAGE_BODY_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,2046}[^\\p{Cc}\\p{Z}])?$"; 1054 | 1055 | /** 1056 | * The maximum number of recipients on a MessageThread. 1057 | */ 1058 | const i32 EDAM_MESSAGE_RECIPIENTS_MAX = 50; 1059 | 1060 | /** 1061 | * The maximum number of attachments a Message can have. 1062 | */ 1063 | const i32 EDAM_MESSAGE_ATTACHMENTS_MAX = 100; 1064 | 1065 | /** 1066 | * The maximum length of a message attachment title in unicode characters. 1067 | */ 1068 | const i32 EDAM_MESSAGE_ATTACHMENT_TITLE_LEN_MAX = 255; 1069 | 1070 | /** 1071 | * The regex to validate message attachment titles against 1072 | */ 1073 | const string EDAM_MESSAGE_ATTACHMENT_TITLE_REGEX = "^[^\\p{Cc}\\p{Z}]([^\\p{Cc}\\p{Zl}\\p{Zp}]{0,253}[^\\p{Cc}\\p{Z}])?$"; 1074 | 1075 | /** 1076 | * The maximum length of a message attachment snippet in unicode characters. 1077 | */ 1078 | const i32 EDAM_MESSAGE_ATTACHMENT_SNIPPET_LEN_MAX = 2048; 1079 | 1080 | /** 1081 | * The regex to validate message attachment snippets against 1082 | */ 1083 | const string EDAM_MESSAGE_ATTACHMENT_SNIPPET_REGEX = "^[^\\p{Cc}\\p{Z}]([\\n[^\\p{Cc}\\p{Zl}\\p{Zp}]]{0,2046}[^\\p{Cc}\\p{Z}])?$"; 1084 | 1085 | /** 1086 | * Maximum user profile photo size, in bytes, that clients may send to the service. 1087 | * Photos may be resized before being stored on the service. 1088 | */ 1089 | const i32 EDAM_USER_PROFILE_PHOTO_MAX_BYTES = 716800; 1090 | 1091 | /** 1092 | * The maximum length of a promotion ID in unicode characters. 1093 | */ 1094 | const i32 EDAM_PROMOTION_ID_LEN_MAX = 32; 1095 | 1096 | /** 1097 | * The regex to validate promotion IDs against. 1098 | */ 1099 | const string EDAM_PROMOTION_ID_REGEX = "^[A-Za-z0-9_.-]{1,32}$"; 1100 | 1101 | /** App Feedback Rating range */ 1102 | const i16 EDAM_APP_RATING_MIN = 1; 1103 | const i16 EDAM_APP_RATING_MAX = 5; 1104 | 1105 | /** 1106 | * The maximium number of note snippets you can retrieve in a single request 1107 | */ 1108 | const i32 EDAM_SNIPPETS_NOTES_MAX = 24; 1109 | 1110 | /** 1111 | * The maximum number of connected identities a client can request. 1112 | */ 1113 | const i32 EDAM_CONNECTED_IDENTITY_REQUEST_MAX = 100; 1114 | 1115 | /** 1116 | * Maximum length for OpenID token. There is no official enforced limit. The length of the Token ID depends 1117 | * on the provider. 1000 seems to be the safest value at this time. 1118 | */ 1119 | const i32 EDAM_OPEN_ID_ACCESS_TOKEN_MAX = 1000; 1120 | 1121 | -------------------------------------------------------------------------------- /src/Types.thrift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2018 Evernote Corporation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /* 27 | * This file contains the definitions of the Evernote data model as it 28 | * is represented through the EDAM protocol. This is the "client-independent" 29 | * view of the contents of a user's account. Each client will translate the 30 | * neutral data model into an appropriate form for storage on that client. 31 | */ 32 | 33 | include "Limits.thrift" 34 | 35 | namespace as3 com.evernote.edam.type 36 | namespace java com.evernote.edam.type 37 | namespace csharp Evernote.EDAM.Type 38 | namespace py evernote.edam.type 39 | namespace cpp evernote.edam 40 | namespace rb Evernote.EDAM.Type 41 | namespace php EDAM.Types 42 | namespace cocoa EDAM 43 | namespace perl EDAMTypes 44 | namespace go edam 45 | 46 | 47 | // =============================== typedefs ==================================== 48 | 49 | /** 50 | * A monotonically incrementing number on each shard that identifies a cross shard 51 | * cache invalidation event. 52 | */ 53 | typedef i64 InvalidationSequenceNumber 54 | 55 | 56 | /** 57 | * A type alias for the primary identifiers for Identity objects. 58 | */ 59 | typedef i64 IdentityID 60 | 61 | 62 | /** 63 | * Every Evernote account is assigned a unique numeric identifier which 64 | * will not change for the life of the account. This is independent of 65 | * the (string-based) "username" which is known by the user for login 66 | * purposes. The user should have no reason to know their UserID. 67 | */ 68 | typedef i32 UserID 69 | 70 | 71 | /** 72 | * Most data elements within a user's account (e.g. notebooks, notes, tags, 73 | * resources, etc.) are internally referred to using a globally unique 74 | * identifier that is written in a standard string format. For example: 75 | * 76 | * "8743428c-ef91-4d05-9e7c-4a2e856e813a" 77 | * 78 | * The internal components of the GUID are not given any particular meaning: 79 | * only the entire string is relevant as a unique identifier. 80 | */ 81 | typedef string Guid 82 | 83 | 84 | /** 85 | * An Evernote Timestamp is the date and time of an event in UTC time. 86 | * This is expressed as a specific number of milliseconds since the 87 | * standard base "epoch" of: 88 | * 89 | * January 1, 1970, 00:00:00 GMT 90 | * 91 | * NOTE: the time is expressed at the resolution of milliseconds, but 92 | * the value is only precise to the level of seconds. This means that 93 | * the last three (decimal) digits of the timestamp will be '000'. 94 | * 95 | * The Thrift IDL specification does not include a native date/time type, 96 | * so this value is used instead. 97 | * 98 | * The service will accept timestamp values (e.g. for Note created and update 99 | * times) between 1000-01-01 and 9999-12-31 100 | */ 101 | typedef i64 Timestamp 102 | 103 | /** 104 | * A sequence number for the MessageStore subsystem. 105 | */ 106 | typedef i64 MessageEventID 107 | 108 | /** 109 | * A type alias for the primary identifiers for MessageThread objects. 110 | */ 111 | typedef i64 MessageThreadID 112 | 113 | // ============================= Enumerations ================================== 114 | 115 | /** 116 | * This enumeration defines the possible permission levels for a user. 117 | * Free accounts will have a level of NORMAL and paid Premium accounts 118 | * will have a level of PREMIUM. 119 | */ 120 | enum PrivilegeLevel { 121 | NORMAL = 1, 122 | PREMIUM = 3, 123 | VIP = 5, 124 | MANAGER = 7, 125 | SUPPORT = 8, 126 | ADMIN = 9 127 | } 128 | 129 | /** 130 | * This enumeration defines the possible tiers of service that a user may have. A 131 | * ServiceLevel of BUSINESS signifies a business-only account, which can never be any 132 | * other ServiceLevel. 133 | */ 134 | enum ServiceLevel { 135 | BASIC = 1, 136 | PLUS = 2, 137 | PREMIUM = 3, 138 | BUSINESS = 4 139 | } 140 | 141 | /** 142 | * Every search query is specified as a sequence of characters. 143 | * Currently, only the USER query format is supported. 144 | */ 145 | enum QueryFormat { 146 | USER = 1, 147 | SEXP = 2 148 | } 149 | 150 | 151 | /** 152 | * This enumeration defines the possible sort ordering for notes when 153 | * they are returned from a search result. 154 | */ 155 | enum NoteSortOrder { 156 | CREATED = 1, 157 | UPDATED = 2, 158 | RELEVANCE = 3, 159 | UPDATE_SEQUENCE_NUMBER = 4, 160 | TITLE = 5 161 | } 162 | 163 | 164 | /** 165 | * This enumeration defines the possible states of a premium account 166 | * 167 | * NONE: the user has never attempted to become a premium subscriber 168 | * 169 | * PENDING: the user has requested a premium account but their charge has not 170 | * been confirmed 171 | * 172 | * ACTIVE: the user has been charged and their premium account is in good 173 | * standing 174 | * 175 | * FAILED: the system attempted to charge the was denied. We will periodically attempt to 176 | * re-validate their order. 177 | * 178 | * CANCELLATION_PENDING: the user has requested that no further charges be made 179 | * but the current account is still active. 180 | * 181 | * CANCELED: the premium account was canceled either because of failure to pay 182 | * or user cancelation. No more attempts will be made to activate the account. 183 | */ 184 | enum PremiumOrderStatus { 185 | NONE = 0, 186 | PENDING = 1, 187 | ACTIVE = 2, 188 | FAILED = 3, 189 | CANCELLATION_PENDING = 4, 190 | CANCELED = 5 191 | } 192 | 193 | /** 194 | * Privilege levels for accessing shared notebooks. 195 | * 196 | * Note that as of 2014-04, FULL_ACCESS is synonymous with BUSINESS_FULL_ACCESS. If a 197 | * user is a member of a business and has FULL_ACCESS privileges, then they will 198 | * automatically be granted BUSINESS_FULL_ACCESS for notebooks in their business. This 199 | * will happen implicitly when they attempt to access the corresponding notebooks of 200 | * the business. BUSINESS_FULL_ACCESS is therefore deprecated. 201 | * 202 | * READ_NOTEBOOK: Recipient is able to read the contents of the shared notebook 203 | * but does not have access to information about other recipients of the 204 | * notebook or the activity stream information. 205 | * 206 | * MODIFY_NOTEBOOK_PLUS_ACTIVITY: Recipient has rights to read and modify the contents 207 | * of the shared notebook, including the right to move notes to the trash and to create 208 | * notes in the notebook. The recipient can also access information about other 209 | * recipients and the activity stream. 210 | * 211 | * READ_NOTEBOOK_PLUS_ACTIVITY: Recipient has READ_NOTEBOOK rights and can also 212 | * access information about other recipients and the activity stream. 213 | * 214 | * GROUP: If the user belongs to a group, such as a Business, that has a defined 215 | * privilege level, use the privilege level of the group as the privilege for 216 | * the individual. 217 | * 218 | * FULL_ACCESS: Recipient has full rights to the shared notebook and recipient lists, 219 | * including privilege to revoke and create invitations and to change privilege 220 | * levels on invitations for individuals. For members of a business, FULL_ACCESS 221 | * privilege on business notebooks also grants the ability to change how the notebook 222 | * will appear when shared with the business, including the rights to share and 223 | * unshare the notebook with the business. 224 | * 225 | * BUSINESS_FULL_ACCESS: Deprecated. See the note above about BUSINESS_FULL_ACCESS and 226 | * FULL_ACCESS being synonymous. 227 | */ 228 | enum SharedNotebookPrivilegeLevel { 229 | READ_NOTEBOOK = 0, 230 | MODIFY_NOTEBOOK_PLUS_ACTIVITY = 1, 231 | READ_NOTEBOOK_PLUS_ACTIVITY = 2, 232 | GROUP = 3, 233 | FULL_ACCESS = 4, 234 | BUSINESS_FULL_ACCESS = 5 235 | } 236 | 237 | /** 238 | * Privilege levels for accessing a shared note. All privilege levels convey "activity feed" access, 239 | * which allows the recipient to access information about other recipients and the activity stream. 240 | * 241 | * READ_NOTE: Recipient has rights to read the shared note. 242 | * 243 | * MODIFY_NOTE: Recipient has all of the rights of READ_NOTE, plus rights to modify the shared 244 | * note's content, title and resources. Other fields, including the notebook, tags and metadata, 245 | * may not be modified. 246 | * 247 | * FULL_ACCESS: Recipient has all of the rights of MODIFY_NOTE, plus rights to share the note with 248 | * other users via email, public note links, and note sharing. Recipient may also update and 249 | * remove other recipient's note sharing rights. 250 | */ 251 | enum SharedNotePrivilegeLevel { 252 | READ_NOTE = 0, 253 | MODIFY_NOTE = 1, 254 | FULL_ACCESS = 2 255 | } 256 | 257 | /** 258 | * Enumeration of the roles that a User can have within a sponsored group. 259 | * 260 | * GROUP_MEMBER: The user is a member of the group with no special privileges. 261 | * 262 | * GROUP_ADMIN: The user is an administrator within the group. 263 | * 264 | * GROUP_OWNER: The user is the owner of the group. 265 | */ 266 | enum SponsoredGroupRole { 267 | GROUP_MEMBER = 1, 268 | GROUP_ADMIN = 2, 269 | GROUP_OWNER = 3 270 | } 271 | 272 | /** 273 | * Enumeration of the roles that a User can have within an Evernote Business account. 274 | * 275 | * ADMIN: The user is an administrator of the Evernote Business account. 276 | * 277 | * NORMAL: The user is a regular user within the Evernote Business account. 278 | */ 279 | enum BusinessUserRole { 280 | ADMIN = 1, 281 | NORMAL = 2, 282 | } 283 | 284 | /** 285 | * The BusinessUserStatus indicates the status of the user in the business. 286 | * 287 | * A BusinessUser will typically start as ACTIVE. 288 | * Only ACTIVE users can authenticate to the Business. 289 | * 290 | *
291 | *
ACTIVE
292 | *
The business user can authenticate to and access the business.
293 | *
DEACTIVATED
294 | *
The business user has been deactivated and cannot access the business
295 | *
296 | */ 297 | enum BusinessUserStatus { 298 | ACTIVE = 1, 299 | DEACTIVATED = 2, 300 | } 301 | 302 | /** 303 | * An enumeration describing restrictions on the domain of shared notebook 304 | * instances that are valid for a given operation, as used, for example, in 305 | * NotebookRestrictions. 306 | * 307 | * ASSIGNED: The domain consists of shared notebooks that belong, or are assigned, 308 | * to the recipient. 309 | * 310 | * NO_SHARED_NOTEBOOKS: No shared notebooks are applicable to the operation. 311 | */ 312 | enum SharedNotebookInstanceRestrictions { 313 | /* 314 | * originally had the name ONLY_JOINED_OR_PREVIEW and was renamed after the 315 | * allowPreview feature was removed. 316 | */ 317 | ASSIGNED = 1, 318 | 319 | /* 320 | * most restrictive 321 | */ 322 | NO_SHARED_NOTEBOOKS = 2 323 | } 324 | 325 | /** 326 | * An enumeration describing the configuration state related to receiving 327 | * reminder e-mails from the service. Reminder e-mails summarize notes 328 | * based on their Note.attributes.reminderTime values. 329 | * 330 | * DO_NOT_SEND: The user has selected to not receive reminder e-mail. 331 | * 332 | * SEND_DAILY_EMAIL: The user has selected to receive reminder e-mail for those 333 | * days when there is a reminder. 334 | */ 335 | enum ReminderEmailConfig { 336 | DO_NOT_SEND = 1, 337 | SEND_DAILY_EMAIL = 2 338 | } 339 | 340 | /** 341 | * An enumeration defining the possible states of a BusinessInvitation. 342 | * 343 | * APPROVED: The invitation was created or approved by a business admin and may be redeemed by the 344 | * invited email. 345 | * 346 | * REQUESTED: The invitation was requested by a non-admin member of the business and must be 347 | * approved by an admin before it may be redeemed. Invitations in this state do not count 348 | * against a business' seat limit. 349 | * 350 | * REDEEMED: The invitation has already been redeemed. Invitations in this state do not count 351 | * against a business' seat limit. 352 | */ 353 | enum BusinessInvitationStatus { 354 | APPROVED = 0, 355 | REQUESTED = 1, 356 | REDEEMED = 2 357 | } 358 | 359 | /** 360 | * What kinds of Contacts does the Evernote service know about? 361 | */ 362 | enum ContactType { 363 | EVERNOTE = 1, 364 | SMS = 2, 365 | FACEBOOK = 3, 366 | EMAIL = 4, 367 | TWITTER = 5, 368 | LINKEDIN = 6, 369 | } 370 | 371 | /** 372 | * Entity types 373 | */ 374 | enum EntityType { 375 | NOTE = 1, 376 | NOTEBOOK = 2, 377 | WORKSPACE = 3 378 | } 379 | 380 | 381 | // ============================== Constants =================================== 382 | 383 | /** 384 | * A value for the "recipe" key in the "classifications" map in NoteAttributes 385 | * that indicates the user has classified a note as being a non-recipe. 386 | */ 387 | const string CLASSIFICATION_RECIPE_USER_NON_RECIPE = "000"; 388 | 389 | /** 390 | * A value for the "recipe" key in the "classifications" map in NoteAttributes 391 | * that indicates the user has classified a note as being a recipe. 392 | */ 393 | const string CLASSIFICATION_RECIPE_USER_RECIPE = "001"; 394 | 395 | /** 396 | * A value for the "recipe" key in the "classifications" map in NoteAttributes 397 | * that indicates the Evernote service has classified a note as being a recipe. 398 | */ 399 | const string CLASSIFICATION_RECIPE_SERVICE_RECIPE = "002"; 400 | 401 | /** 402 | * Standardized value for the 'source' NoteAttribute for notes that 403 | * were clipped from the web in some manner. 404 | */ 405 | const string EDAM_NOTE_SOURCE_WEB_CLIP = "web.clip"; 406 | 407 | /** 408 | * Standardized value for the 'source' NoteAttribute for notes that 409 | * were clipped using the "simplified article" function of the clipper. 410 | */ 411 | const string EDAM_NOTE_SOURCE_WEB_CLIP_SIMPLIFIED = "Clearly"; 412 | 413 | /** 414 | * Standardized value for the 'source' NoteAttribute for notes that 415 | * were clipped from an email message. 416 | */ 417 | const string EDAM_NOTE_SOURCE_MAIL_CLIP = "mail.clip"; 418 | 419 | /** 420 | * Standardized value for the 'source' NoteAttribute for notes that 421 | * were created via email sent to Evernote's email interface. 422 | */ 423 | const string EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = "mail.smtp"; 424 | 425 | 426 | // ============================== Structures =================================== 427 | 428 | /** 429 | * In several places, EDAM exchanges blocks of bytes of data for a component 430 | * which may be relatively large. For example: the contents of a clipped 431 | * HTML note, the bytes of an embedded image, or the recognition XML for 432 | * a large image. This structure is used in the protocol to represent 433 | * any of those large blocks of data when they are transmitted or when 434 | * they are only referenced their metadata. 435 | * 436 | *
437 | *
bodyHash
438 | *
This field carries a one-way hash of the contents of the 439 | * data body, in binary form. The hash function is MD5
440 | * Length: EDAM_HASH_LEN (exactly) 441 | *
442 | * 443 | *
size
444 | *
The length, in bytes, of the data body. 445 | *
446 | * 447 | *
body
448 | *
This field is set to contain the binary contents of the data 449 | * whenever the resource is being transferred. If only metadata is 450 | * being exchanged, this field will be empty. For example, a client could 451 | * notify the service about the change to an attribute for a resource 452 | * without transmitting the binary resource contents. 453 | *
454 | *
455 | */ 456 | struct Data { 457 | 1: optional binary bodyHash, 458 | 2: optional i32 size, 459 | 3: optional binary body 460 | } 461 | 462 | 463 | /** 464 | * A structure holding the optional attributes that can be stored 465 | * on a User. These are generally less critical than the core User fields. 466 | * 467 | *
468 | *
defaultLocationName
469 | *
the location string that should be associated 470 | * with the user in order to determine where notes are taken if not otherwise 471 | * specified.
472 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 473 | *
474 | * 475 | *
defaultLatitude
476 | *
if set, this is the latitude that should be 477 | * assigned to any notes that have no other latitude information. 478 | *
479 | * 480 | *
defaultLongitude
481 | *
if set, this is the longitude that should be 482 | * assigned to any notes that have no other longitude information. 483 | *
484 | * 485 | *
preactivation
486 | *
if set, the user account is not yet confirmed for 487 | * login. I.e. the account has been created, but we are still waiting for 488 | * the user to complete the activation step. 489 | *
490 | * 491 | *
viewedPromotions
492 | *
a list of promotions the user has seen. 493 | * This list may occasionally be modified by the system when promotions are 494 | * no longer available.
495 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 496 | *
497 | * 498 | *
incomingEmailAddress
499 | *
if set, this is the email address that the 500 | * user may send email to in order to add an email note directly into the 501 | * account via the SMTP email gateway. This is the part of the email 502 | * address before the '@' symbol ... our domain is not included. 503 | * If this is not set, the user may not add notes via the gateway.
504 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 505 | *
506 | * 507 | *
recentMailedAddresses
508 | *
if set, this will contain a list of email 509 | * addresses that have recently been used as recipients 510 | * of outbound emails by the user. This can be used to pre-populate a 511 | * list of possible destinations when a user wishes to send a note via 512 | * email.
513 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX each
514 | * Max: EDAM_USER_RECENT_MAILED_ADDRESSES_MAX entries 515 | *
516 | * 517 | *
comments
518 | *
Free-form text field that may hold general support 519 | * information, etc.
520 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 521 | *
522 | * 523 | *
dateAgreedToTermsOfService
524 | *
The date/time when the user agreed to 525 | * the terms of service. This can be used as the effective "start date" 526 | * for the account. 527 | *
528 | * 529 | *
maxReferrals
530 | *
The number of referrals that the user is permitted 531 | * to make. 532 | *
533 | * 534 | *
referralCount
535 | *
The number of referrals sent from this account. 536 | *
537 | * 538 | *
refererCode
539 | *
A code indicating where the user was sent from. AKA 540 | * promotion code 541 | *
542 | * 543 | *
sentEmailDate
544 | *
The most recent date when the user sent outbound 545 | * emails from the service. Used with sentEmailCount to limit the number 546 | * of emails that can be sent per day. 547 | *
548 | * 549 | *
sentEmailCount
550 | *
The number of emails that were sent from the user 551 | * via the service on sentEmailDate. Used to enforce a limit on the number 552 | * of emails per user per day to prevent spamming. 553 | *
554 | * 555 | *
dailyEmailLimit
556 | *
If set, this is the maximum number of emails that 557 | * may be sent in a given day from this account. If unset, the server will 558 | * use the configured default limit. 559 | *
560 | * 561 | *
emailOptOutDate
562 | *
If set, this is the date when the user asked 563 | * to be excluded from offers and promotions sent by Evernote. If not set, 564 | * then the user currently agrees to receive these messages. 565 | *
566 | * 567 | *
partnerEmailOptInDate
568 | *
If set, this is the date when the user asked 569 | * to be included in offers and promotions sent by Evernote's partners. 570 | * If not sent, then the user currently does not agree to receive these 571 | * emails. 572 | *
573 | * 574 | *
preferredLanguage
575 | *
a 2 character language codes based on: 576 | * http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt used for 577 | * localization purposes to determine what language to use for the web 578 | * interface and for other direct communication (e.g. emails). 579 | *
580 | * 581 | *
preferredCountry
582 | *
Preferred country code based on ISO 3166-1-alpha-2 indicating the 583 | * users preferred country
584 | * 585 | *
clipFullPage
586 | *
Boolean flag set to true if the user wants to clip full pages by 587 | * default when they use the web clipper without a selection.
588 | * 589 | *
twitterUserName
590 | *
The username of the account of someone who has chosen to enable 591 | * Twittering into Evernote. This value is subject to change, since users 592 | * may change their Twitter user name.
593 | * 594 | *
twitterId
595 | *
The unique identifier of the user's Twitter account if that user 596 | * has chosen to enable Twittering into Evernote.
597 | * 598 | *
groupName
599 | *
A name identifier used to identify a particular set of branding and 600 | * light customization.
601 | * 602 | *
recognitionLanguage
603 | *
a 2 character language codes based on: 604 | * http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt 605 | * If set, this is used to determine the language that should be used 606 | * when processing images and PDF files to find text. 607 | * If not set, then the 'preferredLanguage' will be used. 608 | *
609 | * 610 | *
educationalInstitution
611 | *
a flag indicating that the user is part of an educational institution which 612 | * makes them eligible for discounts on bulk purchases 613 | *
614 | * 615 | *
businessAddress
616 | *
A string recording the business address of a Sponsored Account user who has requested invoicing. 617 | *
618 | * 619 | *
hideSponsorBilling
620 | *
A flag indicating whether to hide the billing information on a sponsored 621 | * account owner's settings page 622 | *
623 | * 624 | *
useEmailAutoFiling
625 | *
A flag indicating whether the user chooses to allow Evernote to automatically 626 | * file and tag emailed notes 627 | *
628 | * 629 | *
reminderEmailConfig
630 | *
Configuration state for whether or not the user wishes to receive 631 | * reminder e-mail. This setting applies to both the reminder e-mail sent 632 | * for personal reminder notes and for the reminder e-mail sent for reminder 633 | * notes in the user's business notebooks that the user has configured for 634 | * e-mail notifications. 635 | *
636 | * 637 | *
emailAddressLastConfirmed
638 | *
If set, this contains the time at which the user last confirmed that the 639 | * configured email address for this account is correct and up-to-date. If this is 640 | * unset that indicates that the user's email address is unverified. 641 | *
642 | * 643 | *
passwordUpdated
644 | *
If set, this contains the time at which the user's password last changed. This 645 | * will be unset for users created before the addition of this field who have not 646 | * changed their passwords since the addition of this field. 647 | *
648 | * 649 | *
shouldLogClientEvent
650 | *
If set to True, the server will record LogRequest send from clients of this 651 | * user as ClientEventLog. 652 | *
653 | * 654 | *
optOutMachineLearning
655 | *
If set to True, no Machine Learning nor human review will be done to this 656 | * user's note contents. 657 | *
658 | *
659 | */ 660 | struct UserAttributes { 661 | 1: optional string defaultLocationName, 662 | 2: optional double defaultLatitude, 663 | 3: optional double defaultLongitude, 664 | 4: optional bool preactivation, 665 | 5: optional list viewedPromotions, 666 | 6: optional string incomingEmailAddress, 667 | 7: optional list recentMailedAddresses, 668 | 9: optional string comments, 669 | 11: optional Timestamp dateAgreedToTermsOfService, 670 | 12: optional i32 maxReferrals, 671 | 13: optional i32 referralCount, 672 | 14: optional string refererCode, 673 | 15: optional Timestamp sentEmailDate, 674 | 16: optional i32 sentEmailCount, 675 | 17: optional i32 dailyEmailLimit, 676 | 18: optional Timestamp emailOptOutDate, 677 | 19: optional Timestamp partnerEmailOptInDate, 678 | 20: optional string preferredLanguage, 679 | 21: optional string preferredCountry, 680 | 22: optional bool clipFullPage, 681 | 23: optional string twitterUserName, 682 | 24: optional string twitterId, 683 | 25: optional string groupName, 684 | 26: optional string recognitionLanguage, 685 | 28: optional string referralProof, 686 | 29: optional bool educationalDiscount, 687 | 30: optional string businessAddress, 688 | 31: optional bool hideSponsorBilling, 689 | 33: optional bool useEmailAutoFiling, 690 | 34: optional ReminderEmailConfig reminderEmailConfig, 691 | 35: optional Timestamp emailAddressLastConfirmed, 692 | 36: optional Timestamp passwordUpdated, 693 | 37: optional bool salesforcePushEnabled, 694 | 38: optional bool shouldLogClientEvent, 695 | 39: optional bool optOutMachineLearning 696 | } 697 | 698 | /** 699 | * A structure holding the optional attributes associated with users 700 | * in a business. 701 | * 702 | *
703 | *
title
704 | *
Free form text of this user's title in the business
705 | * 706 | *
location
707 | *
City, State (for US) or City / Province for other countries
708 | * 709 | *
department
710 | *
Free form text of the department this user belongs to.
711 | * 712 | *
mobilePhone
713 | *
User's mobile phone number. Stored as plain text without any formatting.
714 | * 715 | *
linkedInProfileUrl
716 | *
URL to user's public LinkedIn profile page. This should only contain 717 | * the portion relative to the base LinkedIn URL. For example: "/pub/john-smith/". 718 | *
719 | * 720 | *
workPhone
721 | *
User's work phone number. Stored as plain text without any formatting.
722 | * 723 | *
companyStartDate
724 | *
The date on which the user started working at their company.
725 | *
726 | */ 727 | struct BusinessUserAttributes { 728 | 1: optional string title, 729 | 2: optional string location, 730 | 3: optional string department, 731 | 4: optional string mobilePhone, 732 | 5: optional string linkedInProfileUrl, 733 | 6: optional string workPhone, 734 | 7: optional Timestamp companyStartDate 735 | } 736 | 737 | /** 738 | * This represents the bookkeeping information for the user's subscription. 739 | * 740 | *
741 | *
uploadLimitEnd
742 | *
The date and time when the current upload limit 743 | * expires. At this time, the monthly upload count reverts to 0 and a new 744 | * limit is imposed. This date and time is exclusive, so this is effectively 745 | * the start of the new month. 746 | *
747 | *
uploadLimitNextMonth
748 | *
When uploadLimitEnd is reached, the service 749 | * will change uploadLimit to uploadLimitNextMonth. If a premium account is 750 | * canceled, this mechanism will reset the quota appropriately. 751 | *
752 | *
premiumServiceStatus
753 | *
Indicates the phases of a premium account 754 | * during the billing process. 755 | *
756 | *
premiumOrderNumber
757 | *
The order number used by the commerce system to 758 | * process recurring payments 759 | *
760 | *
premiumServiceStart
761 | *
The start date when this premium promotion 762 | * began (this number will get overwritten if a premium service is canceled 763 | * and then re-activated). 764 | *
765 | *
premiumCommerceService
766 | *
The commerce system used (paypal, Google 767 | * checkout, etc) 768 | *
769 | *
premiumServiceSKU
770 | *
The code associated with the purchase eg. monthly 771 | * or annual purchase. Clients should interpret this value and localize it. 772 | *
773 | *
lastSuccessfulCharge
774 | *
Date the last time the user was charged. 775 | * Null if never charged. 776 | *
777 | *
lastFailedCharge
778 | *
Date the last time a charge was attempted and 779 | * failed. 780 | *
781 | *
lastFailedChargeReason
782 | *
Reason provided for the charge failure 783 | *
784 | *
nextPaymentDue
785 | *
The end of the billing cycle. This could be in the 786 | * past if there are failed charges. 787 | *
788 | *
premiumLockUntil
789 | *
An internal variable to manage locking operations 790 | * on the commerce variables. 791 | *
792 | *
updated
793 | *
The date any modification where made to this record. 794 | *
795 | *
premiumSubscriptionNumber
796 | *
The number number identifying the 797 | * recurring subscription used to make the recurring charges. 798 | *
799 | *
lastRequestedCharge
800 | *
Date charge last attempted
801 | *
currency
802 | *
ISO 4217 currency code
803 | *
unitPrice
804 | *
charge in the smallest unit of the currency (e.g. cents for USD)
805 | *
businessId
806 | *
DEPRECATED:See BusinessUserInfo.
807 | *
businessName
808 | *
DEPRECATED:See BusinessUserInfo.
809 | *
businessRole
810 | *
DEPRECATED:See BusinessUserInfo.
811 | *
unitDiscount
812 | *
discount per seat in negative amount and smallest unit of the currency (e.g. 813 | * cents for USD)
814 | *
nextChargeDate
815 | *
The next time the user will be charged, may or may not be the same as 816 | * nextPaymentDue
817 | *
818 | */ 819 | struct Accounting { 820 | 2: optional Timestamp uploadLimitEnd, 821 | 3: optional i64 uploadLimitNextMonth, 822 | 4: optional PremiumOrderStatus premiumServiceStatus, 823 | 5: optional string premiumOrderNumber, 824 | 6: optional string premiumCommerceService, 825 | 7: optional Timestamp premiumServiceStart, 826 | 8: optional string premiumServiceSKU, 827 | 9: optional Timestamp lastSuccessfulCharge, 828 | 10: optional Timestamp lastFailedCharge, 829 | 11: optional string lastFailedChargeReason, 830 | 12: optional Timestamp nextPaymentDue, 831 | 13: optional Timestamp premiumLockUntil, 832 | 14: optional Timestamp updated, 833 | 16: optional string premiumSubscriptionNumber, 834 | 17: optional Timestamp lastRequestedCharge, 835 | 18: optional string currency, 836 | 19: optional i32 unitPrice, 837 | 20: optional i32 businessId, 838 | 21: optional string businessName, 839 | 22: optional BusinessUserRole businessRole, 840 | 23: optional i32 unitDiscount, 841 | 24: optional Timestamp nextChargeDate, 842 | 25: optional i32 availablePoints 843 | } 844 | 845 | /** 846 | * This structure is used to provide information about an Evernote Business 847 | * membership, for members who are part of a business. 848 | * 849 | *
850 | *
businessId
851 | *
The ID of the Evernote Business account that the user is a member of. 852 | *
businessName
853 | *
The human-readable name of the Evernote Business account that the user 854 | * is a member of.
855 | *
role
856 | *
The role of the user within the Evernote Business account that 857 | * they are a member of.
858 | *
email
859 | *
An e-mail address that will be used by the service in the context of your 860 | * Evernote Business activities. For example, this e-mail address will be used 861 | * when you e-mail a business note, when you update notes in the account of 862 | * your business, etc. The business e-mail cannot be used for identification 863 | * purposes such as for logging into the service. 864 | *
865 | *
updated
866 | *
Last time the business user or business user attributes were updated.
867 | *
868 | */ 869 | struct BusinessUserInfo { 870 | 1: optional i32 businessId, 871 | 2: optional string businessName, 872 | 3: optional BusinessUserRole role, 873 | 4: optional string email, 874 | 5: optional Timestamp updated 875 | } 876 | 877 | /** 878 | * This structure is used to provide account limits that are in effect for this user. 879 | *
880 | *
userMailLimitDaily
881 | *
The number of emails of any type that can be sent by a user from the 882 | * service per day. If an email is sent to two different recipients, this 883 | * counts as two emails. 884 | *
885 | *
noteSizeMax
886 | *
Maximum total size of a Note that can be added. The size of a note is 887 | * calculated as: 888 | * ENML content length (in Unicode characters) plus the sum of all resource 889 | * sizes (in bytes). 890 | *
891 | *
resourceSizeMax
892 | *
Maximum size of a resource, in bytes 893 | *
894 | *
userLinkedNotebookMax
895 | *
Maximum number of linked notebooks per account. 896 | *
897 | *
uploadLimit
898 | *
The number of bytes that can be uploaded to the account 899 | * in the current month. For new notes that are created, this is the length 900 | * of the note content (in Unicode characters) plus the size of each resource 901 | * (in bytes). For edited notes, this is the the difference between the old 902 | * length and the new length (if this is greater than 0) plus the size of 903 | * each new resource. 904 | *
905 | *
userNoteCountMax
906 | *
Maximum number of Notes per user
907 | *
userNotebookCountMax
908 | *
Maximum number of Notebooks per user
909 | *
userTagCountMax
910 | *
Maximum number of Tags per account
911 | *
noteTagCountMax
912 | *
Maximum number of Tags per Note
913 | *
userSavedSearchesMax
914 | *
Maximum number of SavedSearches per account
915 | *
noteResourceCountMax
916 | *
The maximum number of Resources per Note
917 | *
918 | */ 919 | struct AccountLimits { 920 | 1: optional i32 userMailLimitDaily, 921 | 2: optional i64 noteSizeMax, 922 | 3: optional i64 resourceSizeMax, 923 | 4: optional i32 userLinkedNotebookMax, 924 | 5: optional i64 uploadLimit, 925 | 6: optional i32 userNoteCountMax, 926 | 7: optional i32 userNotebookCountMax, 927 | 8: optional i32 userTagCountMax, 928 | 9: optional i32 noteTagCountMax, 929 | 10: optional i32 userSavedSearchesMax, 930 | 11: optional i32 noteResourceCountMax 931 | } 932 | 933 | /** 934 | * This represents the information about a single user account. 935 | *
936 | *
id
937 | *
The unique numeric identifier for the account, which will not 938 | * change for the lifetime of the account. 939 | *
940 | * 941 | *
username
942 | *
The name that uniquely identifies a single user account. This name 943 | * may be presented by the user, along with their password, to log into 944 | * their account. 945 | * May only contain a-z, 0-9, or '-', and may not start or end with the '-' 946 | *
947 | * Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX 948 | *
949 | * Regex: EDAM_USER_USERNAME_REGEX 950 | *
951 | * 952 | *
email
953 | *
The email address registered for the user. Must comply with 954 | * RFC 2821 and RFC 2822.
955 | * Third party applications that authenticate using OAuth do not have 956 | * access to this field. 957 | * Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX 958 | *
959 | * Regex: EDAM_EMAIL_REGEX 960 | *
961 | * 962 | *
name
963 | *
The printable name of the user, which may be a combination 964 | * of given and family names. This is used instead of separate "first" 965 | * and "last" names due to variations in international name format/order. 966 | * May not start or end with a whitespace character. May contain any 967 | * character but carriage return or newline (Unicode classes Zl and Zp). 968 | *
969 | * Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX 970 | *
971 | * Regex: EDAM_USER_NAME_REGEX 972 | *
973 | * 974 | *
timezone
975 | *
The zone ID for the user's default location. If present, 976 | * this may be used to localize the display of any timestamp for which no 977 | * other timezone is available. 978 | * The format must be encoded as a standard zone ID such as 979 | * "America/Los_Angeles" or "GMT+08:00" 980 | *
981 | * Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX 982 | *
983 | * Regex: EDAM_TIMEZONE_REGEX 984 | *
985 | * 986 | *
serviceLevel
987 | *
The level of service the user currently receives. This will always be populated 988 | * for users retrieved from the Evernote service. 989 | *
990 | * 991 | *
created
992 | *
The date and time when this user account was created in the 993 | * service. 994 | *
995 | * 996 | *
updated
997 | *
The date and time when this user account was last modified 998 | * in the service. 999 | *
1000 | * 1001 | *
deleted
1002 | *
If the account has been deleted from the system (e.g. as 1003 | * the result of a legal request by the user), the date and time of the 1004 | * deletion will be represented here. If not, this value will not be set. 1005 | *
1006 | * 1007 | *
active
1008 | *
If the user account is available for login and 1009 | * synchronization, this flag will be set to true. 1010 | *
1011 | * 1012 | *
shardId
1013 | *
DEPRECATED - Client applications should have no need to use this field. 1014 | *
1015 | * 1016 | *
attributes
1017 | *
If present, this will contain a list of the attributes 1018 | * for this user account. 1019 | *
1020 | * 1021 | *
accounting
1022 | *
Bookkeeping information for the user's subscription. 1023 | *
1024 | * 1025 | *
businessUserInfo
1026 | *
If present, this will contain a set of business information 1027 | * relating to the user's business membership. If not present, the 1028 | * user is not currently part of a business. 1029 | *
1030 | * 1031 | *
photoUrl
1032 | *
The URL of the photo that represents this User. This field is filled in by the 1033 | * service and is read-only to clients. If photoLastUpdated is 1034 | * not set, this url will point to a placeholder user photo generated by the 1035 | * service.
1036 | * 1037 | *
photoLastUpdated
1038 | *
The time at which the photo at 'photoUrl' was last updated by this User. This 1039 | * field will be null if the User never set a profile photo. This field is filled in by 1040 | * the service and is read-only to clients.
1041 | * 1042 | *
accountLimits
1043 | *
Account limits applicable for this user.
1044 | */ 1045 | struct User { 1046 | 1: optional UserID id, 1047 | 2: optional string username, 1048 | 3: optional string email, 1049 | 4: optional string name, 1050 | 6: optional string timezone, 1051 | 7: optional PrivilegeLevel privilege, 1052 | 21: optional ServiceLevel serviceLevel, 1053 | 9: optional Timestamp created, 1054 | 10: optional Timestamp updated, 1055 | 11: optional Timestamp deleted, 1056 | 13: optional bool active, 1057 | 14: optional string shardId, 1058 | 15: optional UserAttributes attributes, 1059 | 16: optional Accounting accounting, 1060 | 18: optional BusinessUserInfo businessUserInfo, 1061 | 19: optional string photoUrl, 1062 | 20: optional Timestamp photoLastUpdated, 1063 | 22: optional AccountLimits accountLimits 1064 | } 1065 | 1066 | 1067 | /** 1068 | * A structure that represents contact information. Note this does not necessarily correspond to 1069 | * an Evernote user. 1070 | * 1071 | *
1072 | *
name
1073 | *
The displayable name of this contact. This field is filled in by the service and 1074 | * is read-only to clients. 1075 | *
1076 | *
id
1077 | *
A unique identifier for this ContactType. 1078 | *
1079 | *
type
1080 | *
What service does this contact come from? 1081 | *
1082 | *
photoUrl
1083 | *
A URL of a profile photo representing this Contact. This field is filled in by the 1084 | * service and is read-only to clients. 1085 | *
1086 | *
photoLastUpdated
1087 | *
timestamp when the profile photo at 'photoUrl' was last updated. 1088 | * This field will be null if the user has never set a profile photo. 1089 | * This field is filled in by the service and is read-only to clients. 1090 | *
1091 | *
messagingPermit
1092 | *
This field will only be filled by the service when it is giving a Contact record 1093 | * to a client, and that client does not normally have enough permission to send a 1094 | * new message to the person represented through this Contact. In that case, this 1095 | * whole Contact record could be used to send a new Message to the Contact, and the 1096 | * service will inspect this permit to confirm that operation was allowed. 1097 | *
1098 | *
messagingPermitExpires
1099 | *
If this field is set, then this (whole) Contact record may be used in calls to 1100 | * sendMessage until this time. After that time, those calls may be rejected by the 1101 | * service if the caller does not have direct permission to initiate a message with 1102 | * the represented Evernote user. 1103 | *
1104 | *
1105 | */ 1106 | struct Contact { 1107 | 1: optional string name, 1108 | 2: optional string id, 1109 | 3: optional ContactType type, 1110 | 4: optional string photoUrl, 1111 | 5: optional Timestamp photoLastUpdated, 1112 | 6: optional binary messagingPermit, 1113 | 7: optional Timestamp messagingPermitExpires 1114 | } 1115 | 1116 | /** 1117 | * An object that represents the relationship between a Contact that possibly 1118 | * belongs to an Evernote User. 1119 | * 1120 | *
1121 | *
id
1122 | *
The unique identifier for this mapping. 1123 | *
1124 | * 1125 | *
contact
1126 | *
The Contact that can be used to address this Identity. May be unset. 1127 | *
1128 | * 1129 | *
userId
1130 | *
The Evernote User id that is connected to the Contact. May be unset 1131 | * if this identity has not yet been claimed, or the caller is not 1132 | * connected to this identity. 1133 | *
1134 | * 1135 | *
deactivated
1136 | *
Indicates that the contact for this identity is no longer active and 1137 | * should not be used when creating new threads using Destination.recipients, 1138 | * unless you know of another Identity instance with the same contact information 1139 | * that is active. If you are connected to the user (see userConnected), you 1140 | * can still create threads using their Evernote-type contact.
1141 | * 1142 | *
sameBusiness
1143 | *
Does this Identity belong to someone who is in the same business as the 1144 | * caller? 1145 | *
1146 | * 1147 | *
blocked
1148 | *
Has the caller blocked the Evernote user this Identity represents? 1149 | *
1150 | * 1151 | *
userConnected
1152 | *
Indicates that the caller is "connected" to the user of this 1153 | * identity via this identity. When you have a connection via an 1154 | * identity, you should always create new threads using the 1155 | * Evernote-type contact (see ContactType) using the userId field 1156 | * from a connected Identity. On the Evernote service, the 1157 | * Evernote-type contact is the most durable. Phone numbers and 1158 | * e-mail addresses can get re-assigned but your Evernote account 1159 | * user ID will remain the same. A connection exists when both of 1160 | * you are in the same business or the user has replied to a thread 1161 | * that you are on. When connected, you will also get to see more 1162 | * information about the user who has claimed the identity. Note 1163 | * that you are never connected to yourself since you won't be 1164 | * sending messages to yourself, but you will obviously see your own 1165 | * profile information. 1166 | *
1167 | * 1168 | *
eventId
1169 | *
A server-assigned sequence number for the events in the messages 1170 | * subsystem. 1171 | *
1172 | *
1173 | */ 1174 | struct Identity { 1175 | 1: required IdentityID id, 1176 | 2: optional Contact contact, 1177 | 3: optional UserID userId, 1178 | 4: optional bool deactivated, 1179 | 5: optional bool sameBusiness, 1180 | 6: optional bool blocked, 1181 | 7: optional bool userConnected, 1182 | 8: optional MessageEventID eventId 1183 | } 1184 | 1185 | /** 1186 | * A tag within a user's account is a unique name which may be organized 1187 | * a simple hierarchy. 1188 | *
1189 | *
guid
1190 | *
The unique identifier of this tag. Will be set by the service, 1191 | * so may be omitted by the client when creating the Tag. 1192 | *
1193 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1194 | *
1195 | * Regex: EDAM_GUID_REGEX 1196 | *
1197 | * 1198 | *
name
1199 | *
A sequence of characters representing the tag's identifier. 1200 | * Case is preserved, but is ignored for comparisons. 1201 | * This means that an account may only have one tag with a given name, via 1202 | * case-insensitive comparison, so an account may not have both "food" and 1203 | * "Food" tags. 1204 | * May not contain a comma (','), and may not begin or end with a space. 1205 | *
1206 | * Length: EDAM_TAG_NAME_LEN_MIN - EDAM_TAG_NAME_LEN_MAX 1207 | *
1208 | * Regex: EDAM_TAG_NAME_REGEX 1209 | *
1210 | * 1211 | *
parentGuid
1212 | *
If this is set, then this is the GUID of the tag that 1213 | * holds this tag within the tag organizational hierarchy. If this is 1214 | * not set, then the tag has no parent and it is a "top level" tag. 1215 | * Cycles are not allowed (e.g. a->parent->parent == a) and will be 1216 | * rejected by the service. 1217 | *
1218 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1219 | *
1220 | * Regex: EDAM_GUID_REGEX 1221 | *
1222 | * 1223 | *
updateSequenceNum
1224 | *
A number identifying the last transaction to 1225 | * modify the state of this object. The USN values are sequential within an 1226 | * account, and can be used to compare the order of modifications within the 1227 | * service. 1228 | *
1229 | *
1230 | */ 1231 | struct Tag { 1232 | 1: optional Guid guid, 1233 | 2: optional string name, 1234 | 3: optional Guid parentGuid, 1235 | 4: optional i32 updateSequenceNum 1236 | } 1237 | 1238 | 1239 | /** 1240 | * A structure that wraps a map of name/value pairs whose values are not 1241 | * always present in the structure in order to reduce space when obtaining 1242 | * batches of entities that contain the map. 1243 | * 1244 | * When the server provides the client with a LazyMap, it will fill in either 1245 | * the keysOnly field or the fullMap field, but never both, based on the API 1246 | * and parameters. 1247 | * 1248 | * When a client provides a LazyMap to the server as part of an update to 1249 | * an object, the server will only update the LazyMap if the fullMap field is 1250 | * set. If the fullMap field is not set, the server will not make any changes 1251 | * to the map. 1252 | * 1253 | * Check the API documentation of the individual calls involving the LazyMap 1254 | * for full details including the constraints of the names and values of the 1255 | * map. 1256 | * 1257 | *
1258 | *
keysOnly
1259 | *
The set of keys for the map. This field is ignored by the 1260 | * server when set. 1261 | *
1262 | * 1263 | *
fullMap
1264 | *
The complete map, including all keys and values. 1265 | *
1266 | *
1267 | */ 1268 | struct LazyMap { 1269 | 1: optional set keysOnly, 1270 | 2: optional map fullMap 1271 | } 1272 | 1273 | 1274 | /** 1275 | * Structure holding the optional attributes of a Resource 1276 | *
1277 | *
sourceURL
1278 | *
the original location where the resource was hosted 1279 | *
1280 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1281 | *
1282 | * 1283 | *
timestamp
1284 | *
the date and time that is associated with this resource 1285 | * (e.g. the time embedded in an image from a digital camera with a clock) 1286 | *
1287 | * 1288 | *
latitude
1289 | *
the latitude where the resource was captured 1290 | *
1291 | * 1292 | *
longitude
1293 | *
the longitude where the resource was captured 1294 | *
1295 | * 1296 | *
altitude
1297 | *
the altitude where the resource was captured 1298 | *
1299 | * 1300 | *
cameraMake
1301 | *
information about an image's camera, e.g. as embedded in 1302 | * the image's EXIF data 1303 | *
1304 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1305 | *
1306 | * 1307 | *
cameraModel
1308 | *
information about an image's camera, e.g. as embedded 1309 | * in the image's EXIF data 1310 | *
1311 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1312 | *
1313 | * 1314 | *
clientWillIndex
1315 | *
if true, then the original client that submitted 1316 | * the resource plans to submit the recognition index for this resource at a 1317 | * later time. 1318 | *
1319 | * 1320 | *
recoType
1321 | *
DEPRECATED - this field is no longer set by the service, so should 1322 | * be ignored. 1323 | *
1324 | * 1325 | *
fileName
1326 | *
if the resource came from a source that provided an 1327 | * explicit file name, the original name will be stored here. Many resources 1328 | * come from unnamed sources, so this will not always be set. 1329 | *
1330 | * 1331 | *
attachment
1332 | *
this will be true if the resource should be displayed as an attachment, 1333 | * or false if the resource should be displayed inline (if possible). 1334 | *
1335 | * 1336 | *
applicationData
1337 | *
Provides a location for applications to store a relatively small 1338 | * (4kb) blob of data associated with a Resource that is not visible to the user 1339 | * and that is opaque to the Evernote service. A single application may use at most 1340 | * one entry in this map, using its API consumer key as the map key. See the 1341 | * documentation for LazyMap for a description of when the actual map values 1342 | * are returned by the service. 1343 | *

To safely add or modify your application's entry in the map, use 1344 | * NoteStore.setResourceApplicationDataEntry. To safely remove your application's 1345 | * entry from the map, use NoteStore.unsetResourceApplicationDataEntry.

1346 | * Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN 1347 | *
1348 | * Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX 1349 | *
1350 | * Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX 1351 | *
1352 | * 1353 | *
1354 | */ 1355 | struct ResourceAttributes { 1356 | 1: optional string sourceURL, 1357 | 2: optional Timestamp timestamp, 1358 | 3: optional double latitude, 1359 | 4: optional double longitude, 1360 | 5: optional double altitude, 1361 | 6: optional string cameraMake, 1362 | 7: optional string cameraModel, 1363 | 8: optional bool clientWillIndex, 1364 | 9: optional string recoType, 1365 | 10: optional string fileName, 1366 | 11: optional bool attachment, 1367 | 12: optional LazyMap applicationData 1368 | } 1369 | 1370 | 1371 | /** 1372 | * Every media file that is embedded or attached to a note is represented 1373 | * through a Resource entry. 1374 | *
1375 | *
guid
1376 | *
The unique identifier of this resource. Will be set whenever 1377 | * a resource is retrieved from the service, but may be null when a client 1378 | * is creating a resource. 1379 | *
1380 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1381 | *
1382 | * Regex: EDAM_GUID_REGEX 1383 | *
1384 | * 1385 | *
noteGuid
1386 | *
The unique identifier of the Note that holds this 1387 | * Resource. Will be set whenever the resource is retrieved from the service, 1388 | * but may be null when a client is creating a resource. 1389 | *
1390 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1391 | *
1392 | * Regex: EDAM_GUID_REGEX 1393 | *
1394 | * 1395 | *
data
1396 | *
The contents of the resource. 1397 | * Maximum length: The data.body is limited to EDAM_RESOURCE_SIZE_MAX_FREE 1398 | * for free accounts and EDAM_RESOURCE_SIZE_MAX_PREMIUM for premium accounts. 1399 | *
1400 | * 1401 | *
mime
1402 | *
The MIME type for the embedded resource. E.g. "image/gif" 1403 | *
1404 | * Length: EDAM_MIME_LEN_MIN - EDAM_MIME_LEN_MAX 1405 | *
1406 | * Regex: EDAM_MIME_REGEX 1407 | *
1408 | * 1409 | *
width
1410 | *
If set, this contains the display width of this resource, in 1411 | * pixels. 1412 | *
1413 | * 1414 | *
height
1415 | *
If set, this contains the display height of this resource, 1416 | * in pixels. 1417 | *
1418 | * 1419 | *
duration
1420 | *
DEPRECATED: ignored. 1421 | *
1422 | * 1423 | *
active
1424 | *
If the resource is active or not. 1425 | *
1426 | * 1427 | *
recognition
1428 | *
If set, this will hold the encoded data that provides 1429 | * information on search and recognition within this resource. 1430 | *
1431 | * 1432 | *
attributes
1433 | *
A list of the attributes for this resource. 1434 | *
1435 | * 1436 | *
updateSequenceNum
1437 | *
A number identifying the last transaction to 1438 | * modify the state of this object. The USN values are sequential within an 1439 | * account, and can be used to compare the order of modifications within the 1440 | * service. 1441 | *
1442 | * 1443 | *
alternateData
1444 | *
Some Resources may be assigned an alternate data format by the service 1445 | * which may be more appropriate for indexing or rendering than the original 1446 | * data provided by the user. In these cases, the alternate data form will 1447 | * be available via this Data element. If a Resource has no alternate form, 1448 | * this field will be unset.
1449 | *
1450 | */ 1451 | struct Resource { 1452 | 1: optional Guid guid, 1453 | 2: optional Guid noteGuid, 1454 | 3: optional Data data, 1455 | 4: optional string mime, 1456 | 5: optional i16 width, 1457 | 6: optional i16 height, 1458 | 7: optional i16 duration, 1459 | 8: optional bool active, 1460 | 9: optional Data recognition, 1461 | 11: optional ResourceAttributes attributes, 1462 | 12: optional i32 updateSequenceNum, 1463 | 13: optional Data alternateData 1464 | } 1465 | 1466 | 1467 | /** 1468 | * The list of optional attributes that can be stored on a note. 1469 | *
1470 | *
subjectDate
1471 | *
time that the note refers to 1472 | *
1473 | * 1474 | *
latitude
1475 | *
the latitude where the note was taken 1476 | *
1477 | * 1478 | *
longitude
1479 | *
the longitude where the note was taken 1480 | *
1481 | * 1482 | *
altitude
1483 | *
the altitude where the note was taken 1484 | *
1485 | * 1486 | *
author
1487 | *
the author of the content of the note 1488 | *
1489 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1490 | *
1491 | * 1492 | *
source
1493 | *
the method that the note was added to the account, if the 1494 | * note wasn't directly authored in an Evernote desktop client. 1495 | *
1496 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1497 | *
1498 | * 1499 | *
sourceURL
1500 | *
the original location where the resource was hosted. For web clips, 1501 | * this will be the URL of the page that was clipped. 1502 | *
1503 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1504 | *
1505 | * 1506 | *
sourceApplication
1507 | *
an identifying string for the application that 1508 | * created this note. This string does not have a guaranteed syntax or 1509 | * structure -- it is intended for human inspection and tracking. 1510 | *
1511 | * Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX 1512 | *
1513 | * 1514 | *
shareDate
1515 | *
The date and time when this note was directly shared via its own URL. 1516 | * This is only set on notes that were individually shared - it is independent 1517 | * of any notebook-level sharing of the containing notebook. This field 1518 | * is treated as "read-only" for clients; the server will ignore changes 1519 | * to this field from an external client. 1520 | *
1521 | * 1522 | *
reminderOrder
1523 | *
The set of notes with this parameter set are considered 1524 | * "reminders" and are to be treated specially by clients to give them 1525 | * higher UI prominence within a notebook. The value is used to sort 1526 | * the reminder notes within the notebook with higher values 1527 | * representing greater prominence. Outside of the context of a 1528 | * notebook, the value of this parameter is undefined. The value is 1529 | * not intended to be compared to the values of reminder notes in 1530 | * other notebooks. In order to allow clients to place a note at a 1531 | * higher precedence than other notes, you should never set a value 1532 | * greater than the current time (as defined for a Timetstamp). To 1533 | * place a note at higher precedence than existing notes, set the 1534 | * value to the current time as defined for a timestamp (milliseconds 1535 | * since the epoch). Synchronizing clients must remember the time when 1536 | * the update was performed, using the local clock on the client, 1537 | * and use that value when they later upload the note to the service. 1538 | * Clients must not set the reminderOrder to the reminderTime as the 1539 | * reminderTime could be in the future. Those two fields are never 1540 | * intended to be related. The correct value for reminderOrder field 1541 | * for new notes is the "current" time when the user indicated that 1542 | * the note is a reminder. Clients may implement a separate 1543 | * "sort by date" feature to show notes ordered by reminderTime. 1544 | * Whenever a reminderDoneTime or reminderTime is set but a 1545 | * reminderOrder is not set, the server will fill in the current 1546 | * server time for the reminderOrder field.
1547 | * 1548 | *
reminderDoneTime
1549 | *
The date and time when a user dismissed/"marked done" the reminder 1550 | * on the note. Users typically do not manually set this value directly 1551 | * as it is set to the time when the user dismissed/"marked done" the 1552 | * reminder.
1553 | * 1554 | *
reminderTime
1555 | *
The date and time a user has selected to be reminded of the note. 1556 | * A note with this value set is known as a "reminder" and the user can 1557 | * be reminded, via e-mail or client-specific notifications, of the note 1558 | * when the time is reached or about to be reached. When a user sets 1559 | * a reminder time on a note that has a reminder done time, and that 1560 | * reminder time is in the future, then the reminder done time should be 1561 | * cleared. This should happen regardless of any existing reminder time 1562 | * that may have previously existed on the note.
1563 | * 1564 | *
placeName
1565 | *
Allows the user to assign a human-readable location name associated 1566 | * with a note. Users may assign values like 'Home' and 'Work'. Place 1567 | * names may also be populated with values from geonames database 1568 | * (e.g., a restaurant name). Applications are encouraged to normalize values 1569 | * so that grouping values by place name provides a useful result. Applications 1570 | * MUST NOT automatically add place name values based on geolocation without 1571 | * confirmation from the user; that is, the value in this field should be 1572 | * more useful than a simple automated lookup based on the note's latitude 1573 | * and longitude.
1574 | * 1575 | *
contentClass
1576 | *
The class (or type) of note. This field is used to indicate to 1577 | * clients that special structured information is represented within 1578 | * the note such that special rules apply when making 1579 | * modifications. If contentClass is set and the client 1580 | * application does not specifically support the specified class, 1581 | * the client MUST treat the note as read-only. In this case, the 1582 | * client MAY modify the note's notebook and tags via the 1583 | * Note.notebookGuid and Note.tagGuids fields. The client MAY also 1584 | * modify the reminderOrder field as well as the reminderTime and 1585 | * reminderDoneTime fields. 1586 | *

Applications should set contentClass only when they are creating notes 1587 | * that contain structured information that needs to be maintained in order 1588 | * for the user to be able to use the note within that application. 1589 | * Setting contentClass makes a note read-only in other applications, so 1590 | * there is a trade-off when an application chooses to use contentClass. 1591 | * Applications that set contentClass when creating notes must use a contentClass 1592 | * string of the form CompanyName.ApplicationName to ensure uniqueness.

1593 | * Length restrictions: EDAM_NOTE_CONTENT_CLASS_LEN_MIN, EDAM_NOTE_CONTENT_CLASS_LEN_MAX 1594 | *
1595 | * Regex: EDAM_NOTE_CONTENT_CLASS_REGEX 1596 | *
1597 | * 1598 | *
applicationData
1599 | *
Provides a location for applications to store a relatively small 1600 | * (4kb) blob of data that is not meant to be visible to the user and 1601 | * that is opaque to the Evernote service. A single application may use at most 1602 | * one entry in this map, using its API consumer key as the map key. See the 1603 | * documentation for LazyMap for a description of when the actual map values 1604 | * are returned by the service. 1605 | *

To safely add or modify your application's entry in the map, use 1606 | * NoteStore.setNoteApplicationDataEntry. To safely remove your application's 1607 | * entry from the map, use NoteStore.unsetNoteApplicationDataEntry.

1608 | * Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN 1609 | *
1610 | * Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX 1611 | *
1612 | * Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX 1613 | *
1614 | * 1615 | *
creatorId
1616 | *
The numeric user ID of the user who originally created the note.
1617 | * 1618 | *
lastEditedBy
1619 | *
An indication of who made the last change to the note. If you are 1620 | * accessing the note via a shared notebook to which you have modification 1621 | * rights, or if you are the owner of the notebook to which the note belongs, 1622 | * then you have access to the value. In this case, the value will be 1623 | * unset if the owner of the notebook containing the note was the last to 1624 | * make the modification, else it will be a string describing the 1625 | * guest who made the last edit. If you do not have access to this value, 1626 | * it will be left unset. This field is read-only by clients. The server 1627 | * will ignore all values set by clients into this field.
1628 | * 1629 | *
lastEditorId
1630 | *
The numeric user ID of the user described in lastEditedBy.
1631 | * 1632 | *
classifications
1633 | *
A map of classifications applied to the note by clients or by the 1634 | * Evernote service. The key is the string name of the classification type, 1635 | * and the value is a constant that begins with CLASSIFICATION_.
1636 | * 1637 | *
sharedWithBusiness
1638 | *
When this flag is set on a business note, any user in that business 1639 | * may view the note if they request it by GUID. This field is read-only by 1640 | * clients. The server will ignore all values set by clients into this field. 1641 | * 1642 | * To share a note with the business, use NoteStore.shareNoteWithBusiness and 1643 | * to stop sharing a note with the business, use NoteStore.stopSharingNoteWithBusiness. 1644 | *
1645 | * 1646 | *
conflictSourceNoteGuid
1647 | *
If set, this specifies the GUID of a note that caused a sync conflict 1648 | * resulting in the creation of a duplicate note. The duplicated note contains 1649 | * the user's changes that could not be applied as a result of the sync conflict, 1650 | * and uses the conflictSourceNoteGuid field to specify the note that caused the 1651 | * conflict. This allows clients to provide a customized user experience for note 1652 | * conflicts. 1653 | *
1654 | * 1655 | *
noteTitleQuality
1656 | *
If set, this specifies that the note's title was automatically generated 1657 | * and indicates the likelihood that the generated title is useful for display to 1658 | * the user. If not set, the note's title was manually entered by the user. 1659 | * 1660 | * Clients MUST set this attribute to one of the following values when the 1661 | * corresponding note's title was not manually entered by the user: 1662 | * EDAM_NOTE_TITLE_QUALITY_UNTITLED, EDAM_NOTE_TITLE_QUALITY_LOW, 1663 | * EDAM_NOTE_TITLE_QUALITY_MEDIUM or EDAM_NOTE_TITLE_QUALITY_HIGH. 1664 | * 1665 | * When a user edits a note's title, clients MUST unset this value. 1666 | *
1667 | *
1668 | */ 1669 | struct NoteAttributes { 1670 | 1: optional Timestamp subjectDate, 1671 | 10: optional double latitude, 1672 | 11: optional double longitude, 1673 | 12: optional double altitude, 1674 | 13: optional string author, 1675 | 14: optional string source, 1676 | 15: optional string sourceURL, 1677 | 16: optional string sourceApplication, 1678 | 17: optional Timestamp shareDate, 1679 | 18: optional i64 reminderOrder, 1680 | 19: optional Timestamp reminderDoneTime, 1681 | 20: optional Timestamp reminderTime, 1682 | 21: optional string placeName, 1683 | 22: optional string contentClass, 1684 | 23: optional LazyMap applicationData, 1685 | 24: optional string lastEditedBy, 1686 | 26: optional map classifications, 1687 | 27: optional UserID creatorId, 1688 | 28: optional UserID lastEditorId, 1689 | 29: optional bool sharedWithBusiness, 1690 | 30: optional Guid conflictSourceNoteGuid, 1691 | 31: optional i32 noteTitleQuality 1692 | } 1693 | 1694 | 1695 | /** 1696 | * Represents a relationship between a note and a single share invitation recipient. The recipient 1697 | * is identified via an Identity, and has a given privilege that specifies what actions they may 1698 | * take on the note. 1699 | * 1700 | *
1701 | *
sharerUserID
1702 | *
The user ID of the user who shared the note with the recipient.
1703 | * 1704 | *
recipientIdentity
1705 | *
The identity of the recipient of the share. For a given note, there may be only one 1706 | * SharedNote per recipient identity. Only recipientIdentity.id is guaranteed to be set. 1707 | * Other fields on the Identity may or my not be set based on the requesting user's 1708 | * relationship with the recipient.
1709 | * 1710 | *
privilege
1711 | *
The privilege level that the share grants to the recipient.
1712 | * 1713 | *
serviceCreated
1714 | *
The time at which the share was created.
1715 | * 1716 | *
serviceUpdated
1717 | *
The time at which the share was last updated.
1718 | * 1719 | *
serviceAssigned
1720 | *
The time at which the share was assigned to a specific recipient user ID.
1721 | *
1722 | */ 1723 | struct SharedNote { 1724 | 1: optional UserID sharerUserID, 1725 | 2: optional Identity recipientIdentity, 1726 | 3: optional SharedNotePrivilegeLevel privilege, 1727 | 4: optional Timestamp serviceCreated, 1728 | 5: optional Timestamp serviceUpdated, 1729 | 6: optional Timestamp serviceAssigned 1730 | } 1731 | 1732 | /** 1733 | * This structure captures information about the operations that cannot be performed on a given 1734 | * note that has been shared with a recipient via a SharedNote. The following operations are 1735 | * never allowed based on SharedNotes, and as such are left out of the NoteRestrictions 1736 | * structure for brevity: 1737 | * 1738 | *
    1739 | *
  • Expunging a note (NoteStore.expungeNote)
  • 1740 | *
  • Moving a note to the trash (Note.active)
  • 1741 | *
  • Updating a note's notebook (Note.notebookGuid)
  • 1742 | *
  • Updating a note's tags (Note.tagGuids, Note.tagNames)
  • 1743 | *
  • Updating a note's attributes (Note.attributes)
  • 1744 | *
  • Sharing a note with the business (NoteStore.shareNoteWithBusiness
  • 1745 | *
  • Getting a note's version history (NoteStore.listNoteVersions, 1746 | * NoteStore.getNoteVersion)
  • 1747 | *
1748 | * 1749 | * When a client has permission to update a note's title or content, it may also update the 1750 | * Note.updated timestamp. 1751 | * 1752 | * This structure reflects only the privileges / restrictions conveyed by the SharedNote. 1753 | * It does not incorporate privileges conveyed by a potential SharedNotebook to the same 1754 | * recipient. As such, the actual permissions that the recipient has on the note may differ from 1755 | * the permissions expressed in this structure. 1756 | * 1757 | * For example, consider a user with read-only access to a shared notebook, and a read-write share 1758 | * of a specific note in the notebook. The note restrictions would contain noUpdateTitle = false, 1759 | * while the notebook restrictions would contain noUpdateNotes = true. In this case, the user is 1760 | * allowed to update the note title based on the note restrictions. 1761 | * 1762 | * Alternatively, consider a user with read-write access to a shared notebook, and a read-only 1763 | * share of a specific note in that notebook. The note restrictions would contain 1764 | * noUpdateTitle = true, while the notebook restrictions would contain noUpdateNotes = false. In 1765 | * this case, the user would have full edit permissions on the note based on the notebook 1766 | * restrictions. 1767 | * 1768 | *
1769 | *
noUpdateTitle
1770 | *
The client may not update the note's title (Note.title).
1771 | * 1772 | *
noUpdateContent
1773 | *
The client may not update the note's content. Content includes Note.content 1774 | * and Note.resources, as well as the related fields Note.contentHash and 1775 | * Note.contentLength.
1776 | * 1777 | *
noEmail
1778 | *
The client may not email the note (NoteStore.emailNote).
1779 | * 1780 | *
noShare
1781 | *
The client may not share the note with specific recipients 1782 | * (NoteStore.createOrUpdateSharedNotes).
1783 | * 1784 | *
noSharePublicly
1785 | *
The client may not make the note public (NoteStore.shareNote).
1786 | *
1787 | */ 1788 | struct NoteRestrictions { 1789 | 1: optional bool noUpdateTitle, 1790 | 2: optional bool noUpdateContent, 1791 | 3: optional bool noEmail, 1792 | 4: optional bool noShare, 1793 | 5: optional bool noSharePublicly 1794 | } 1795 | 1796 | /** 1797 | * Represents the owner's account related limits on a Note. 1798 | * The field uploaded represents the total number of bytes that have been uploaded 1799 | * to this account and is taken from the SyncState struct. All other fields 1800 | * represent account related limits and are taken from the AccountLimits struct. 1801 | *

1802 | * See SyncState and AccountLimits struct field definitions for more details. 1803 | */ 1804 | struct NoteLimits { 1805 | 1: optional i32 noteResourceCountMax, 1806 | 2: optional i64 uploadLimit, 1807 | 3: optional i64 resourceSizeMax, 1808 | 4: optional i64 noteSizeMax, 1809 | 5: optional i64 uploaded 1810 | } 1811 | 1812 | /** 1813 | * Represents a single note in the user's account. 1814 | * 1815 | *

1816 | *
guid
1817 | *
The unique identifier of this note. Will be set by the 1818 | * server, but will be omitted by clients calling NoteStore.createNote() 1819 | *
1820 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1821 | *
1822 | * Regex: EDAM_GUID_REGEX 1823 | *
1824 | * 1825 | *
title
1826 | *
The subject of the note. Can't begin or end with a space. 1827 | *
1828 | * Length: EDAM_NOTE_TITLE_LEN_MIN - EDAM_NOTE_TITLE_LEN_MAX 1829 | *
1830 | * Regex: EDAM_NOTE_TITLE_REGEX 1831 | *
1832 | * 1833 | *
content
1834 | *
The XHTML block that makes up the note. This is 1835 | * the canonical form of the note's contents, so will include abstract 1836 | * Evernote tags for internal resource references. A client may create 1837 | * a separate transformed version of this content for internal presentation, 1838 | * but the same canonical bytes should be used for transmission and 1839 | * comparison unless the user chooses to modify their content. 1840 | *
1841 | * Length: EDAM_NOTE_CONTENT_LEN_MIN - EDAM_NOTE_CONTENT_LEN_MAX 1842 | *
1843 | * 1844 | *
contentHash
1845 | *
The binary MD5 checksum of the UTF-8 encoded content 1846 | * body. This will always be set by the server, but clients may choose to omit 1847 | * this when they submit a note with content. 1848 | *
1849 | * Length: EDAM_HASH_LEN (exactly) 1850 | *
1851 | * 1852 | *
contentLength
1853 | *
The number of Unicode characters in the content of 1854 | * the note. This will always be set by the service, but clients may choose 1855 | * to omit this value when they submit a Note. 1856 | *
1857 | * 1858 | *
created
1859 | *
The date and time when the note was created in one of the 1860 | * clients. In most cases, this will match the user's sense of when 1861 | * the note was created, and ordering between notes will be based on 1862 | * ordering of this field. However, this is not a "reliable" timestamp 1863 | * if a client has an incorrect clock, so it cannot provide a true absolute 1864 | * ordering between notes. Notes created directly through the service 1865 | * (e.g. via the web GUI) will have an absolutely ordered "created" value. 1866 | *
1867 | * 1868 | *
updated
1869 | *
The date and time when the note was last modified in one of 1870 | * the clients. In most cases, this will match the user's sense of when 1871 | * the note was modified, but this field may not be absolutely reliable 1872 | * due to the possibility of client clock errors. 1873 | *
1874 | * 1875 | *
deleted
1876 | *
If present, the note is considered "deleted", and this 1877 | * stores the date and time when the note was deleted by one of the clients. 1878 | * In most cases, this will match the user's sense of when the note was 1879 | * deleted, but this field may be unreliable due to the possibility of 1880 | * client clock errors. 1881 | *
1882 | * 1883 | *
active
1884 | *
If the note is available for normal actions and viewing, 1885 | * this flag will be set to true. 1886 | *
1887 | * 1888 | *
updateSequenceNum
1889 | *
A number identifying the last transaction to 1890 | * modify the state of this note (including changes to the note's attributes 1891 | * or resources). The USN values are sequential within an account, 1892 | * and can be used to compare the order of modifications within the service. 1893 | *
1894 | * 1895 | *
notebookGuid
1896 | *
The unique identifier of the notebook that contains 1897 | * this note. If no notebookGuid is provided on a call to createNote(), the 1898 | * default notebook will be used instead. 1899 | *
1900 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 1901 | *
1902 | * Regex: EDAM_GUID_REGEX 1903 | *
1904 | * 1905 | *
tagGuids
1906 | *
A list of the GUID identifiers for tags that are applied to this note. 1907 | * This may be provided in a call to createNote() to unambiguously declare 1908 | * the tags that should be assigned to the new note. Alternately, clients 1909 | * may pass the names of desired tags via the 'tagNames' field during 1910 | * note creation. 1911 | * If the list of tags are omitted on a call to createNote(), then 1912 | * the server will assume that no changes have been made to the resources. 1913 | * Maximum: EDAM_NOTE_TAGS_MAX tags per note 1914 | *
1915 | * 1916 | *
resources
1917 | *
The list of resources that are embedded within this note. 1918 | * If the list of resources are omitted on a call to updateNote(), then 1919 | * the server will assume that no changes have been made to the resources. 1920 | * The binary contents of the resources must be provided when the resource 1921 | * is first sent to the service, but it will be omitted by the service when 1922 | * the Note is returned in the future. 1923 | * Maximum: EDAM_NOTE_RESOURCES_MAX resources per note 1924 | *
1925 | * 1926 | *
attributes
1927 | *
A list of the attributes for this note. 1928 | * If the list of attributes are omitted on a call to updateNote(), then 1929 | * the server will assume that no changes have been made to the resources. 1930 | *
1931 | * 1932 | *
tagNames
1933 | *
May be provided by clients during calls to createNote() as an 1934 | * alternative to providing the tagGuids of existing tags. If any tagNames 1935 | * are provided during createNote(), these will be found, or created if they 1936 | * don't already exist. Created tags will have no parent (they will be at 1937 | * the top level of the tag panel). 1938 | *
1939 | * 1940 | *
sharedNotes
1941 | *
The list of recipients with whom this note has been shared. This field will be unset if 1942 | * the caller has access to the note via the containing notebook, but does not have activity 1943 | * feed permission for that notebook. This field is read-only. Clients may not make changes to 1944 | * a note's sharing state via this field. 1945 | *
1946 | * 1947 | *
restrictions
1948 | *
If this field is set, the user has note-level permissions that may differ from their 1949 | * notebook-level permissions. In this case, the restrictions structure specifies 1950 | * a set of restrictions limiting the actions that a user may take on the note based 1951 | * on their note-level permissions. If this field is unset, then there are no 1952 | * note-specific restrictions. However, a client may still be limited based on the user's 1953 | * notebook permissions.
1954 | *
1955 | */ 1956 | struct Note { 1957 | 1: optional Guid guid, 1958 | 2: optional string title, 1959 | 3: optional string content, 1960 | 4: optional binary contentHash, 1961 | 5: optional i32 contentLength, 1962 | 6: optional Timestamp created, 1963 | 7: optional Timestamp updated, 1964 | 8: optional Timestamp deleted, 1965 | 9: optional bool active, 1966 | 10: optional i32 updateSequenceNum, 1967 | 11: optional string notebookGuid, 1968 | 12: optional list tagGuids, 1969 | 13: optional list resources, 1970 | 14: optional NoteAttributes attributes, 1971 | 15: optional list tagNames, 1972 | 16: optional list sharedNotes, 1973 | 17: optional NoteRestrictions restrictions, 1974 | 18: optional NoteLimits limits 1975 | } 1976 | 1977 | 1978 | /** 1979 | * If a Notebook has been opened to the public, the Notebook will have a 1980 | * reference to one of these structures, which gives the location and optional 1981 | * description of the externally-visible public Notebook. 1982 | *
1983 | *
uri
1984 | *
If this field is present, then the notebook is published for 1985 | * mass consumption on the Internet under the provided URI, which is 1986 | * relative to a defined base publishing URI defined by the service. 1987 | * This field can only be modified via the web service GUI ... publishing 1988 | * cannot be modified via an offline client. 1989 | *
1990 | * Length: EDAM_PUBLISHING_URI_LEN_MIN - EDAM_PUBLISHING_URI_LEN_MAX 1991 | *
1992 | * Regex: EDAM_PUBLISHING_URI_REGEX 1993 | *
1994 | * 1995 | *
order
1996 | *
When the notes are publicly displayed, they will be sorted 1997 | * based on the requested criteria. 1998 | *
1999 | * 2000 | *
ascending
2001 | *
If this is set to true, then the public notes will be 2002 | * displayed in ascending order (e.g. from oldest to newest). Otherwise, 2003 | * the notes will be displayed in descending order (e.g. newest to oldest). 2004 | *
2005 | * 2006 | *
publicDescription
2007 | *
This field may be used to provide a short 2008 | * description of the notebook, which may be displayed when (e.g.) the 2009 | * notebook is shown in a public view. Can't begin or end with a space. 2010 | *
2011 | * Length: EDAM_PUBLISHING_DESCRIPTION_LEN_MIN - 2012 | * EDAM_PUBLISHING_DESCRIPTION_LEN_MAX 2013 | *
2014 | * Regex: EDAM_PUBLISHING_DESCRIPTION_REGEX 2015 | *
2016 | * 2017 | *
2018 | */ 2019 | struct Publishing { 2020 | 1: optional string uri, 2021 | 2: optional NoteSortOrder order, 2022 | 3: optional bool ascending, 2023 | 4: optional string publicDescription 2024 | } 2025 | 2026 | /** 2027 | * If a Notebook contained in an Evernote Business account has been published 2028 | * the to business library, the Notebook will have a reference to one of these 2029 | * structures, which specifies how the Notebook will be represented in the 2030 | * library. 2031 | * 2032 | *
2033 | *
notebookDescription
2034 | *
A short description of the notebook's content that will be displayed 2035 | * in the business library user interface. The description may not begin 2036 | * or end with whitespace. 2037 | *
2038 | * Length: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN - 2039 | * EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX 2040 | *
2041 | * Regex: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX 2042 | *
2043 | * 2044 | *
privilege
2045 | *
The privileges that will be granted to users who join the notebook through 2046 | * the business library. 2047 | *
2048 | * 2049 | *
recommended
2050 | *
Whether the notebook should be "recommended" when displayed in the business 2051 | * library user interface. 2052 | *
2053 | *
2054 | */ 2055 | struct BusinessNotebook { 2056 | 1: optional string notebookDescription, 2057 | 2: optional SharedNotebookPrivilegeLevel privilege, 2058 | 3: optional bool recommended 2059 | } 2060 | 2061 | 2062 | /** 2063 | * A structure defining the scope of a SavedSearch. 2064 | * 2065 | *
2066 | *
includeAccount
2067 | *
The search should include notes from the account that contains the SavedSearch.
2068 | * 2069 | *
includePersonalLinkedNotebooks
2070 | *
The search should include notes within those shared notebooks 2071 | * that the user has joined that are NOT business notebooks.
2072 | * 2073 | *
includeBusinessLinkedNotebooks
2074 | *
The search should include notes within those shared notebooks 2075 | * that the user has joined that are business notebooks in the business that 2076 | * the user is currently a member of.
2077 | *
2078 | */ 2079 | struct SavedSearchScope { 2080 | 1: optional bool includeAccount, 2081 | 2: optional bool includePersonalLinkedNotebooks, 2082 | 3: optional bool includeBusinessLinkedNotebooks 2083 | } 2084 | 2085 | 2086 | /** 2087 | * A named search associated with the account that can be quickly re-used. 2088 | *
2089 | *
guid
2090 | *
The unique identifier of this search. Will be set by the 2091 | * service, so may be omitted by the client when creating. 2092 | *
2093 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 2094 | *
2095 | * Regex: EDAM_GUID_REGEX 2096 | *
2097 | * 2098 | *
name
2099 | *
The name of the saved search to display in the GUI. The 2100 | * account may only contain one search with a given name (case-insensitive 2101 | * compare). Can't begin or end with a space. 2102 | *
2103 | * Length: EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX 2104 | *
2105 | * Regex: EDAM_SAVED_SEARCH_NAME_REGEX 2106 | *
2107 | * 2108 | *
query
2109 | *
A string expressing the search to be performed. 2110 | *
2111 | * Length: EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX 2112 | *
2113 | * 2114 | *
format
2115 | *
The format of the query string, to determine how to parse 2116 | * and process it. 2117 | *
2118 | * 2119 | *
updateSequenceNum
2120 | *
A number identifying the last transaction to 2121 | * modify the state of this object. The USN values are sequential within an 2122 | * account, and can be used to compare the order of modifications within the 2123 | * service. 2124 | *
2125 | * 2126 | *
scope
2127 | *

Specifies the set of notes that should be included in the search, if 2128 | * possible.

2129 | *

Clients are expected to search as much of the desired scope as possible, 2130 | * with the understanding that a given client may not be able to cover the full 2131 | * specified scope. For example, when executing a search that includes notes in both 2132 | * the owner's account and business notebooks, a mobile client may choose to only 2133 | * search within the user's account because it is not capable of searching both 2134 | * scopes simultaneously. When a search across multiple scopes is not possible, 2135 | * a client may choose which scope to search based on the current application 2136 | * context. If a client cannot search any of the desired scopes, it should refuse 2137 | * to execute the search.

2138 | *
2139 | *
2140 | */ 2141 | struct SavedSearch { 2142 | 1: optional Guid guid, 2143 | 2: optional string name, 2144 | 3: optional string query, 2145 | 4: optional QueryFormat format, 2146 | 5: optional i32 updateSequenceNum, 2147 | 6: optional SavedSearchScope scope 2148 | } 2149 | 2150 | /** 2151 | * Settings meant for the recipient of a shared notebook, such as 2152 | * for indicating which types of notifications the recipient wishes 2153 | * for reminders, etc. 2154 | * 2155 | * The reminderNotifyEmail and reminderNotifyInApp fields have a 2156 | * 3-state read value but a 2-state write value. On read, it is 2157 | * possible to observe "unset", true, or false. The initial state is 2158 | * "unset". When you choose to set a value, you may set it to either 2159 | * true or false, but you cannot unset the value. Once one of these 2160 | * members has a true/false value, it will always have a true/false 2161 | * value. 2162 | * 2163 | *
2164 | *
reminderNotifyEmail
2165 | *
Indicates that the user wishes to receive daily e-mail notifications 2166 | * for reminders associated with the notebook. This may be true only for 2167 | * business notebooks that belong to the business of which the user is a 2168 | * member. You may only set this value on a notebook in your business.
2169 | *
reminderNotifyInApp
2170 | *
Indicates that the user wishes to receive notifications for 2171 | * reminders by applications that support providing such 2172 | * notifications. The exact nature of the notification is defined 2173 | * by the individual applications.
2174 | *
2175 | **/ 2176 | struct SharedNotebookRecipientSettings { 2177 | 1: optional bool reminderNotifyEmail, 2178 | 2: optional bool reminderNotifyInApp 2179 | } 2180 | 2181 | /** 2182 | * This enumeration defines the possible states that a notebook can be in for a recipient. 2183 | * It encompasses the "inMyList" boolean and default notebook status. 2184 | * 2185 | *
2186 | *
NOT_IN_MY_LIST
2187 | *
The notebook is not in the recipient's list (not "joined").
2188 | *
IN_MY_LIST
2189 | *
The notebook is in the recipient's notebook list (formerly, we would say 2190 | * that the recipient has "joined" the notebook)
2191 | *
IN_MY_LIST_AND_DEFAULT_NOTEBOOK
2192 | *
The same as IN_MY_LIST and this notebook is the user's default notebook.
2193 | *
2194 | */ 2195 | enum RecipientStatus { 2196 | NOT_IN_MY_LIST = 1, 2197 | IN_MY_LIST = 2, 2198 | IN_MY_LIST_AND_DEFAULT_NOTEBOOK = 3, 2199 | } 2200 | 2201 | /** 2202 | * Settings meant for the recipient of a notebook share. 2203 | * 2204 | * Some of these fields have a 3-state read value but a 2-state write value. 2205 | * On read, it is possible to observe "unset", true, or false. The initial 2206 | * state is "unset". When you choose to set a value, you may set it to either 2207 | * true or false, but you cannot unset the value. Once one of these members 2208 | * has a true/false value, it will always have a true/false value. 2209 | * 2210 | *
2211 | *
reminderNotifyEmail
2212 | *
Indicates that the user wishes to receive daily e-mail notifications 2213 | * for reminders associated with the notebook. This may be 2214 | * true only for business notebooks that belong to the business of 2215 | * which the user is a member. You may only set this value on a 2216 | * notebook in your business. This value will initially be unset.
2217 | *
reminderNotifyInApp
2218 | *
Indicates that the user wishes to receive notifications for 2219 | * reminders by applications that support providing such 2220 | * notifications. The exact nature of the notification is defined 2221 | * by the individual applications. This value will initially be unset.
2222 | *
2223 | *
inMyList
2224 | *
DEPRECATED: Use recipientStatus instead. 2225 | * The notebook is on the recipient's notebook list (formerly, we would say 2226 | * that the recipient has "joined" the notebook)
2227 | *
recipientStatus
2228 | *
The notebook is on/off the recipient's notebook list (formerly, we would say 2229 | * that the recipient has "joined" the notebook) and perhaps also their 2230 | * default notebook
2231 | *
stack
2232 | *
The stack the recipient has put this notebook into. See Notebook.stack 2233 | * for a definition. Every recipient can have their own stack value for the same 2234 | * notebook.
2235 | *
2236 | **/ 2237 | struct NotebookRecipientSettings { 2238 | 1: optional bool reminderNotifyEmail, 2239 | 2: optional bool reminderNotifyInApp, 2240 | 3: optional bool inMyList, 2241 | 4: optional string stack, 2242 | 5: optional RecipientStatus recipientStatus, 2243 | } 2244 | 2245 | /** 2246 | * Shared notebooks represent a relationship between a notebook and a single 2247 | * share invitation recipient. 2248 | *
2249 | *
id
2250 | *
The primary identifier of the share, which is not globally unique.
2251 | * 2252 | *
userId
2253 | *
The user id of the owner of the notebook.
2254 | * 2255 | *
notebookGuid
2256 | *
The GUID of the notebook that has been shared.
2257 | * 2258 | *
email
2259 | *
A string containing a display name for the recipient of the share. This may 2260 | * be an email address, a phone number, a full name, or some other descriptive 2261 | * string This field is read-only to clients. It will be filled in by the service 2262 | * when returning shared notebooks. 2263 | *
2264 | * 2265 | *
recipientIdentityId
2266 | *
The IdentityID of the share recipient. If present, only the user who has 2267 | * claimed that identity may access this share. 2268 | *
2269 | * 2270 | *
notebookModifiable
2271 | *
DEPRECATED
2272 | * 2273 | *
serviceCreated
2274 | *
The date that the owner first created the share with the specific email 2275 | * address.
2276 | * 2277 | *
serviceUpdated
2278 | *
The date the shared notebook was last updated on the service. This 2279 | * will be updated when authenticateToSharedNotebook is called the first 2280 | * time with a shared notebook (i.e. when the username is bound to that 2281 | * shared notebook), and also when the SharedNotebook privilege is updated 2282 | * as part of a shareNotebook(...) call, as well as on any calls to 2283 | * updateSharedNotebook(...). 2284 | *
2285 | * 2286 | *
username
2287 | *
DEPRECATED. The username of the user who can access this share. This 2288 | * value is read-only to clients. It will be filled in by the service when 2289 | * returning shared notebooks. 2290 | *
2291 | * 2292 | *
privilege
2293 | *
The privilege level granted to the notebook, activity stream, and 2294 | * invitations. See the corresponding enumeration for details. 2295 | *
2296 | * 2297 | *
recipientSettings
2298 | *
Settings intended for use only by the recipient of this shared 2299 | * notebook. You should skip setting this value unless you want 2300 | * to change the value contained inside the structure, and only if 2301 | * you are the recipient.
2302 | * 2303 | *
globalId
2304 | *
An immutable, opaque string that acts as a globally unique 2305 | * identifier for this shared notebook record. You can use this field to 2306 | * match linked notebook and shared notebook records as well as to 2307 | * create new LinkedNotebook records. This field replaces the deprecated 2308 | * shareKey field. 2309 | *
2310 | * 2311 | *
sharerUserId
2312 | *
The user id of the user who shared a notebook via this shared notebook 2313 | * instance. This may not be the same as userId, since a user with full 2314 | * access to a notebook may have created a new share for that notebook. For 2315 | * Business, this represents the user who shared the business notebook. This 2316 | * field is currently unset for a SharedNotebook created by joining a 2317 | * notebook that has been published to the business. 2318 | *
2319 | * 2320 | *
recipientUsername
2321 | *
The username of the user who can access this share. This is the username 2322 | * for the user with the id in recipientUserId. This value can be set 2323 | * by clients when calling shareNotebook(...), and that will result in the 2324 | * created SharedNotebook being assigned to a user. This value is always set 2325 | * if serviceAssigned is set. 2326 | *
2327 | * 2328 | *
recipientUserId
2329 | *
The id of the user who can access this share. This is the id for the user 2330 | * with the username in recipientUsername. This value is read-only and set 2331 | * by the service. Value set by clients will be ignored. This field may be unset 2332 | * for unjoined notebooks and is always set if serviceAssigned is set. Clients should 2333 | * prefer this field over recipientUsername unless they need to use usernames 2334 | * directly. 2335 | *
2336 | * 2337 | *
serviceAssigned
2338 | *
The date this SharedNotebook was assigned (i.e. has been associated with an 2339 | * Evernote user whose user ID is set in recipientUserId). Unset if the SharedNotebook 2340 | * is not assigned. This field is a read-only value that is set by the service. 2341 | *
2342 | *
2343 | */ 2344 | struct SharedNotebook { 2345 | 1: optional i64 id, 2346 | 2: optional UserID userId, 2347 | 3: optional Guid notebookGuid, 2348 | 4: optional string email, 2349 | 18: optional IdentityID recipientIdentityId, 2350 | 5: optional bool notebookModifiable, // deprecated 2351 | 7: optional Timestamp serviceCreated, 2352 | 10: optional Timestamp serviceUpdated, 2353 | 8: optional string globalId, // rename from shareKey 2354 | 9: optional string username, // deprecated 2355 | 11: optional SharedNotebookPrivilegeLevel privilege, 2356 | 13: optional SharedNotebookRecipientSettings recipientSettings, 2357 | 14: optional UserID sharerUserId, 2358 | 15: optional string recipientUsername, 2359 | 17: optional UserID recipientUserId, 2360 | 16: optional Timestamp serviceAssigned 2361 | } 2362 | 2363 | /** 2364 | * This enumeration defines the possible types of canMoveToContainer outcomes. 2365 | *

2366 | * An outdated client is expected to signal a "Cannot Move, Please Upgrade To Learn Why" 2367 | * like response to the user if an unknown enumeration value is received. 2368 | *

2369 | *
CAN_BE_MOVED
2370 | *
Can move Notebook to Workspace.
2371 | *
INSUFFICIENT_ENTITY_PRIVILEGE
2372 | *
Can not move Notebook to Workspace, because either: 2373 | * a) Notebook not in Workspace and insufficient privilege on Notebook 2374 | * or b) Notebook in Workspace and membership on Workspace with insufficient privilege 2375 | * for move
2376 | *
INSUFFICIENT_CONTAINER_PRIVILEGE
2377 | *
Notebook in Workspace and no membership on Workspace. 2378 | *
2379 | *
2380 | */ 2381 | enum CanMoveToContainerStatus { 2382 | CAN_BE_MOVED = 1, 2383 | INSUFFICIENT_ENTITY_PRIVILEGE = 2, 2384 | INSUFFICIENT_CONTAINER_PRIVILEGE = 3 2385 | } 2386 | 2387 | /** 2388 | * Specifies if the client can move a Notebook to a Workspace. 2389 | */ 2390 | struct CanMoveToContainerRestrictions { 2391 | 1: optional CanMoveToContainerStatus canMoveToContainer 2392 | } 2393 | 2394 | /** 2395 | * This structure captures information about the types of operations 2396 | * that cannot be performed on a given notebook with a type of 2397 | * authenticated access and credentials. The values filled into this 2398 | * structure are based on then-current values in the server database 2399 | * for shared notebooks and notebook publishing records, as well as 2400 | * information related to the authentication token. Information from 2401 | * the authentication token includes the application that is accessing 2402 | * the server, as defined by the permissions granted by consumer (api) 2403 | * key, and the method used to obtain the token, for example via 2404 | * authenticateToSharedNotebook, authenticateToBusiness, etc. Note 2405 | * that changes to values in this structure that are the result of 2406 | * shared notebook or publishing record changes are communicated to 2407 | * the client via a change in the notebook USN during sync. It is 2408 | * important to use the same access method, parameters, and consumer 2409 | * key in order obtain correct results from the sync engine. 2410 | * 2411 | * The server has the final say on what is allowed as values may 2412 | * change between calls to obtain NotebookRestrictions instances 2413 | * and to operate on data on the service. 2414 | * 2415 | * If the following are set and true, then the given restriction is 2416 | * in effect, as accessed by the same authentication token from which 2417 | * the values were obtained. 2418 | * 2419 | *
2420 | *
noReadNotes
2421 | *
The client is not able to read notes from the service and 2422 | * the notebook is write-only. 2423 | *
2424 | *
noCreateNotes
2425 | *
The client may not create new notes in the notebook. 2426 | *
2427 | *
noUpdateNotes
2428 | *
The client may not update notes currently in the notebook. 2429 | *
2430 | *
noExpungeNotes
2431 | *
The client may not expunge notes currently in the notebook. 2432 | *
2433 | *
noShareNotes
2434 | *
The client may not share notes in the notebook via the 2435 | * shareNote or createOrUpdateSharedNotes methods. 2436 | *
2437 | *
noEmailNotes
2438 | *
The client may not e-mail notes by guid via the Evernote 2439 | * service by using the emailNote method. Email notes by value 2440 | * by populating the note parameter instead. 2441 | *
2442 | *
noSendMessageToRecipients
2443 | *
The client may not send messages to the share recipients of 2444 | * the notebook. 2445 | *
2446 | *
noUpdateNotebook
2447 | *
The client may not update the Notebook object itself, for 2448 | * example, via the updateNotebook method. 2449 | *
2450 | *
noExpungeNotebook
2451 | *
The client may not expunge the Notebook object itself, for 2452 | * example, via the expungeNotebook method. 2453 | *
2454 | *
noSetDefaultNotebook
2455 | *
The client may not set this notebook to be the default notebook. 2456 | * The caller should leave Notebook.defaultNotebook unset. 2457 | *
2458 | *
noSetNotebookStack
2459 | *
If the client is able to update the Notebook, the Notebook.stack 2460 | * value may not be set. 2461 | *
2462 | *
noPublishToPublic
2463 | *
The client may not publish the notebook to the public. 2464 | * For example, business notebooks may not be shared publicly. 2465 | *
2466 | *
noPublishToBusinessLibrary
2467 | *
The client may not publish the notebook to the business library. 2468 | *
2469 | *
noCreateTags
2470 | *
The client may not complete an operation that results in a new tag 2471 | * being created in the owner's account. 2472 | *
2473 | *
noUpdateTags
2474 | *
The client may not update tags in the owner's account. 2475 | *
2476 | *
noExpungeTags
2477 | *
The client may not expunge tags in the owner's account. 2478 | *
2479 | *
noSetParentTag
2480 | *
If the client is able to create or update tags in the owner's account, 2481 | * then they will not be able to set the parent tag. Leave the value unset. 2482 | *
2483 | *
noCreateSharedNotebooks
2484 | *
The client is unable to create shared notebooks for the notebook. 2485 | *
2486 | *
updateWhichSharedNotebookRestrictions
2487 | *
Restrictions on which shared notebook instances can be updated. If the 2488 | * value is not set or null, then the client can update any of the shared notebooks 2489 | * associated with the notebook on which the NotebookRestrictions are defined. 2490 | * See the enumeration for further details. 2491 | *
2492 | *
expungeWhichSharedNotebookRestrictions
2493 | *
Restrictions on which shared notebook instances can be expunged. If the 2494 | * value is not set or null, then the client can expunge any of the shared notebooks 2495 | * associated with the notebook on which the NotebookRestrictions are defined. 2496 | * See the enumeration for further details. 2497 | *
2498 | *
noShareNotesWithBusiness
2499 | *
The client may not share notes in the notebook via the shareNoteWithBusiness 2500 | * method. 2501 | *
2502 | *
noRenameNotebook
2503 | *
The client may not rename this notebook.
2504 | *
noSetInMyList
2505 | *
clients may not change the NotebookRecipientSettings.inMyList settings for 2506 | * this notebook.
2507 | *
noSetContact
2508 | *
The contact for this notebook may not be changed.
2509 | *
2510 | *
canMoveToContainerRestrictions
2511 | *
Specifies if the client can move this notebook to a container and if not, 2512 | * the reason why.
2513 | *
noCanMoveNote
2514 | *
If set, the client cannot move a Note into or out of the Notebook.
2515 | * 2516 | */ 2517 | struct NotebookRestrictions { 2518 | 1: optional bool noReadNotes, 2519 | 2: optional bool noCreateNotes, 2520 | 3: optional bool noUpdateNotes, 2521 | 4: optional bool noExpungeNotes, 2522 | 5: optional bool noShareNotes, 2523 | 6: optional bool noEmailNotes, 2524 | 7: optional bool noSendMessageToRecipients, 2525 | 8: optional bool noUpdateNotebook, 2526 | 9: optional bool noExpungeNotebook, 2527 | 10: optional bool noSetDefaultNotebook, 2528 | 11: optional bool noSetNotebookStack, 2529 | 12: optional bool noPublishToPublic, 2530 | 13: optional bool noPublishToBusinessLibrary, 2531 | 14: optional bool noCreateTags, 2532 | 15: optional bool noUpdateTags, 2533 | 16: optional bool noExpungeTags, 2534 | 17: optional bool noSetParentTag, 2535 | 18: optional bool noCreateSharedNotebooks, 2536 | 19: optional SharedNotebookInstanceRestrictions updateWhichSharedNotebookRestrictions, 2537 | 20: optional SharedNotebookInstanceRestrictions expungeWhichSharedNotebookRestrictions, 2538 | 21: optional bool noShareNotesWithBusiness, 2539 | 22: optional bool noRenameNotebook, 2540 | 23: optional bool noSetInMyList, 2541 | 24: optional bool noChangeContact, 2542 | 26: optional CanMoveToContainerRestrictions canMoveToContainerRestrictions, 2543 | 27: optional bool noSetReminderNotifyEmail, 2544 | 28: optional bool noSetReminderNotifyInApp, 2545 | 29: optional bool noSetRecipientSettingsStack, 2546 | 30: optional bool noCanMoveNote 2547 | } 2548 | 2549 | /** 2550 | * A unique container for a set of notes. 2551 | *
2552 | *
guid
2553 | *
The unique identifier of this notebook. 2554 | *
2555 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 2556 | *
2557 | * Regex: EDAM_GUID_REGEX 2558 | *
2559 | * 2560 | *
name
2561 | *
A sequence of characters representing the name of the 2562 | * notebook. May be changed by clients, but the account may not contain two 2563 | * notebooks with names that are equal via a case-insensitive comparison. 2564 | * Can't begin or end with a space. 2565 | *
2566 | * Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX 2567 | *
2568 | * Regex: EDAM_NOTEBOOK_NAME_REGEX 2569 | *
2570 | * 2571 | *
updateSequenceNum
2572 | *
A number identifying the last transaction to 2573 | * modify the state of this object. The USN values are sequential within an 2574 | * account, and can be used to compare the order of modifications within the 2575 | * service. 2576 | *
2577 | * 2578 | *
defaultNotebook
2579 | *
If true, this notebook should be used for new notes 2580 | * whenever the user has not (or cannot) specify a desired target notebook. 2581 | * For example, if a note is submitted via SMTP email. 2582 | * The service will maintain at most one defaultNotebook per account. 2583 | * If a second notebook is created or updated with defaultNotebook set to 2584 | * true, the service will automatically update the prior notebook's 2585 | * defaultNotebook field to false. If the default notebook is deleted 2586 | * (i.e. "active" set to false), the "defaultNotebook" field will be 2587 | * set to false by the service. If the account has no default notebook 2588 | * set, the service will use the most recent notebook as the default. 2589 | *
2590 | * 2591 | *
serviceCreated
2592 | *
The time when this notebook was created on the 2593 | * service. This will be set on the service during creation, and the service 2594 | * will provide this value when it returns a Notebook to a client. 2595 | * The service will ignore this value if it is sent by clients. 2596 | *
2597 | * 2598 | *
serviceUpdated
2599 | *
The time when this notebook was last modified on the 2600 | * service. This will be set on the service during creation, and the service 2601 | * will provide this value when it returns a Notebook to a client. 2602 | * The service will ignore this value if it is sent by clients. 2603 | *
2604 | * 2605 | *
publishing
2606 | *
If the Notebook has been opened for public access, then this will point to the set of 2607 | * publishing information for the Notebook (URI, description, etc.). A Notebook cannot be 2608 | * published without providing this information, but it will persist for later use if publishing 2609 | * is ever disabled on the Notebook. Clients that do not wish to change the publishing behavior 2610 | * of a Notebook should not set this value when calling NoteStore.updateNotebook(). 2611 | * Note that this structure is never populated for business notebooks, see the businessNotebook 2612 | * field. 2613 | *
2614 | * 2615 | *
published
2616 | *
If this is set to true, then the Notebook will be 2617 | * accessible either to the public, or for business users to their business, 2618 | * via the 'publishing' or 'businessNotebook' specifications, which must also be set. If this is 2619 | * set to false, the Notebook will not be available to the public (or business). 2620 | * Clients that do not wish to change the publishing behavior of a Notebook 2621 | * should not set this value when calling NoteStore.updateNotebook(). 2622 | *
2623 | * 2624 | *
stack
2625 | *
If this is set, then the notebook is visually contained within a stack 2626 | * of notebooks with this name. All notebooks in the same account with the 2627 | * same 'stack' field are considered to be in the same stack. 2628 | * Notebooks with no stack set are "top level" and not contained within a 2629 | * stack. 2630 | *
2631 | * 2632 | *
sharedNotebookIds
2633 | *
DEPRECATED - replaced by sharedNotebooks.
2634 | * 2635 | *
sharedNotebooks
2636 | *
The list of recipients to whom this notebook has been shared 2637 | * (one SharedNotebook object per recipient email address). This field will 2638 | * be unset if you do not have permission to access this data. If you are 2639 | * accessing the notebook as the owner or via a shared notebook that is 2640 | * modifiable, then you have access to this data and the value will be set. 2641 | * This field is read-only. Clients may not make changes to shared notebooks 2642 | * via this field. 2643 | *
2644 | * 2645 | *
businessNotebook
2646 | *
If the notebook is part of a business account and has been shared with the entire 2647 | * business, this will contain sharing information. The presence or absence of this field 2648 | * is not a reliable test of whether a given notebook is in fact a business notebook - the 2649 | * field is only used when a notebook is or has been shared with the entire business. 2650 | *
2651 | * 2652 | *
contact
2653 | *
Intended for use with Business accounts, this field identifies the user who 2654 | * has been designated as the "contact". For notebooks created in business 2655 | * accounts, the server will automatically set this value to the user who created 2656 | * the notebook unless Notebook.contact.username has been set, in which that value 2657 | * will be used. When updating a notebook, it is common to leave Notebook.contact 2658 | * field unset, indicating that no change to the value is being requested and that 2659 | * the existing value, if any, should be preserved. 2660 | *
2661 | * 2662 | *
recipientSettings
2663 | *
This represents the preferences/settings that a recipient has set for this 2664 | * notebook. These are intended to be changed only by the recipient, and each 2665 | * recipient has their own recipient settings. 2666 | *
2667 | *
2668 | */ 2669 | struct Notebook { 2670 | 1: optional Guid guid, 2671 | 2: optional string name, 2672 | 5: optional i32 updateSequenceNum, 2673 | 6: optional bool defaultNotebook, 2674 | 7: optional Timestamp serviceCreated, 2675 | 8: optional Timestamp serviceUpdated, 2676 | 10: optional Publishing publishing, 2677 | 11: optional bool published, 2678 | 12: optional string stack, 2679 | 13: optional list sharedNotebookIds, 2680 | 14: optional list sharedNotebooks, 2681 | 15: optional BusinessNotebook businessNotebook, 2682 | 16: optional User contact, 2683 | 17: optional NotebookRestrictions restrictions, 2684 | 18: optional NotebookRecipientSettings recipientSettings 2685 | } 2686 | 2687 | /** 2688 | * A link in a user's account that refers them to a public or 2689 | * individual shared notebook in another user's account. 2690 | * 2691 | *
2692 | *
shareName
2693 | *
The display name of the shared notebook. The link owner can change this.
2694 | * 2695 | *
username
2696 | *
The username of the user who owns the shared or public notebook.
2697 | * 2698 | *
shardId
2699 | *
The shard ID of the notebook if the notebook is not public. 2700 | * 2701 | *
uri
2702 | *
The identifier of the public notebook.
2703 | * 2704 | *
guid
2705 | *
The unique identifier of this linked notebook. Will be set whenever 2706 | * a linked notebook is retrieved from the service, but may be null when a client 2707 | * is creating a linked notebook. 2708 | *
2709 | * Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX 2710 | *
2711 | * Regex: EDAM_GUID_REGEX 2712 | *
2713 | * 2714 | *
updateSequenceNum
2715 | *
A number identifying the last transaction to 2716 | * modify the state of this object. The USN values are sequential within an 2717 | * account, and can be used to compare the order of modifications within the 2718 | * service. 2719 | *
2720 | * 2721 | *
noteStoreUrl
2722 | *
2723 | * This field will contain the full URL that clients should use to make 2724 | * NoteStore requests to the server shard that contains that notebook's data. 2725 | * I.e. this is the URL that should be used to create the Thrift HTTP client 2726 | * transport to send messages to the NoteStore service for the account. 2727 | *
2728 | * 2729 | *
webApiUrlPrefix:
2730 | *
2731 | * This field will contain the initial part of the URLs that should be used 2732 | * to make requests to Evernote's thin client "web API", which provide 2733 | * optimized operations for clients that aren't capable of manipulating 2734 | * the full contents of accounts via the full Thrift data model. Clients 2735 | * should concatenate the relative path for the various servlets onto the 2736 | * end of this string to construct the full URL, as documented on our 2737 | * developer web site. 2738 | *
2739 | * 2740 | *
stack
2741 | *
If this is set, then the notebook is visually contained within a stack 2742 | * of notebooks with this name. All notebooks in the same account with the 2743 | * same 'stack' field are considered to be in the same stack. 2744 | * Notebooks with no stack set are "top level" and not contained within a 2745 | * stack. The link owner can change this and this field is for the benefit 2746 | * of the link owner. 2747 | *
2748 | * 2749 | *
businessId
2750 | *
If set, this will be the unique identifier for the business that owns 2751 | * the notebook to which the linked notebook refers.
2752 | * 2753 | *
sharedNotebookGlobalId
2754 | *
The globally unique identifier (globalId) of the shared notebook that 2755 | * corresponds to the share key, or the GUID of the Notebook that the linked notebook 2756 | * refers to. This field must be filled in with the SharedNotebook.globalId or 2757 | * Notebook.GUID value when creating new LinkedNotebooks. This field replaces the 2758 | * deprecated "shareKey" field. 2759 | *
2760 | *
2761 | */ 2762 | struct LinkedNotebook { 2763 | 2: optional string shareName, 2764 | 3: optional string username, 2765 | 4: optional string shardId, 2766 | 5: optional string sharedNotebookGlobalId, // rename from shareKey 2767 | 6: optional string uri, 2768 | 7: optional Guid guid, 2769 | 8: optional i32 updateSequenceNum, 2770 | 9: optional string noteStoreUrl, 2771 | 10: optional string webApiUrlPrefix, 2772 | 11: optional string stack, 2773 | 12: optional i32 businessId 2774 | } 2775 | 2776 | /** 2777 | * A structure that describes a notebook or a user's relationship with 2778 | * a notebook. NotebookDescriptor is expected to remain a lighter-weight 2779 | * structure when compared to Notebook. 2780 | *
2781 | *
guid
2782 | *
The unique identifier of the notebook. 2783 | *
2784 | * 2785 | *
notebookDisplayName
2786 | *
A sequence of characters representing the name of the 2787 | * notebook. 2788 | *
2789 | * 2790 | *
contactName
2791 | *
The User.name value of the notebook's "contact". 2792 | *
2793 | * 2794 | *
hasSharedNotebook
2795 | *
Whether a SharedNotebook record exists between the calling user and this 2796 | * notebook. 2797 | *
2798 | * 2799 | *
joinedUserCount
2800 | *
The number of users who have joined this notebook. 2801 | *
2802 | * 2803 | *
2804 | */ 2805 | struct NotebookDescriptor { 2806 | 1: optional Guid guid, 2807 | 2: optional string notebookDisplayName, 2808 | 3: optional string contactName, 2809 | 4: optional bool hasSharedNotebook, 2810 | 5: optional i32 joinedUserCount 2811 | } 2812 | 2813 | /** 2814 | * This structure represents profile information for a user in a business. 2815 | * 2816 | *
2817 | *
id
2818 | *
The numeric identifier that uniquely identifies a user.
2819 | * 2820 | *
name
2821 | *
The full name of the user.
2822 | * 2823 | *
email
2824 | *
The user's business email address. If the user has not registered their business 2825 | * email address, this field will be empty. 2826 | *
2827 | * 2828 | *
username
2829 | *
The user's Evernote username.
2830 | * 2831 | *
attributes
2832 | *
The user's business specific attributes.
2833 | * 2834 | *
joined
2835 | *
The time when the user joined the business
2836 | * 2837 | *
photoLastUpdated
2838 | *
The time when the user's profile photo was most recently updated
2839 | * 2840 | *
photoUrl
2841 | *
A URL identifying a copy of the user's current profile photo
2842 | * 2843 | *
role
2844 | *
The BusinessUserRole for the user
2845 | * 2846 | *
status
2847 | *
The BusinessUserStatus for the user
2848 | * 2849 | *
2850 | */ 2851 | struct UserProfile { 2852 | 1: optional UserID id, 2853 | 2: optional string name, 2854 | 3: optional string email, 2855 | 4: optional string username, 2856 | 5: optional BusinessUserAttributes attributes, 2857 | 6: optional Timestamp joined 2858 | 7: optional Timestamp photoLastUpdated, 2859 | 8: optional string photoUrl, 2860 | 9: optional BusinessUserRole role, 2861 | 10: optional BusinessUserStatus status 2862 | } 2863 | 2864 | /** 2865 | * This enumeration defines the possible types of related content. 2866 | * 2867 | * NEWS_ARTICLE: This related content is a news article 2868 | * PROFILE_PERSON: This match refers to the profile of an individual person 2869 | * PROFILE_ORGANIZATION: This match refers to the profile of an organization 2870 | * REFERENCE_MATERIAL: This related content is material from reference works 2871 | */ 2872 | enum RelatedContentType { 2873 | NEWS_ARTICLE = 1, 2874 | PROFILE_PERSON = 2, 2875 | PROFILE_ORGANIZATION = 3, 2876 | REFERENCE_MATERIAL = 4, 2877 | } 2878 | 2879 | /** 2880 | * This enumeration defines the possible ways to access related content. 2881 | * 2882 | * NOT_ACCESSIBLE: The content is not accessible given the user's privilege level, but 2883 | * still worth showing as a snippet. The content url may point to a webpage that 2884 | * explains why not, or explains how to access that content. 2885 | * 2886 | * DIRECT_LINK_ACCESS_OK: The content is accessible directly, and no additional login is 2887 | * required. 2888 | * 2889 | * DIRECT_LINK_LOGIN_REQUIRED: The content is accessible directly, but an additional login 2890 | * is required. 2891 | * 2892 | * DIRECT_LINK_EMBEDDED_VIEW: The content is accessible directly, and should be shown in 2893 | * an embedded web view. 2894 | * If the URL refers to a secured location under our control (for example, 2895 | * https://www.evernote.com/*), the client may include user-specific authentication 2896 | * credentials with the request. 2897 | */ 2898 | enum RelatedContentAccess { 2899 | NOT_ACCESSIBLE = 0, 2900 | DIRECT_LINK_ACCESS_OK = 1, 2901 | DIRECT_LINK_LOGIN_REQUIRED = 2, 2902 | DIRECT_LINK_EMBEDDED_VIEW = 3, 2903 | } 2904 | 2905 | /** 2906 | * An external image that can be shown with a related content snippet, 2907 | * usually either a JPEG or PNG image. It is up to the client which image(s) are shown, 2908 | * depending on available screen real estate, resolution and aspect ratio. 2909 | * 2910 | *
2911 | *
url
2912 | *
The external URL of the image
2913 | *
width
2914 | *
The width of the image, in pixels.
2915 | *
height
2916 | *
The height of the image, in pixels.
2917 | *
pixelRatio
2918 | *
the pixel ratio (usually either 1.0, 1.5 or 2.0)
2919 | *
fileSize
2920 | *
the size of the image file, in bytes
2921 | *
2922 | */ 2923 | struct RelatedContentImage { 2924 | 1: optional string url, 2925 | 2: optional i32 width, 2926 | 3: optional i32 height, 2927 | 4: optional double pixelRatio, 2928 | 5: optional i32 fileSize 2929 | } 2930 | 2931 | /** 2932 | * A structure identifying one snippet of related content (some information that is not 2933 | * part of an Evernote account but might still be relevant to the user). 2934 | * 2935 | *
2936 | * 2937 | *
contentId
2938 | *
An identifier that uniquely identifies the content.
2939 | * 2940 | *
title
2941 | *
The main title to show.
2942 | * 2943 | *
url
2944 | *
The URL the client can use to retrieve the content.
2945 | * 2946 | *
sourceId
2947 | *
An identifier that uniquely identifies the source.
2948 | * 2949 | *
sourceUrl
2950 | *
A URL the client can access to know more about the source.
2951 | * 2952 | *
sourceFaviconUrl
2953 | *
The favicon URL of the source which the content belongs to.
2954 | *
2955 | * 2956 | *
sourceName
2957 | *
A human-readable name of the source that provided this content.
2958 | * 2959 | *
date
2960 | *
A timestamp telling the user about the recency of the content.
2961 | * 2962 | *
teaser
2963 | *
A teaser text to show to the user; usually the first few sentences of the content, 2964 | * excluding the title.
2965 | * 2966 | *
thumbnails
2967 | *
A list of thumbnails the client can show in the snippet.
2968 | * 2969 | *
contentType
2970 | *
The type of this related content.
2971 | * 2972 | *
accessType
2973 | *
An indication of how this content can be accessed. This type influences the 2974 | * semantics of the url parameter.
2975 | * 2976 | *
visibleUrl
2977 | *
If set, the client should show this URL to the user, instead of the URL that was 2978 | * used to retrieve the content. This URL should be used when opening the content 2979 | * in an external browser window, or when sharing with another person.
2980 | * 2981 | *
clipUrl
2982 | *
If set, the client should use this URL for clipping purposes, instead of the URL 2983 | * that was used to retrieve the content. The clipUrl may directly point to an .enex 2984 | * file, for example.
2985 | * 2986 | *
contact
2987 | *
If set, the client may use this Contact for messaging purposes. This will typically 2988 | * only be set for user profiles.
2989 | * 2990 | *
authors
2991 | *
For News articles only. A list of names of the article authors, if available.
2992 | * 2993 | * 2994 | */ 2995 | struct RelatedContent { 2996 | 1: optional string contentId, 2997 | 2: optional string title, 2998 | 3: optional string url, 2999 | 4: optional string sourceId, 3000 | 5: optional string sourceUrl, 3001 | 6: optional string sourceFaviconUrl, 3002 | 7: optional string sourceName, 3003 | 8: optional Timestamp date, 3004 | 9: optional string teaser, 3005 | 10: optional list thumbnails, 3006 | 11: optional RelatedContentType contentType, 3007 | 12: optional RelatedContentAccess accessType, 3008 | 13: optional string visibleUrl, 3009 | 14: optional string clipUrl, 3010 | 15: optional Contact contact, 3011 | 16: optional list authors, 3012 | } 3013 | 3014 | /** 3015 | * A structure describing an invitation to join a business account. 3016 | * 3017 | *
3018 | *
businessId
3019 | *
3020 | * The ID of the business to which the invitation grants access. 3021 | *
3022 | * 3023 | *
email
3024 | *
3025 | * The email address that was invited to join the business. 3026 | *
3027 | * 3028 | *
role
3029 | *
3030 | * The role to grant the user after the invitation is accepted. 3031 | *
3032 | * 3033 | *
status
3034 | *
3035 | * The status of the invitation. 3036 | *
3037 | * 3038 | *
requesterId
3039 | *
3040 | * For invitations that were initially requested by a non-admin member of the business, 3041 | * this field specifies the user ID of the requestor. For all other invitations, this field 3042 | * will be unset. 3043 | *
3044 | *
fromWorkChat
3045 | *
3046 | * If this invitation was created implicitly via a WorkChat, this field 3047 | * will be true. 3048 | *
3049 | *
created
3050 | *
3051 | * The timestamp at which this invitation was created. 3052 | *
3053 | *
mostRecentReminder
3054 | *
3055 | * The timestamp at which the most recent reminder was sent. 3056 | *
3057 | *
3058 | */ 3059 | struct BusinessInvitation { 3060 | 1: optional i32 businessId, 3061 | 2: optional string email, 3062 | 3: optional BusinessUserRole role, 3063 | 4: optional BusinessInvitationStatus status, 3064 | 5: optional UserID requesterId, 3065 | 6: optional bool fromWorkChat, 3066 | 7: optional Timestamp created, 3067 | 8: optional Timestamp mostRecentReminder 3068 | } 3069 | 3070 | /** 3071 | * 3072 | */ 3073 | enum UserIdentityType { 3074 | EVERNOTE_USERID = 1, 3075 | EMAIL = 2, 3076 | IDENTITYID = 3 3077 | } 3078 | 3079 | /** 3080 | * A structure that holds user identifying information such as an 3081 | * email address, Evernote user ID, or an identifier from a 3rd party 3082 | * service. An instance consists of a type and a value, where the 3083 | * value will be stored in one of the value fields depending upon the 3084 | * data type required for the identity type. 3085 | * 3086 | * When used with shared notebook invitations, a UserIdentity 3087 | * identifies a particular person who may not (yet) have an Evernote 3088 | * UserID UserIdentity but who has (almost) unique access to the 3089 | * service endpoint described by the UserIdentity. For example, an 3090 | * e-mail UserIdentity can identify the person who receives e-mail at 3091 | * the given address, and who can therefore read the share key that 3092 | * has a cryptographic signature from the Evernote service. With the 3093 | * share key, this person can supply their Evernote UserID via an 3094 | * authentication token to join the notebook 3095 | * (authenticateToSharedNotebook), at which time we have associated 3096 | * the e-mail UserIdentity with an Evernote UserID UserIdentity. Note 3097 | * that using shared notebook records, the relationship between 3098 | * Evernote UserIDs and e-mail addresses is many to many. 3099 | * 3100 | * Note that the identifier may not directly identify a 3101 | * particular Evernote UserID UserIdentity without further 3102 | * verification. For example, an e-mail UserIdentity may be 3103 | * associated with an invitation to join a notebook (via a shared 3104 | * notebook record), but until a user uses a share key, that was sent 3105 | * to that e-mail address, to join the notebook, we do not know an 3106 | * Evernote UserID UserIdentity ID to match the e-mail address. 3107 | */ 3108 | struct UserIdentity { 3109 | 1: optional UserIdentityType type, 3110 | 2: optional string stringIdentifier, 3111 | 3: optional i64 longIdentifier 3112 | } 3113 | --------------------------------------------------------------------------------