@dereekb/firebase-server 12.7.0 → 13.0.1

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 (343) hide show
  1. package/LICENSE +1 -1
  2. package/index.cjs.default.js +1 -0
  3. package/index.cjs.js +2859 -0
  4. package/index.cjs.mjs +2 -0
  5. package/index.esm.js +2699 -0
  6. package/mailgun/index.cjs.default.js +1 -0
  7. package/mailgun/{src/lib/auth.mailgun.js → index.cjs.js} +6 -6
  8. package/mailgun/index.cjs.mjs +2 -0
  9. package/mailgun/index.esm.js +39 -0
  10. package/mailgun/package.json +20 -5
  11. package/model/index.cjs.default.js +1 -0
  12. package/model/index.cjs.js +4767 -0
  13. package/model/index.cjs.mjs +2 -0
  14. package/model/index.d.ts +1 -0
  15. package/model/index.esm.js +4630 -0
  16. package/model/package.json +28 -4
  17. package/model/src/lib/notification/notification.module.d.ts +10 -10
  18. package/model/src/lib/storagefile/storagefile.task.service.handler.d.ts +3 -14
  19. package/package.json +49 -47
  20. package/src/lib/auth/auth.context.d.ts +1 -1
  21. package/src/lib/auth/auth.service.d.ts +1 -1
  22. package/src/lib/function/assert.d.ts +2 -2
  23. package/src/lib/function/context.d.ts +1 -1
  24. package/src/lib/function/error.d.ts +0 -8
  25. package/src/lib/index.d.ts +1 -0
  26. package/src/lib/nest/app.d.ts +1 -1
  27. package/src/lib/nest/development/development.app.function.d.ts +1 -2
  28. package/src/lib/nest/function/call.d.ts +1 -1
  29. package/src/lib/nest/function/context.d.ts +0 -4
  30. package/src/lib/nest/function/index.d.ts +0 -1
  31. package/src/lib/nest/function/nest.d.ts +1 -1
  32. package/src/lib/nest/function/v2/blocking.d.ts +3 -2
  33. package/src/lib/nest/model/crud.assert.function.d.ts +0 -4
  34. package/src/lib/storage/storage.d.ts +1 -1
  35. package/src/lib/type.d.ts +9 -0
  36. package/test/index.cjs.default.js +1 -0
  37. package/test/index.cjs.js +1258 -0
  38. package/test/index.cjs.mjs +2 -0
  39. package/test/index.d.ts +1 -0
  40. package/test/index.esm.js +1181 -0
  41. package/test/package.json +31 -4
  42. package/test/src/lib/firebase/firebase.admin.auth.d.ts +22 -13
  43. package/test/src/lib/firebase/firebase.admin.collection.d.ts +6 -6
  44. package/test/src/lib/firebase/firebase.admin.d.ts +10 -10
  45. package/test/src/lib/firebase/firebase.admin.function.d.ts +9 -9
  46. package/test/src/lib/firebase/firebase.admin.nest.d.ts +8 -8
  47. package/test/src/lib/firebase/firebase.admin.nest.function.d.ts +9 -9
  48. package/test/src/lib/firebase/firebase.test.d.ts +30 -0
  49. package/test/src/lib/firebase/index.d.ts +1 -1
  50. package/test/src/lib/firestore/firestore.admin.d.ts +3 -3
  51. package/test/src/lib/firestore/firestore.d.ts +2 -2
  52. package/test/src/lib/storage/storage.admin.d.ts +3 -3
  53. package/test/src/lib/storage/storage.d.ts +2 -2
  54. package/zoho/LICENSE +1 -1
  55. package/zoho/index.cjs.default.js +1 -0
  56. package/zoho/index.cjs.js +82 -85
  57. package/zoho/index.cjs.mjs +2 -0
  58. package/zoho/index.d.ts +1 -0
  59. package/zoho/index.esm.js +84 -87
  60. package/zoho/package.json +15 -15
  61. package/CHANGELOG.md +0 -2237
  62. package/mailgun/src/index.js +0 -5
  63. package/mailgun/src/index.js.map +0 -1
  64. package/mailgun/src/lib/auth.mailgun.js.map +0 -1
  65. package/mailgun/src/lib/index.js +0 -5
  66. package/mailgun/src/lib/index.js.map +0 -1
  67. package/model/src/index.js +0 -5
  68. package/model/src/index.js.map +0 -1
  69. package/model/src/lib/index.js +0 -7
  70. package/model/src/lib/index.js.map +0 -1
  71. package/model/src/lib/mailgun/index.js +0 -5
  72. package/model/src/lib/mailgun/index.js.map +0 -1
  73. package/model/src/lib/mailgun/notification.send.service.mailgun.js +0 -68
  74. package/model/src/lib/mailgun/notification.send.service.mailgun.js.map +0 -1
  75. package/model/src/lib/notification/index.js +0 -20
  76. package/model/src/lib/notification/index.js.map +0 -1
  77. package/model/src/lib/notification/notification.action.init.service.js +0 -230
  78. package/model/src/lib/notification/notification.action.init.service.js.map +0 -1
  79. package/model/src/lib/notification/notification.action.service.js +0 -1487
  80. package/model/src/lib/notification/notification.action.service.js.map +0 -1
  81. package/model/src/lib/notification/notification.config.js +0 -13
  82. package/model/src/lib/notification/notification.config.js.map +0 -1
  83. package/model/src/lib/notification/notification.config.service.js +0 -60
  84. package/model/src/lib/notification/notification.config.service.js.map +0 -1
  85. package/model/src/lib/notification/notification.create.run.js +0 -59
  86. package/model/src/lib/notification/notification.create.run.js.map +0 -1
  87. package/model/src/lib/notification/notification.error.js +0 -87
  88. package/model/src/lib/notification/notification.error.js.map +0 -1
  89. package/model/src/lib/notification/notification.expedite.service.js +0 -112
  90. package/model/src/lib/notification/notification.expedite.service.js.map +0 -1
  91. package/model/src/lib/notification/notification.module.js +0 -106
  92. package/model/src/lib/notification/notification.module.js.map +0 -1
  93. package/model/src/lib/notification/notification.send.js +0 -3
  94. package/model/src/lib/notification/notification.send.js.map +0 -1
  95. package/model/src/lib/notification/notification.send.service.js +0 -10
  96. package/model/src/lib/notification/notification.send.service.js.map +0 -1
  97. package/model/src/lib/notification/notification.send.service.notificationsummary.js +0 -104
  98. package/model/src/lib/notification/notification.send.service.notificationsummary.js.map +0 -1
  99. package/model/src/lib/notification/notification.send.service.text.js +0 -29
  100. package/model/src/lib/notification/notification.send.service.text.js.map +0 -1
  101. package/model/src/lib/notification/notification.task.service.handler.js +0 -65
  102. package/model/src/lib/notification/notification.task.service.handler.js.map +0 -1
  103. package/model/src/lib/notification/notification.task.service.js +0 -10
  104. package/model/src/lib/notification/notification.task.service.js.map +0 -1
  105. package/model/src/lib/notification/notification.task.service.util.js +0 -27
  106. package/model/src/lib/notification/notification.task.service.util.js.map +0 -1
  107. package/model/src/lib/notification/notification.task.subtask.handler.js +0 -256
  108. package/model/src/lib/notification/notification.task.subtask.handler.js.map +0 -1
  109. package/model/src/lib/notification/notification.util.js +0 -478
  110. package/model/src/lib/notification/notification.util.js.map +0 -1
  111. package/model/src/lib/storagefile/index.js +0 -12
  112. package/model/src/lib/storagefile/index.js.map +0 -1
  113. package/model/src/lib/storagefile/storagefile.action.init.service.js +0 -155
  114. package/model/src/lib/storagefile/storagefile.action.init.service.js.map +0 -1
  115. package/model/src/lib/storagefile/storagefile.action.server.js +0 -797
  116. package/model/src/lib/storagefile/storagefile.action.server.js.map +0 -1
  117. package/model/src/lib/storagefile/storagefile.error.js +0 -106
  118. package/model/src/lib/storagefile/storagefile.error.js.map +0 -1
  119. package/model/src/lib/storagefile/storagefile.module.js +0 -64
  120. package/model/src/lib/storagefile/storagefile.module.js.map +0 -1
  121. package/model/src/lib/storagefile/storagefile.task.service.handler.js +0 -287
  122. package/model/src/lib/storagefile/storagefile.task.service.handler.js.map +0 -1
  123. package/model/src/lib/storagefile/storagefile.upload.service.initializer.js +0 -180
  124. package/model/src/lib/storagefile/storagefile.upload.service.initializer.js.map +0 -1
  125. package/model/src/lib/storagefile/storagefile.upload.service.js +0 -10
  126. package/model/src/lib/storagefile/storagefile.upload.service.js.map +0 -1
  127. package/model/src/lib/storagefile/storagefile.util.js +0 -54
  128. package/model/src/lib/storagefile/storagefile.util.js.map +0 -1
  129. package/src/index.js +0 -5
  130. package/src/index.js.map +0 -1
  131. package/src/lib/auth/auth.context.js +0 -13
  132. package/src/lib/auth/auth.context.js.map +0 -1
  133. package/src/lib/auth/auth.service.error.js +0 -34
  134. package/src/lib/auth/auth.service.error.js.map +0 -1
  135. package/src/lib/auth/auth.service.js +0 -427
  136. package/src/lib/auth/auth.service.js.map +0 -1
  137. package/src/lib/auth/auth.util.js +0 -23
  138. package/src/lib/auth/auth.util.js.map +0 -1
  139. package/src/lib/auth/index.js +0 -8
  140. package/src/lib/auth/index.js.map +0 -1
  141. package/src/lib/env/env.service.js +0 -7
  142. package/src/lib/env/env.service.js.map +0 -1
  143. package/src/lib/env/index.js +0 -5
  144. package/src/lib/env/index.js.map +0 -1
  145. package/src/lib/firestore/array.js +0 -34
  146. package/src/lib/firestore/array.js.map +0 -1
  147. package/src/lib/firestore/driver.accessor.batch.js +0 -93
  148. package/src/lib/firestore/driver.accessor.batch.js.map +0 -1
  149. package/src/lib/firestore/driver.accessor.default.js +0 -62
  150. package/src/lib/firestore/driver.accessor.default.js.map +0 -1
  151. package/src/lib/firestore/driver.accessor.js +0 -50
  152. package/src/lib/firestore/driver.accessor.js.map +0 -1
  153. package/src/lib/firestore/driver.accessor.transaction.js +0 -96
  154. package/src/lib/firestore/driver.accessor.transaction.js.map +0 -1
  155. package/src/lib/firestore/driver.js +0 -14
  156. package/src/lib/firestore/driver.js.map +0 -1
  157. package/src/lib/firestore/driver.query.js +0 -55
  158. package/src/lib/firestore/driver.query.js.map +0 -1
  159. package/src/lib/firestore/firestore.js +0 -10
  160. package/src/lib/firestore/firestore.js.map +0 -1
  161. package/src/lib/firestore/increment.js +0 -17
  162. package/src/lib/firestore/increment.js.map +0 -1
  163. package/src/lib/firestore/index.js +0 -9
  164. package/src/lib/firestore/index.js.map +0 -1
  165. package/src/lib/function/assert.js +0 -68
  166. package/src/lib/function/assert.js.map +0 -1
  167. package/src/lib/function/context.js +0 -14
  168. package/src/lib/function/context.js.map +0 -1
  169. package/src/lib/function/error.auth.js +0 -25
  170. package/src/lib/function/error.auth.js.map +0 -1
  171. package/src/lib/function/error.js +0 -221
  172. package/src/lib/function/error.js.map +0 -1
  173. package/src/lib/function/index.js +0 -9
  174. package/src/lib/function/index.js.map +0 -1
  175. package/src/lib/function/type.js +0 -3
  176. package/src/lib/function/type.js.map +0 -1
  177. package/src/lib/index.js +0 -11
  178. package/src/lib/index.js.map +0 -1
  179. package/src/lib/nest/app.js +0 -114
  180. package/src/lib/nest/app.js.map +0 -1
  181. package/src/lib/nest/auth/auth.module.js +0 -60
  182. package/src/lib/nest/auth/auth.module.js.map +0 -1
  183. package/src/lib/nest/auth/auth.util.js +0 -72
  184. package/src/lib/nest/auth/auth.util.js.map +0 -1
  185. package/src/lib/nest/auth/index.js +0 -6
  186. package/src/lib/nest/auth/index.js.map +0 -1
  187. package/src/lib/nest/development/development.app.function.js +0 -38
  188. package/src/lib/nest/development/development.app.function.js.map +0 -1
  189. package/src/lib/nest/development/development.assert.function.js +0 -3
  190. package/src/lib/nest/development/development.assert.function.js.map +0 -1
  191. package/src/lib/nest/development/development.function.js +0 -41
  192. package/src/lib/nest/development/development.function.js.map +0 -1
  193. package/src/lib/nest/development/development.schedule.function.error.js +0 -35
  194. package/src/lib/nest/development/development.schedule.function.error.js.map +0 -1
  195. package/src/lib/nest/development/development.schedule.function.js +0 -54
  196. package/src/lib/nest/development/development.schedule.function.js.map +0 -1
  197. package/src/lib/nest/development/index.js +0 -9
  198. package/src/lib/nest/development/index.js.map +0 -1
  199. package/src/lib/nest/env/env.service.js +0 -19
  200. package/src/lib/nest/env/env.service.js.map +0 -1
  201. package/src/lib/nest/env/env.util.js +0 -12
  202. package/src/lib/nest/env/env.util.js.map +0 -1
  203. package/src/lib/nest/env/index.js +0 -6
  204. package/src/lib/nest/env/index.js.map +0 -1
  205. package/src/lib/nest/firebase/firebase.module.js +0 -17
  206. package/src/lib/nest/firebase/firebase.module.js.map +0 -1
  207. package/src/lib/nest/firebase/index.js +0 -5
  208. package/src/lib/nest/firebase/index.js.map +0 -1
  209. package/src/lib/nest/firestore/firestore.module.js +0 -86
  210. package/src/lib/nest/firestore/firestore.module.js.map +0 -1
  211. package/src/lib/nest/firestore/index.js +0 -5
  212. package/src/lib/nest/firestore/index.js.map +0 -1
  213. package/src/lib/nest/function/call.js +0 -46
  214. package/src/lib/nest/function/call.js.map +0 -1
  215. package/src/lib/nest/function/context.js +0 -79
  216. package/src/lib/nest/function/context.js.map +0 -1
  217. package/src/lib/nest/function/index.js +0 -10
  218. package/src/lib/nest/function/index.js.map +0 -1
  219. package/src/lib/nest/function/nest.js +0 -17
  220. package/src/lib/nest/function/nest.js.map +0 -1
  221. package/src/lib/nest/function/schedule.js +0 -8
  222. package/src/lib/nest/function/schedule.js.map +0 -1
  223. package/src/lib/nest/function/v1/call.d.ts +0 -59
  224. package/src/lib/nest/function/v1/call.js +0 -55
  225. package/src/lib/nest/function/v1/call.js.map +0 -1
  226. package/src/lib/nest/function/v1/event.d.ts +0 -80
  227. package/src/lib/nest/function/v1/event.js +0 -52
  228. package/src/lib/nest/function/v1/event.js.map +0 -1
  229. package/src/lib/nest/function/v1/index.d.ts +0 -3
  230. package/src/lib/nest/function/v1/index.js +0 -7
  231. package/src/lib/nest/function/v1/index.js.map +0 -1
  232. package/src/lib/nest/function/v1/schedule.d.ts +0 -47
  233. package/src/lib/nest/function/v1/schedule.js +0 -68
  234. package/src/lib/nest/function/v1/schedule.js.map +0 -1
  235. package/src/lib/nest/function/v2/blocking.js +0 -38
  236. package/src/lib/nest/function/v2/blocking.js.map +0 -1
  237. package/src/lib/nest/function/v2/call.js +0 -31
  238. package/src/lib/nest/function/v2/call.js.map +0 -1
  239. package/src/lib/nest/function/v2/event.js +0 -25
  240. package/src/lib/nest/function/v2/event.js.map +0 -1
  241. package/src/lib/nest/function/v2/index.js +0 -9
  242. package/src/lib/nest/function/v2/index.js.map +0 -1
  243. package/src/lib/nest/function/v2/schedule.js +0 -56
  244. package/src/lib/nest/function/v2/schedule.js.map +0 -1
  245. package/src/lib/nest/function/v2/taskqueue.js +0 -26
  246. package/src/lib/nest/function/v2/taskqueue.js.map +0 -1
  247. package/src/lib/nest/index.js +0 -15
  248. package/src/lib/nest/index.js.map +0 -1
  249. package/src/lib/nest/middleware/appcheck.decorator.js +0 -12
  250. package/src/lib/nest/middleware/appcheck.decorator.js.map +0 -1
  251. package/src/lib/nest/middleware/appcheck.js +0 -3
  252. package/src/lib/nest/middleware/appcheck.js.map +0 -1
  253. package/src/lib/nest/middleware/appcheck.middleware.js +0 -74
  254. package/src/lib/nest/middleware/appcheck.middleware.js.map +0 -1
  255. package/src/lib/nest/middleware/appcheck.module.js +0 -21
  256. package/src/lib/nest/middleware/appcheck.module.js.map +0 -1
  257. package/src/lib/nest/middleware/globalprefix.js +0 -11
  258. package/src/lib/nest/middleware/globalprefix.js.map +0 -1
  259. package/src/lib/nest/middleware/index.js +0 -10
  260. package/src/lib/nest/middleware/index.js.map +0 -1
  261. package/src/lib/nest/middleware/rawbody.middleware.js +0 -16
  262. package/src/lib/nest/middleware/rawbody.middleware.js.map +0 -1
  263. package/src/lib/nest/middleware/webhook.js +0 -24
  264. package/src/lib/nest/middleware/webhook.js.map +0 -1
  265. package/src/lib/nest/model/call.model.function.js +0 -73
  266. package/src/lib/nest/model/call.model.function.js.map +0 -1
  267. package/src/lib/nest/model/create.model.function.js +0 -27
  268. package/src/lib/nest/model/create.model.function.js.map +0 -1
  269. package/src/lib/nest/model/crud.assert.function.js +0 -3
  270. package/src/lib/nest/model/crud.assert.function.js.map +0 -1
  271. package/src/lib/nest/model/delete.model.function.js +0 -27
  272. package/src/lib/nest/model/delete.model.function.js.map +0 -1
  273. package/src/lib/nest/model/index.js +0 -11
  274. package/src/lib/nest/model/index.js.map +0 -1
  275. package/src/lib/nest/model/permission.error.js +0 -24
  276. package/src/lib/nest/model/permission.error.js.map +0 -1
  277. package/src/lib/nest/model/read.model.function.js +0 -27
  278. package/src/lib/nest/model/read.model.function.js.map +0 -1
  279. package/src/lib/nest/model/specifier.function.js +0 -35
  280. package/src/lib/nest/model/specifier.function.js.map +0 -1
  281. package/src/lib/nest/model/update.model.function.js +0 -27
  282. package/src/lib/nest/model/update.model.function.js.map +0 -1
  283. package/src/lib/nest/nest.provider.js +0 -89
  284. package/src/lib/nest/nest.provider.js.map +0 -1
  285. package/src/lib/nest/storage/index.js +0 -5
  286. package/src/lib/nest/storage/index.js.map +0 -1
  287. package/src/lib/nest/storage/storage.module.js +0 -112
  288. package/src/lib/nest/storage/storage.module.js.map +0 -1
  289. package/src/lib/storage/driver.accessor.js +0 -299
  290. package/src/lib/storage/driver.accessor.js.map +0 -1
  291. package/src/lib/storage/driver.js +0 -12
  292. package/src/lib/storage/driver.js.map +0 -1
  293. package/src/lib/storage/index.js +0 -8
  294. package/src/lib/storage/index.js.map +0 -1
  295. package/src/lib/storage/storage.js +0 -20
  296. package/src/lib/storage/storage.js.map +0 -1
  297. package/src/lib/storage/storage.service.js +0 -26
  298. package/src/lib/storage/storage.service.js.map +0 -1
  299. package/test/src/index.js +0 -5
  300. package/test/src/index.js.map +0 -1
  301. package/test/src/lib/firebase/firebase.admin.auth.js +0 -260
  302. package/test/src/lib/firebase/firebase.admin.auth.js.map +0 -1
  303. package/test/src/lib/firebase/firebase.admin.collection.js +0 -108
  304. package/test/src/lib/firebase/firebase.admin.collection.js.map +0 -1
  305. package/test/src/lib/firebase/firebase.admin.function.js +0 -132
  306. package/test/src/lib/firebase/firebase.admin.function.js.map +0 -1
  307. package/test/src/lib/firebase/firebase.admin.js +0 -174
  308. package/test/src/lib/firebase/firebase.admin.js.map +0 -1
  309. package/test/src/lib/firebase/firebase.admin.nest.function.callable.context.js +0 -42
  310. package/test/src/lib/firebase/firebase.admin.nest.function.callable.context.js.map +0 -1
  311. package/test/src/lib/firebase/firebase.admin.nest.function.cloud.context.js +0 -40
  312. package/test/src/lib/firebase/firebase.admin.nest.function.cloud.context.js.map +0 -1
  313. package/test/src/lib/firebase/firebase.admin.nest.function.js +0 -64
  314. package/test/src/lib/firebase/firebase.admin.nest.function.js.map +0 -1
  315. package/test/src/lib/firebase/firebase.admin.nest.js +0 -107
  316. package/test/src/lib/firebase/firebase.admin.nest.js.map +0 -1
  317. package/test/src/lib/firebase/firebase.admin.test.server.js +0 -37
  318. package/test/src/lib/firebase/firebase.admin.test.server.js.map +0 -1
  319. package/test/src/lib/firebase/firebase.function.js +0 -58
  320. package/test/src/lib/firebase/firebase.function.js.map +0 -1
  321. package/test/src/lib/firebase/firebase.jest.d.ts +0 -21
  322. package/test/src/lib/firebase/firebase.jest.js +0 -45
  323. package/test/src/lib/firebase/firebase.jest.js.map +0 -1
  324. package/test/src/lib/firebase/firebase.js +0 -74
  325. package/test/src/lib/firebase/firebase.js.map +0 -1
  326. package/test/src/lib/firebase/index.js +0 -15
  327. package/test/src/lib/firebase/index.js.map +0 -1
  328. package/test/src/lib/firestore/firestore.admin.js +0 -21
  329. package/test/src/lib/firestore/firestore.admin.js.map +0 -1
  330. package/test/src/lib/firestore/firestore.js +0 -57
  331. package/test/src/lib/firestore/firestore.js.map +0 -1
  332. package/test/src/lib/firestore/index.js +0 -6
  333. package/test/src/lib/firestore/index.js.map +0 -1
  334. package/test/src/lib/index.js +0 -7
  335. package/test/src/lib/index.js.map +0 -1
  336. package/test/src/lib/storage/index.js +0 -6
  337. package/test/src/lib/storage/index.js.map +0 -1
  338. package/test/src/lib/storage/storage.admin.js +0 -21
  339. package/test/src/lib/storage/storage.admin.js.map +0 -1
  340. package/test/src/lib/storage/storage.js +0 -59
  341. package/test/src/lib/storage/storage.js.map +0 -1
  342. /package/{zoho/index.cjs.d.ts → index.d.ts} +0 -0
  343. /package/{zoho/index.esm.d.ts → mailgun/index.d.ts} +0 -0
