@rapidmx/activesync-plugin 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/README.md +4 -4
  2. package/dist/lib/BaseDeviceSyncStateRoute.js +32 -0
  3. package/dist/lib/BaseDeviceSyncStateRoute.js.map +1 -1
  4. package/dist/lib/BaseEasRoute.js +91 -15
  5. package/dist/lib/BaseEasRoute.js.map +1 -1
  6. package/dist/lib/EasAuditLog.js +56 -0
  7. package/dist/lib/EasAuditLog.js.map +1 -0
  8. package/dist/lib/EasCollectionLease.js +199 -0
  9. package/dist/lib/EasCollectionLease.js.map +1 -0
  10. package/dist/lib/EasCollectionStore.js +102 -0
  11. package/dist/lib/EasCollectionStore.js.map +1 -0
  12. package/dist/lib/EasCollectionSync.js +294 -0
  13. package/dist/lib/EasCollectionSync.js.map +1 -0
  14. package/dist/lib/EasSyncKeyUtils.js +125 -62
  15. package/dist/lib/EasSyncKeyUtils.js.map +1 -1
  16. package/dist/lib/MessageMoveRules.js +100 -0
  17. package/dist/lib/MessageMoveRules.js.map +1 -0
  18. package/dist/lib/MimeHeaderUtils.js +395 -0
  19. package/dist/lib/MimeHeaderUtils.js.map +1 -0
  20. package/dist/lib/RegexPatternUtils.js +30 -0
  21. package/dist/lib/RegexPatternUtils.js.map +1 -0
  22. package/dist/lib/RestapiCompat.js +41 -0
  23. package/dist/lib/RestapiCompat.js.map +1 -0
  24. package/dist/lib/adapters/CalendarSyncAdapter.js +142 -33
  25. package/dist/lib/adapters/CalendarSyncAdapter.js.map +1 -1
  26. package/dist/lib/adapters/EmailSyncAdapter.js +114 -27
  27. package/dist/lib/adapters/EmailSyncAdapter.js.map +1 -1
  28. package/dist/lib/adapters/mongo/EmailSyncAdapterMongo.js +2 -1
  29. package/dist/lib/adapters/mongo/EmailSyncAdapterMongo.js.map +1 -1
  30. package/dist/lib/adapters/sql/EmailSyncAdapterSQL.js +2 -1
  31. package/dist/lib/adapters/sql/EmailSyncAdapterSQL.js.map +1 -1
  32. package/dist/lib/codec/WbxmlDecoder.js +86 -34
  33. package/dist/lib/codec/WbxmlDecoder.js.map +1 -1
  34. package/dist/lib/codec/WbxmlEncoder.js +103 -22
  35. package/dist/lib/codec/WbxmlEncoder.js.map +1 -1
  36. package/dist/lib/commands/ComposeMailCommand.js +105 -31
  37. package/dist/lib/commands/ComposeMailCommand.js.map +1 -1
  38. package/dist/lib/commands/FolderSyncCommand.js +67 -27
  39. package/dist/lib/commands/FolderSyncCommand.js.map +1 -1
  40. package/dist/lib/commands/GetItemEstimateCommand.js +80 -59
  41. package/dist/lib/commands/GetItemEstimateCommand.js.map +1 -1
  42. package/dist/lib/commands/ItemOperationsCommand.js +219 -56
  43. package/dist/lib/commands/ItemOperationsCommand.js.map +1 -1
  44. package/dist/lib/commands/MeetingResponseCommand.js +212 -53
  45. package/dist/lib/commands/MeetingResponseCommand.js.map +1 -1
  46. package/dist/lib/commands/MoveItemsCommand.js +54 -21
  47. package/dist/lib/commands/MoveItemsCommand.js.map +1 -1
  48. package/dist/lib/commands/PingCommand.js +288 -56
  49. package/dist/lib/commands/PingCommand.js.map +1 -1
  50. package/dist/lib/commands/ProvisionCommand.js +34 -17
  51. package/dist/lib/commands/ProvisionCommand.js.map +1 -1
  52. package/dist/lib/commands/ResolveRecipientsCommand.js +43 -5
  53. package/dist/lib/commands/ResolveRecipientsCommand.js.map +1 -1
  54. package/dist/lib/commands/SearchCommand.js +92 -17
  55. package/dist/lib/commands/SearchCommand.js.map +1 -1
  56. package/dist/lib/commands/SettingsCommand.js +2 -1
  57. package/dist/lib/commands/SettingsCommand.js.map +1 -1
  58. package/dist/lib/commands/SmartForwardCommand.js +2 -1
  59. package/dist/lib/commands/SmartForwardCommand.js.map +1 -1
  60. package/dist/lib/commands/SmartReplyCommand.js +2 -1
  61. package/dist/lib/commands/SmartReplyCommand.js.map +1 -1
  62. package/dist/lib/commands/SyncCommand.js +481 -244
  63. package/dist/lib/commands/SyncCommand.js.map +1 -1
  64. package/dist/lib/commands/mongo/GetItemEstimateCommandMongo.js +6 -1
  65. package/dist/lib/commands/mongo/GetItemEstimateCommandMongo.js.map +1 -1
  66. package/dist/lib/commands/mongo/ItemOperationsCommandMongo.js +3 -1
  67. package/dist/lib/commands/mongo/ItemOperationsCommandMongo.js.map +1 -1
  68. package/dist/lib/commands/mongo/MeetingResponseCommandMongo.js +2 -1
  69. package/dist/lib/commands/mongo/MeetingResponseCommandMongo.js.map +1 -1
  70. package/dist/lib/commands/mongo/PingCommandMongo.js +23 -0
  71. package/dist/lib/commands/mongo/PingCommandMongo.js.map +1 -0
  72. package/dist/lib/commands/mongo/SearchCommandMongo.js +3 -1
  73. package/dist/lib/commands/mongo/SearchCommandMongo.js.map +1 -1
  74. package/dist/lib/commands/mongo/SendMailCommandMongo.js +2 -1
  75. package/dist/lib/commands/mongo/SendMailCommandMongo.js.map +1 -1
  76. package/dist/lib/commands/mongo/SmartForwardCommandMongo.js +2 -1
  77. package/dist/lib/commands/mongo/SmartForwardCommandMongo.js.map +1 -1
  78. package/dist/lib/commands/mongo/SmartReplyCommandMongo.js +2 -1
  79. package/dist/lib/commands/mongo/SmartReplyCommandMongo.js.map +1 -1
  80. package/dist/lib/commands/mongo/SyncCommandMongo.js +7 -1
  81. package/dist/lib/commands/mongo/SyncCommandMongo.js.map +1 -1
  82. package/dist/lib/commands/mongo/index.js +1 -0
  83. package/dist/lib/commands/mongo/index.js.map +1 -1
  84. package/dist/lib/commands/sql/GetItemEstimateCommandSQL.js +6 -1
  85. package/dist/lib/commands/sql/GetItemEstimateCommandSQL.js.map +1 -1
  86. package/dist/lib/commands/sql/ItemOperationsCommandSQL.js +3 -1
  87. package/dist/lib/commands/sql/ItemOperationsCommandSQL.js.map +1 -1
  88. package/dist/lib/commands/sql/MeetingResponseCommandSQL.js +2 -1
  89. package/dist/lib/commands/sql/MeetingResponseCommandSQL.js.map +1 -1
  90. package/dist/lib/commands/sql/PingCommandSQL.js +23 -0
  91. package/dist/lib/commands/sql/PingCommandSQL.js.map +1 -0
  92. package/dist/lib/commands/sql/SearchCommandSQL.js +3 -1
  93. package/dist/lib/commands/sql/SearchCommandSQL.js.map +1 -1
  94. package/dist/lib/commands/sql/SendMailCommandSQL.js +2 -1
  95. package/dist/lib/commands/sql/SendMailCommandSQL.js.map +1 -1
  96. package/dist/lib/commands/sql/SmartForwardCommandSQL.js +2 -1
  97. package/dist/lib/commands/sql/SmartForwardCommandSQL.js.map +1 -1
  98. package/dist/lib/commands/sql/SmartReplyCommandSQL.js +2 -1
  99. package/dist/lib/commands/sql/SmartReplyCommandSQL.js.map +1 -1
  100. package/dist/lib/commands/sql/SyncCommandSQL.js +7 -1
  101. package/dist/lib/commands/sql/SyncCommandSQL.js.map +1 -1
  102. package/dist/lib/commands/sql/index.js +1 -0
  103. package/dist/lib/commands/sql/index.js.map +1 -1
  104. package/dist/lib/index.js +5 -0
  105. package/dist/lib/index.js.map +1 -1
  106. package/dist/lib/jobs/EasDeviceStateCleanupJob.js +44 -2
  107. package/dist/lib/jobs/EasDeviceStateCleanupJob.js.map +1 -1
  108. package/dist/lib/jobs/mongo/EasDeviceStateCleanupJobMongo.js +4 -0
  109. package/dist/lib/jobs/mongo/EasDeviceStateCleanupJobMongo.js.map +1 -1
  110. package/dist/lib/jobs/sql/EasDeviceStateCleanupJobSQL.js +9 -0
  111. package/dist/lib/jobs/sql/EasDeviceStateCleanupJobSQL.js.map +1 -1
  112. package/dist/lib/models/EasCollectionChunk.js +2 -0
  113. package/dist/lib/models/EasCollectionChunk.js.map +1 -0
  114. package/dist/lib/models/EasCollectionState.js +2 -0
  115. package/dist/lib/models/EasCollectionState.js.map +1 -0
  116. package/dist/lib/models/mongo/DeviceSyncStateMongo.js +7 -0
  117. package/dist/lib/models/mongo/DeviceSyncStateMongo.js.map +1 -1
  118. package/dist/lib/models/mongo/EasCollectionChunkMongo.js +83 -0
  119. package/dist/lib/models/mongo/EasCollectionChunkMongo.js.map +1 -0
  120. package/dist/lib/models/mongo/EasCollectionStateMongo.js +162 -0
  121. package/dist/lib/models/mongo/EasCollectionStateMongo.js.map +1 -0
  122. package/dist/lib/models/sql/DeviceSyncStateSQL.js +7 -0
  123. package/dist/lib/models/sql/DeviceSyncStateSQL.js.map +1 -1
  124. package/dist/lib/models/sql/EasCollectionChunkSQL.js +83 -0
  125. package/dist/lib/models/sql/EasCollectionChunkSQL.js.map +1 -0
  126. package/dist/lib/models/sql/EasCollectionStateSQL.js +162 -0
  127. package/dist/lib/models/sql/EasCollectionStateSQL.js.map +1 -0
  128. package/dist/lib/mongo/EasRouteMongo.js +2 -2
  129. package/dist/lib/mongo/EasRouteMongo.js.map +1 -1
  130. package/dist/lib/mongo.js +2 -0
  131. package/dist/lib/mongo.js.map +1 -1
  132. package/dist/lib/sql/EasRouteSQL.js +2 -2
  133. package/dist/lib/sql/EasRouteSQL.js.map +1 -1
  134. package/dist/lib/sql.js +2 -0
  135. package/dist/lib/sql.js.map +1 -1
  136. package/dist/types/BaseDeviceSyncStateRoute.d.ts +10 -0
  137. package/dist/types/BaseEasRoute.d.ts +15 -4
  138. package/dist/types/EasAuditLog.d.ts +47 -0
  139. package/dist/types/EasCollectionLease.d.ts +60 -0
  140. package/dist/types/EasCollectionStore.d.ts +51 -0
  141. package/dist/types/EasCollectionSync.d.ts +96 -0
  142. package/dist/types/EasCommandHandler.d.ts +7 -4
  143. package/dist/types/EasSyncKeyUtils.d.ts +73 -42
  144. package/dist/types/MessageMoveRules.d.ts +45 -0
  145. package/dist/types/MimeHeaderUtils.d.ts +73 -0
  146. package/dist/types/RegexPatternUtils.d.ts +14 -0
  147. package/dist/types/RestapiCompat.d.ts +24 -0
  148. package/dist/types/adapters/CalendarSyncAdapter.d.ts +47 -18
  149. package/dist/types/adapters/EasCollectionSyncAdapter.d.ts +18 -2
  150. package/dist/types/adapters/EmailSyncAdapter.d.ts +24 -7
  151. package/dist/types/adapters/mongo/EmailSyncAdapterMongo.d.ts +1 -0
  152. package/dist/types/adapters/sql/EmailSyncAdapterSQL.d.ts +1 -0
  153. package/dist/types/codec/WbxmlDecoder.d.ts +39 -0
  154. package/dist/types/codec/WbxmlEncoder.d.ts +36 -1
  155. package/dist/types/commands/ComposeMailCommand.d.ts +33 -15
  156. package/dist/types/commands/FolderSyncCommand.d.ts +4 -1
  157. package/dist/types/commands/GetItemEstimateCommand.d.ts +20 -15
  158. package/dist/types/commands/ItemOperationsCommand.d.ts +29 -4
  159. package/dist/types/commands/MeetingResponseCommand.d.ts +52 -13
  160. package/dist/types/commands/MoveItemsCommand.d.ts +13 -3
  161. package/dist/types/commands/PingCommand.d.ts +72 -14
  162. package/dist/types/commands/ProvisionCommand.d.ts +16 -11
  163. package/dist/types/commands/ResolveRecipientsCommand.d.ts +4 -0
  164. package/dist/types/commands/SearchCommand.d.ts +13 -1
  165. package/dist/types/commands/SyncCommand.d.ts +102 -62
  166. package/dist/types/commands/mongo/GetItemEstimateCommandMongo.d.ts +3 -0
  167. package/dist/types/commands/mongo/ItemOperationsCommandMongo.d.ts +2 -0
  168. package/dist/types/commands/mongo/MeetingResponseCommandMongo.d.ts +1 -0
  169. package/dist/types/commands/mongo/PingCommandMongo.d.ts +8 -0
  170. package/dist/types/commands/mongo/SearchCommandMongo.d.ts +2 -0
  171. package/dist/types/commands/mongo/SendMailCommandMongo.d.ts +1 -0
  172. package/dist/types/commands/mongo/SmartForwardCommandMongo.d.ts +1 -0
  173. package/dist/types/commands/mongo/SmartReplyCommandMongo.d.ts +1 -0
  174. package/dist/types/commands/mongo/SyncCommandMongo.d.ts +4 -0
  175. package/dist/types/commands/mongo/index.d.ts +1 -0
  176. package/dist/types/commands/sql/GetItemEstimateCommandSQL.d.ts +3 -0
  177. package/dist/types/commands/sql/ItemOperationsCommandSQL.d.ts +2 -0
  178. package/dist/types/commands/sql/MeetingResponseCommandSQL.d.ts +1 -0
  179. package/dist/types/commands/sql/PingCommandSQL.d.ts +8 -0
  180. package/dist/types/commands/sql/SearchCommandSQL.d.ts +2 -0
  181. package/dist/types/commands/sql/SendMailCommandSQL.d.ts +1 -0
  182. package/dist/types/commands/sql/SmartForwardCommandSQL.d.ts +1 -0
  183. package/dist/types/commands/sql/SmartReplyCommandSQL.d.ts +1 -0
  184. package/dist/types/commands/sql/SyncCommandSQL.d.ts +4 -0
  185. package/dist/types/commands/sql/index.d.ts +1 -0
  186. package/dist/types/index.d.ts +5 -0
  187. package/dist/types/jobs/EasDeviceStateCleanupJob.d.ts +15 -0
  188. package/dist/types/jobs/mongo/EasDeviceStateCleanupJobMongo.d.ts +2 -0
  189. package/dist/types/jobs/sql/EasDeviceStateCleanupJobSQL.d.ts +4 -0
  190. package/dist/types/models/DeviceSyncState.d.ts +13 -2
  191. package/dist/types/models/EasCollectionChunk.d.ts +20 -0
  192. package/dist/types/models/EasCollectionState.d.ts +79 -0
  193. package/dist/types/models/mongo/DeviceSyncStateMongo.d.ts +1 -0
  194. package/dist/types/models/mongo/EasCollectionChunkMongo.d.ts +16 -0
  195. package/dist/types/models/mongo/EasCollectionStateMongo.d.ts +27 -0
  196. package/dist/types/models/sql/DeviceSyncStateSQL.d.ts +1 -0
  197. package/dist/types/models/sql/EasCollectionChunkSQL.d.ts +16 -0
  198. package/dist/types/models/sql/EasCollectionStateSQL.d.ts +27 -0
  199. package/dist/types/mongo.d.ts +2 -0
  200. package/dist/types/sql.d.ts +2 -0
  201. package/package.json +267 -238
