@digitaldefiance/node-express-suite 4.22.2 → 4.23.0

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 (399) hide show
  1. package/README.md +173 -407
  2. package/package.json +1 -5
  3. package/src/__tests__/fixtures/index.d.ts +1 -1
  4. package/src/__tests__/fixtures/index.d.ts.map +1 -1
  5. package/src/__tests__/fixtures/index.js +1 -2
  6. package/src/__tests__/fixtures/index.js.map +1 -1
  7. package/src/__tests__/helpers/index.d.ts +1 -3
  8. package/src/__tests__/helpers/index.d.ts.map +1 -1
  9. package/src/__tests__/helpers/index.js +1 -4
  10. package/src/__tests__/helpers/index.js.map +1 -1
  11. package/src/__tests__/index.d.ts.map +1 -1
  12. package/src/__tests__/index.js +1 -0
  13. package/src/__tests__/index.js.map +1 -1
  14. package/src/application.d.ts +8 -11
  15. package/src/application.d.ts.map +1 -1
  16. package/src/application.js +8 -17
  17. package/src/application.js.map +1 -1
  18. package/src/branded-responses/branded-api-responses.d.ts +10 -2
  19. package/src/branded-responses/branded-api-responses.d.ts.map +1 -1
  20. package/src/branded-responses/branded-api-responses.js +5 -0
  21. package/src/branded-responses/branded-api-responses.js.map +1 -1
  22. package/src/branded-responses/serializers.d.ts +4 -1
  23. package/src/branded-responses/serializers.d.ts.map +1 -1
  24. package/src/builders/index.d.ts +1 -1
  25. package/src/builders/index.d.ts.map +1 -1
  26. package/src/builders/index.js +1 -2
  27. package/src/builders/index.js.map +1 -1
  28. package/src/controllers/base.d.ts +5 -18
  29. package/src/controllers/base.d.ts.map +1 -1
  30. package/src/controllers/base.js +7 -62
  31. package/src/controllers/base.js.map +1 -1
  32. package/src/controllers/index.d.ts +1 -1
  33. package/src/controllers/index.d.ts.map +1 -1
  34. package/src/controllers/index.js +2 -1
  35. package/src/controllers/index.js.map +1 -1
  36. package/src/controllers/openapi.d.ts +3 -3
  37. package/src/controllers/openapi.d.ts.map +1 -1
  38. package/src/controllers/openapi.js.map +1 -1
  39. package/src/enumerations/index.d.ts +0 -2
  40. package/src/enumerations/index.d.ts.map +1 -1
  41. package/src/enumerations/index.js +0 -2
  42. package/src/enumerations/index.js.map +1 -1
  43. package/src/environment.d.ts +4 -3
  44. package/src/environment.d.ts.map +1 -1
  45. package/src/environment.js +3 -1
  46. package/src/environment.js.map +1 -1
  47. package/src/errors/index.d.ts +0 -3
  48. package/src/errors/index.d.ts.map +1 -1
  49. package/src/errors/index.js +0 -3
  50. package/src/errors/index.js.map +1 -1
  51. package/src/index.d.ts +1 -8
  52. package/src/index.d.ts.map +1 -1
  53. package/src/index.js +1 -11
  54. package/src/index.js.map +1 -1
  55. package/src/interfaces/controller-config.d.ts +1 -2
  56. package/src/interfaces/controller-config.d.ts.map +1 -1
  57. package/src/interfaces/document-store.d.ts +3 -2
  58. package/src/interfaces/document-store.d.ts.map +1 -1
  59. package/src/interfaces/document-store.js +3 -3
  60. package/src/interfaces/document-store.js.map +1 -1
  61. package/src/interfaces/environment.d.ts +3 -2
  62. package/src/interfaces/environment.d.ts.map +1 -1
  63. package/src/interfaces/index.d.ts +0 -11
  64. package/src/interfaces/index.d.ts.map +1 -1
  65. package/src/interfaces/index.js +0 -11
  66. package/src/interfaces/index.js.map +1 -1
  67. package/src/plugins/database-plugin.d.ts +12 -0
  68. package/src/plugins/database-plugin.d.ts.map +1 -1
  69. package/src/plugins/index.d.ts +0 -1
  70. package/src/plugins/index.d.ts.map +1 -1
  71. package/src/plugins/index.js +0 -1
  72. package/src/plugins/index.js.map +1 -1
  73. package/src/routers/index.d.ts +0 -1
  74. package/src/routers/index.d.ts.map +1 -1
  75. package/src/routers/index.js +0 -1
  76. package/src/routers/index.js.map +1 -1
  77. package/src/services/base.d.ts +10 -13
  78. package/src/services/base.d.ts.map +1 -1
  79. package/src/services/base.js +7 -21
  80. package/src/services/base.js.map +1 -1
  81. package/src/services/index.d.ts +0 -15
  82. package/src/services/index.d.ts.map +1 -1
  83. package/src/services/index.js +0 -15
  84. package/src/services/index.js.map +1 -1
  85. package/src/testing.d.ts +1 -1
  86. package/src/testing.d.ts.map +1 -1
  87. package/src/testing.js +1 -1
  88. package/src/testing.js.map +1 -1
  89. package/src/types.d.ts +6 -17
  90. package/src/types.d.ts.map +1 -1
  91. package/src/types.js.map +1 -1
  92. package/src/utils.d.ts +5 -34
  93. package/src/utils.d.ts.map +1 -1
  94. package/src/utils.js +24 -165
  95. package/src/utils.js.map +1 -1
  96. package/src/__tests__/fixtures/model-mocks.mock.d.ts +0 -12
  97. package/src/__tests__/fixtures/model-mocks.mock.d.ts.map +0 -1
  98. package/src/__tests__/fixtures/model-mocks.mock.js +0 -102
  99. package/src/__tests__/fixtures/model-mocks.mock.js.map +0 -1
  100. package/src/__tests__/helpers/application.mock.d.ts +0 -8
  101. package/src/__tests__/helpers/application.mock.d.ts.map +0 -1
  102. package/src/__tests__/helpers/application.mock.js +0 -85
  103. package/src/__tests__/helpers/application.mock.js.map +0 -1
  104. package/src/__tests__/helpers/setup-test-env.d.ts +0 -13
  105. package/src/__tests__/helpers/setup-test-env.d.ts.map +0 -1
  106. package/src/__tests__/helpers/setup-test-env.js +0 -133
  107. package/src/__tests__/helpers/setup-test-env.js.map +0 -1
  108. package/src/builders/application-builder.d.ts +0 -53
  109. package/src/builders/application-builder.d.ts.map +0 -1
  110. package/src/builders/application-builder.js +0 -91
  111. package/src/builders/application-builder.js.map +0 -1
  112. package/src/controllers/user.d.ts +0 -66
  113. package/src/controllers/user.d.ts.map +0 -1
  114. package/src/controllers/user.js +0 -949
  115. package/src/controllers/user.js.map +0 -1
  116. package/src/documents/base.d.ts +0 -15
  117. package/src/documents/base.d.ts.map +0 -1
  118. package/src/documents/base.js +0 -8
  119. package/src/documents/base.js.map +0 -1
  120. package/src/documents/email-token.d.ts +0 -15
  121. package/src/documents/email-token.d.ts.map +0 -1
  122. package/src/documents/email-token.js +0 -8
  123. package/src/documents/email-token.js.map +0 -1
  124. package/src/documents/index.d.ts +0 -8
  125. package/src/documents/index.d.ts.map +0 -1
  126. package/src/documents/index.js +0 -3
  127. package/src/documents/index.js.map +0 -1
  128. package/src/documents/mnemonic.d.ts +0 -16
  129. package/src/documents/mnemonic.d.ts.map +0 -1
  130. package/src/documents/mnemonic.js +0 -8
  131. package/src/documents/mnemonic.js.map +0 -1
  132. package/src/documents/role.d.ts +0 -15
  133. package/src/documents/role.d.ts.map +0 -1
  134. package/src/documents/role.js +0 -8
  135. package/src/documents/role.js.map +0 -1
  136. package/src/documents/used-direct-login-token.d.ts +0 -16
  137. package/src/documents/used-direct-login-token.d.ts.map +0 -1
  138. package/src/documents/used-direct-login-token.js +0 -8
  139. package/src/documents/used-direct-login-token.js.map +0 -1
  140. package/src/documents/user-role.d.ts +0 -16
  141. package/src/documents/user-role.d.ts.map +0 -1
  142. package/src/documents/user-role.js +0 -8
  143. package/src/documents/user-role.js.map +0 -1
  144. package/src/documents/user.d.ts +0 -16
  145. package/src/documents/user.d.ts.map +0 -1
  146. package/src/documents/user.js +0 -8
  147. package/src/documents/user.js.map +0 -1
  148. package/src/enumerations/base-model-name.d.ts +0 -43
  149. package/src/enumerations/base-model-name.d.ts.map +0 -1
  150. package/src/enumerations/base-model-name.js +0 -39
  151. package/src/enumerations/base-model-name.js.map +0 -1
  152. package/src/enumerations/schema-collection.d.ts +0 -39
  153. package/src/enumerations/schema-collection.d.ts.map +0 -1
  154. package/src/enumerations/schema-collection.js +0 -43
  155. package/src/enumerations/schema-collection.js.map +0 -1
  156. package/src/errors/invalid-model.d.ts +0 -18
  157. package/src/errors/invalid-model.d.ts.map +0 -1
  158. package/src/errors/invalid-model.js +0 -26
  159. package/src/errors/invalid-model.js.map +0 -1
  160. package/src/errors/model-not-registered.d.ts +0 -18
  161. package/src/errors/model-not-registered.d.ts.map +0 -1
  162. package/src/errors/model-not-registered.js +0 -26
  163. package/src/errors/model-not-registered.js.map +0 -1
  164. package/src/errors/mongoose-validation.d.ts +0 -28
  165. package/src/errors/mongoose-validation.d.ts.map +0 -1
  166. package/src/errors/mongoose-validation.js +0 -33
  167. package/src/errors/mongoose-validation.js.map +0 -1
  168. package/src/interfaces/api-mongo-validation-error-response.d.ts +0 -16
  169. package/src/interfaces/api-mongo-validation-error-response.d.ts.map +0 -1
  170. package/src/interfaces/api-mongo-validation-error-response.js +0 -8
  171. package/src/interfaces/api-mongo-validation-error-response.js.map +0 -1
  172. package/src/interfaces/database-init-result-tx.d.ts +0 -27
  173. package/src/interfaces/database-init-result-tx.d.ts.map +0 -1
  174. package/src/interfaces/database-init-result-tx.js +0 -3
  175. package/src/interfaces/database-init-result-tx.js.map +0 -1
  176. package/src/interfaces/db-init-result.d.ts +0 -16
  177. package/src/interfaces/db-init-result.d.ts.map +0 -1
  178. package/src/interfaces/db-init-result.js +0 -8
  179. package/src/interfaces/db-init-result.js.map +0 -1
  180. package/src/interfaces/discriminator-collections.d.ts +0 -17
  181. package/src/interfaces/discriminator-collections.d.ts.map +0 -1
  182. package/src/interfaces/discriminator-collections.js +0 -8
  183. package/src/interfaces/discriminator-collections.js.map +0 -1
  184. package/src/interfaces/environment-mongo.d.ts +0 -86
  185. package/src/interfaces/environment-mongo.d.ts.map +0 -1
  186. package/src/interfaces/environment-mongo.js +0 -8
  187. package/src/interfaces/environment-mongo.js.map +0 -1
  188. package/src/interfaces/models/email-token.d.ts +0 -12
  189. package/src/interfaces/models/email-token.d.ts.map +0 -1
  190. package/src/interfaces/models/email-token.js +0 -8
  191. package/src/interfaces/models/email-token.js.map +0 -1
  192. package/src/interfaces/models/index.d.ts +0 -8
  193. package/src/interfaces/models/index.d.ts.map +0 -1
  194. package/src/interfaces/models/index.js +0 -11
  195. package/src/interfaces/models/index.js.map +0 -1
  196. package/src/interfaces/models/mnemonic.d.ts +0 -13
  197. package/src/interfaces/models/mnemonic.d.ts.map +0 -1
  198. package/src/interfaces/models/mnemonic.js +0 -8
  199. package/src/interfaces/models/mnemonic.js.map +0 -1
  200. package/src/interfaces/models/role.d.ts +0 -12
  201. package/src/interfaces/models/role.d.ts.map +0 -1
  202. package/src/interfaces/models/role.js +0 -8
  203. package/src/interfaces/models/role.js.map +0 -1
  204. package/src/interfaces/models/token-role.d.ts +0 -19
  205. package/src/interfaces/models/token-role.d.ts.map +0 -1
  206. package/src/interfaces/models/token-role.js +0 -8
  207. package/src/interfaces/models/token-role.js.map +0 -1
  208. package/src/interfaces/models/used-direct-login-token.d.ts +0 -19
  209. package/src/interfaces/models/used-direct-login-token.d.ts.map +0 -1
  210. package/src/interfaces/models/used-direct-login-token.js +0 -8
  211. package/src/interfaces/models/used-direct-login-token.js.map +0 -1
  212. package/src/interfaces/models/user-role.d.ts +0 -19
  213. package/src/interfaces/models/user-role.d.ts.map +0 -1
  214. package/src/interfaces/models/user-role.js +0 -8
  215. package/src/interfaces/models/user-role.js.map +0 -1
  216. package/src/interfaces/models/user.d.ts +0 -21
  217. package/src/interfaces/models/user.d.ts.map +0 -1
  218. package/src/interfaces/models/user.js +0 -8
  219. package/src/interfaces/models/user.js.map +0 -1
  220. package/src/interfaces/mongo-application.d.ts +0 -35
  221. package/src/interfaces/mongo-application.d.ts.map +0 -1
  222. package/src/interfaces/mongo-application.js +0 -10
  223. package/src/interfaces/mongo-application.js.map +0 -1
  224. package/src/interfaces/mongo-errors.d.ts +0 -13
  225. package/src/interfaces/mongo-errors.d.ts.map +0 -1
  226. package/src/interfaces/mongo-errors.js +0 -8
  227. package/src/interfaces/mongo-errors.js.map +0 -1
  228. package/src/interfaces/mongoose-document-store.d.ts +0 -42
  229. package/src/interfaces/mongoose-document-store.d.ts.map +0 -1
  230. package/src/interfaces/mongoose-document-store.js +0 -10
  231. package/src/interfaces/mongoose-document-store.js.map +0 -1
  232. package/src/interfaces/schema.d.ts +0 -37
  233. package/src/interfaces/schema.d.ts.map +0 -1
  234. package/src/interfaces/schema.js +0 -8
  235. package/src/interfaces/schema.js.map +0 -1
  236. package/src/interfaces/server-init-result.d.ts +0 -45
  237. package/src/interfaces/server-init-result.d.ts.map +0 -1
  238. package/src/interfaces/server-init-result.js +0 -8
  239. package/src/interfaces/server-init-result.js.map +0 -1
  240. package/src/interfaces/test-environment.d.ts +0 -22
  241. package/src/interfaces/test-environment.d.ts.map +0 -1
  242. package/src/interfaces/test-environment.js +0 -8
  243. package/src/interfaces/test-environment.js.map +0 -1
  244. package/src/model-registry.d.ts +0 -79
  245. package/src/model-registry.d.ts.map +0 -1
  246. package/src/model-registry.js +0 -97
  247. package/src/model-registry.js.map +0 -1
  248. package/src/models/email-token.d.ts +0 -24
  249. package/src/models/email-token.d.ts.map +0 -1
  250. package/src/models/email-token.js +0 -16
  251. package/src/models/email-token.js.map +0 -1
  252. package/src/models/index.d.ts +0 -7
  253. package/src/models/index.d.ts.map +0 -1
  254. package/src/models/index.js +0 -10
  255. package/src/models/index.js.map +0 -1
  256. package/src/models/mnemonic.d.ts +0 -24
  257. package/src/models/mnemonic.d.ts.map +0 -1
  258. package/src/models/mnemonic.js +0 -27
  259. package/src/models/mnemonic.js.map +0 -1
  260. package/src/models/role.d.ts +0 -24
  261. package/src/models/role.d.ts.map +0 -1
  262. package/src/models/role.js +0 -27
  263. package/src/models/role.js.map +0 -1
  264. package/src/models/used-direct-login-token.d.ts +0 -24
  265. package/src/models/used-direct-login-token.d.ts.map +0 -1
  266. package/src/models/used-direct-login-token.js +0 -16
  267. package/src/models/used-direct-login-token.js.map +0 -1
  268. package/src/models/user-role.d.ts +0 -23
  269. package/src/models/user-role.d.ts.map +0 -1
  270. package/src/models/user-role.js +0 -26
  271. package/src/models/user-role.js.map +0 -1
  272. package/src/models/user.d.ts +0 -24
  273. package/src/models/user.d.ts.map +0 -1
  274. package/src/models/user.js +0 -27
  275. package/src/models/user.js.map +0 -1
  276. package/src/mongo-application-concrete.d.ts +0 -32
  277. package/src/mongo-application-concrete.d.ts.map +0 -1
  278. package/src/mongo-application-concrete.js +0 -49
  279. package/src/mongo-application-concrete.js.map +0 -1
  280. package/src/plugins/mongo-database-plugin.d.ts +0 -115
  281. package/src/plugins/mongo-database-plugin.d.ts.map +0 -1
  282. package/src/plugins/mongo-database-plugin.js +0 -234
  283. package/src/plugins/mongo-database-plugin.js.map +0 -1
  284. package/src/routers/api.d.ts +0 -60
  285. package/src/routers/api.d.ts.map +0 -1
  286. package/src/routers/api.js +0 -116
  287. package/src/routers/api.js.map +0 -1
  288. package/src/schemas/email-token.d.ts +0 -65
  289. package/src/schemas/email-token.d.ts.map +0 -1
  290. package/src/schemas/email-token.js +0 -68
  291. package/src/schemas/email-token.js.map +0 -1
  292. package/src/schemas/index.d.ts +0 -8
  293. package/src/schemas/index.d.ts.map +0 -1
  294. package/src/schemas/index.js +0 -11
  295. package/src/schemas/index.js.map +0 -1
  296. package/src/schemas/mnemonic.d.ts +0 -37
  297. package/src/schemas/mnemonic.d.ts.map +0 -1
  298. package/src/schemas/mnemonic.js +0 -41
  299. package/src/schemas/mnemonic.js.map +0 -1
  300. package/src/schemas/role.d.ts +0 -57
  301. package/src/schemas/role.d.ts.map +0 -1
  302. package/src/schemas/role.js +0 -102
  303. package/src/schemas/role.js.map +0 -1
  304. package/src/schemas/schema.d.ts +0 -62
  305. package/src/schemas/schema.d.ts.map +0 -1
  306. package/src/schemas/schema.js +0 -81
  307. package/src/schemas/schema.js.map +0 -1
  308. package/src/schemas/used-direct-login-token.d.ts +0 -49
  309. package/src/schemas/used-direct-login-token.d.ts.map +0 -1
  310. package/src/schemas/used-direct-login-token.js +0 -35
  311. package/src/schemas/used-direct-login-token.js.map +0 -1
  312. package/src/schemas/user-role.d.ts +0 -52
  313. package/src/schemas/user-role.d.ts.map +0 -1
  314. package/src/schemas/user-role.js +0 -67
  315. package/src/schemas/user-role.js.map +0 -1
  316. package/src/schemas/user.d.ts +0 -43
  317. package/src/schemas/user.d.ts.map +0 -1
  318. package/src/schemas/user.js +0 -214
  319. package/src/schemas/user.js.map +0 -1
  320. package/src/services/backup-code.d.ts +0 -120
  321. package/src/services/backup-code.d.ts.map +0 -1
  322. package/src/services/backup-code.js +0 -323
  323. package/src/services/backup-code.js.map +0 -1
  324. package/src/services/database-initialization.d.ts +0 -138
  325. package/src/services/database-initialization.d.ts.map +0 -1
  326. package/src/services/database-initialization.js +0 -913
  327. package/src/services/database-initialization.js.map +0 -1
  328. package/src/services/db-init-cache.d.ts +0 -18
  329. package/src/services/db-init-cache.d.ts.map +0 -1
  330. package/src/services/db-init-cache.js +0 -7
  331. package/src/services/db-init-cache.js.map +0 -1
  332. package/src/services/direct-login-token.d.ts +0 -28
  333. package/src/services/direct-login-token.d.ts.map +0 -1
  334. package/src/services/direct-login-token.js +0 -62
  335. package/src/services/direct-login-token.js.map +0 -1
  336. package/src/services/jwt.d.ts +0 -45
  337. package/src/services/jwt.d.ts.map +0 -1
  338. package/src/services/jwt.js +0 -105
  339. package/src/services/jwt.js.map +0 -1
  340. package/src/services/mnemonic.d.ts +0 -68
  341. package/src/services/mnemonic.d.ts.map +0 -1
  342. package/src/services/mnemonic.js +0 -120
  343. package/src/services/mnemonic.js.map +0 -1
  344. package/src/services/mongo-authentication-provider.d.ts +0 -27
  345. package/src/services/mongo-authentication-provider.d.ts.map +0 -1
  346. package/src/services/mongo-authentication-provider.js +0 -84
  347. package/src/services/mongo-authentication-provider.js.map +0 -1
  348. package/src/services/mongo-backup-code-store.d.ts +0 -40
  349. package/src/services/mongo-backup-code-store.d.ts.map +0 -1
  350. package/src/services/mongo-backup-code-store.js +0 -104
  351. package/src/services/mongo-backup-code-store.js.map +0 -1
  352. package/src/services/mongo-base.d.ts +0 -24
  353. package/src/services/mongo-base.d.ts.map +0 -1
  354. package/src/services/mongo-base.js +0 -28
  355. package/src/services/mongo-base.js.map +0 -1
  356. package/src/services/mongoose-collection.d.ts +0 -52
  357. package/src/services/mongoose-collection.d.ts.map +0 -1
  358. package/src/services/mongoose-collection.js +0 -326
  359. package/src/services/mongoose-collection.js.map +0 -1
  360. package/src/services/mongoose-database.d.ts +0 -64
  361. package/src/services/mongoose-database.d.ts.map +0 -1
  362. package/src/services/mongoose-database.js +0 -121
  363. package/src/services/mongoose-database.js.map +0 -1
  364. package/src/services/mongoose-document-store.d.ts +0 -109
  365. package/src/services/mongoose-document-store.d.ts.map +0 -1
  366. package/src/services/mongoose-document-store.js +0 -264
  367. package/src/services/mongoose-document-store.js.map +0 -1
  368. package/src/services/mongoose-session-adapter.d.ts +0 -39
  369. package/src/services/mongoose-session-adapter.d.ts.map +0 -1
  370. package/src/services/mongoose-session-adapter.js +0 -63
  371. package/src/services/mongoose-session-adapter.js.map +0 -1
  372. package/src/services/request-user.d.ts +0 -45
  373. package/src/services/request-user.d.ts.map +0 -1
  374. package/src/services/request-user.js +0 -90
  375. package/src/services/request-user.js.map +0 -1
  376. package/src/services/role.d.ts +0 -97
  377. package/src/services/role.d.ts.map +0 -1
  378. package/src/services/role.js +0 -289
  379. package/src/services/role.js.map +0 -1
  380. package/src/services/user.d.ts +0 -368
  381. package/src/services/user.d.ts.map +0 -1
  382. package/src/services/user.js +0 -1495
  383. package/src/services/user.js.map +0 -1
  384. package/src/transactions/index.d.ts +0 -2
  385. package/src/transactions/index.d.ts.map +0 -1
  386. package/src/transactions/index.js +0 -5
  387. package/src/transactions/index.js.map +0 -1
  388. package/src/transactions/transaction-manager.d.ts +0 -37
  389. package/src/transactions/transaction-manager.d.ts.map +0 -1
  390. package/src/transactions/transaction-manager.js +0 -50
  391. package/src/transactions/transaction-manager.js.map +0 -1
  392. package/src/types/mongoose-helpers.d.ts +0 -16
  393. package/src/types/mongoose-helpers.d.ts.map +0 -1
  394. package/src/types/mongoose-helpers.js +0 -8
  395. package/src/types/mongoose-helpers.js.map +0 -1
  396. package/src/utils/default-mongo-uri-validator.d.ts +0 -15
  397. package/src/utils/default-mongo-uri-validator.d.ts.map +0 -1
  398. package/src/utils/default-mongo-uri-validator.js +0 -46
  399. package/src/utils/default-mongo-uri-validator.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/models/user.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,MAAM,IAAI,SAAS,CAC7D,MAAM,EACN,IAAI,EACJ,SAAS,EACT,aAAa,CACd,CAAC;AACF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CACtB,SAAS,SAAS,MAAM,EACxB,GAAG,SAAS,UAAU,GAAG,MAAM,IAC7B,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview User model interfaces for frontend and backend.