@@ -1,7 +1,31 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/model",
3
- "version": "12.7.0",
4
- "type": "commonjs",
5
- "types": "./src/index.d.ts",
6
- "main": "./src/index.js"
3
+ "version": "13.0.1",
4
+ "peerDependencies": {
5
+ "@dereekb/date": "13.0.1",
6
+ "@dereekb/firebase": "13.0.1",
7
+ "@dereekb/firebase-server": "13.0.1",
8
+ "@dereekb/model": "13.0.1",
9
+ "@dereekb/nestjs": "13.0.1",
10
+ "@dereekb/rxjs": "13.0.1",
11
+ "@dereekb/util": "13.0.1",
12
+ "@nestjs/common": "^11.0.0",
13
+ "@nestjs/config": "^4.0.0",
14
+ "archiver": "^7.0.0",
15
+ "date-fns": "^4.0.0",
16
+ "firebase-functions": "^7.0.0",
17
+ "make-error": "^1.3.0"
18
+ },
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ ".": {
22
+ "module": "./index.esm.js",
23
+ "types": "./index.d.ts",
24
+ "import": "./index.cjs.mjs",
25
+ "default": "./index.cjs.js"
26
+ }
27
+ },
28
+ "module": "./index.esm.js",
29
+ "main": "./index.cjs.js",
30
+ "types": "./index.d.ts"
7
31
  }
