@jeromefitz/notion 6.2.0-canary.1 → 7.0.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 (315) hide show
  1. package/{dist/utils/get-types/_unsupported.mjs → _unsupported-BUIwc9lr.mjs} +2 -2
  2. package/_unsupported-BUIwc9lr.mjs.map +1 -0
  3. package/{dist/utils/add-time/index.mjs → add-time-B_LfV4Ex.mjs} +2 -2
  4. package/add-time-B_LfV4Ex.mjs.map +1 -0
  5. package/checkbox-Cil1erOZ.mjs +2 -0
  6. package/checkbox-Cil1erOZ.mjs.map +1 -0
  7. package/constants/index.d.mts +2 -0
  8. package/constants/index.mjs +1 -0
  9. package/{dist/constants/index.mjs → constants-C2jPji6h.mjs} +2 -2
  10. package/constants-C2jPji6h.mjs.map +1 -0
  11. package/date-IJAT1r3Y.mjs +2 -0
  12. package/date-IJAT1r3Y.mjs.map +1 -0
  13. package/dist-BQciLh9t.mjs +2 -0
  14. package/dist-BQciLh9t.mjs.map +1 -0
  15. package/email-DygPLxSo.mjs +2 -0
  16. package/email-DygPLxSo.mjs.map +1 -0
  17. package/{dist/utils/get-types/files.mjs → files-Dx1jw5iY.mjs} +2 -2
  18. package/files-Dx1jw5iY.mjs.map +1 -0
  19. package/{dist/queries/get-blocks-by-id-children/index.mjs → get-blocks-by-id-children-BRe4p0pZ.mjs} +2 -2
  20. package/get-blocks-by-id-children-BRe4p0pZ.mjs.map +1 -0
  21. package/get-data-type-B5X5VOmp.mjs +2 -0
  22. package/get-data-type-B5X5VOmp.mjs.map +1 -0
  23. package/get-databases-by-id-query-CI9TMkPN.mjs +2 -0
  24. package/get-databases-by-id-query-CI9TMkPN.mjs.map +1 -0
  25. package/{dist/queries/get-deep-fetch-all-children/index.mjs → get-deep-fetch-all-children-DVZ-HFbN.mjs} +2 -2
  26. package/get-deep-fetch-all-children-DVZ-HFbN.mjs.map +1 -0
  27. package/{dist/queries/get-info-type/index.mjs → get-info-type-CUsHqtfs.mjs} +2 -2
  28. package/get-info-type-CUsHqtfs.mjs.map +1 -0
  29. package/get-notion-listing-JJxOipMx.mjs +2 -0
  30. package/get-notion-listing-JJxOipMx.mjs.map +1 -0
  31. package/get-notion-listing-by-date-CSKBdFDQ.mjs +2 -0
  32. package/get-notion-listing-by-date-CSKBdFDQ.mjs.map +1 -0
  33. package/get-notion-slug-BecwpT0b.mjs +2 -0
  34. package/get-notion-slug-BecwpT0b.mjs.map +1 -0
  35. package/get-notion-slug-by-route-Dh428D_m.mjs +2 -0
  36. package/get-notion-slug-by-route-Dh428D_m.mjs.map +1 -0
  37. package/{dist/queries/get-pages-by-id/index.mjs → get-pages-by-id-D_3I7OED.mjs} +2 -2
  38. package/get-pages-by-id-D_3I7OED.mjs.map +1 -0
  39. package/get-path-variables-CnBrxTgg.mjs +2 -0
  40. package/get-path-variables-CnBrxTgg.mjs.map +1 -0
  41. package/get-query-ljtSpKL5.mjs +2 -0
  42. package/get-query-ljtSpKL5.mjs.map +1 -0
  43. package/{dist/utils/get-title/index.mjs → get-title-BWc2Ckhi.mjs} +2 -2
  44. package/get-title-BWc2Ckhi.mjs.map +1 -0
  45. package/get-types-Clb6OmBv.mjs +2 -0
  46. package/{dist/get-types-7QEbhRzY.mjs.map → get-types-Clb6OmBv.mjs.map} +1 -1
  47. package/{dist/constants/index.d.mts → index-BD5kzRhY.d.mts} +3 -3
  48. package/index-BD5kzRhY.d.mts.map +1 -0
  49. package/{dist/utils/get-data-type/index.d.mts → index-BGofpiiB.d.mts} +3 -3
  50. package/index-BGofpiiB.d.mts.map +1 -0
  51. package/{dist/queries/get-notion-listing-by-date/index.d.mts → index-BIttGCzA.d.mts} +2 -2
  52. package/index-BIttGCzA.d.mts.map +1 -0
  53. package/{dist/queries/get-pages-by-id/index.d.mts → index-C-J3ICp0.d.mts} +2 -2
  54. package/index-C-J3ICp0.d.mts.map +1 -0
  55. package/{dist/queries/get-notion-slug-by-route/index.d.mts → index-CLQVoKDp.d.mts} +2 -2
  56. package/index-CLQVoKDp.d.mts.map +1 -0
  57. package/{dist/queries/get-databases-by-id-query/index.d.mts → index-CucnheQT.d.mts} +3 -3
  58. package/index-CucnheQT.d.mts.map +1 -0
  59. package/{dist/queries/get-path-variables/index.d.mts → index-D16uYjWr.d.mts} +3 -3
  60. package/index-D16uYjWr.d.mts.map +1 -0
  61. package/{dist/queries/get-notion-listing/index.d.mts → index-D4Gn1cYC.d.mts} +2 -2
  62. package/index-D4Gn1cYC.d.mts.map +1 -0
  63. package/{dist/utils/data-normalized-results/index.d.mts → index-DMqCumJi.d.mts} +2 -2
  64. package/index-DMqCumJi.d.mts.map +1 -0
  65. package/{dist/utils/get-types/index.d.mts → index-DZSqTeBx.d.mts} +2 -2
  66. package/index-DZSqTeBx.d.mts.map +1 -0
  67. package/{dist/utils/data-normalized/index.d.mts → index-DZjFlXjH.d.mts} +2 -2
  68. package/index-DZjFlXjH.d.mts.map +1 -0
  69. package/{dist/queries/get-deep-fetch-all-children/index.d.mts → index-D_fBH_D4.d.mts} +2 -2
  70. package/index-D_fBH_D4.d.mts.map +1 -0
  71. package/{dist/queries/get-notion-slug/index.d.mts → index-Dx2yW5u0.d.mts} +2 -2
  72. package/index-Dx2yW5u0.d.mts.map +1 -0
  73. package/{dist/utils/add-time/index.d.mts → index-DxiWPo1l.d.mts} +2 -2
  74. package/index-DxiWPo1l.d.mts.map +1 -0
  75. package/{dist/queries/get-info-type/index.d.mts → index-H5Qko6iL.d.mts} +2 -2
  76. package/index-H5Qko6iL.d.mts.map +1 -0
  77. package/{dist/utils/get-title/index.d.mts → index-iru-ct3u.d.mts} +2 -2
  78. package/index-iru-ct3u.d.mts.map +1 -0
  79. package/{dist/queries/get-blocks-by-id-children/index.d.mts → index-oAghjuN5.d.mts} +2 -2
  80. package/index-oAghjuN5.d.mts.map +1 -0
  81. package/{dist/queries/get-query/index.d.mts → index-wMZIVRBv.d.mts} +2 -2
  82. package/index-wMZIVRBv.d.mts.map +1 -0
  83. package/{dist/index.d.mts → index.d.mts} +1 -1
  84. package/index.d.mts.map +1 -0
  85. package/index.mjs +2 -0
  86. package/index.mjs.map +1 -0
  87. package/index.test.d.mts +1 -0
  88. package/index.test.mjs +129 -0
  89. package/index.test.mjs.map +1 -0
  90. package/magic-string.es-D6kIB8Km.mjs +18 -0
  91. package/magic-string.es-D6kIB8Km.mjs.map +1 -0
  92. package/{dist/utils/get-types/multi-select.mjs → multi-select-BTDQCZWJ.mjs} +2 -2
  93. package/multi-select-BTDQCZWJ.mjs.map +1 -0
  94. package/number-DXsVfS7U.mjs +2 -0
  95. package/number-DXsVfS7U.mjs.map +1 -0
  96. package/package.json +57 -208
  97. package/{dist/utils/get-types/people.mjs → people-Ognwaka4.mjs} +2 -2
  98. package/people-Ognwaka4.mjs.map +1 -0
  99. package/phone-number-D-jSJ6fm.mjs +2 -0
  100. package/phone-number-D-jSJ6fm.mjs.map +1 -0
  101. package/queries/get-blocks-by-id-children/index.d.mts +2 -0
  102. package/queries/get-blocks-by-id-children/index.mjs +1 -0
  103. package/queries/get-databases-by-id-query/index.d.mts +2 -0
  104. package/queries/get-databases-by-id-query/index.mjs +1 -0
  105. package/queries/get-deep-fetch-all-children/index.d.mts +2 -0
  106. package/queries/get-deep-fetch-all-children/index.mjs +1 -0
  107. package/queries/get-info-type/index.d.mts +2 -0
  108. package/queries/get-info-type/index.mjs +1 -0
  109. package/queries/get-notion-listing/index.d.mts +2 -0
  110. package/queries/get-notion-listing/index.mjs +1 -0
  111. package/queries/get-notion-listing-by-date/index.d.mts +2 -0
  112. package/queries/get-notion-listing-by-date/index.mjs +1 -0
  113. package/queries/get-notion-slug/index.d.mts +2 -0
  114. package/queries/get-notion-slug/index.mjs +1 -0
  115. package/queries/get-notion-slug-by-route/index.d.mts +2 -0
  116. package/queries/get-notion-slug-by-route/index.mjs +1 -0
  117. package/queries/get-pages-by-id/index.d.mts +2 -0
  118. package/queries/get-pages-by-id/index.mjs +1 -0
  119. package/queries/get-path-variables/index.d.mts +2 -0
  120. package/queries/get-path-variables/index.mjs +1 -0
  121. package/queries/get-query/index.d.mts +2 -0
  122. package/queries/get-query/index.mjs +1 -0
  123. package/queries/index.d.mts +12 -0
  124. package/queries/index.mjs +1 -0
  125. package/queries-CCGQpuUT.mjs +1 -0
  126. package/{dist/utils/get-types/rich-text.mjs → rich-text-pNpMuY2o.mjs} +2 -2
  127. package/rich-text-pNpMuY2o.mjs.map +1 -0
  128. package/{dist/utils/get-types/select.mjs → select-i6mHDBMN.mjs} +2 -2
  129. package/select-i6mHDBMN.mjs.map +1 -0
  130. package/title-vmIyt8-r.mjs +2 -0
  131. package/title-vmIyt8-r.mjs.map +1 -0
  132. package/url-D7qu9nU2.mjs +2 -0
  133. package/url-D7qu9nU2.mjs.map +1 -0
  134. package/utils/add-time/index.d.mts +2 -0
  135. package/utils/add-time/index.mjs +1 -0
  136. package/utils/data-normalized/index.d.mts +2 -0
  137. package/utils/data-normalized/index.mjs +1 -0
  138. package/utils/data-normalized-results/index.d.mts +2 -0
  139. package/utils/data-normalized-results/index.mjs +1 -0
  140. package/utils/get-data-type/index.d.mts +2 -0
  141. package/utils/get-data-type/index.mjs +1 -0
  142. package/utils/get-title/index.d.mts +2 -0
  143. package/utils/get-title/index.mjs +1 -0
  144. package/utils/get-types/_unsupported.mjs +1 -0
  145. package/utils/get-types/checkbox.mjs +1 -0
  146. package/utils/get-types/date.mjs +1 -0
  147. package/utils/get-types/email.mjs +1 -0
  148. package/utils/get-types/files.mjs +1 -0
  149. package/utils/get-types/index.d.mts +2 -0
  150. package/utils/get-types/index.mjs +1 -0
  151. package/utils/get-types/multi-select.mjs +1 -0
  152. package/utils/get-types/number.mjs +1 -0
  153. package/utils/get-types/people.mjs +1 -0
  154. package/utils/get-types/phone-number.mjs +1 -0
  155. package/utils/get-types/relation.mjs +1 -0
  156. package/utils/get-types/rich-text.mjs +1 -0
  157. package/utils/get-types/rollup.mjs +1 -0
  158. package/utils/get-types/select.mjs +1 -0
  159. package/utils/get-types/title.mjs +1 -0
  160. package/utils/get-types/url.mjs +1 -0
  161. package/utils/index.d.mts +7 -0
  162. package/utils/index.mjs +1 -0
  163. package/utils-B1QU_ezs.mjs +2 -0
  164. package/{dist/utils-SxsCJsDP.mjs.map → utils-B1QU_ezs.mjs.map} +1 -1
  165. package/.turbo/turbo-build.log +0 -4
  166. package/.turbo/turbo-lint$colon$ts.log +0 -1
  167. package/dist/constants/index.d.mts.map +0 -1
  168. package/dist/constants/index.mjs.map +0 -1
  169. package/dist/get-types-7QEbhRzY.mjs +0 -2
  170. package/dist/index.d.mts.map +0 -1
  171. package/dist/index.mjs +0 -2
  172. package/dist/index.mjs.map +0 -1
  173. package/dist/queries/get-blocks-by-id-children/index.d.mts.map +0 -1
  174. package/dist/queries/get-blocks-by-id-children/index.mjs.map +0 -1
  175. package/dist/queries/get-databases-by-id-query/index.d.mts.map +0 -1
  176. package/dist/queries/get-databases-by-id-query/index.mjs +0 -2
  177. package/dist/queries/get-databases-by-id-query/index.mjs.map +0 -1
  178. package/dist/queries/get-deep-fetch-all-children/index.d.mts.map +0 -1
  179. package/dist/queries/get-deep-fetch-all-children/index.mjs.map +0 -1
  180. package/dist/queries/get-info-type/index.d.mts.map +0 -1
  181. package/dist/queries/get-info-type/index.mjs.map +0 -1
  182. package/dist/queries/get-notion-listing/index.d.mts.map +0 -1
  183. package/dist/queries/get-notion-listing/index.mjs +0 -2
  184. package/dist/queries/get-notion-listing/index.mjs.map +0 -1
  185. package/dist/queries/get-notion-listing-by-date/index.d.mts.map +0 -1
  186. package/dist/queries/get-notion-listing-by-date/index.mjs +0 -2
  187. package/dist/queries/get-notion-listing-by-date/index.mjs.map +0 -1
  188. package/dist/queries/get-notion-slug/index.d.mts.map +0 -1
  189. package/dist/queries/get-notion-slug/index.mjs +0 -2
  190. package/dist/queries/get-notion-slug/index.mjs.map +0 -1
  191. package/dist/queries/get-notion-slug-by-route/index.d.mts.map +0 -1
  192. package/dist/queries/get-notion-slug-by-route/index.mjs +0 -2
  193. package/dist/queries/get-notion-slug-by-route/index.mjs.map +0 -1
  194. package/dist/queries/get-pages-by-id/index.d.mts.map +0 -1
  195. package/dist/queries/get-pages-by-id/index.mjs.map +0 -1
  196. package/dist/queries/get-path-variables/index.d.mts.map +0 -1
  197. package/dist/queries/get-path-variables/index.mjs +0 -2
  198. package/dist/queries/get-path-variables/index.mjs.map +0 -1
  199. package/dist/queries/get-query/index.d.mts.map +0 -1
  200. package/dist/queries/get-query/index.mjs +0 -2
  201. package/dist/queries/get-query/index.mjs.map +0 -1
  202. package/dist/queries/index.d.mts +0 -12
  203. package/dist/queries/index.mjs +0 -1
  204. package/dist/utils/add-time/index.d.mts.map +0 -1
  205. package/dist/utils/add-time/index.mjs.map +0 -1
  206. package/dist/utils/data-normalized/index.d.mts.map +0 -1
  207. package/dist/utils/data-normalized/index.mjs +0 -1
  208. package/dist/utils/data-normalized-results/index.d.mts.map +0 -1
  209. package/dist/utils/data-normalized-results/index.mjs +0 -1
  210. package/dist/utils/get-data-type/index.d.mts.map +0 -1
  211. package/dist/utils/get-data-type/index.mjs +0 -2
  212. package/dist/utils/get-data-type/index.mjs.map +0 -1
  213. package/dist/utils/get-title/index.d.mts.map +0 -1
  214. package/dist/utils/get-title/index.mjs.map +0 -1
  215. package/dist/utils/get-types/_unsupported.mjs.map +0 -1
  216. package/dist/utils/get-types/checkbox.mjs +0 -2
  217. package/dist/utils/get-types/checkbox.mjs.map +0 -1
  218. package/dist/utils/get-types/date.mjs +0 -2
  219. package/dist/utils/get-types/date.mjs.map +0 -1
  220. package/dist/utils/get-types/email.mjs +0 -2
  221. package/dist/utils/get-types/email.mjs.map +0 -1
  222. package/dist/utils/get-types/files.mjs.map +0 -1
  223. package/dist/utils/get-types/index.d.mts.map +0 -1
  224. package/dist/utils/get-types/index.mjs +0 -1
  225. package/dist/utils/get-types/multi-select.mjs.map +0 -1
  226. package/dist/utils/get-types/number.mjs +0 -2
  227. package/dist/utils/get-types/number.mjs.map +0 -1
  228. package/dist/utils/get-types/people.mjs.map +0 -1
  229. package/dist/utils/get-types/phone-number.mjs +0 -2
  230. package/dist/utils/get-types/phone-number.mjs.map +0 -1
  231. package/dist/utils/get-types/relation.mjs +0 -1
  232. package/dist/utils/get-types/rich-text.mjs.map +0 -1
  233. package/dist/utils/get-types/rollup.mjs +0 -1
  234. package/dist/utils/get-types/select.mjs.map +0 -1
  235. package/dist/utils/get-types/title.mjs +0 -2
  236. package/dist/utils/get-types/title.mjs.map +0 -1
  237. package/dist/utils/get-types/url.mjs +0 -2
  238. package/dist/utils/get-types/url.mjs.map +0 -1
  239. package/dist/utils/index.d.mts +0 -7
  240. package/dist/utils/index.mjs +0 -1
  241. package/dist/utils-SxsCJsDP.mjs +0 -2
  242. package/release.config.js +0 -25
  243. package/src/constants/index.ts +0 -1326
  244. package/src/index.ts +0 -151
  245. package/src/queries/get-blocks-by-id-children/index.ts +0 -12
  246. package/src/queries/get-databases-by-id-query/index.ts +0 -28
  247. package/src/queries/get-deep-fetch-all-children/index.ts +0 -35
  248. package/src/queries/get-info-type/index.ts +0 -40
  249. package/src/queries/get-notion-listing/index.ts +0 -91
  250. package/src/queries/get-notion-listing-by-date/index.ts +0 -190
  251. package/src/queries/get-notion-slug/index.ts +0 -64
  252. package/src/queries/get-notion-slug-by-route/index.ts +0 -201
  253. package/src/queries/get-pages-by-id/index.ts +0 -12
  254. package/src/queries/get-path-variables/index.ts +0 -60
  255. package/src/queries/get-query/index.ts +0 -140
  256. package/src/queries/index.ts +0 -25
  257. package/src/schema/index.ts +0 -386
  258. package/src/utils/add-time/index.ts +0 -16
  259. package/src/utils/data-normalized/index.ts +0 -49
  260. package/src/utils/data-normalized-results/index.ts +0 -29
  261. package/src/utils/get-data-type/index.ts +0 -62
  262. package/src/utils/get-title/index.ts +0 -21
  263. package/src/utils/get-types/_unsupported.ts +0 -7
  264. package/src/utils/get-types/checkbox.ts +0 -3
  265. package/src/utils/get-types/date.ts +0 -6
  266. package/src/utils/get-types/email.ts +0 -3
  267. package/src/utils/get-types/files.ts +0 -67
  268. package/src/utils/get-types/index.ts +0 -41
  269. package/src/utils/get-types/multi-select.ts +0 -16
  270. package/src/utils/get-types/number.ts +0 -6
  271. package/src/utils/get-types/people.ts +0 -22
  272. package/src/utils/get-types/phone-number.ts +0 -3
  273. package/src/utils/get-types/relation.ts +0 -18
  274. package/src/utils/get-types/rich-text.ts +0 -5
  275. package/src/utils/get-types/rollup.ts +0 -30
  276. package/src/utils/get-types/select.ts +0 -21
  277. package/src/utils/get-types/title.ts +0 -4
  278. package/src/utils/get-types/url.ts +0 -3
  279. package/src/utils/index.ts +0 -16
  280. package/tsconfig.json +0 -15
  281. package/tsdown.config.ts +0 -14
  282. /package/{dist/index-BAoq6yHe.d.mts → index-BAoq6yHe.d.mts} +0 -0
  283. /package/{dist/index-BAoq6yHe.d.mts.map → index-BAoq6yHe.d.mts.map} +0 -0
  284. /package/{dist/schema → schema}/index.d.mts +0 -0
  285. /package/{dist/schema → schema}/index.mjs +0 -0
  286. /package/{dist/utils → utils}/get-types/_unsupported.d.mts +0 -0
  287. /package/{dist/utils → utils}/get-types/_unsupported.d.mts.map +0 -0
  288. /package/{dist/utils → utils}/get-types/checkbox.d.mts +0 -0
  289. /package/{dist/utils → utils}/get-types/checkbox.d.mts.map +0 -0
  290. /package/{dist/utils → utils}/get-types/date.d.mts +0 -0
  291. /package/{dist/utils → utils}/get-types/date.d.mts.map +0 -0
  292. /package/{dist/utils → utils}/get-types/email.d.mts +0 -0
  293. /package/{dist/utils → utils}/get-types/email.d.mts.map +0 -0
  294. /package/{dist/utils → utils}/get-types/files.d.mts +0 -0
  295. /package/{dist/utils → utils}/get-types/files.d.mts.map +0 -0
  296. /package/{dist/utils → utils}/get-types/multi-select.d.mts +0 -0
  297. /package/{dist/utils → utils}/get-types/multi-select.d.mts.map +0 -0
  298. /package/{dist/utils → utils}/get-types/number.d.mts +0 -0
  299. /package/{dist/utils → utils}/get-types/number.d.mts.map +0 -0
  300. /package/{dist/utils → utils}/get-types/people.d.mts +0 -0
  301. /package/{dist/utils → utils}/get-types/people.d.mts.map +0 -0
  302. /package/{dist/utils → utils}/get-types/phone-number.d.mts +0 -0
  303. /package/{dist/utils → utils}/get-types/phone-number.d.mts.map +0 -0
  304. /package/{dist/utils → utils}/get-types/relation.d.mts +0 -0
  305. /package/{dist/utils → utils}/get-types/relation.d.mts.map +0 -0
  306. /package/{dist/utils → utils}/get-types/rich-text.d.mts +0 -0
  307. /package/{dist/utils → utils}/get-types/rich-text.d.mts.map +0 -0
  308. /package/{dist/utils → utils}/get-types/rollup.d.mts +0 -0
  309. /package/{dist/utils → utils}/get-types/rollup.d.mts.map +0 -0
  310. /package/{dist/utils → utils}/get-types/select.d.mts +0 -0
  311. /package/{dist/utils → utils}/get-types/select.d.mts.map +0 -0
  312. /package/{dist/utils → utils}/get-types/title.d.mts +0 -0
  313. /package/{dist/utils → utils}/get-types/title.d.mts.map +0 -0
  314. /package/{dist/utils → utils}/get-types/url.d.mts +0 -0
  315. /package/{dist/utils → utils}/get-types/url.d.mts.map +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-query-ljtSpKL5.mjs","names":["_map","_omit"],"sources":["../src/queries/get-query/index.ts"],"sourcesContent":["import { avoidRateLimit, isObjectEmpty } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit, size as _size } from \"lodash-es\";\n\nimport { PROPERTIES } from \"../../constants/index\";\nimport type { SortItem } from \"../../schema/index\";\nimport dataNormalizedResults from \"../../utils/data-normalized-results/index\";\n\n// const useCache = process.env.NEXT_PUBLIC__NOTION_USE_CACHE\n// const useCache = false\n\nconst SORTS: SortItem[] = [\n {\n direction: \"ascending\",\n property: PROPERTIES.slug.notion,\n },\n];\n\n// @todo(complexity) 12\n// oxlint-disable-next-line complexity\nconst getQuery = async ({ config, notionDatabasesQuery, reqQuery }) => {\n const { NOTION } = config;\n const { databaseType } = reqQuery;\n const routeType = databaseType;\n let hasError = false;\n\n /**\n * @setup\n */\n const DATABASE_TYPE = databaseType.toUpperCase();\n const database_id = NOTION[DATABASE_TYPE].database_id;\n if (!database_id) return [];\n\n // @todo(types) any\n let data: any = {},\n items: any = {};\n let filter: any, sorts: any;\n\n /**\n * @todo(notion) move this to the api so it can be re-used\n * not hidden in here all hacky\n *\n * @note(notion) right now only need this for episodes of podcasts\n * _OR_ Related Databases (PODCASTS => EPISODES)\n *\n * This is not needed often and can/should probably be handled instead\n * with Relations & Rollups rather than this customization\n */\n\n if (databaseType === \"EPISODES\") {\n sorts = SORTS;\n const { podcasts } = reqQuery;\n\n // @todo(types)\n const filterTagEpisodesByPodcasts: any = [];\n const podcastIds: any = [];\n\n // oxlint-disable-next-line no-unused-expressions\n !!podcasts && podcastIds.push(...podcasts?.split(\",\"));\n // oxlint-disable-next-line no-unused-expressions\n _size(podcastIds) > 0 &&\n _map(podcastIds, (id) =>\n filterTagEpisodesByPodcasts.push({\n property: PROPERTIES.relationEpisodes__Podcasts.notion,\n relation: {\n contains: id,\n },\n }),\n );\n filter = { or: [...filterTagEpisodesByPodcasts] };\n } else {\n // console.dir(`no filter`)\n hasError = true;\n }\n\n // /**\n // * @cache pre\n // */\n // if (useCache) {\n // const url = catchAll.join('/')\n // const cacheData = await getCache(url)\n // if (!!cacheData) {\n // data = cacheData\n // }\n // }\n\n if (!hasError && (!data || isObjectEmpty(data))) {\n await avoidRateLimit(0);\n // @todo(types) any\n let contentData: Pick<any, number | string | symbol>;\n\n // oxlint-disable-next-line no-extra-boolean-cast\n if (!!filter) {\n // @hack(notion)-do-not-return'\n if (filter?.or.length === 0) {\n filter = {\n and: [\n {\n property: PROPERTIES.slug.notion,\n rich_text: { equals: \"@hack(notion)-do-not-return\" },\n },\n ],\n };\n }\n contentData = await notionDatabasesQuery({\n database_id,\n filter,\n sorts,\n });\n\n data = contentData;\n items = dataNormalizedResults({\n config,\n results: contentData.results,\n routeType,\n });\n data = _omit(data, \"results\");\n data.results = items;\n } else {\n // console.dir(`no filter`)\n hasError = true;\n }\n\n // /**\n // * @cache post\n // */\n // if (useCache && !!data) {\n // const url = catchAll.join('/')\n // // console.dir(url)\n // const isCacheExists = await getCache(url)\n // // console.dir(isCacheExists)\n // if (!isCacheExists || isCacheExists === undefined) {\n // setCache(data, url)\n // }\n // }\n }\n\n return data;\n};\n\nexport default getQuery;\n"],"mappings":"gNAUA,MAAM,EAAoB,CACxB,CACE,UAAW,YACX,SAAU,EAAW,KAAK,MAC5B,CACF,EAIM,EAAW,MAAO,CAAE,SAAQ,uBAAsB,cAAe,CACrE,GAAM,CAAE,UAAW,EACb,CAAE,gBAAiB,EACnB,EAAY,EACd,EAAW,GAMT,EAAc,EADE,EAAa,YACR,EAAc,CAAC,YAC1C,GAAI,CAAC,EAAa,MAAO,CAAC,EAG1B,IAAI,EAAY,CAAC,EACf,EAAa,CAAC,EACZ,EAAa,EAajB,GAAI,IAAiB,WAAY,CAC/B,EAAQ,EACR,GAAM,CAAE,YAAa,EAGf,EAAmC,CAAC,EACpC,EAAkB,CAAC,EAGvB,GAAY,EAAW,KAAK,GAAG,GAAU,MAAM,GAAG,CAAC,EAErD,EAAM,CAAU,EAAI,GAClBA,EAAK,EAAa,GAChB,EAA4B,KAAK,CAC/B,SAAU,EAAW,2BAA2B,OAChD,SAAU,CACR,SAAU,CACZ,CACF,CAAC,CACH,EACF,EAAS,CAAE,GAAI,CAAC,GAAG,CAA2B,CAAE,CAClD,KAEE,GAAW,GAcb,GAAI,CAAC,IAAa,CAAC,GAAQ,EAAc,CAAI,GAAI,CAC/C,MAAM,EAAe,CAAC,EAEtB,IAAI,EAGE,GAEA,GAAQ,GAAG,SAAW,IACxB,EAAS,CACP,IAAK,CACH,CACE,SAAU,EAAW,KAAK,OAC1B,UAAW,CAAE,OAAQ,6BAA8B,CACrD,CACF,CACF,GAEF,EAAc,MAAM,EAAqB,CACvC,cACA,SACA,OACF,CAAC,EAED,EAAO,EACP,EAAQ,EAAsB,CAC5B,SACA,QAAS,EAAY,QACrB,WACF,CAAC,EACD,EAAOC,EAAM,EAAM,SAAS,EAC5B,EAAK,QAAU,GAGf,EAAW,EAef,CAEA,OAAO,CACT"}