4
- * Defines type aliases for user documents with platform-specific IDs.
5
- * @module interfaces/models/user
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/models/user.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,35 +0,0 @@
1
- /**
2
- * @fileoverview Mongoose/MongoDB-specific application interface.
3
- * Extends the base IApplication with MongoDB-specific capabilities.
4
- * Use this interface in controllers, services, and middlewares that require
5
- * direct access to the Mongoose connection or MongoDB configuration.
6
- * @module interfaces/mongo-application
7
- */
8
- import mongoose from '@digitaldefiance/mongoose-types';
9
- import type { Model } from '@digitaldefiance/mongoose-types';
10
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
11
- import type { BaseDocument } from '../documents';
12
- import type { IApplication } from './application';
13
- /**
14
- * MongoDB/Mongoose-specific application interface.
15
- * Extends IApplication with the Mongoose connection and MongoDB configuration.
16
- *
17
- * Use this interface when your code needs:
18
- * - `application.db` (the Mongoose connection)
19
- * - `application.environment.mongo` (MongoDB config with a guaranteed URI)
20
- * - `application.getModel<T>(name)` (Mongoose model lookup)
21
- *
22
- * Non-Mongo applications (e.g. BrightChainDb) should use the base IApplication.
23
- */
24
- export interface IMongoApplication<TID extends PlatformID = Buffer> extends IApplication<TID> {
25
- /** Mongoose database connection. */
26
- get db(): typeof mongoose;
27
- /**
28
- * Gets a Mongoose model by name.
29
- * @template U Document type extending BaseDocument
30
- * @param modelName Name of the model to retrieve
31
- * @returns Mongoose model instance
32
- */
33
- getModel<U extends BaseDocument<any, TID>>(modelName: string): Model<U>;
34
- }
35
- //# sourceMappingURL=mongo-application.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo-application.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongo-application.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB,CAChC,GAAG,SAAS,UAAU,GAAG,MAAM,CAC/B,SAAQ,YAAY,CAAC,GAAG,CAAC;IACzB,oCAAoC;IACpC,IAAI,EAAE,IAAI,OAAO,QAAQ,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CACzE"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Mongoose/MongoDB-specific application interface.
4
- * Extends the base IApplication with MongoDB-specific capabilities.
5
- * Use this interface in controllers, services, and middlewares that require
6
- * direct access to the Mongoose connection or MongoDB configuration.
7
- * @module interfaces/mongo-application
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- //# sourceMappingURL=mongo-application.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo-application.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongo-application.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @fileoverview MongoDB validation errors interface.
3
- * Defines structure for Mongoose validation error collections.
4
- * @module interfaces/mongo-errors
5
- */
6
- import { Error } from '@digitaldefiance/mongoose-types';
7
- /**
8
- * Collection of MongoDB validation errors.
9
- */
10
- export interface IMongoErrors {
11
- [key: string]: Error.ValidatorError | Error.CastError;
12
- }
13
- //# sourceMappingURL=mongo-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo-errors.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongo-errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;CACvD"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview MongoDB validation errors interface.
4
- * Defines structure for Mongoose validation error collections.
5
- * @module interfaces/mongo-errors
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=mongo-errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo-errors.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongo-errors.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,42 +0,0 @@
1
- /**
2
- * @fileoverview Mongoose-specific interface for document store operations.
3
- * This interface depends on Mongoose types (Model, MongoMemoryReplSet).
4
- * Non-Mongoose database plugins should implement IDatabasePlugin directly
5
- * without depending on this interface.
6
- * @module interfaces/mongoose-document-store
7
- */
8
- import { Model } from '@digitaldefiance/mongoose-types';
9
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
10
- import { MongoMemoryReplSet } from 'mongodb-memory-server';
11
- import { BaseDocument } from '../documents/base';
12
- import { ISchema } from './schema';
13
- import { IApplication } from './application';
14
- /**
15
- * Mongoose-specific interface for document store operations.
16
- * This interface depends on Mongoose types (Model, MongoMemoryReplSet).
17
- * Non-Mongoose database plugins should implement IDatabasePlugin directly
18
- * without depending on this interface.
19
- * @template TID - Platform-specific ID type extending PlatformID
20
- * @template TModelDocs - Record mapping model names to their document types
21
- */
22
- export interface IDocumentStore<TID extends PlatformID = Buffer, TModelDocs extends Record<string, BaseDocument<any, TID>> = Record<string, BaseDocument<any, TID>>> {
23
- /** Connect to the backing store. URI may be ignored by non-network stores. */
24
- connect(uri?: string): Promise<void>;
25
- /** Disconnect from the backing store. */
26
- disconnect(): Promise<void>;
27
- /** Whether the store is currently connected and ready for operations. */
28
- isConnected(): boolean;
29
- /** Retrieve a Mongoose model by name. */
30
- getModel<T extends BaseDocument<any, TID>>(modelName: string): Model<T>;
31
- /** The schema map, if available (populated after connect). */
32
- readonly schemaMap?: {
33
- [K in keyof TModelDocs]: ISchema<TID, TModelDocs[K]>;
34
- };
35
- /** The dev database instance (MongoMemoryReplSet), if any (for cleanup on stop). */
36
- readonly devDatabase?: MongoMemoryReplSet;
37
- /** Optional: provision a dev/test database, returning its connection URI. */
38
- setupDevStore?(): Promise<string | void>;
39
- /** Optional: seed the dev database with initial data. */
40
- initializeDevStore?<TInitResults>(app: IApplication<TID>): Promise<TInitResults>;
41
- }
42
- //# sourceMappingURL=mongoose-document-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongoose-document-store.d.ts","sourceRoot":"","s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C,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEzC,yDAAyD;IACzD,kBAAkB,CAAC,CAAC,YAAY,EAC9B,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,GACrB,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1B"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Mongoose-specific interface for document store operations.
4
- * This interface depends on Mongoose types (Model, MongoMemoryReplSet).
5
- * Non-Mongoose database plugins should implement IDatabasePlugin directly
6
- * without depending on this interface.
7
- * @module interfaces/mongoose-document-store
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- //# sourceMappingURL=mongoose-document-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongoose-document-store.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongoose-document-store.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -1,37 +0,0 @@
1
- /**
2
- * @fileoverview Schema interface for Mongoose model registration.
3
- * Defines structure for schema map entries with models and discriminators.
4
- * @module interfaces/schema
5
- */
6
- import { Model, Schema } from '@digitaldefiance/mongoose-types';
7
- import { BaseDocument } from '../documents/base';
8
- import { IDiscriminatorCollections } from '../interfaces/discriminator-collections';
9
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
10
- /**
11
- * Interface for each schema in the schema map.
12
- * Combines Mongoose schema, model, and collection metadata with optional discriminators.
13
- * @template T - Document type extending BaseDocument
14
- */
15
- export interface ISchema<TID extends PlatformID, T extends BaseDocument<any, TID>> {
16
- /**
17
- * The name of the collection, eg 'models'
18
- */
19
- collection: string;
20
- /**
21
- * The model for the schema
22
- */
23
- model: Model<T>;
24
- /**
25
- * The name of the model, eg 'Model'
26
- */
27
- modelName: string;
28
- /**
29
- * The schema for the model
30
- */
31
- schema: Schema;
32
- /**
33
- * Discriminators for the model
34
- */
35
- discriminators?: IDiscriminatorCollections<TID, T>;
36
- }
37
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE;;;;GAIG;AAEH,MAAM,WAAW,OAAO,CACtB,GAAG,SAAS,UAAU,EACtB,CAAC,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC;IAEhC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IAEH,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,yBAAyB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;CACpD"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Schema interface for Mongoose model registration.
4
- * Defines structure for schema map entries with models and discriminators.
5
- * @module interfaces/schema
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/schema.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,45 +0,0 @@
1
- /**
2
- * @fileoverview Server initialization result interface.
3
- * Defines structure for test server initialization with admin, member, and system users.
4
- * @module interfaces/server-init-result
5
- */
6
- import { Member, PlatformID } from '@digitaldefiance/node-ecies-lib';
7
- import { RoleDocument } from '../documents/role';
8
- import { UserDocument } from '../documents/user';
9
- import { UserRoleDocument } from '../documents/user-role';
10
- export type { RoleDocument, UserDocument, UserRoleDocument };
11
- /**
12
- * Result of server initialization for testing.
13
- * Contains admin, member, and system user accounts with credentials and roles.
14
- * @template TID - Platform ID type (defaults to Buffer)
15
- */
16
- export interface IServerInitResult<TID extends PlatformID = Buffer> {
17
- adminRole: RoleDocument<TID>;
18
- adminUser: UserDocument<string, TID>;
19
- adminUsername: string;
20
- adminEmail: string;
21
- adminMnemonic: string;
22
- adminPassword: string;
23
- adminBackupCodes: Array<string>;
24
- adminMember: Member<TID>;
25
- adminUserRole: UserRoleDocument<TID>;
26
- memberRole: RoleDocument<TID>;
27
- memberUser: UserDocument<string, TID>;
28
- memberUsername: string;
29
- memberEmail: string;
30
- memberMnemonic: string;
31
- memberPassword: string;
32
- memberBackupCodes: Array<string>;
33
- memberMember: Member<TID>;
34
- memberUserRole: UserRoleDocument<TID>;
35
- systemRole: RoleDocument<TID>;
36
- systemUser: UserDocument<string, TID>;
37
- systemUsername: string;
38
- systemEmail: string;
39
- systemMnemonic: string;
40
- systemPassword: string;
41
- systemBackupCodes: Array<string>;
42
- systemMember: Member<TID>;
43
- systemUserRole: UserRoleDocument<TID>;
44
- }
45
- //# sourceMappingURL=server-init-result.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-init-result.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/server-init-result.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,gBA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C;CACvC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Server initialization result interface.
4
- * Defines structure for test server initialization with admin, member, and system users.
5
- * @module interfaces/server-init-result
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=server-init-result.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-init-result.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/server-init-result.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,22 +0,0 @@
1
- /**
2
- * @fileoverview Test environment interface.
3
- * Defines structure for test environment with in-memory MongoDB and initialized accounts.
4
- * @module interfaces/test-environment
5
- */
6
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
7
- import { MongoMemoryReplSet } from 'mongodb-memory-server';
8
- import { IApplication } from './application';
9
- import { IServerInitResult } from './server-init-result';
10
- /**
11
- * Test environment configuration.
12
- * Contains application instance, in-memory MongoDB, and test account data.
13
- * @template TID - Platform ID type (defaults to Buffer)
14
- */
15
- export interface ITestEnvironment<TID extends PlatformID = Buffer> {
16
- application: IApplication<TID>;
17
- mongoServer: MongoMemoryReplSet;
18
- mongoUri: string;
19
- accountData: IServerInitResult<TID>;
20
- dbName: string;
21
- }
22
- //# sourceMappingURL=test-environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-environment.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/test-environment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM;IAC/D,WAAW,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Test environment interface.
4
- * Defines structure for test environment with in-memory MongoDB and initialized accounts.
5
- * @module interfaces/test-environment
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- //# sourceMappingURL=test-environment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-environment.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/test-environment.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -1,79 +0,0 @@
1
- /**
2
- * @fileoverview Model registry for dynamic Mongoose model management.
3
- * Singleton registry for registering and retrieving Mongoose models.
4
- * @module model-registry
5
- */
6
- import { Model, Document as MongooseDocument, Schema } from '@digitaldefiance/mongoose-types';
7
- import { BaseDocument } from './documents/base';
8
- import { PlatformID } from '@digitaldefiance/node-ecies-lib';
9
- /**
10
- * Model registration information.
11
- * @template T - Document Data type
12
- * @template U - Document type extending BaseDocument
13
- */
14
- export type ModelRegistration<TID extends PlatformID, T, U extends BaseDocument<T, TID>> = {
15
- modelName: string;
16
- schema: Schema;
17
- model: Model<U>;
18
- collection: string;
19
- discriminators?: unknown;
20
- };
21
- /**
22
- * Singleton registry for Mongoose models.
23
- * Manages model registration and retrieval across the application.
24
- */
25
- declare class ModelRegistry<TID extends PlatformID> {
26
- protected static _instance: ModelRegistry<PlatformID>;
27
- protected _models: Map<string, ModelRegistration<TID, any, BaseDocument<any, TID>>>;
28
- private constructor();
29
- /**
30
- * Gets the singleton instance of ModelRegistry.
31
- * @returns {ModelRegistry} The singleton instance
32
- */
33
- static get instance(): ModelRegistry<PlatformID>;
34
- /**
35
- * Registers a model with the registry.
36
- * @template T - Document ID type
37
- * @template U - Document type extending BaseDocument
38
- * @param {ModelRegistration<T, U>} registration - Model registration information
39
- */
40
- register<T, U extends BaseDocument<T, TID>>(registration: ModelRegistration<TID, T, U>): void;
41
- /**
42
- * Retrieves a model registration by name.
43
- * @template T - Document ID type
44
- * @template U - Document type extending BaseDocument
45
- * @param {string} modelName - Name of the model
46
- * @returns {ModelRegistration<T, U>} Model registration
47
- * @throws {InvalidModelError} If model is not registered
48
- */
49
- get<T, U extends BaseDocument<T, TID>>(modelName: string): ModelRegistration<TID, T, U>;
50
- /**
51
- * Retrieves a typed Mongoose model by name.
52
- * @template TDoc - Mongoose document type
53
- * @param {string} modelName - Name of the model
54
- * @returns {Model<TDoc>} Mongoose model
55
- * @throws {InvalidModelError} If model is not registered
56
- */
57
- getTypedModel<TDoc extends MongooseDocument>(modelName: string): Model<TDoc>;
58
- /**
59
- * Retrieves a typed Mongoose schema by name.
60
- * @template TDoc - Mongoose document type
61
- * @param {string} modelName - Name of the model
62
- * @returns {Schema<TDoc>} Mongoose schema
63
- * @throws {InvalidModelError} If model is not registered
64
- */
65
- getTypedSchema<TDoc extends MongooseDocument>(modelName: string): Schema<TDoc>;
66
- /**
67
- * Checks if a model is registered.
68
- * @param {string} modelName - Name of the model
69
- * @returns {boolean} True if model exists
70
- */
71
- has(modelName: string): boolean;
72
- /**
73
- * Lists all registered model names.
74
- * @returns {string[]} Array of model names
75
- */
76
- list(): string[];
77
- }
78
- export { ModelRegistry };
79
- //# sourceMappingURL=model-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/model-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,EACL,QAAQ,IAAI,gBAAgB,EAC5B,MAAM,EACP,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE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OAMG;IACI,cAAc,CAAC,IAAI,SAAS,gBAAgB,EACjD,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,IAAI,CAAC;IAQf;;;;OAIG;IACI,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAItC;;;OAGG;IACI,IAAI,IAAI,MAAM,EAAE;CAGxB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Model registry for dynamic Mongoose model management.
4
- * Singleton registry for registering and retrieving Mongoose models.
5
- * @module model-registry
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ModelRegistry = void 0;
9
- const errors_1 = require("./errors");
10
- /**
11
- * Singleton registry for Mongoose models.
12
- * Manages model registration and retrieval across the application.
13
- */
14
- class ModelRegistry {
15
- static _instance;
16
- _models = new Map();
17
- constructor() { }
18
- /**
19
- * Gets the singleton instance of ModelRegistry.
20
- * @returns {ModelRegistry} The singleton instance
21
- */
22
- static get instance() {
23
- if (!ModelRegistry._instance) {
24
- ModelRegistry._instance = new ModelRegistry();
25
- }
26
- return ModelRegistry._instance;
27
- }
28
- /**
29
- * Registers a model with the registry.
30
- * @template T - Document ID type
31
- * @template U - Document type extending BaseDocument
32
- * @param {ModelRegistration<T, U>} registration - Model registration information
33
- */
34
- register(registration) {
35
- this._models.set(registration.modelName, registration);
36
- }
37
- /**
38
- * Retrieves a model registration by name.
39
- * @template T - Document ID type
40
- * @template U - Document type extending BaseDocument
41
- * @param {string} modelName - Name of the model
42
- * @returns {ModelRegistration<T, U>} Model registration
43
- * @throws {InvalidModelError} If model is not registered
44
- */
45
- get(modelName) {
46
- const result = this._models.get(modelName);
47
- if (result === undefined) {
48
- throw new errors_1.InvalidModelError(modelName);
49
- }
50
- return result;
51
- }
52
- /**
53
- * Retrieves a typed Mongoose model by name.
54
- * @template TDoc - Mongoose document type
55
- * @param {string} modelName - Name of the model
56
- * @returns {Model<TDoc>} Mongoose model
57
- * @throws {InvalidModelError} If model is not registered
58
- */
59
- getTypedModel(modelName) {
60
- const result = this._models.get(modelName);
61
- if (result === undefined) {
62
- throw new errors_1.InvalidModelError(modelName);
63
- }
64
- return result.model;
65
- }
66
- /**
67
- * Retrieves a typed Mongoose schema by name.
68
- * @template TDoc - Mongoose document type
69
- * @param {string} modelName - Name of the model
70
- * @returns {Schema<TDoc>} Mongoose schema
71
- * @throws {InvalidModelError} If model is not registered
72
- */
73
- getTypedSchema(modelName) {
74
- const result = this._models.get(modelName);
75
- if (result === undefined) {
76
- throw new errors_1.InvalidModelError(modelName);
77
- }
78
- return result.schema;
79
- }
80
- /**
81
- * Checks if a model is registered.
82
- * @param {string} modelName - Name of the model
83
- * @returns {boolean} True if model exists
84
- */
85
- has(modelName) {
86
- return this._models.has(modelName);
87
- }
88
- /**
89
- * Lists all registered model names.
90
- * @returns {string[]} Array of model names
91
- */
92
- list() {
93
- return Array.from(this._models.keys());
94
- }
95
- }
96
- exports.ModelRegistry = ModelRegistry;
97
- //# sourceMappingURL=model-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model-registry.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/model-registry.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAQH,qCAA6C;AAoB7C;;;GAGG;AACH,MAAM,aAAa;IACP,MAAM,CAAC,SAAS,CAA4B;IAC5C,OAAO,GAGb,IAAI,GAAG,EAAE,CAAC;IAEd,gBAAuB,CAAC;IAExB;;;OAGG;IACI,MAAM,KAAK,QAAQ;QACxB,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;YAC7B,aAAa,CAAC,SAAS,GAAG,IAAI,aAAa,EAAE,CAAC;QAChD,CAAC;QACD,OAAO,aAAa,CAAC,SAAS,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,QAAQ,CACb,YAA0C;QAE1C,IAAI,CAAC,OAAO,CAAC,GAAG,CACd,YAAY,CAAC,SAAS,EACtB,YAA4C,CAC7C,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,GAAG,CACR,SAAiB;QAEjB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAiC,CAAC;QAC3E,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,0BAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,SAAiB;QAEjB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,0BAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC,KAAoB,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CACnB,SAAiB;QAEjB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,0BAAiB,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC,MAAsB,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,SAAiB;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IAED;;;OAGG;IACI,IAAI;QACT,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;CACF;AAEQ,sCAAa"}
@@ -1,24 +0,0 @@
1
- /**
2
- * @fileoverview Email token model factory for MongoDB.
3
- * Creates Mongoose model for email verification and password reset tokens.
4
- * @module models/email-token
5
- */
6
- import { Connection, Model, Schema } from '@digitaldefiance/mongoose-types';
7
- import { EmailTokenDocument } from '../documents/email-token';
8
- import { BaseModelName } from '../enumerations';
9
- import { SchemaCollection } from '../enumerations/schema-collection';
10
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
11
- /**
12
- * Creates a Mongoose model for email token documents.
13
- * @template TModelName - Model name type (defaults to BaseModelName)
14
- * @template TCollection - Collection name type (defaults to SchemaCollection)
15
- * @template TID - Platform ID type (defaults to Buffer)
16
- * @param {Connection} connection - Mongoose connection instance
17
- * @param {TModelName} [modelName] - Model name (defaults to 'EmailToken')
18
- * @param {TCollection} [collection] - Collection name (defaults to 'emailTokens')
19
- * @param {Schema} [schema] - Mongoose schema (defaults to EmailTokenSchema)
20
- * @returns {Model<EmailTokenDocument<TID>>} Configured Mongoose model
21
- */
22
- export declare function EmailTokenModel<TModelName extends string = BaseModelName, TCollection extends string = SchemaCollection, TID extends PlatformID = Buffer>(connection: Connection, modelName?: TModelName, collection?: TCollection, schema?: Schema): Model<EmailTokenDocument<TID>>;
23
- export default EmailTokenModel;
24
- //# sourceMappingURL=email-token.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-token.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/models/email-token.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,UAAU,SAAS,MAAM,GAAG,aAAa,EACzC,WAAW,SAAS,MAAM,GAAG,gBAAgB,EAC7C,GAAG,SAAS,UAAU,GAAG,MAAM,EAE/B,UAAU,EAAE,UAAU,EACtB,SAAS,CAAC,EAAE,UAAU,EACtB,UAAU,CAAC,EAAE,WAAW,EACxB,MAAM,CAAC,EAAE,MAAM,GACd,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AAelC,eAAe,eAAe,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- /**
3
- * @fileoverview Email token model factory for MongoDB.
4
- * Creates Mongoose model for email verification and password reset tokens.
5
- * @module models/email-token
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.EmailTokenModel = EmailTokenModel;
9
- const enumerations_1 = require("../enumerations");
10
- const schema_collection_1 = require("../enumerations/schema-collection");
11
- const email_token_1 = require("../schemas/email-token");
12
- function EmailTokenModel(connection, modelName = enumerations_1.BaseModelName.EmailToken, collection = schema_collection_1.SchemaCollection.EmailToken, schema = email_token_1.EmailTokenSchema) {
13
- return connection.model(modelName, schema, collection);
14
- }
15
- exports.default = EmailTokenModel;
16
- //# sourceMappingURL=email-token.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email-token.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/models/email-token.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA+BH,0CAWC;AAtCD,kDAAgD;AAChD,yEAAqE;AACrE,wDAA0D;AAyB1D,SAAgB,eAAe,CAC7B,UAAsB,EACtB,YAAoB,4BAAa,CAAC,UAAU,EAC5C,aAAqB,oCAAgB,CAAC,UAAU,EAChD,SAAiB,8BAAgB;IAEjC,OAAO,UAAU,CAAC,KAAK,CACrB,SAAS,EACT,MAAM,EACN,UAAU,CACX,CAAC;AACJ,CAAC;AAED,kBAAe,eAAe,CAAC"}
@@ -1,7 +0,0 @@
1
- export * from './email-token';
2
- export * from './mnemonic';
3
- export * from './role';
4
- export * from './used-direct-login-token';
5
- export * from './user';
6
- export * from './user-role';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./email-token"), exports);
5
- tslib_1.__exportStar(require("./mnemonic"), exports);
6
- tslib_1.__exportStar(require("./role"), exports);
7
- tslib_1.__exportStar(require("./used-direct-login-token"), exports);
8
- tslib_1.__exportStar(require("./user"), exports);
9
- tslib_1.__exportStar(require("./user-role"), exports);
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/models/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,qDAA2B;AAC3B,iDAAuB;AACvB,oEAA0C;AAC1C,iDAAuB;AACvB,sDAA4B"}
@@ -1,24 +0,0 @@
1
- /**
2
- * @fileoverview Mnemonic model factory for MongoDB.
3
- * Creates Mongoose model for mnemonic hash storage.
4
- * @module models/mnemonic
5
- */
6
- import { Connection, Model, Schema } from '@digitaldefiance/mongoose-types';
7
- import { MnemonicDocument } from '../documents/mnemonic';
8
- import { BaseModelName } from '../enumerations';
9
- import { SchemaCollection } from '../enumerations/schema-collection';
10
- import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
11
- /**
12
- * Creates a Mongoose model for mnemonic documents.
13
- * @template TModelName - Model name type (defaults to BaseModelName)
14
- * @template TCollection - Collection name type (defaults to SchemaCollection)
15
- * @template TID - Platform ID type (defaults to Buffer)
16
- * @param {Connection} connection - Mongoose connection instance
17
- * @param {TModelName} modelName - Model name (defaults to 'Mnemonic')
18
- * @param {TCollection} collection - Collection name (defaults to 'mnemonics')
19
- * @param {Schema} schema - Mongoose schema (defaults to MnemonicSchema)
20
- * @returns {Model<MnemonicDocument<TID>>} Configured Mongoose model
21
- */
22
- export declare function MnemonicModel<TModelName extends string = BaseModelName, TCollection extends string = SchemaCollection, TID extends PlatformID = Buffer>(connection: Connection, modelName?: TModelName, collection?: TCollection, schema?: Schema): Model<MnemonicDocument<TID>>;
23
- export default MnemonicModel;
24
- //# sourceMappingURL=mnemonic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mnemonic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/models/mnemonic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,UAAU,SAAS,MAAM,GAAG,aAAa,EACzC,WAAW,SAAS,MAAM,GAAG,gBAAgB,EAC7C,GAAG,SAAS,UAAU,GAAG,MAAM,EAE/B,UAAU,EAAE,UAAU,EACtB,SAAS,GAAE,UAAiD,EAC5D,UAAU,GAAE,WAAsD,EAClE,MAAM,GAAE,MAAuB,GAC9B,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAE9B;AAED,eAAe,aAAa,CAAC"}