@@ -11,17 +11,17 @@ export declare function notificationServerActionsContextFactory(context: BaseNot
11
11
  notificationSendService: NotificationSendService;
12
12
  notificationTaskService: NotificationTaskService;
13
13
  notificationsExpediteService: NotificationExpediteService;
14
- firebaseServerActionTransformFactory: import("dist/packages/model/src").TransformAndValidateObjectFactory;
15
- firebaseServerActionTransformFunctionFactory: import("dist/packages/model/src").TransformAndValidateFunctionResultFactory;
16
- notificationUserCollection: import("dist/packages/firebase/src").NotificationUserFirestoreCollection;
17
- notificationSummaryCollection: import("dist/packages/firebase/src").NotificationSummaryFirestoreCollection;
18
- notificationBoxCollection: import("dist/packages/firebase/src").NotificationBoxFirestoreCollection;
19
- notificationCollectionFactory: import("dist/packages/firebase/src").NotificationFirestoreCollectionFactory;
20
- notificationCollectionGroup: import("dist/packages/firebase/src").NotificationFirestoreCollectionGroup;
21
- notificationWeekCollectionFactory: import("dist/packages/firebase/src").NotificationWeekFirestoreCollectionFactory;
22
- notificationWeekCollectionGroup: import("dist/packages/firebase/src").NotificationWeekFirestoreCollectionGroup;
14
+ firebaseServerActionTransformFactory: import("@dereekb/model").TransformAndValidateObjectFactory;
15
+ firebaseServerActionTransformFunctionFactory: import("@dereekb/model").TransformAndValidateFunctionResultFactory;
16
+ notificationUserCollection: import("@dereekb/firebase").NotificationUserFirestoreCollection;
17
+ notificationSummaryCollection: import("@dereekb/firebase").NotificationSummaryFirestoreCollection;
18
+ notificationBoxCollection: import("@dereekb/firebase").NotificationBoxFirestoreCollection;
19
+ notificationCollectionFactory: import("@dereekb/firebase").NotificationFirestoreCollectionFactory;
20
+ notificationCollectionGroup: import("@dereekb/firebase").NotificationFirestoreCollectionGroup;
21
+ notificationWeekCollectionFactory: import("@dereekb/firebase").NotificationWeekFirestoreCollectionFactory;
22
+ notificationWeekCollectionGroup: import("@dereekb/firebase").NotificationWeekFirestoreCollectionGroup;
23
23
  authService: import("dist/packages/firebase-server/src").FirebaseServerAuthService<import("dist/packages/firebase-server/src").FirebaseServerAuthUserContext, import("dist/packages/firebase-server/src").FirebaseServerAuthContext<import("dist/packages/firebase-server/src").FirebaseServerAuthUserContext>>;
24
- firestoreContext: import("dist/packages/firebase/src").FirestoreContext<import("dist/packages/firebase/src").Firestore>;
24
+ firestoreContext: import("@dereekb/firebase").FirestoreContext<import("@dereekb/firebase").Firestore>;
25
25
  };