package/package.json CHANGED
@@ -1,238 +1,267 @@
1
- {
2
- "name": "@rapidmx/activesync-plugin",
3
- "version": "1.0.0-beta.2",
4
- "description": "RapixMX plugin that provides Exchange ActiveSync (EAS) protocol support.",
5
- "repository": "https://github.com/RapidMX/activesync.git",
6
- "author": "RapidREST <rapidrests@gmail.com>",
7
- "license": "MPL-2.0",
8
- "contributors": [
9
- "Jean-Philippe Steinmetz"
10
- ],
11
- "scripts": {
12
- "build": "yarn lint && rimraf dist && tsc",
13
- "lint": "eslint ./src ./test",
14
- "local-audit": "yarn install && yarn npm audit -A -R \"$@\"",
15
- "checkup": "yarn dlx @yarnpkg/doctor \"$@\"",
16
- "dependency-check": "yarn dlx depcheck \"$@\"",
17
- "report-coverage": "cat ./coverage/lcov.info | coveralls",
18
- "test": "vitest run",
19
- "test:prod": "npm run lint && vitest run --coverage",
20
- "test:watch": "vitest",
21
- "release": "npx @rapidrest/cli release",
22
- "prepublish": "yarn build"
23
- },
24
- "peerDependencies": {
25
- "@rapidmx/restapi": "0.x",
26
- "@rapidrest/core": "5.x",
27
- "@rapidrest/service-core": "2.x"
28
- },
29
- "dependencies": {
30
- "mailparser": "^3.9.23"
31
- },
32
- "devDependencies": {
33
- "@rapidmx/restapi": "^0.9.0",
34
- "@rapidrest/core": "^5.2.2",
35
- "@rapidrest/service-core": "^2.0.0",
36
- "@swc/core": "^1.16.2",
37
- "@types/mailparser": "^3.4.6",
38
- "@types/nconf": "^0.10.7",
39
- "@types/node": "^26.5.0",
40
- "@typescript-eslint/eslint-plugin": "^8.70.0",
41
- "@typescript-eslint/parser": "^8.70.0",
42
- "@vitest/coverage-v8": "^5.0.0",
43
- "better-sqlite3": "^13.0.3",
44
- "eslint": "^10.10.0",
45
- "eslint-config-prettier": "^10.1.8",
46
- "eslint-plugin-import": "^2.32.0",
47
- "eslint-plugin-jsdoc": "^64.3.6",
48
- "globals": "^17.12.0",
49
- "lodash-es": "^4.18.1",
50
- "mongodb": "^7.6.0",
51
- "mongodb-memory-server": "^11.2.0",
52
- "nconf": "^0.13.0",
53
- "openapi3-ts": "^4.6.1",
54
- "prom-client": "^15.1.3",
55
- "redis": "^6.2.1",
56
- "reflect-metadata": "^0.2.2",
57
- "rimraf": "^6.1.3",
58
- "ts-node": "^10.9.2",
59
- "tsx": "^4.23.13",
60
- "typeorm": "^1.1.1",
61
- "typescript": "^6.0.3",
62
- "unplugin-swc": "^1.6.0",
63
- "vite": "^8.2.2",
64
- "vitest": "^5.0.0",
65
- "winston": "^3.19.0"
66
- },
67
- "packageManager": "yarn@4.5.3",
68
- "engines": {
69
- "node": ">=24.0.0"
70
- },
71
- "publishConfig": {
72
- "registry": "https://registry.npmjs.org/"
73
- },
74
- "type": "module",
75
- "main": "dist/lib/index.js",
76
- "exports": {
77
- ".": {
78
- "import": "./dist/lib/index.js",
79
- "types": "./dist/types/index.d.ts"
80
- },
81
- "./mongo": {
82
- "import": "./dist/lib/mongo.js",
83
- "types": "./dist/types/mongo.d.ts"
84
- },
85
- "./sql": {
86
- "import": "./dist/lib/sql.js",
87
- "types": "./dist/types/sql.d.ts"
88
- }
89
- },
90
- "typings": "dist/types/index.d.ts",
91
- "files": [
92
- "dist"
93
- ],
94
- "rapidmx": {
95
- "plugin": {
96
- "apiVersion": 1,
97
- "displayName": "Exchange ActiveSync",
98
- "description": "Lets phones and mail apps sync mail, contacts, calendars and tasks over Exchange ActiveSync (served at /Microsoft-Server-ActiveSync).",
99
- "settings": [
100
- {
101
- "key": "mail:eas:sync_window_size",
102
- "label": "Sync batch size",
103
- "type": "number",
104
- "default": 100,
105
- "min": 1,
106
- "max": 512,
107
- "help": "Most items sent to a device in one Sync response."
108
- },
109
- {
110
- "key": "mail:eas:foldersync_window_size",
111
- "label": "Folder sync batch size",
112
- "type": "number",
113
- "default": 512,
114
- "min": 1,
115
- "max": 5000,
116
- "help": "Most folder changes sent in one FolderSync response."
117
- },
118
- {
119
- "key": "mail:eas:item_estimate_max_count",
120
- "label": "Item estimate limit",
121
- "type": "number",
122
- "default": 512,
123
- "min": 1,
124
- "max": 100000,
125
- "help": "Highest count GetItemEstimate reports for a folder."
126
- },
127
- {
128
- "key": "mail:eas:itemoperations_max_fetch",
129
- "label": "Fetches per request",
130
- "type": "number",
131
- "default": 25,
132
- "min": 1,
133
- "max": 500,
134
- "help": "Most items a device may fetch in one ItemOperations request."
135
- },
136
- {
137
- "key": "mail:eas:itemoperations_batch_size",
138
- "label": "Fetch batch size",
139
- "type": "number",
140
- "default": 500,
141
- "min": 1,
142
- "max": 5000,
143
- "help": "Rows read per database query while fetching."
144
- },
145
- {
146
- "key": "mail:eas:ping_min_heartbeat_seconds",
147
- "label": "Minimum push heartbeat (seconds)",
148
- "type": "number",
149
- "default": 60,
150
- "min": 1,
151
- "max": 3600,
152
- "help": "Shortest Ping interval a device may request."
153
- },
154
- {
155
- "key": "mail:eas:ping_max_heartbeat_seconds",
156
- "label": "Maximum push heartbeat (seconds)",
157
- "type": "number",
158
- "default": 1740,
159
- "min": 60,
160
- "max": 3600,
161
- "help": "Longest Ping interval a device may request."
162
- },
163
- {
164
- "key": "mail:eas:search_default_range",
165
- "label": "Default search results",
166
- "type": "number",
167
- "default": 9,
168
- "min": 0,
169
- "max": 999,
170
- "help": "Last result index returned when a search doesn't ask for a range."
171
- },
172
- {
173
- "key": "mail:eas:search_max_range",
174
- "label": "Maximum search results",
175
- "type": "number",
176
- "default": 99,
177
- "min": 0,
178
- "max": 999,
179
- "help": "Highest result index a search may request."
180
- },
181
- {
182
- "key": "mail:eas:resolve_recipients_max_matches",
183
- "label": "Recipient lookup matches",
184
- "type": "number",
185
- "default": 10,
186
- "min": 1,
187
- "max": 100,
188
- "help": "Most matches returned per name when resolving recipients."
189
- },
190
- {
191
- "key": "mail:eas:provision:password_enabled",
192
- "label": "Require a device passcode",
193
- "type": "boolean",
194
- "default": true,
195
- "help": "Devices must set a passcode before syncing."
196
- },
197
- {
198
- "key": "mail:eas:provision:min_password_length",
199
- "label": "Minimum passcode length",
200
- "type": "number",
201
- "default": 4,
202
- "min": 1,
203
- "max": 16
204
- },
205
- {
206
- "key": "mail:eas:provision:max_failed_attempts",
207
- "label": "Failed unlocks before wipe",
208
- "type": "number",
209
- "default": 8,
210
- "min": 1,
211
- "max": 16
212
- },
213
- {
214
- "key": "mail:eas:provision:require_device_encryption",
215
- "label": "Require device encryption",
216
- "type": "boolean",
217
- "default": true
218
- },
219
- {
220
- "key": "mail:eas:provision:allow_simple_password",
221
- "label": "Allow simple passcodes",
222
- "type": "boolean",
223
- "default": false,
224
- "help": "For example 1111 or 1234."
225
- },
226
- {
227
- "key": "mail:jobs:eas_device_cleanup:device_ttl_days",
228
- "label": "Forget idle devices after (days)",
229
- "type": "number",
230
- "default": 90,
231
- "min": 1,
232
- "max": 3650,
233
- "help": "Device pairings that haven't synced for this long are removed."
234
- }
235
- ]
236
- }
237
- }
238
- }
1
+ {
2
+ "name": "@rapidmx/activesync-plugin",
3
+ "version": "1.0.0-beta.3",
4
+ "description": "RapixMX plugin that provides Exchange ActiveSync (EAS) protocol support.",
5
+ "repository": "https://github.com/RapidMX/activesync.git",
6
+ "author": "RapidREST <rapidrests@gmail.com>",
7
+ "license": "MPL-2.0",
8
+ "contributors": [
9
+ "Jean-Philippe Steinmetz"
10
+ ],
11
+ "scripts": {
12
+ "build": "yarn lint && rimraf dist && tsc",
13
+ "lint": "eslint ./src ./test",
14
+ "local-audit": "yarn install && yarn npm audit -A -R \"$@\"",
15
+ "checkup": "yarn dlx @yarnpkg/doctor \"$@\"",
16
+ "dependency-check": "yarn dlx depcheck \"$@\"",
17
+ "report-coverage": "cat ./coverage/lcov.info | coveralls",
18
+ "test": "vitest run",
19
+ "test:prod": "npm run lint && vitest run --coverage",
20
+ "test:watch": "vitest",
21
+ "release": "npx @rapidrest/cli release",
22
+ "prepublish": "yarn build"
23
+ },
24
+ "peerDependencies": {
25
+ "@rapidmx/restapi": "0.x",
26
+ "@rapidrest/core": "5.x",
27
+ "@rapidrest/service-core": "^2.1.0"
28
+ },
29
+ "dependencies": {
30
+ "mailparser": "^3.9.23",
31
+ "nodemailer": "^10.0.1"
32
+ },
33
+ "devDependencies": {
34
+ "@rapidmx/restapi": "^0.9.0",
35
+ "@rapidrest/core": "^5.2.2",
36
+ "@rapidrest/service-core": "^2.1.0",
37
+ "@swc/core": "^1.16.2",
38
+ "@types/mailparser": "^3.4.6",
39
+ "@types/nconf": "^0.10.7",
40
+ "@types/node": "^26.5.0",
41
+ "@typescript-eslint/eslint-plugin": "^8.70.0",
42
+ "@typescript-eslint/parser": "^8.70.0",
43
+ "@vitest/coverage-v8": "^5.0.0",
44
+ "better-sqlite3": "^13.0.3",
45
+ "eslint": "^10.10.0",
46
+ "eslint-config-prettier": "^10.1.8",
47
+ "eslint-plugin-import": "^2.32.0",
48
+ "eslint-plugin-jsdoc": "^64.3.6",
49
+ "globals": "^17.12.0",
50
+ "lodash-es": "^4.18.1",
51
+ "mongodb": "^7.6.0",
52
+ "mongodb-memory-server": "^11.2.0",
53
+ "nconf": "^0.13.0",
54
+ "openapi3-ts": "^4.6.1",
55
+ "prom-client": "^15.1.3",
56
+ "redis": "^6.2.1",
57
+ "reflect-metadata": "^0.2.2",
58
+ "rimraf": "^6.1.3",
59
+ "ts-node": "^10.9.2",
60
+ "tsx": "^4.23.13",
61
+ "typeorm": "^1.1.1",
62
+ "typescript": "^6.0.3",
63
+ "unplugin-swc": "^1.6.0",
64
+ "vite": "^8.2.2",
65
+ "vitest": "^5.0.0",
66
+ "winston": "^3.19.0"
67
+ },
68
+ "packageManager": "yarn@4.5.3",
69
+ "engines": {
70
+ "node": ">=24.0.0"
71
+ },
72
+ "publishConfig": {
73
+ "registry": "https://registry.npmjs.org/"
74
+ },
75
+ "type": "module",
76
+ "main": "dist/lib/index.js",
77
+ "exports": {
78
+ ".": {
79
+ "import": "./dist/lib/index.js",
80
+ "types": "./dist/types/index.d.ts"
81
+ },
82
+ "./mongo": {
83
+ "import": "./dist/lib/mongo.js",
84
+ "types": "./dist/types/mongo.d.ts"
85
+ },
86
+ "./sql": {
87
+ "import": "./dist/lib/sql.js",
88
+ "types": "./dist/types/sql.d.ts"
89
+ }
90
+ },
91
+ "typings": "dist/types/index.d.ts",
92
+ "files": [
93
+ "dist"
94
+ ],
95
+ "rapidmx": {
96
+ "plugin": {
97
+ "apiVersion": 1,
98
+ "displayName": "Exchange ActiveSync",
99
+ "description": "Lets phones and mail apps sync mail, contacts, calendars and tasks over Exchange ActiveSync (served at /Microsoft-Server-ActiveSync).",
100
+ "mailboxScopedData": true,
101
+ "settings": [
102
+ {
103
+ "key": "mail:eas:sync_window_size",
104
+ "label": "Sync batch size",
105
+ "type": "number",
106
+ "default": 100,
107
+ "min": 1,
108
+ "max": 512,
109
+ "help": "Most items sent to a device in one Sync response."
110
+ },
111
+ {
112
+ "key": "mail:eas:foldersync_window_size",
113
+ "label": "Folder sync batch size",
114
+ "type": "number",
115
+ "default": 512,
116
+ "min": 1,
117
+ "max": 5000,
118
+ "help": "Most folder changes sent in one FolderSync response."
119
+ },
120
+ {
121
+ "key": "mail:eas:item_estimate_max_count",
122
+ "label": "Item estimate limit",
123
+ "type": "number",
124
+ "default": 512,
125
+ "min": 1,
126
+ "max": 100000,
127
+ "help": "Highest count GetItemEstimate reports for a folder."
128
+ },
129
+ {
130
+ "key": "mail:eas:itemoperations_max_fetch",
131
+ "label": "Fetches per request",
132
+ "type": "number",
133
+ "default": 25,
134
+ "min": 1,
135
+ "max": 500,
136
+ "help": "Most items a device may fetch in one ItemOperations request."
137
+ },
138
+ {
139
+ "key": "mail:eas:itemoperations_batch_size",
140
+ "label": "Fetch batch size",
141
+ "type": "number",
142
+ "default": 500,
143
+ "min": 1,
144
+ "max": 5000,
145
+ "help": "Rows read per database query while fetching."
146
+ },
147
+ {
148
+ "key": "mail:eas:itemoperations_max_response_bytes",
149
+ "label": "Fetch response size limit (bytes)",
150
+ "type": "number",
151
+ "default": 67108864,
152
+ "min": 1048576,
153
+ "max": 1073741824,
154
+ "help": "Largest combined size of the bodies and attachments one fetch response embeds."
155
+ },
156
+ {
157
+ "key": "mail:eas:max_request_bytes",
158
+ "label": "Request size limit (bytes)",
159
+ "type": "number",
160
+ "default": 16777216,
161
+ "min": 65536,
162
+ "max": 1073741824,
163
+ "help": "Largest request body a device may send."
164
+ },
165
+ {
166
+ "key": "mail:eas:ping_min_heartbeat_seconds",
167
+ "label": "Minimum push heartbeat (seconds)",
168
+ "type": "number",
169
+ "default": 60,
170
+ "min": 1,
171
+ "max": 3600,
172
+ "help": "Shortest Ping interval a device may request."
173
+ },
174
+ {
175
+ "key": "mail:eas:ping_max_heartbeat_seconds",
176
+ "label": "Maximum push heartbeat (seconds)",
177
+ "type": "number",
178
+ "default": 1740,
179
+ "min": 60,
180
+ "max": 3600,
181
+ "help": "Longest Ping interval a device may request."
182
+ },
183
+ {
184
+ "key": "mail:eas:ping_max_folders",
185
+ "label": "Push folder limit",
186
+ "type": "number",
187
+ "default": 300,
188
+ "min": 1,
189
+ "max": 5000,
190
+ "help": "Most folders one Ping may watch."
191
+ },
192
+ {
193
+ "key": "mail:eas:search_default_range",
194
+ "label": "Default search results",
195
+ "type": "number",
196
+ "default": 9,
197
+ "min": 0,
198
+ "max": 999,
199
+ "help": "Last result index returned when a search doesn't ask for a range."
200
+ },
201
+ {
202
+ "key": "mail:eas:search_max_range",
203
+ "label": "Maximum search results",
204
+ "type": "number",
205
+ "default": 99,
206
+ "min": 0,
207
+ "max": 999,
208
+ "help": "Highest result index a search may request."
209
+ },
210
+ {
211
+ "key": "mail:eas:resolve_recipients_max_matches",
212
+ "label": "Recipient lookup matches",
213
+ "type": "number",
214
+ "default": 10,
215
+ "min": 1,
216
+ "max": 100,
217
+ "help": "Most matches returned per name when resolving recipients."
218
+ },
219
+ {
220
+ "key": "mail:eas:provision:password_enabled",
221
+ "label": "Require a device passcode",
222
+ "type": "boolean",
223
+ "default": true,
224
+ "help": "Devices must set a passcode before syncing."
225
+ },
226
+ {
227
+ "key": "mail:eas:provision:min_password_length",
228
+ "label": "Minimum passcode length",
229
+ "type": "number",
230
+ "default": 4,
231
+ "min": 1,
232
+ "max": 16
233
+ },
234
+ {
235
+ "key": "mail:eas:provision:max_failed_attempts",
236
+ "label": "Failed unlocks before wipe",
237
+ "type": "number",
238
+ "default": 8,
239
+ "min": 1,
240
+ "max": 16
241
+ },
242
+ {
243
+ "key": "mail:eas:provision:require_device_encryption",
244
+ "label": "Require device encryption",
245
+ "type": "boolean",
246
+ "default": true
247
+ },
248
+ {
249
+ "key": "mail:eas:provision:allow_simple_password",
250
+ "label": "Allow simple passcodes",
251
+ "type": "boolean",
252
+ "default": false,
253
+ "help": "For example 1111 or 1234."
254
+ },
255
+ {
256
+ "key": "mail:jobs:eas_device_cleanup:device_ttl_days",
257
+ "label": "Forget idle devices after (days)",
258
+ "type": "number",
259
+ "default": 90,
260
+ "min": 1,
261
+ "max": 3650,
262
+ "help": "Device pairings that haven't synced for this long are removed."
263
+ }
264
+ ]
265
+ }
266
+ }
267
+ }