@@ -1,2 +1,2 @@
1
- import{last as e}from"lodash-es";const t=t=>{let n=e(t.split(`_`))??``;return n&&n.replace(`Past`,`Cast Emeritus`).replace(`Musical`,`Musical Director`).replace(`Technical`,`Technical Director`)};export{t as default};
2
- //# sourceMappingURL=index.mjs.map
1
+ import{last as e}from"lodash-es";const t=t=>{let n=e(t.split(`_`))??``;return n&&n.replace(`Past`,`Cast Emeritus`).replace(`Musical`,`Musical Director`).replace(`Technical`,`Technical Director`)};export{t};
2
+ //# sourceMappingURL=get-title-BWc2Ckhi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-title-BWc2Ckhi.mjs","names":["_last"],"sources":["../src/utils/get-title/index.ts"],"sourcesContent":["import { last as _last } from \"lodash-es\";\n\n/**\n * @note this should be in the website repo as it’s custom\n * *cough* more custom than _waves vaguely all-around_ all of this\n */\nconst getTitle = (title: string) => {\n const _title: string = _last(title.split(\"_\")) ?? \"\";\n\n // oxlint-disable-next-line no-extra-boolean-cast\n if (!!_title) {\n return _title\n .replace(\"Past\", \"Cast Emeritus\")\n .replace(\"Musical\", \"Musical Director\")\n .replace(\"Technical\", \"Technical Director\");\n }\n\n return _title;\n};\n\nexport default getTitle;\n"],"mappings":"iCAMA,MAAM,EAAY,GAAkB,CAClC,IAAM,EAAiBA,EAAM,EAAM,MAAM,GAAG,CAAC,GAAK,GAUlD,OAPM,GACG,EACJ,QAAQ,OAAQ,eAAe,CAAC,CAChC,QAAQ,UAAW,kBAAkB,CAAC,CACtC,QAAQ,YAAa,oBAAoB,CAIhD"}
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./_unsupported-BUIwc9lr.mjs";import{t}from"./checkbox-Cil1erOZ.mjs";import{t as n}from"./date-IJAT1r3Y.mjs";import{t as r}from"./email-DygPLxSo.mjs";import{t as i}from"./files-Dx1jw5iY.mjs";import{t as a}from"./multi-select-BTDQCZWJ.mjs";import{t as o}from"./number-DXsVfS7U.mjs";import{t as s}from"./people-Ognwaka4.mjs";import{t as c}from"./phone-number-D-jSJ6fm.mjs";import{t as l}from"./rich-text-pNpMuY2o.mjs";import{t as u}from"./select-i6mHDBMN.mjs";import{t as d}from"./title-vmIyt8-r.mjs";import{t as f}from"./url-D7qu9nU2.mjs";import{map as p,sortBy as m}from"lodash-es";const h=e=>e.type===`rollup`?e.rollup.type===`array`&&p(e.rollup.array,e=>_[e.type](e))[0]:p(e.relation,e=>e.id),g=e=>{let t=e?.rollup;return m(p(t?.array,e=>p(e[e?.type],t=>_[e?.type]({[e?.type]:[t],type:e?.type})))).flat()},_={checkbox:t,created_by:e,created_time:n,date:n,email:r,files:i,formula:e,image:i,last_edited_by:e,last_edited_time:n,multi_select:a,number:o,people:s,phone_number:c,relation:h,rich_text:l,rollup:g,select:u,title:d,url:f};export{g as n,h as r,_ as t};
2
+ //# sourceMappingURL=get-types-Clb6OmBv.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-types-7QEbhRzY.mjs","names":["_map","_sortBy","_map"],"sources":["../src/utils/get-types/relation.ts","../src/utils/get-types/rollup.ts","../src/utils/get-types/index.ts"],"sourcesContent":["import { map as _map } from \"lodash-es\";\n\nimport getTypes from \"../../utils/get-types/index\";\n\nconst relation = (data: any) => {\n if (data.type === \"rollup\") {\n return (\n data.rollup.type === \"array\" &&\n _map(data.rollup.array, (item: any) => {\n return getTypes[item.type](item);\n })[0]\n );\n } else {\n return _map(data.relation, (relation: any) => relation.id);\n }\n};\n\nexport default relation;\n","import { map as _map, sortBy as _sortBy } from \"lodash-es\";\n\nimport type { RollupFunction } from \"../../schema/index\";\nimport getTypes from \"../../utils/get-types/index\";\n\n/**\n * @note(notion) https://github.com/JeromeFitz/packages/issues/631\n */\ntype Rollup = {\n array: any;\n function: RollupFunction;\n type: \"array\";\n};\n\n// @todo(types)\nconst rollup = (data: any) => {\n const rollupData: Rollup = data?.rollup;\n return _sortBy(\n _map(rollupData?.array, (item) =>\n _map(item[item?.type], (itemData) =>\n getTypes[item?.type]({\n [item?.type]: [itemData],\n type: item?.type,\n }),\n ),\n ),\n ).flat();\n};\n\nexport default rollup;\n","import _unsupported from \"./_unsupported\";\nimport checkbox from \"./checkbox\";\nimport date from \"./date\";\nimport email from \"./email\";\nimport files from \"./files\";\n// import images from './images'\nimport multi_select from \"./multi-select\";\nimport number from \"./number\";\nimport people from \"./people\";\nimport phone_number from \"./phone-number\";\nimport relation from \"./relation\";\nimport rich_text from \"./rich-text\";\nimport rollup from \"./rollup\";\nimport select from \"./select\";\nimport title from \"./title\";\nimport url from \"./url\";\n\nconst getTypes = {\n checkbox,\n created_by: _unsupported,\n created_time: date,\n date,\n email,\n files,\n formula: _unsupported,\n image: files,\n last_edited_by: _unsupported,\n last_edited_time: date,\n multi_select,\n number,\n people,\n phone_number,\n relation,\n rich_text,\n rollup,\n select,\n title,\n url,\n};\n\nexport default getTypes;\n"],"mappings":"unBAIA,MAAM,EAAY,GACZ,EAAK,OAAS,SAEd,EAAK,OAAO,OAAS,SACrBA,EAAK,EAAK,OAAO,MAAQ,GAChB,EAAS,EAAK,KAAK,CAAC,CAAI,CAChC,CAAC,CAAC,GAGEA,EAAK,EAAK,SAAW,GAAkB,EAAS,EAAE,ECEvD,EAAU,GAAc,CAC5B,IAAM,EAAqB,GAAM,OACjC,OAAOC,EACLC,EAAK,GAAY,MAAQ,GACvBA,EAAK,EAAK,GAAM,MAAQ,GACtB,EAAS,GAAM,KAAK,CAAC,EAClB,GAAM,MAAO,CAAC,CAAQ,EACvB,KAAM,GAAM,IACd,CAAC,CACH,CACF,CACF,CAAC,CAAC,KAAK,CACT,ECVM,EAAW,CACf,WACA,WAAY,EACZ,aAAc,EACd,OACA,QACA,QACA,QAAS,EACT,MAAO,EACP,eAAgB,EAChB,iBAAkB,EAClB,eACA,SACA,SACA,eACA,WACA,YACA,SACA,SACA,QACA,KACF"}
1
+ {"version":3,"file":"get-types-Clb6OmBv.mjs","names":["_map","_sortBy","_map"],"sources":["../src/utils/get-types/relation.ts","../src/utils/get-types/rollup.ts","../src/utils/get-types/index.ts"],"sourcesContent":["import { map as _map } from \"lodash-es\";\n\nimport getTypes from \"../../utils/get-types/index\";\n\nconst relation = (data: any) => {\n if (data.type === \"rollup\") {\n return (\n data.rollup.type === \"array\" &&\n _map(data.rollup.array, (item: any) => {\n return getTypes[item.type](item);\n })[0]\n );\n } else {\n return _map(data.relation, (relation: any) => relation.id);\n }\n};\n\nexport default relation;\n","import { map as _map, sortBy as _sortBy } from \"lodash-es\";\n\nimport type { RollupFunction } from \"../../schema/index\";\nimport getTypes from \"../../utils/get-types/index\";\n\n/**\n * @note(notion) https://github.com/JeromeFitz/packages/issues/631\n */\ntype Rollup = {\n array: any;\n function: RollupFunction;\n type: \"array\";\n};\n\n// @todo(types)\nconst rollup = (data: any) => {\n const rollupData: Rollup = data?.rollup;\n return _sortBy(\n _map(rollupData?.array, (item) =>\n _map(item[item?.type], (itemData) =>\n getTypes[item?.type]({\n [item?.type]: [itemData],\n type: item?.type,\n }),\n ),\n ),\n ).flat();\n};\n\nexport default rollup;\n","import _unsupported from \"./_unsupported\";\nimport checkbox from \"./checkbox\";\nimport date from \"./date\";\nimport email from \"./email\";\nimport files from \"./files\";\n// import images from './images'\nimport multi_select from \"./multi-select\";\nimport number from \"./number\";\nimport people from \"./people\";\nimport phone_number from \"./phone-number\";\nimport relation from \"./relation\";\nimport rich_text from \"./rich-text\";\nimport rollup from \"./rollup\";\nimport select from \"./select\";\nimport title from \"./title\";\nimport url from \"./url\";\n\nconst getTypes = {\n checkbox,\n created_by: _unsupported,\n created_time: date,\n date,\n email,\n files,\n formula: _unsupported,\n image: files,\n last_edited_by: _unsupported,\n last_edited_time: date,\n multi_select,\n number,\n people,\n phone_number,\n relation,\n rich_text,\n rollup,\n select,\n title,\n url,\n};\n\nexport default getTypes;\n"],"mappings":"wlBAIA,MAAM,EAAY,GACZ,EAAK,OAAS,SAEd,EAAK,OAAO,OAAS,SACrBA,EAAK,EAAK,OAAO,MAAQ,GAChB,EAAS,EAAK,KAAK,CAAC,CAAI,CAChC,CAAC,CAAC,GAGEA,EAAK,EAAK,SAAW,GAAkB,EAAS,EAAE,ECEvD,EAAU,GAAc,CAC5B,IAAM,EAAqB,GAAM,OACjC,OAAOC,EACLC,EAAK,GAAY,MAAQ,GACvBA,EAAK,EAAK,GAAM,MAAQ,GACtB,EAAS,GAAM,KAAK,CAAC,EAClB,GAAM,MAAO,CAAC,CAAQ,EACvB,KAAM,GAAM,IACd,CAAC,CACH,CACF,CACF,CAAC,CAAC,KAAK,CACT,ECVM,EAAW,CACf,WACA,WAAY,EACZ,aAAc,EACd,OACA,QACA,QACA,QAAS,EACT,MAAO,EACP,eAAgB,EAChB,iBAAkB,EAClB,eACA,SACA,SACA,eACA,WACA,YACA,SACA,SACA,QACA,KACF"}
@@ -1,4 +1,4 @@
1
- import { i as DataTypesObject, r as DataTypes, x as Property } from "../index-BAoq6yHe.mjs";
1
+ import { i as DataTypesObject, r as DataTypes, x as Property } from "./index-BAoq6yHe.mjs";
2
2
 