26
26
  export declare function notificationServerActionsFactory(context: NotificationServerActionsContext, mutableNotificationExpediteService: MutableNotificationExpediteService): NotificationServerActions;
27
27
  export declare function notificationInitServerActionsFactory(context: NotificationServerActionsContext, notificationInitServerActionsContextConfig: NotificationInitServerActionsContextConfig): NotificationInitServerActions;
@@ -1,19 +1,13 @@
1
- import { type StorageFileProcessingNotificationTaskData, type StorageFilePurpose, type StorageFileProcessingSubtaskMetadata, type NotificationTaskServiceHandleNotificationTaskResult, type StorageFileProcessingSubtask, type StorageFileDocument, type StorageFile, type DocumentDataWithIdAndKey, StorageFileProcessingState, type StorageFileFirestoreCollections, type StoredFileReader, type FirebaseStorageAccessor, type StorageFileGroupZipStorageFileProcessingSubtask, type StorageFileGroupZipStorageFileProcessingSubtaskMetadata, type StorageFileGroup, type StorageFileGroupEmbeddedFile, type StorageFileDisplayName, type StorageFileGroupDocument, type StorageMetadata, type FirebaseStorageAccessorFile } from '@dereekb/firebase';
1
+ import { type StorageFileProcessingNotificationTaskData, type StorageFileProcessingSubtaskMetadata, type NotificationTaskServiceHandleNotificationTaskResult, type StorageFileProcessingSubtask, type StorageFileDocument, type StorageFile, type DocumentDataWithIdAndKey, StorageFileProcessingState, type StorageFileFirestoreCollections, type StoredFileReader, type FirebaseStorageAccessor, type StorageFileGroupZipStorageFileProcessingSubtask, type StorageFileGroupZipStorageFileProcessingSubtaskMetadata, type StorageFileGroup, type StorageFileGroupEmbeddedFile, type StorageFileDisplayName, type StorageFileGroupDocument, type StorageMetadata, type FirebaseStorageAccessorFile } from '@dereekb/firebase';
2
2
  import { type NotificationTaskServiceTaskHandlerConfig } from '../notification/notification.task.service.handler';