3
3
  //#region src/constants/index.d.ts
4
4
  /**
@@ -125,5 +125,5 @@ declare const QUERIES: {
125
125
  declare const getDataTypes: DataTypes[];
126
126
  declare const DATA_TYPES: DataTypesObject;
127
127
  //#endregion
128
- export { DATA_TYPES, INIT, LOOKUP, PROPERTIES, PROPERTIES_LOOKUP, QUERIES, getDataTypes };
129
- //# sourceMappingURL=index.d.mts.map
128
+ export { PROPERTIES_LOOKUP as a, PROPERTIES as i, INIT as n, QUERIES as o, LOOKUP as r, getDataTypes as s, DATA_TYPES as t };
129
+ //# sourceMappingURL=index-BD5kzRhY.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BD5kzRhY.d.mts","names":[],"sources":["../src/constants/index.ts"],"mappings":";;;;;AAE4E;;;;AAqBnC;AAAA;;;;;;cAAnC,UAAA,EAAY,MAAM,SAAS,QAAA;;;;;;;;;;cA0sC3B,IAAA;;;;;;;;;;;;cAaA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,iBAAA;;;;;;;;cAQA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCA,YAAA,EAAc,SAAS;AAAA,cAEvB,UAAA,EAAY,eAIjB"}
@@ -1,4 +1,4 @@
1
- import { r as DataTypes } from "../../index-BAoq6yHe.mjs";
1
+ import { r as DataTypes } from "./index-BAoq6yHe.mjs";
2
2
 
3
3
  //#region src/utils/get-data-type/index.d.ts
4
4
  /**
@@ -62,5 +62,5 @@ declare const getDataType: ({
62
62
  isPage: any;
63
63
  }) => DataTypes;
64
64
  //#endregion
65
- export { getDataType as default };
66
- //# sourceMappingURL=index.d.mts.map
65
+ export { getDataType as t };
66
+ //# sourceMappingURL=index-BGofpiiB.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BGofpiiB.d.mts","names":[],"sources":["../src/utils/get-data-type/index.ts"],"mappings":";;;;;;AAqDiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA3C,WAAA;EAAe,OAAA;EAAA,OAAA;EAAA;AAAA;;;;MAAA,SAAA"}
@@ -22,5 +22,5 @@ declare const getNotionListingByDate: ({
22
22
  items: Pick<Pick<any, string | number | symbol>, string | number | symbol>;
23
23
  }>;
24
24
  //#endregion
25
- export { getNotionListingByDate as default };
26
- //# sourceMappingURL=index.d.mts.map
25
+ export { getNotionListingByDate as t };
26
+ //# sourceMappingURL=index-BIttGCzA.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BIttGCzA.d.mts","names":[],"sources":["../src/queries/get-notion-listing-by-date/index.ts"],"mappings":";cA0HM,sBAAA;EAAgC,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,YAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQrC,OAAA"}
@@ -7,5 +7,5 @@ declare const getPagesById: ({
7
7
  page_id: any;
8
8
  }) => Promise<any>;
9
9
  //#endregion
10
- export { getPagesById as default };
11
- //# sourceMappingURL=index.d.mts.map
10
+ export { getPagesById as t };
11
+ //# sourceMappingURL=index-C-J3ICp0.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C-J3ICp0.d.mts","names":[],"sources":["../src/queries/get-pages-by-id/index.ts"],"mappings":";cAGM,YAAA;EAAsB,gBAAA;EAAA;AAAA;;;MAA6B,OAAA"}
@@ -22,5 +22,5 @@ declare const getNotionSlugByRoute: ({
22
22
  items: {};
23
23
  }>;
24
24
  //#endregion
25
- export { getNotionSlugByRoute as default };
26
- //# sourceMappingURL=index.d.mts.map
25
+ export { getNotionSlugByRoute as t };
26
+ //# sourceMappingURL=index-CLQVoKDp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CLQVoKDp.d.mts","names":[],"sources":["../src/queries/get-notion-slug-by-route/index.ts"],"mappings":";cAuJM,oBAAA;EAA8B,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,QAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQnC,OAAA"}
@@ -1,4 +1,4 @@
1
- import { O as SortItem } from "../../index-BAoq6yHe.mjs";
1
+ import { O as SortItem } from "./index-BAoq6yHe.mjs";
2
2
 
3
3
  //#region src/queries/get-databases-by-id-query/index.d.ts
4
4
  declare const getDatabasesByIdQuery: ({
@@ -13,5 +13,5 @@ declare const getDatabasesByIdQuery: ({
13
13
  sorts?: SortItem[] | undefined;
14
14
  }) => Promise<any>;
15
15
  //#endregion
16
- export { getDatabasesByIdQuery as default };
17
- //# sourceMappingURL=index.d.mts.map
16
+ export { getDatabasesByIdQuery as t };
17
+ //# sourceMappingURL=index-CucnheQT.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CucnheQT.d.mts","names":[],"sources":["../src/queries/get-databases-by-id-query/index.ts"],"mappings":";;;cAaM,qBAAA;EAA+B,WAAA;EAAA,MAAA;EAAA,iBAAA;EAAA;AAAA;;;;UAAA,QAAA;AAAA,MAKpC,OAAA"}
@@ -1,4 +1,4 @@
1
- import { r as DataTypes } from "../../index-BAoq6yHe.mjs";
1
+ import { r as DataTypes } from "./index-BAoq6yHe.mjs";
2
2
 
3
3
  //#region src/queries/get-path-variables/index.d.ts
4
4
  declare const getPathVariables: ({
@@ -18,5 +18,5 @@ declare const getPathVariables: ({
18
18
  url: string;
19
19
  };
20
20
  //#endregion
21
- export { getPathVariables as default };
22
- //# sourceMappingURL=index.d.mts.map
21
+ export { getPathVariables as t };
22
+ //# sourceMappingURL=index-D16uYjWr.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D16uYjWr.d.mts","names":[],"sources":["../src/queries/get-path-variables/index.ts"],"mappings":";;;cAiBM,gBAAA;EAAoB,QAAA;EAAA;AAAA;;;;YAAA,SAAA"}
@@ -25,5 +25,5 @@ declare const getNotionListing: ({
25
25
  items: Pick<any, string | number | symbol>;
26
26
  }>;
27
27
  //#endregion
28
- export { getNotionListing as default };
29
- //# sourceMappingURL=index.d.mts.map
28
+ export { getNotionListing as t };
29
+ //# sourceMappingURL=index-D4Gn1cYC.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D4Gn1cYC.d.mts","names":[],"sources":["../src/queries/get-notion-listing/index.ts"],"mappings":";cAMM,gBAAA;EAA0B,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,YAAA;EAAA,aAAA;EAAA;AAAA;;;;;;;MAO/B,OAAA"}
@@ -15,5 +15,5 @@ declare const dataNormalizedResults: ({
15
15
  routeType: any;
16
16
  }) => any[];
17
17
  //#endregion
18
- export { dataNormalizedResults as default };
19
- //# sourceMappingURL=index.d.mts.map
18
+ export { dataNormalizedResults as t };
19
+ //# sourceMappingURL=index-DMqCumJi.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DMqCumJi.d.mts","names":[],"sources":["../src/utils/data-normalized-results/index.ts"],"mappings":";;;;;;;cAWM,qBAAA;EAAyB,MAAA;EAAA,OAAA;EAAA;AAAA"}
@@ -24,5 +24,5 @@ declare const getTypes: {
24
24
  url: (data: any) => any;
25
25
  };
26
26
  //#endregion
27
- export { getTypes as default };
28
- //# sourceMappingURL=index.d.mts.map
27
+ export { getTypes as t };
28
+ //# sourceMappingURL=index-DZSqTeBx.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DZSqTeBx.d.mts","names":[],"sources":["../src/utils/get-types/index.ts"],"mappings":";cAiBM,QAAA"}
@@ -16,5 +16,5 @@ declare const dataNormalized: ({
16
16
  pathVariables: any;
17
17
  }) => {};
18
18
  //#endregion
19
- export { dataNormalized as default };
20
- //# sourceMappingURL=index.d.mts.map
19
+ export { dataNormalized as t };
20
+ //# sourceMappingURL=index-DZjFlXjH.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DZjFlXjH.d.mts","names":[],"sources":["../src/utils/data-normalized/index.ts"],"mappings":";;;;;;cAWM,cAAA;EAAkB,MAAA;EAAA,IAAA;EAAA,MAAA;EAAA;AAAA"}
@@ -7,5 +7,5 @@ declare const getDeepFetchAllChildren: ({
7
7
  getBlocksChildrenList: any;
8
8
  }) => Promise<Array<any | any[]>>;
9
9
  //#endregion
10
- export { getDeepFetchAllChildren as default };
11
- //# sourceMappingURL=index.d.mts.map
10
+ export { getDeepFetchAllChildren as t };
11
+ //# sourceMappingURL=index-D_fBH_D4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D_fBH_D4.d.mts","names":[],"sources":["../src/queries/get-deep-fetch-all-children/index.ts"],"mappings":";cAAM,uBAAA;EAAiC,MAAA;EAAA;AAAA;;;MAGnC,OAAA,CAAQ,KAAA"}
@@ -32,5 +32,5 @@ declare const getNotionSlug: ({
32
32
  items: {};
33
33
  }>;
34
34
  //#endregion
35
- export { getNotionSlug as default };
36
- //# sourceMappingURL=index.d.mts.map
35
+ export { getNotionSlug as t };
36
+ //# sourceMappingURL=index-Dx2yW5u0.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Dx2yW5u0.d.mts","names":[],"sources":["../src/queries/get-notion-slug/index.ts"],"mappings":";cAMM,aAAA;EAAuB,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQ5B,OAAA"}
@@ -1,5 +1,5 @@
1
1
  //#region src/utils/add-time/index.d.ts
2
2
  declare const addTime: (date: any, type: any) => any;
3
3
  //#endregion
4
- export { addTime as default };
5
- //# sourceMappingURL=index.d.mts.map
4
+ export { addTime as t };
5
+ //# sourceMappingURL=index-DxiWPo1l.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DxiWPo1l.d.mts","names":[],"sources":["../src/utils/add-time/index.ts"],"mappings":";cAEM,OAAA,GAAW,IAAA,OAAM,IAAI"}
@@ -16,5 +16,5 @@ declare const getInfoType: ({
16
16
  slug: any;
17
17
  };
18
18
  //#endregion
19
- export { getInfoType as default };
20
- //# sourceMappingURL=index.d.mts.map
19
+ export { getInfoType as t };
20
+ //# sourceMappingURL=index-H5Qko6iL.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-H5Qko6iL.d.mts","names":[],"sources":["../src/queries/get-info-type/index.ts"],"mappings":";cAAM,WAAA;EAAe,MAAA;EAAA,IAAA;EAAA,IAAA;EAAA;AAAA"}
@@ -5,5 +5,5 @@
5
5
  */
6
6
  declare const getTitle: (title: string) => string;
7
7
  //#endregion
8
- export { getTitle as default };
9
- //# sourceMappingURL=index.d.mts.map
8
+ export { getTitle as t };
9
+ //# sourceMappingURL=index-iru-ct3u.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-iru-ct3u.d.mts","names":[],"sources":["../src/utils/get-title/index.ts"],"mappings":";;;;;cAMM,QAAA,GAAY,KAAa"}
@@ -7,5 +7,5 @@ declare const getBlocksByIdChildren: ({
7
7
  getBlocksChildrenList: any;
8
8
  }) => Promise<any>;
9
9
  //#endregion
10
- export { getBlocksByIdChildren as default };
11
- //# sourceMappingURL=index.d.mts.map
10
+ export { getBlocksByIdChildren as t };
11
+ //# sourceMappingURL=index-oAghjuN5.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-oAghjuN5.d.mts","names":[],"sources":["../src/queries/get-blocks-by-id-children/index.ts"],"mappings":";cAGM,qBAAA;EAA+B,QAAA;EAAA;AAAA;;;MAAmC,OAAA"}
@@ -9,5 +9,5 @@ declare const getQuery: ({
9
9
  reqQuery: any;
10
10
  }) => Promise<any>;
11
11
  //#endregion