3
3
  import { type PromiseOrValue, type Maybe } from '@dereekb/util';
4
4
  import { type StorageFileQueueForDeleteTime } from './storagefile.util';
5
5
  import { type NotificationTaskSubtaskCleanupInstructions, type NotificationTaskSubtaskFlowEntry, type NotificationTaskSubtaskInput, type NotificationTaskSubtaskNotificationTaskHandlerConfig, type NotificationTaskSubtaskProcessorConfig } from '../notification/notification.task.subtask.handler';
6
- import * as archiver from 'archiver';
6
+ import archiver from 'archiver';
7
7
  /**
8
8
  * Input for a StorageFileProcessingPurposeSubtask.
9
9
  */
10
10
  export interface StorageFileProcessingPurposeSubtaskInput<M extends StorageFileProcessingSubtaskMetadata = any, S extends StorageFileProcessingSubtask = StorageFileProcessingSubtask> extends NotificationTaskSubtaskInput<StorageFileProcessingNotificationTaskData<M, S>, M, S> {
11
- /**
12
- * The retrieved purpose.
13
- *
14
- * @deprecated use target instead.
15
- */
16
- readonly purpose: StorageFilePurpose;
17
11
  /**
18
12
  * The associated StorageFileDocument.
19
13
  */
@@ -72,12 +66,7 @@ export type StorageFileProcessingPurposeSubtaskProcessorConfigWithTarget<M exten
72
66
  *
73
67
  * The flows behave the same way.
74
68
  */
75
- export type StorageFileProcessingPurposeSubtaskProcessorConfig<M extends StorageFileProcessingSubtaskMetadata = any, S extends StorageFileProcessingSubtask = StorageFileProcessingSubtask> = StorageFileProcessingPurposeSubtaskProcessorConfigWithTarget<M, S> | (Omit<NotificationTaskSubtaskProcessorConfig<StorageFileProcessingPurposeSubtaskInput<M, S>, StorageFileProcessingPurposeSubtaskCleanupOutput, StorageFileProcessingNotificationTaskData<M, S>>, 'target'> & {
76
- /**
77
- * @deprecated use target instead.
78
- */
79
- readonly purpose?: Maybe<StorageFilePurpose>;
80
- });
69
+ export type StorageFileProcessingPurposeSubtaskProcessorConfig<M extends StorageFileProcessingSubtaskMetadata = any, S extends StorageFileProcessingSubtask = StorageFileProcessingSubtask> = StorageFileProcessingPurposeSubtaskProcessorConfigWithTarget<M, S>;
81
70
  export interface StorageFileProcessingNotificationTaskHandlerConfig extends Omit<NotificationTaskSubtaskNotificationTaskHandlerConfig<StorageFileProcessingPurposeSubtaskInput, StorageFileProcessingPurposeSubtaskCleanupOutput, StorageFileProcessingNotificationTaskData>, 'processors'> {
82
71
  /**
83
72
  * The input processors.
package/package.json CHANGED
@@ -1,66 +1,68 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server",
3
- "version": "12.7.0",
3
+ "version": "13.0.1",
4
4
  "exports": {
5
- ".": {
6
- "types": "./src/index.d.ts",
7
- "main": "./src/index.js",
8
- "require": "./src/index.js",
9
- "default": "./src/index.js"
10
- },
11
5
  "./test": {
12
- "types": "./test/src/index.d.ts",
13
- "main": "./test/src/index.js",
14
- "require": "./test/src/index.js",
15
- "default": "./test/src/index.js"
6
+ "module": "./test/index.esm.js",
7
+ "types": "./test/index.d.ts",
8
+ "import": "./test/index.cjs.mjs",
9
+ "default": "./test/index.cjs.js"
16
10
  },
17
11
  "./mailgun": {
18
- "types": "./mailgun/src/index.d.ts",
19
- "main": "./mailgun/src/index.js",
20
- "require": "./mailgun/src/index.js",
21
- "default": "./mailgun/src/index.js"
12
+ "module": "./mailgun/index.esm.js",
13
+ "types": "./mailgun/index.d.ts",
14
+ "import": "./mailgun/index.cjs.mjs",
15
+ "default": "./mailgun/index.cjs.js"
22
16
  },
23
17
  "./zoho": {
24
- "types": "./zoho/src/index.d.ts",
25
18
  "module": "./zoho/index.esm.js",
26
- "main": "./zoho/index.cjs.js",
27
- "node": {
28
- "require": "./zoho/index.cjs.js"
29
- },
30
- "browser": {
31
- "require": "./zoho/index.cjs.js",
32
- "import": "./zoho/index.esm.js"
33
- }
19
+ "types": "./zoho/index.d.ts",
20
+ "import": "./zoho/index.cjs.mjs",
21
+ "default": "./zoho/index.cjs.js"
34
22
  },
35
23
  "./model": {
36
- "types": "./model/src/index.d.ts",
37
- "main": "./model/src/index.js",
38
- "require": "./model/src/index.js",
39
- "default": "./model/src/index.js"
24
+ "module": "./model/index.esm.js",
25
+ "types": "./model/index.d.ts",
26
+ "import": "./model/index.cjs.mjs",
27
+ "default": "./model/index.cjs.js"
28
+ },
29
+ "./package.json": "./package.json",
30
+ ".": {
31
+ "module": "./index.esm.js",
32
+ "types": "./index.d.ts",
33
+ "import": "./index.cjs.mjs",
34
+ "default": "./index.cjs.js"
40
35
  }
41
36
  },
42
- "main": "./src/index.js",
37
+ "main": "./index.cjs.js",
43
38
  "types": "./src/index.d.ts",
44
39
  "peerDependencies": {
45
- "@dereekb/firebase": "*",
46
- "@dereekb/util": "*",
47
- "@dereekb/date": "*",
48
- "@dereekb/dbx-core": "*",
49
- "express": "4.21.2",
50
- "@dereekb/nestjs": "*",
51
- "@dereekb/model": "*",
52
- "firebase-functions": "^6.0.0",
40
+ "@dereekb/date": "13.0.1",
41
+ "@dereekb/dbx-core": "13.0.1",
42
+ "@dereekb/firebase": "13.0.1",
43
+ "@dereekb/model": "13.0.1",
44
+ "@dereekb/nestjs": "13.0.1",
45
+ "@dereekb/rxjs": "13.0.1",
46
+ "@dereekb/util": "13.0.1",
47
+ "@dereekb/zoho": "13.0.1",
48
+ "@google-cloud/firestore": "^7.0.0",
49
+ "@google-cloud/storage": "^7.0.0",
50
+ "@nestjs/common": "^11.0.0",
51
+ "@nestjs/config": "^4.0.0",
52
+ "@nestjs/core": "^11.0.0",
53
+ "@nestjs/platform-express": "^11.0.0",
54
+ "@nestjs/testing": "^11.0.0",
55
+ "archiver": "^7.0.0",
56
+ "class-validator": "^0.15.1",
57
+ "date-fns": "^4.0.0",
58
+ "express": "^5.0.0",
53
59
  "firebase-admin": "^13.0.0",
54
- "@nestjs/common": "^10.0.0",
60
+ "firebase-functions": "^7.0.0",
61
+ "firebase-functions-test": "3.4.1",
62
+ "jsonwebtoken": "^9.0.0",
55
63
  "make-error": "^1.3.0",
56
- "@google-cloud/firestore": "^7.0.0",
57
- "rxjs": "^7.4.0",
58
- "@nestjs/core": "^10.0.0",
59
- "@nestjs/platform-express": "^10.0.0",
60
- "class-validator": "^0.14.0",
61
- "ts-essentials": "^9.1.2",
62
- "@google-cloud/storage": "7.16.0"
64
+ "rxjs": "^7.8.0",
65
+ "ts-essentials": "^10.0.0"
63
66
  },
64
- "dependencies": {},
65
- "type": "commonjs"
67
+ "module": "./index.esm.js"
66
68
  }
@@ -1,6 +1,6 @@
1
1
  import { type FirebaseAuthToken } from '@dereekb/firebase';
2
- import { type AuthData } from 'firebase-functions/lib/common/providers/https';
3
2
  import type * as admin from 'firebase-admin';
3
+ import { type AuthData } from '../type';
4
4
  export interface AuthDataRef {
5
5
  readonly auth?: AuthData;
6
6
  }
@@ -3,7 +3,7 @@ import { type FirebaseAuthContextInfo, type FirebaseAuthDetails, type FirebaseAu
3
3
  import { type Milliseconds, type AuthClaims, type AuthRoleSet, type ArrayOrValue, type AuthRole, type AuthClaimsUpdate, type AuthClaimsObject, type Maybe, type EmailAddress, type E164PhoneNumber, type PasswordString } from '@dereekb/util';
4
4
  import { type CallableContextWithAuthData } from '../function/context';
5
5
  import { type AuthDataRef } from './auth.context';
6
- import { type CallableContext } from 'firebase-functions/lib/common/providers/https';
6
+ import { type CallableContext } from '../type';
7
7
  export declare const DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR: import("@dereekb/util").NumberFactory;
8
8
  export interface FirebaseServerAuthUserIdentifierContext {
9
9
  /**
@@ -1,5 +1,5 @@
1
1
  import { type DocumentDataWithIdAndKey, type FirestoreDocument, type FirestoreDocumentData } from '@dereekb/firebase';
2
- import { type CallableContext } from 'firebase-functions/lib/common/providers/https';
2
+ import { type CallableContext } from '../type';
3
3
  export declare function assertContextHasAuth(context: CallableContext): void;
4
4
  /**
5
5
  * Attempts to load data from the document. A modelNotAvailableError is thrown if the snapshot data is null/undefined (the document does not exist).
@@ -32,4 +32,4 @@ export declare function assertDocumentExists<D extends FirestoreDocument<any>>(d
32
32
  * @param message
33
33
  * @returns
34
34
  */
35
- export declare function documentModelNotAvailableError(document: Pick<FirestoreDocument<any>, 'modelType'>, message?: string): import("firebase-functions/lib/common/providers/https").HttpsError;
35
+ export declare function documentModelNotAvailableError(document: Pick<FirestoreDocument<any>, 'modelType'>, message?: string): import("firebase-functions/https").HttpsError;
@@ -1,4 +1,4 @@
1
- import { type CallableContext } from 'firebase-functions/lib/common/providers/https';
1
+ import { type CallableContext } from '../type';
2
2
  export type CallableContextWithAuthData<R extends CallableContext = CallableContext> = Omit<R, 'auth'> & Required<Pick<R, 'auth'>>;
3
3
  export declare function isContextWithAuthData<R extends CallableContext>(context: CallableContext): context is CallableContextWithAuthData<R>;
4
4
  export declare function assertIsContextWithAuthData<R extends CallableContext>(context: CallableContext): asserts context is CallableContextWithAuthData<R>;
@@ -2,15 +2,7 @@ import { type ErrorMessageOrPartialServerError, type ServerError, type StringErr
2
2
  import type * as admin from 'firebase-admin';
3
3
  import { type FirebaseErrorCode } from '@dereekb/firebase';
4
4
  import { HttpsError } from 'firebase-functions/https';
5
- /**
6
- * @deprecated use DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE instead
7
- */
8
- export declare const NO_AUTH_ERROR_CODE = "NO_AUTH";
9
5
  export declare function unauthenticatedContextHasNoAuthData(): HttpsError;
10
- /**
11
- * @deprecated use DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE instead
12
- */
13
- export declare const NO_UID_ERROR_CODE = "NO_AUTH";
14
6
  export declare function unauthenticatedContextHasNoUidError(): HttpsError;
15
7
  export declare const UNAUTHENTICATED_ERROR_CODE = "UNAUTHENTICATED";
16
8
  export declare function unauthenticatedError(messageOrError?: ErrorMessageOrPartialServerError): HttpsError;
@@ -5,3 +5,4 @@ export * from './firestore';
5
5
  export * from './function';
6
6
  export * from './nest';
7
7
  export * from './storage';
8
+ export * from './type';
@@ -1,6 +1,6 @@
1
1
  import { type ClassType, type Getter } from '@dereekb/util';
2
2
  import { type INestApplication, type INestApplicationContext, type NestApplicationOptions, type Provider } from '@nestjs/common';
3
- import * as express from 'express';
3
+ import express from 'express';
4
4
  import type * as admin from 'firebase-admin';
5
5
  import { type StorageBucketId } from '@dereekb/firebase';
6
6
  import { type ServerEnvironmentConfig } from '@dereekb/nestjs';
@@ -2,7 +2,6 @@ import { type OnCallDevelopmentParams, type RUN_DEV_FUNCTION_APP_FUNCTION_KEY }
2
2
  import { type CallableHttpFunction, type RunnableHttpFunction } from '../../function/type';
3
3
  import { type NestAppPromiseGetter } from '../app';
4
4
  import { type NestApplicationScheduleConfiguredFunctionMap } from '../function/schedule';
5
- import { type OnCallWithNestContextFactory } from '../function/v1/call';
6
5
  import { type OnCallHandlerWithNestContextFactory } from '../function/v2/call';
7
6
  import { type AbstractFirebaseNestContext } from '../nest.provider';
8
7
  import { type OnCallDevelopmentFunctionMap } from './development.function';
@@ -14,7 +13,7 @@ export interface FirebaseServerDevFunctionsConfig<N extends AbstractFirebaseNest
14
13
  readonly secure?: boolean;
15
14
  readonly nest: NestAppPromiseGetter;
16
15
  readonly developerFunctionsMap: OnCallDevelopmentFunctionMap<N>;
17
- readonly onCallFactory: OnCallWithNestContextFactory<N> | OnCallHandlerWithNestContextFactory<N>;
16
+ readonly onCallFactory: OnCallHandlerWithNestContextFactory<N>;
18
17
  /**
19
18
  * Whether or not to disable adding the dev schedule function. False by default.
20
19
  */
@@ -1,5 +1,5 @@
1
1
  import { type PromiseOrValue } from '@dereekb/util';
2
- import { type CallableRequest } from 'firebase-functions/lib/common/providers/https';
2
+ import { type CallableRequest } from 'firebase-functions/v2/https';
3
3
  import { type NestApplicationContextRequest, type NestContextCallableRequest, type NestContextCallableRequestWithAuth } from './nest';
4
4
  import { type MakeNestContext } from '../nest.provider';
5
5
  export type OnCallWithNestApplicationRequest<I> = NestApplicationContextRequest<CallableRequest<I>>;
@@ -44,7 +44,3 @@ export interface FirebaseServerActionsTransformFactoryOptions extends Pick<Trans
44
44
  readonly logError?: FirebaseServerActionsTransformFactoryLogErrorFunctionInput;
45
45
  }
46
46
  export declare function firebaseServerActionsTransformFactory(options?: FirebaseServerActionsTransformFactoryOptions): TransformAndValidateObjectFactory;
47
- /**
48
- * @deprecated mispelling. Use FIREBASE_SERVER_VALIDATION_ERROR_CODE instead.
49
- */
50
- export declare const FIRESTBASE_SERVER_VALIDATION_ERROR_CODE = "VALIDATION_ERROR";
@@ -1,4 +1,3 @@
1
- export * from './v1';
2
1
  export * from './v2';
3
2
  export * from './context';
4
3
  export * from './call';
@@ -1,5 +1,5 @@
1
1
  import { type INestApplicationContext } from '@nestjs/common';
2
- import { type CallableRequest } from 'firebase-functions/lib/common/providers/https';
2
+ import { type CallableRequest } from 'firebase-functions/v2/https';
3
3
  import { type CallableContextWithAuthData } from '../../function/context';
4
4
  import { type OnCallWithNestContextRequest } from './call';
5
5
  export type NestApplicationContextRequest<R> = R & {
@@ -1,8 +1,9 @@
1
- import { type Maybe, type PromiseOrValue } from '@dereekb/util';
1
+ import { type MaybeSo, type Maybe, type PromiseOrValue } from '@dereekb/util';
2
2
  import { type MakeNestContext, type NestApplicationFunctionFactory } from '../../nest.provider';
3
3
  import { type NestContextRequest } from '../nest';
4
4
  import { type BlockingFunction } from 'firebase-functions/v1';
5
- import { type BlockingOptions } from 'firebase-functions/identity';
5
+ import { type BlockingOptions, type beforeUserCreated } from 'firebase-functions/identity';
6
+ export type BeforeCreateResponse = MaybeSo<Awaited<ReturnType<Parameters<typeof beforeUserCreated>[1]>>>;
6
7
  export type BlockingFunctionNestContextRequest<N, E extends object> = NestContextRequest<N, E>;
7
8
  export type BlockingFunctionHandler<E extends object, O> = (event: E) => PromiseOrValue<O | void>;
8
9
  export type BlockingFunctionHandlerRef<E extends object, O> = {
@@ -4,10 +4,6 @@ import { type OnCallFunctionType } from '@dereekb/firebase';
4
4
  export type AssertModelCrudRequestFunctionContextCrudType = 'call' | 'create' | 'read' | 'update' | 'delete';
5
5
  export interface AssertModelCrudRequestFunctionContext<N, I = unknown> {
6
6
  readonly request: NestContextCallableRequest<N, I>;
7
- /**
8
- * @deprecated use call instead.
9
- */
10
- readonly crud: AssertModelCrudRequestFunctionContextCrudType;
11
7
  readonly call: OnCallFunctionType;
12
8
  readonly modelType: string;
13
9
  readonly specifier: Maybe<string>;
@@ -1,5 +1,5 @@
1
1
  import { type FirebaseStorageContextFactory } from '@dereekb/firebase';
2
- import { type Storage as FirebaseAdminStorage } from 'firebase-admin/lib/storage/storage';
2
+ import { type Storage as FirebaseAdminStorage } from 'firebase-admin/storage';
3
3
  import { type Storage as GoogleCloudStorage } from '@google-cloud/storage';
4
4
  /**
5
5
  * Creates a FirestoreContextFactory that uses the @google-cloud/storage package.
@@ -0,0 +1,9 @@
1
+ import { type CallableRequest } from 'firebase-functions/v2/https';
2
+ /**
3
+ * CallableRequest auth data.
4
+ */
5
+ export type AuthData = NonNullable<CallableRequest['auth']>;
6
+ /**
7
+ * CallableRequest context data (omits data and stream configs).
8
+ */
9
+ export type CallableContext = Omit<CallableRequest<any>, 'data' | 'acceptsStreaming'>;
@@ -0,0 +1 @@
1
+ exports._default = require('./index.cjs.js').default;