12
- export { getQuery as default };
13
- //# sourceMappingURL=index.d.mts.map
12
+ export { getQuery as t };
13
+ //# sourceMappingURL=index-wMZIVRBv.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-wMZIVRBv.d.mts","names":[],"sources":["../src/queries/get-query/index.ts"],"mappings":";cAmBM,QAAA;EAAkB,MAAA;EAAA,oBAAA;EAAA;AAAA;;;;MAA0C,OAAA"}
@@ -1,5 +1,5 @@
1
1
  import { r as DataTypes } from "./index-BAoq6yHe.mjs";
2
- import { DATA_TYPES } from "./constants/index.mjs";
2
+ import { t as DATA_TYPES } from "./index-BD5kzRhY.mjs";
3
3
  import { Client as Client$1 } from "@notionhq/client";
4
4
 
5
5
  //#region src/index.d.ts
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;KAiBK,WAAA;EACH,MAAA,EAAQ,WAAA;EACR,SAAA,EAAW,cAAc;AAAA;AAAA,KAGtB,eAAA;EACH,IAAA;EACA,MAAM;AAAA;AAAA,KAGH,WAAA;EACH,qBAAA;EACA,qBAAA;EACA,uBAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,QAAA;AAAA;AAAA,KAGG,cAAA;EACH,OAAA;EACA,eAAA;EACA,IAAA;EACA,aAAA;AAAA;AAAA,cAGI,MAAA,SAAe,QAAA;EAAA;WAwBH,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;WAwCA,SAAA;IAAA,CACb,UAAA,CAAW,OAAA,IAAQ,KAAA;MAAkB,aAAA;MAAoB,SAAA;MAAgB,IAAA;IAAA,MAAY,OAAA;;;;;;;;;;;KAWrF,UAAA,CAAW,eAAA,IAAgB,KAAA;MAC1B,aAAA;MACA,SAAA;MACA,IAAA;IAAA,MACD,OAAA;;;;;;KAWA,UAAA,CAAW,IAAA,IAAK,KAAA;MAAkB,aAAA;MAAoB,SAAA;MAAgB,IAAA;IAAA,MAAW,OAAA;;;;;;;;;;;;;;;;KAWjF,UAAA,CAAW,aAAA,IAAc,KAAA;MACxB,aAAA;MACA,SAAA;MACA,IAAA;IAAA,MACD,OAAA;;;;;;;cAagB,OAAA;AAAA"}
package/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./constants-C2jPji6h.mjs";import{t}from"./get-blocks-by-id-children-BRe4p0pZ.mjs";import{t as n}from"./get-databases-by-id-query-CI9TMkPN.mjs";import{t as r}from"./get-deep-fetch-all-children-DVZ-HFbN.mjs";import{t as i}from"./get-info-type-CUsHqtfs.mjs";import{t as a}from"./get-notion-listing-by-date-CSKBdFDQ.mjs";import{t as o}from"./get-notion-listing-JJxOipMx.mjs";import{t as s}from"./get-notion-slug-by-route-Dh428D_m.mjs";import{t as c}from"./get-notion-slug-BecwpT0b.mjs";import{t as l}from"./get-pages-by-id-D_3I7OED.mjs";import{t as u}from"./get-path-variables-CnBrxTgg.mjs";import{t as d}from"./get-query-ljtSpKL5.mjs";import"./queries-CCGQpuUT.mjs";import{Client as f}from"@notionhq/client";var p=class extends f{#e;#t=async e=>{let t=await this.databases.retrieve({database_id:e}),n=`data_sources`in t?t.data_sources[0]?.id:void 0;if(!n)throw Error(`No data source found for Notion database ${e}`);return n};#n=async({database_id:e,...t})=>{let n=await this.#t(e);return await this.dataSources.query({data_source_id:n,...t})};custom={getBlocksByIdChildren:async e=>await t({...e,getBlocksChildrenList:this.blocks.children.list}),getDatabasesByIdQuery:async e=>await n({...e,getDatabasesQuery:this.#n}),getDeepFetchAllChildren:async e=>await r({...e,getBlocksChildrenList:this.blocks.children.list}),getInfoType:e=>i({...e,config:this.#e}),getPagesById:async e=>await l({...e,getPagesRetrieve:this.pages.retrieve}),getPathVariables:e=>u({...e,config:this.#e}),getQuery:async e=>await d({...e,config:this.#e,notionDatabasesQuery:this.#n})};dataTypes={[e.LISTING]:async e=>await o({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[e.LISTING_BY_DATE]:async e=>await a({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[e.SLUG]:async e=>await c({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getDeepFetchAllChildren:this.custom.getDeepFetchAllChildren}),[e.SLUG_BY_ROUTE]:async e=>await s({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getQuery:this.custom.getQuery})};constructor(e){super(e),this.#e=e?.config}};export{p as Client};
2
+ //# sourceMappingURL=index.mjs.map
package/index.mjs.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["_Client","#getDataSourceId","#queryDatabase","#config"],"sources":["../src/index.ts"],"sourcesContent":["import { Client as _Client } from \"@notionhq/client\";\n\nimport { DATA_TYPES } from \"./constants/index\";\nimport {\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getDeepFetchAllChildren,\n getInfoType,\n getNotionListing,\n getNotionListingByDate,\n getNotionSlug,\n getNotionSlugByRoute,\n getPagesById,\n getPathVariables,\n getQuery,\n} from \"./queries/index\";\n\ntype ClientProps = {\n custom: CustomProps;\n dataTypes: DataTypesProps;\n};\n\ntype CredentialProps = {\n auth: string;\n config: any;\n};\n\ntype CustomProps = {\n getBlocksByIdChildren: any;\n getDatabasesByIdQuery: any;\n getDeepFetchAllChildren: any;\n getInfoType: any;\n getPagesById: any;\n getPathVariables: any;\n getQuery: any;\n};\n\ntype DataTypesProps = {\n LISTING: any;\n LISTING_BY_DATE: any;\n SLUG: any;\n SLUG_BY_ROUTE: any;\n};\n\nclass Client extends _Client {\n #config?: any;\n\n #getDataSourceId = async (database_id: string): Promise<string> => {\n const database = await this.databases.retrieve({ database_id });\n const data_source_id = \"data_sources\" in database ? database.data_sources[0]?.id : undefined;\n if (!data_source_id) {\n throw new Error(`No data source found for Notion database ${database_id}`);\n }\n return data_source_id;\n };\n\n #queryDatabase = async ({\n database_id,\n ...rest\n }: {\n database_id: string;\n [key: string]: any;\n }) => {\n const data_source_id = await this.#getDataSourceId(database_id);\n return await this.dataSources.query({ data_source_id, ...rest });\n };\n\n // @todo(notion) throw error if `config` is not passed\n public readonly custom = {\n getBlocksByIdChildren: async (props) =>\n await getBlocksByIdChildren({\n ...props,\n getBlocksChildrenList: this.blocks.children.list,\n }),\n\n getDatabasesByIdQuery: async (props) =>\n await getDatabasesByIdQuery({\n ...props,\n getDatabasesQuery: this.#queryDatabase,\n }),\n\n getDeepFetchAllChildren: async (props) =>\n await getDeepFetchAllChildren({\n ...props,\n getBlocksChildrenList: this.blocks.children.list,\n }),\n\n getInfoType: (props) => {\n return getInfoType({ ...props, config: this.#config });\n },\n\n getPagesById: async (props) =>\n await getPagesById({ ...props, getPagesRetrieve: this.pages.retrieve }),\n\n getPathVariables: (props) => getPathVariables({ ...props, config: this.#config }),\n\n getQuery: async (props) =>\n await getQuery({\n ...props,\n config: this.#config,\n notionDatabasesQuery: this.#queryDatabase,\n }),\n };\n\n /**\n * @info details at: ../../utils/getDataType\n *\n */\n public readonly dataTypes = {\n [DATA_TYPES.LISTING]: async (props: { pathVariables: any; routeType: any; slug?: any }) => {\n // console.dir(`📦️ [@jeromefitz/notion] => ${DATA_TYPES.LISTING}`)\n return await getNotionListing({\n ...props,\n config: this.#config,\n getBlocksByIdChildren: this.custom.getBlocksByIdChildren,\n getDatabasesByIdQuery: this.custom.getDatabasesByIdQuery,\n getPagesById: this.custom.getPagesById,\n });\n },\n\n [DATA_TYPES.LISTING_BY_DATE]: async (props: {\n pathVariables: any;\n routeType: any;\n slug: any;\n }) => {\n // console.dir(`📦️ [@jeromefitz/notion] => ${DATA_TYPES.LISTING_BY_DATE}`)\n return await getNotionListingByDate({\n ...props,\n config: this.#config,\n getBlocksByIdChildren: this.custom.getBlocksByIdChildren,\n getDatabasesByIdQuery: this.custom.getDatabasesByIdQuery,\n getPagesById: this.custom.getPagesById,\n });\n },\n\n [DATA_TYPES.SLUG]: async (props: { pathVariables: any; routeType: any; slug: any }) => {\n // console.dir(`📦️ [@jeromefitz/notion] => ${DATA_TYPES.SLUG}`)\n return await getNotionSlug({\n ...props,\n config: this.#config,\n getBlocksByIdChildren: this.custom.getBlocksByIdChildren,\n getDatabasesByIdQuery: this.custom.getDatabasesByIdQuery,\n getDeepFetchAllChildren: this.custom.getDeepFetchAllChildren,\n });\n },\n\n [DATA_TYPES.SLUG_BY_ROUTE]: async (props: {\n pathVariables: any;\n routeType: any;\n slug: any;\n }) => {\n // console.dir(`📦️ [@jeromefitz/notion] => ${DATA_TYPES.SLUG_BY_ROUTE}`)\n return await getNotionSlugByRoute({\n ...props,\n config: this.#config,\n getBlocksByIdChildren: this.custom.getBlocksByIdChildren,\n getDatabasesByIdQuery: this.custom.getDatabasesByIdQuery,\n getQuery: this.custom.getQuery,\n });\n },\n };\n\n // public constructor(options?: ClientOptions) {\n public constructor(options?: any) {\n super(options);\n this.#config = options?.config;\n }\n}\n\nexport type { ClientProps, CredentialProps };\nexport { Client };\n"],"mappings":"otBA4CA,IAAM,EAAN,cAAqBA,CAAQ,CAC3B,GAEA,GAAmB,KAAO,IAAyC,CACjE,IAAM,EAAW,MAAM,KAAK,UAAU,SAAS,CAAE,aAAY,CAAC,EACxD,EAAiB,iBAAkB,EAAW,EAAS,aAAa,EAAE,EAAE,GAAK,OACnF,GAAI,CAAC,EACH,MAAU,MAAM,4CAA4C,GAAa,EAE3E,OAAO,CACT,EAEA,GAAiB,MAAO,CACtB,cACA,GAAG,KAIC,CACJ,IAAM,EAAiB,MAAM,KAAKC,GAAiB,CAAW,EAC9D,OAAO,MAAM,KAAK,YAAY,MAAM,CAAE,iBAAgB,GAAG,CAAK,CAAC,CACjE,EAGA,OAAyB,CACvB,sBAAuB,KAAO,IAC5B,MAAM,EAAsB,CAC1B,GAAG,EACH,sBAAuB,KAAK,OAAO,SAAS,IAC9C,CAAC,EAEH,sBAAuB,KAAO,IAC5B,MAAM,EAAsB,CAC1B,GAAG,EACH,kBAAmB,KAAKC,EAC1B,CAAC,EAEH,wBAAyB,KAAO,IAC9B,MAAM,EAAwB,CAC5B,GAAG,EACH,sBAAuB,KAAK,OAAO,SAAS,IAC9C,CAAC,EAEH,YAAc,GACL,EAAY,CAAE,GAAG,EAAO,OAAQ,KAAKC,EAAQ,CAAC,EAGvD,aAAc,KAAO,IACnB,MAAM,EAAa,CAAE,GAAG,EAAO,iBAAkB,KAAK,MAAM,QAAS,CAAC,EAExE,iBAAmB,GAAU,EAAiB,CAAE,GAAG,EAAO,OAAQ,KAAKA,EAAQ,CAAC,EAEhF,SAAU,KAAO,IACf,MAAM,EAAS,CACb,GAAG,EACH,OAAQ,KAAKA,GACb,qBAAsB,KAAKD,EAC7B,CAAC,CACL,EAMA,UAA4B,EACzB,EAAW,SAAU,KAAO,IAEpB,MAAM,EAAiB,CAC5B,GAAG,EACH,OAAQ,KAAKC,GACb,sBAAuB,KAAK,OAAO,sBACnC,sBAAuB,KAAK,OAAO,sBACnC,aAAc,KAAK,OAAO,YAC5B,CAAC,GAGF,EAAW,iBAAkB,KAAO,IAM5B,MAAM,EAAuB,CAClC,GAAG,EACH,OAAQ,KAAKA,GACb,sBAAuB,KAAK,OAAO,sBACnC,sBAAuB,KAAK,OAAO,sBACnC,aAAc,KAAK,OAAO,YAC5B,CAAC,GAGF,EAAW,MAAO,KAAO,IAEjB,MAAM,EAAc,CACzB,GAAG,EACH,OAAQ,KAAKA,GACb,sBAAuB,KAAK,OAAO,sBACnC,sBAAuB,KAAK,OAAO,sBACnC,wBAAyB,KAAK,OAAO,uBACvC,CAAC,GAGF,EAAW,eAAgB,KAAO,IAM1B,MAAM,EAAqB,CAChC,GAAG,EACH,OAAQ,KAAKA,GACb,sBAAuB,KAAK,OAAO,sBACnC,sBAAuB,KAAK,OAAO,sBACnC,SAAU,KAAK,OAAO,QACxB,CAAC,CAEL,EAGA,YAAmB,EAAe,CAChC,MAAM,CAAO,EACb,KAAKA,GAAU,GAAS,MAC1B,CACF"}
@@ -0,0 +1 @@
1
+ export { };