@jeromefitz/notion 6.2.0-canary.1 → 7.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 (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
+ import{t as e}from"../../get-blocks-by-id-children-BRe4p0pZ.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getDatabasesByIdQuery } from "../../index-CucnheQT.mjs";
2
+ export { getDatabasesByIdQuery as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-databases-by-id-query-CI9TMkPN.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getDeepFetchAllChildren } from "../../index-D_fBH_D4.mjs";
2
+ export { getDeepFetchAllChildren as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-deep-fetch-all-children-DVZ-HFbN.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getInfoType } from "../../index-H5Qko6iL.mjs";
2
+ export { getInfoType as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-info-type-CUsHqtfs.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getNotionListing } from "../../index-D4Gn1cYC.mjs";
2
+ export { getNotionListing as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-notion-listing-JJxOipMx.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getNotionListingByDate } from "../../index-BIttGCzA.mjs";
2
+ export { getNotionListingByDate as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-notion-listing-by-date-CSKBdFDQ.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getNotionSlug } from "../../index-Dx2yW5u0.mjs";
2
+ export { getNotionSlug as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-notion-slug-BecwpT0b.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getNotionSlugByRoute } from "../../index-CLQVoKDp.mjs";
2
+ export { getNotionSlugByRoute as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-notion-slug-by-route-Dh428D_m.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getPagesById } from "../../index-C-J3ICp0.mjs";
2
+ export { getPagesById as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-pages-by-id-D_3I7OED.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getPathVariables } from "../../index-D16uYjWr.mjs";
2
+ export { getPathVariables as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-path-variables-CnBrxTgg.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getQuery } from "../../index-wMZIVRBv.mjs";
2
+ export { getQuery as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-query-ljtSpKL5.mjs";export{e as default};
@@ -0,0 +1,12 @@
1
+ import { t as getBlocksByIdChildren } from "../index-oAghjuN5.mjs";
2
+ import { t as getDatabasesByIdQuery } from "../index-CucnheQT.mjs";
3
+ import { t as getDeepFetchAllChildren } from "../index-D_fBH_D4.mjs";
4
+ import { t as getInfoType } from "../index-H5Qko6iL.mjs";
5
+ import { t as getNotionListingByDate } from "../index-BIttGCzA.mjs";
6
+ import { t as getNotionListing } from "../index-D4Gn1cYC.mjs";
7
+ import { t as getNotionSlugByRoute } from "../index-CLQVoKDp.mjs";
8
+ import { t as getNotionSlug } from "../index-Dx2yW5u0.mjs";
9
+ import { t as getPagesById } from "../index-C-J3ICp0.mjs";
10
+ import { t as getPathVariables } from "../index-D16uYjWr.mjs";
11
+ import { t as getQuery } from "../index-wMZIVRBv.mjs";
12
+ export { getBlocksByIdChildren, getDatabasesByIdQuery, getDeepFetchAllChildren, getInfoType, getNotionListing, getNotionListingByDate, getNotionSlug, getNotionSlugByRoute, getPagesById, getPathVariables, getQuery };
@@ -0,0 +1 @@
1
+ import{t as e}from"../get-blocks-by-id-children-BRe4p0pZ.mjs";import{t}from"../get-databases-by-id-query-CI9TMkPN.mjs";import{t as n}from"../get-deep-fetch-all-children-DVZ-HFbN.mjs";import{t as r}from"../get-info-type-CUsHqtfs.mjs";import{t as i}from"../get-notion-listing-by-date-CSKBdFDQ.mjs";import{t as a}from"../get-notion-listing-JJxOipMx.mjs";import{t as o}from"../get-notion-slug-by-route-Dh428D_m.mjs";import{t as s}from"../get-notion-slug-BecwpT0b.mjs";import{t as c}from"../get-pages-by-id-D_3I7OED.mjs";import{t as l}from"../get-path-variables-CnBrxTgg.mjs";import{t as u}from"../get-query-ljtSpKL5.mjs";import"../queries-CCGQpuUT.mjs";export{e as getBlocksByIdChildren,t as getDatabasesByIdQuery,n as getDeepFetchAllChildren,r as getInfoType,a as getNotionListing,i as getNotionListingByDate,s as getNotionSlug,o as getNotionSlugByRoute,c as getPagesById,l as getPathVariables,u as getQuery};
@@ -0,0 +1 @@
1
+ import"./get-blocks-by-id-children-BRe4p0pZ.mjs";import"./get-databases-by-id-query-CI9TMkPN.mjs";import"./get-deep-fetch-all-children-DVZ-HFbN.mjs";import"./get-info-type-CUsHqtfs.mjs";import"./get-notion-listing-by-date-CSKBdFDQ.mjs";import"./get-notion-listing-JJxOipMx.mjs";import"./get-notion-slug-by-route-Dh428D_m.mjs";import"./get-notion-slug-BecwpT0b.mjs";import"./get-pages-by-id-D_3I7OED.mjs";import"./get-path-variables-CnBrxTgg.mjs";import"./get-query-ljtSpKL5.mjs";export{};
@@ -1,2 +1,2 @@
1
- const e=e=>e?.rich_text?e?.rich_text[0]?.plain_text:null;export{e as default};
2
- //# sourceMappingURL=rich-text.mjs.map
1
+ const e=e=>e?.rich_text?e?.rich_text[0]?.plain_text:null;export{e as t};
2
+ //# sourceMappingURL=rich-text-pNpMuY2o.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-pNpMuY2o.mjs","names":[],"sources":["../src/utils/get-types/rich-text.ts"],"sourcesContent":["const rich_text = (data: any) =>\n // oxlint-disable-next-line no-extra-boolean-cast\n !!data?.rich_text ? data?.rich_text[0]?.plain_text : null;\n\nexport default rich_text;\n"],"mappings":"AAAA,MAAM,EAAa,GAEf,GAAM,UAAY,GAAM,UAAU,EAAE,EAAE,WAAa"}
@@ -1,2 +1,2 @@
1
- import e from"github-slugger";const t=t=>{let n=new e,r=t.select;return r?(r.slug=n.slug(t.select.name),{[r.id]:r}):null};export{t as default};
2
- //# sourceMappingURL=select.mjs.map
1
+ import e from"github-slugger";const t=t=>{let n=new e,r=t.select;return r?(r.slug=n.slug(t.select.name),{[r.id]:r}):null};export{t};
2
+ //# sourceMappingURL=select-i6mHDBMN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-i6mHDBMN.mjs","names":[],"sources":["../src/utils/get-types/select.ts"],"sourcesContent":["import Slugger from \"github-slugger\";\n\nconst select = (data: any) => {\n const slugger = new Slugger();\n\n const s: any = data.select;\n // console.dir(`getTypeSelectNormalized`)\n // console.dir(data)\n\n // oxlint-disable-next-line no-extra-boolean-cast\n if (!!s) {\n s.slug = slugger.slug(data.select.name);\n return { [s.id]: s };\n } else {\n return null;\n }\n\n // return data\n};\n\nexport default select;\n"],"mappings":"8BAEA,MAAM,EAAU,GAAc,CAC5B,IAAM,EAAU,IAAI,EAEd,EAAS,EAAK,OASlB,OAJI,GACJ,EAAE,KAAO,EAAQ,KAAK,EAAK,OAAO,IAAI,EAC/B,EAAG,EAAE,IAAK,CAAE,GAEZ,IAIX"}
@@ -0,0 +1,2 @@
1
+ const e=e=>e?.title?e?.title[0]?.plain_text:null;export{e as t};
2
+ //# sourceMappingURL=title-vmIyt8-r.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"title-vmIyt8-r.mjs","names":[],"sources":["../src/utils/get-types/title.ts"],"sourcesContent":["// oxlint-disable-next-line no-extra-boolean-cast\nconst title = (data: any) => (!!data?.title ? data?.title[0]?.plain_text : null);\n\nexport default title;\n"],"mappings":"AACA,MAAM,EAAS,GAAiB,GAAM,MAAQ,GAAM,MAAM,EAAE,EAAE,WAAa"}
@@ -0,0 +1,2 @@
1
+ const e=e=>e.url||null;export{e as t};
2
+ //# sourceMappingURL=url-D7qu9nU2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url-D7qu9nU2.mjs","names":[],"sources":["../src/utils/get-types/url.ts"],"sourcesContent":["const url = (data: any) => data.url || null;\n\nexport default url;\n"],"mappings":"AAAA,MAAM,EAAO,GAAc,EAAK,KAAO"}
@@ -0,0 +1,2 @@
1
+ import { t as addTime } from "../../index-DxiWPo1l.mjs";
2
+ export { addTime as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../add-time-B_LfV4Ex.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as dataNormalized } from "../../index-DZjFlXjH.mjs";
2
+ export { dataNormalized as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../utils-B1QU_ezs.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as dataNormalizedResults } from "../../index-DMqCumJi.mjs";
2
+ export { dataNormalizedResults as default };
@@ -0,0 +1 @@
1
+ import{n as e}from"../../utils-B1QU_ezs.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getDataType } from "../../index-BGofpiiB.mjs";
2
+ export { getDataType as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-data-type-B5X5VOmp.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getTitle } from "../../index-iru-ct3u.mjs";
2
+ export { getTitle as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-title-BWc2Ckhi.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../_unsupported-BUIwc9lr.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../checkbox-Cil1erOZ.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../date-IJAT1r3Y.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../email-DygPLxSo.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../files-Dx1jw5iY.mjs";export{e as default};
@@ -0,0 +1,2 @@
1
+ import { t as getTypes } from "../../index-DZSqTeBx.mjs";
2
+ export { getTypes as default };
@@ -0,0 +1 @@
1
+ import{t as e}from"../../get-types-Clb6OmBv.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../multi-select-BTDQCZWJ.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../number-DXsVfS7U.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../people-Ognwaka4.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../phone-number-D-jSJ6fm.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"../../get-types-Clb6OmBv.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../rich-text-pNpMuY2o.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"../../get-types-Clb6OmBv.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../select-i6mHDBMN.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../title-vmIyt8-r.mjs";export{e as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"../../url-D7qu9nU2.mjs";export{e as default};
@@ -0,0 +1,7 @@
1
+ import { t as addTime } from "../index-DxiWPo1l.mjs";
2
+ import { t as dataNormalizedResults } from "../index-DMqCumJi.mjs";
3
+ import { t as dataNormalized } from "../index-DZjFlXjH.mjs";
4
+ import { t as getDataType } from "../index-BGofpiiB.mjs";
5
+ import { t as getTitle } from "../index-iru-ct3u.mjs";
6
+ import { t as getTypes } from "../index-DZSqTeBx.mjs";
7
+ export { addTime, dataNormalized, dataNormalizedResults, getDataType, getTitle, getTypes };
@@ -0,0 +1 @@
1
+ import{t as e}from"../add-time-B_LfV4Ex.mjs";import{n as t,t as n}from"../utils-B1QU_ezs.mjs";import{t as r}from"../get-data-type-B5X5VOmp.mjs";import{t as i}from"../get-title-BWc2Ckhi.mjs";import{t as a}from"../get-types-Clb6OmBv.mjs";export{e as addTime,n as dataNormalized,t as dataNormalizedResults,r as getDataType,i as getTitle,a as getTypes};
@@ -0,0 +1,2 @@
1
+ import{a as e,r as t}from"./constants-C2jPji6h.mjs";import"./add-time-B_LfV4Ex.mjs";import"./get-data-type-B5X5VOmp.mjs";import"./get-title-BWc2Ckhi.mjs";import{t as n}from"./get-types-Clb6OmBv.mjs";import{map as r,omit as i}from"lodash-es";import{sortObject as a}from"@jeromefitz/utils";const o=({config:e,results:t,routeType:n})=>{let o=[];return r(t,t=>{let r=i(t,`properties`);r.properties=a(s({config:e,data:t,pageId:t?.id,pathVariables:n})),o.push(r)}),o},s=({config:i,data:a,pageId:o,pathVariables:s})=>{let{NOTION:c}=i,l={};if(!a?.properties)return l;let{properties:u}=a,d=``;if(s){let{meta:e,routeType:t}=s;d=t===c?.PODCASTS?.routeType&&e.length>1?c?.EPISODES?.routeType:t}return r(d?t[d.toUpperCase()]:e,e=>{let t,r=u[e.notion];l[e.key]=null,r&&(t=n[e.type](r,o),l[e.key]=t||null)}),l};export{o as n,s as t};
2
+ //# sourceMappingURL=utils-B1QU_ezs.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils-SxsCJsDP.mjs","names":["_omit"],"sources":["../src/utils/data-normalized-results/index.ts","../src/utils/data-normalized/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit } from \"lodash-es\";\n\nimport { dataNormalized } from \"../../utils/index\";\n\n/**\n * @todo(notion)\n *\n * Refactor after `dataNormalized` to remove `config` as a parameter,\n * or move this to `queries`\n */\nconst dataNormalizedResults = ({ config, results, routeType }) => {\n const normalizedResults: any[] = [];\n _map(results, (result) => {\n const normalizedResult = _omit(result, \"properties\");\n normalizedResult.properties = sortObject(\n dataNormalized({\n config,\n data: result,\n pageId: result?.id,\n pathVariables: routeType,\n }),\n );\n normalizedResults.push(normalizedResult);\n });\n return normalizedResults;\n};\n\nexport default dataNormalizedResults;\n","import { map as _map } from \"lodash-es\";\n\nimport { LOOKUP, PROPERTIES_LOOKUP } from \"../../constants/index\";\nimport { getTypes } from \"../../utils/index\";\n\n/**\n * @todo(notion)\n *\n * Refactor to remove `config` as a parameter, or move this to `queries`\n */\n// oxlint-disable-next-line complexity\nconst dataNormalized = ({ config, data, pageId, pathVariables }) => {\n const { NOTION } = config;\n const DATA_NORMALIZED = {};\n if (!data?.properties) return DATA_NORMALIZED;\n const { properties } = data;\n\n // @hack(notion) not great\n let routeType = \"\";\n if (pathVariables) {\n const { meta, routeType: _routeType } = pathVariables;\n routeType =\n _routeType === NOTION?.PODCASTS?.routeType && meta.length > 1\n ? NOTION?.EPISODES?.routeType\n : _routeType;\n }\n\n const items = routeType ? LOOKUP[routeType.toUpperCase()] : PROPERTIES_LOOKUP;\n\n _map(items, (item) => {\n let dataToNormalize: any;\n\n const dataFromNotion = properties[item.notion];\n /**\n * @note(notion)\n * ensure key populates in api\n * only populate w/ data if exists in notion\n */\n DATA_NORMALIZED[item.key] = null;\n if (dataFromNotion) {\n dataToNormalize = getTypes[item.type](dataFromNotion, pageId);\n DATA_NORMALIZED[item.key] = dataToNormalize ? dataToNormalize : null;\n }\n });\n\n return DATA_NORMALIZED;\n};\n\nexport default dataNormalized;\n"],"mappings":"2TAWA,MAAM,GAAyB,CAAE,SAAQ,UAAS,eAAgB,CAChE,IAAM,EAA2B,CAAC,EAalC,OAZA,EAAK,EAAU,GAAW,CACxB,IAAM,EAAmBA,EAAM,EAAQ,YAAY,EACnD,EAAiB,WAAa,EAC5B,EAAe,CACb,SACA,KAAM,EACN,OAAQ,GAAQ,GAChB,cAAe,CACjB,CAAC,CACH,EACA,EAAkB,KAAK,CAAgB,CACzC,CAAC,EACM,CACT,ECfM,GAAkB,CAAE,SAAQ,OAAM,SAAQ,mBAAoB,CAClE,GAAM,CAAE,UAAW,EACb,EAAkB,CAAC,EACzB,GAAI,CAAC,GAAM,WAAY,OAAO,EAC9B,GAAM,CAAE,cAAe,EAGnB,EAAY,GAChB,GAAI,EAAe,CACjB,GAAM,CAAE,OAAM,UAAW,GAAe,EACxC,EACE,IAAe,GAAQ,UAAU,WAAa,EAAK,OAAS,EACxD,GAAQ,UAAU,UAClB,CACR,CAoBA,OAhBA,EAFc,EAAY,EAAO,EAAU,YAAY,GAAK,EAE/C,GAAS,CACpB,IAAI,EAEE,EAAiB,EAAW,EAAK,QAMvC,EAAgB,EAAK,KAAO,KACxB,IACF,EAAkB,EAAS,EAAK,KAAK,CAAC,EAAgB,CAAM,EAC5D,EAAgB,EAAK,KAAO,GAAoC,KAEpE,CAAC,EAEM,CACT"}
1
+ {"version":3,"file":"utils-B1QU_ezs.mjs","names":["_omit"],"sources":["../src/utils/data-normalized-results/index.ts","../src/utils/data-normalized/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit } from \"lodash-es\";\n\nimport { dataNormalized } from \"../../utils/index\";\n\n/**\n * @todo(notion)\n *\n * Refactor after `dataNormalized` to remove `config` as a parameter,\n * or move this to `queries`\n */\nconst dataNormalizedResults = ({ config, results, routeType }) => {\n const normalizedResults: any[] = [];\n _map(results, (result) => {\n const normalizedResult = _omit(result, \"properties\");\n normalizedResult.properties = sortObject(\n dataNormalized({\n config,\n data: result,\n pageId: result?.id,\n pathVariables: routeType,\n }),\n );\n normalizedResults.push(normalizedResult);\n });\n return normalizedResults;\n};\n\nexport default dataNormalizedResults;\n","import { map as _map } from \"lodash-es\";\n\nimport { LOOKUP, PROPERTIES_LOOKUP } from \"../../constants/index\";\nimport { getTypes } from \"../../utils/index\";\n\n/**\n * @todo(notion)\n *\n * Refactor to remove `config` as a parameter, or move this to `queries`\n */\n// oxlint-disable-next-line complexity\nconst dataNormalized = ({ config, data, pageId, pathVariables }) => {\n const { NOTION } = config;\n const DATA_NORMALIZED = {};\n if (!data?.properties) return DATA_NORMALIZED;\n const { properties } = data;\n\n // @hack(notion) not great\n let routeType = \"\";\n if (pathVariables) {\n const { meta, routeType: _routeType } = pathVariables;\n routeType =\n _routeType === NOTION?.PODCASTS?.routeType && meta.length > 1\n ? NOTION?.EPISODES?.routeType\n : _routeType;\n }\n\n const items = routeType ? LOOKUP[routeType.toUpperCase()] : PROPERTIES_LOOKUP;\n\n _map(items, (item) => {\n let dataToNormalize: any;\n\n const dataFromNotion = properties[item.notion];\n /**\n * @note(notion)\n * ensure key populates in api\n * only populate w/ data if exists in notion\n */\n DATA_NORMALIZED[item.key] = null;\n if (dataFromNotion) {\n dataToNormalize = getTypes[item.type](dataFromNotion, pageId);\n DATA_NORMALIZED[item.key] = dataToNormalize ? dataToNormalize : null;\n }\n });\n\n return DATA_NORMALIZED;\n};\n\nexport default dataNormalized;\n"],"mappings":"gSAWA,MAAM,GAAyB,CAAE,SAAQ,UAAS,eAAgB,CAChE,IAAM,EAA2B,CAAC,EAalC,OAZA,EAAK,EAAU,GAAW,CACxB,IAAM,EAAmBA,EAAM,EAAQ,YAAY,EACnD,EAAiB,WAAa,EAC5B,EAAe,CACb,SACA,KAAM,EACN,OAAQ,GAAQ,GAChB,cAAe,CACjB,CAAC,CACH,EACA,EAAkB,KAAK,CAAgB,CACzC,CAAC,EACM,CACT,ECfM,GAAkB,CAAE,SAAQ,OAAM,SAAQ,mBAAoB,CAClE,GAAM,CAAE,UAAW,EACb,EAAkB,CAAC,EACzB,GAAI,CAAC,GAAM,WAAY,OAAO,EAC9B,GAAM,CAAE,cAAe,EAGnB,EAAY,GAChB,GAAI,EAAe,CACjB,GAAM,CAAE,OAAM,UAAW,GAAe,EACxC,EACE,IAAe,GAAQ,UAAU,WAAa,EAAK,OAAS,EACxD,GAAQ,UAAU,UAClB,CACR,CAoBA,OAhBA,EAFc,EAAY,EAAO,EAAU,YAAY,GAAK,EAE/C,GAAS,CACpB,IAAI,EAEE,EAAiB,EAAW,EAAK,QAMvC,EAAgB,EAAK,KAAO,KACxB,IACF,EAAkB,EAAS,EAAK,KAAK,CAAC,EAAgB,CAAM,EAC5D,EAAgB,EAAK,KAAO,GAAoC,KAEpE,CAAC,EAEM,CACT"}
@@ -1,4 +0,0 @@
1
- $ tsdown
2
- ℹ tsdown v0.22.0 powered by rolldown v1.1.3
3
- ℹ config file: /home/runner/work/packages/packages/packages/notion/tsdown.config.ts
4
- ℹ Build start
@@ -1 +0,0 @@
1
- $ tsc --noEmit --declaration
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_filter","_map"],"sources":["../../src/constants/index.ts"],"sourcesContent":["import { filter as _filter, map as _map } from \"lodash-es\";\n\nimport type { DataTypes, DataTypesObject, Property } from \"../schema/index\";\n\nconst getLookup = ({ key, notion, type }) => ({\n key,\n notion,\n type,\n});\n\n/**\n * @note\n * Valid Notion Property Types mapped to Normalizer w/ init info\n *\n * *********************\n * RELATIONS and ROLLUPS\n * *********************\n *\n * For each RELATION or ROLLUP there can be only one init\n * During the build process this happens in waves\n *\n *\n */\nconst PROPERTIES: Record<string, Property> = {\n addressCity: {\n init: true,\n key: \"addressCity\",\n notion: \"Address.City\",\n type: \"rich_text\",\n },\n addressLatitude: {\n format: \"number\",\n init: true,\n key: \"addressLatitude\",\n notion: \"Address.Latitude\",\n type: \"number\",\n },\n addressLongitude: {\n format: \"number\",\n init: true,\n key: \"addressLongitude\",\n notion: \"Address.Longitude\",\n type: \"number\",\n },\n addressNeighborhood: {\n init: true,\n key: \"addressNeighborhood\",\n notion: \"Address.Neighborhood\",\n type: \"rich_text\",\n },\n addressState: {\n init: true,\n key: \"addressState\",\n notion: \"Address.State\",\n type: \"select\",\n },\n addressStreet: {\n init: true,\n key: \"addressStreet\",\n notion: \"Address.Street\",\n type: \"rich_text\",\n },\n addressZipCode: {\n format: \"number\",\n init: true,\n key: \"addressZipCode\",\n notion: \"Address.ZipCode\",\n type: \"number\",\n },\n author: {\n init: true,\n key: \"author\",\n notion: \"Author\",\n type: \"rich_text\",\n },\n authors: {\n init: true,\n key: \"authors\",\n notion: \"Authors\",\n type: \"people\",\n },\n categories: {\n init: true,\n key: \"categories\",\n notion: \"Categories\",\n type: \"multi_select\",\n },\n dateCreated: {\n init: false,\n key: \"dateCreated\",\n notion: \"Date.Created\",\n type: \"created_time\",\n },\n dateEdited: {\n init: false,\n key: \"dateEdited\",\n notion: \"Date.Edited\",\n type: \"last_edited_time\",\n },\n dateEvent: {\n init: true,\n key: \"dateEvent\",\n notion: \"Date.Event\",\n type: \"date\",\n },\n datePublished: {\n init: true,\n key: \"datePublished\",\n notion: \"Date.Published\",\n type: \"date\",\n },\n dateRecorded: {\n init: true,\n key: \"dateRecorded\",\n notion: \"Date.Recorded\",\n type: \"date\",\n },\n duration: {\n init: true,\n key: \"duration\",\n notion: \"Duration\",\n type: \"rich_text\",\n },\n email: {\n init: true,\n key: \"email\",\n notion: \"Email\",\n type: \"rich_text\",\n },\n episode: {\n format: \"number\",\n init: true,\n key: \"episode\",\n notion: \"Episode\",\n type: \"number\",\n },\n explicit: {\n init: true,\n key: \"explicit\",\n notion: \"Explicit\",\n type: \"checkbox\",\n },\n festivals: {\n init: true,\n key: \"festivals\",\n notion: \"Festival\",\n type: \"multi_select\",\n },\n food: {\n init: true,\n key: \"food\",\n notion: \"Food\",\n type: \"rich_text\",\n },\n isIndexed: {\n init: true,\n key: \"isIndexed\",\n notion: \"Is.Indexed\",\n type: \"checkbox\",\n },\n isPublished: {\n init: true,\n key: \"isPublished\",\n notion: \"Is.Published\",\n type: \"checkbox\",\n },\n mp3: {\n init: true,\n key: \"mp3\",\n notion: \"MP3\",\n type: \"files\",\n },\n name: {\n init: true,\n key: \"name\",\n notion: \"Name\",\n type: \"rich_text\",\n },\n nameFirst: {\n init: true,\n key: \"nameFirst\",\n notion: \"Name.First\",\n type: \"rich_text\",\n },\n nameLast: {\n init: true,\n key: \"nameLast\",\n notion: \"Name.Last\",\n type: \"rich_text\",\n },\n namePreferred: {\n init: true,\n key: \"namePreferred\",\n notion: \"Name.Preferred\",\n type: \"rich_text\",\n },\n phoneNumber: {\n init: true,\n key: \"phoneNumber\",\n notion: \"Phone\",\n type: \"rich_text\",\n },\n podcastAuthor: {\n init: true,\n key: \"podcastAuthor\",\n notion: \"Author\",\n type: \"rich_text\",\n },\n podcastAuthorEmail: {\n init: true,\n key: \"podcastAuthorEmail\",\n notion: \"Author.Email\",\n type: \"rich_text\",\n },\n relationEpisodes__People_Guest: {\n init: true,\n key: \"relationEpisodes__People_Guest\",\n notion: \"Guest\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Episodes.Guest\",\n },\n type: \"relation\",\n },\n relationEpisodes__People_Sound_Engineer: {\n init: true,\n key: \"relationEpisodes__People_Sound_Engineer\",\n notion: \"Sound.Engineer\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Episodes.Sound.Engineer\",\n },\n type: \"relation\",\n },\n relationEpisodes__People_Thanks: {\n init: true,\n key: \"relationEpisodes__People_Thanks\",\n notion: \"Thanks\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Episodes.Thanks\",\n },\n type: \"relation\",\n },\n /**\n * @relation\n */\n relationEpisodes__Podcasts: {\n init: true,\n key: \"relationEpisodes__Podcasts\",\n notion: \"Podcasts\",\n relation: {\n database_id: \"Podcasts\",\n synced_property_name: \"Episodes\",\n },\n type: \"relation\",\n },\n relationEpisodes__Venues: {\n init: true,\n key: \"relationEpisodes__Venues\",\n notion: \"Venues\",\n relation: {\n database_id: \"Venues\",\n synced_property_name: \"Episodes\",\n },\n type: \"relation\",\n },\n relationEvents__People_Guest: {\n init: true,\n key: \"relationEvents__People_Guest\",\n notion: \"Guest\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Events.Guest\",\n },\n type: \"relation\",\n },\n\n relationEvents__People_Guest_Music: {\n init: true,\n key: \"relationEvents__People_Guest_Music\",\n notion: \"Guest.Music\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Events.Guest.Music\",\n },\n type: \"relation\",\n },\n relationEvents__People_Host: {\n init: true,\n key: \"relationEvents__People_Host\",\n notion: \"Host\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Events.Host\",\n },\n type: \"relation\",\n },\n relationEvents__Shows: {\n init: true,\n key: \"relationEvents__Shows\",\n notion: \"Shows\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Events\",\n },\n type: \"relation\",\n },\n relationEvents__Shows_Lineup: {\n init: true,\n key: \"relationEvents__Shows_Lineup\",\n notion: \"Shows.Lineup\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Events.Lineup\",\n },\n type: \"relation\",\n },\n relationEvents__Venues: {\n init: true,\n key: \"relationEvents__Venues\",\n notion: \"Venues\",\n relation: {\n database_id: \"Venues\",\n synced_property_name: \"Events\",\n },\n type: \"relation\",\n },\n relationPeople__Episodes_Guest: {\n init: false,\n key: \"relationPeople__Episodes_Guest\",\n notion: \"Episodes.Guest\",\n relation: {\n database_id: \"Episodes\",\n synced_property_name: \"Guest\",\n },\n type: \"relation\",\n },\n relationPeople__Episodes_Sound_Engineer: {\n init: false,\n key: \"relationPeople__Episodes_Sound_Engineer\",\n notion: \"Episodes.Sound.Engineer\",\n relation: {\n database_id: \"Episodes\",\n synced_property_name: \"Sound.Engineer\",\n },\n type: \"relation\",\n },\n relationPeople__Episodes_Thanks: {\n init: false,\n key: \"relationPeople__Episodes_Thanks\",\n notion: \"Episodes.Thanks\",\n relation: {\n database_id: \"Episodes\",\n synced_property_name: \"Thanks\",\n },\n type: \"relation\",\n },\n relationPeople__Events_Guest: {\n init: false,\n key: \"relationEvents__People_Guest\",\n notion: \"Events.Guest\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Guest\",\n },\n type: \"relation\",\n },\n relationPeople__Events_Guest_Music: {\n init: false,\n key: \"relationPeople__Events_Guest_Music\",\n notion: \"Events.Guest.Music\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Guest.Music\",\n },\n type: \"relation\",\n },\n relationPeople__Events_Host: {\n init: false,\n key: \"relationPeople__Events_Host\",\n notion: \"Events.Host\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Host\",\n },\n type: \"relation\",\n },\n relationPeople__Podcasts_Host: {\n init: false,\n key: \"relationPeople__Podcasts_Host\",\n notion: \"Podcasts.Host\",\n relation: {\n database_id: \"Podcasts\",\n synced_property_name: \"Host\",\n },\n type: \"relation\",\n },\n relationPeople__Podcasts_Sound_Engineer: {\n init: false,\n key: \"relationPeople__Podcasts_Sound_Engineer\",\n notion: \"Podcasts.Sound.Engineer\",\n relation: {\n database_id: \"Podcasts\",\n synced_property_name: \"Sound.Engineer\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Cast: {\n init: false,\n key: \"relationPeople__Shows_Cast\",\n notion: \"Shows.Cast\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Cast\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Cast_Past: {\n init: false,\n key: \"relationPeople__Shows_Cast_Past\",\n notion: \"Shows.Cast.Past\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Cast.Past\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Crew: {\n init: true,\n key: \"relationPeople__Shows_Crew\",\n notion: \"Shows.Crew\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Crew\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Director: {\n init: false,\n key: \"relationPeople__Shows_Director\",\n notion: \"Shows.Director\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Director\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Director_Musical: {\n init: false,\n key: \"relationPeople__Shows_Director_Musical\",\n notion: \"Shows.Director.Musical\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Director.Musical\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Director_Technical: {\n init: false,\n key: \"relationPeople__Shows_Director_Technical\",\n notion: \"Shows.Director.Technical\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Director.Technical\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Producer: {\n init: false,\n key: \"relationPeople__Shows_Producer\",\n notion: \"Shows.Producer\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Producer\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Thanks: {\n init: false,\n key: \"relationPeople__Shows_Thanks\",\n notion: \"Shows.Thanks\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Thanks\",\n },\n type: \"relation\",\n },\n relationPeople__Shows_Writer: {\n init: false,\n key: \"relationPeople__Shows_Writer\",\n notion: \"Shows.Writer\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Writer\",\n },\n type: \"relation\",\n },\n relationPodcasts__Episodes: {\n init: false,\n key: \"relationPodcasts__Episodes\",\n notion: \"Episodes\",\n relation: {\n database_id: \"Episodes\",\n synced_property_name: \"Podcasts\",\n },\n type: \"relation\",\n },\n relationPodcasts__People_Host: {\n init: true,\n key: \"relationPodcasts__People_Host\",\n notion: \"Host\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Podcasts.Host\",\n },\n type: \"relation\",\n },\n relationPodcasts__People_Sound_Engineer: {\n init: true,\n key: \"relationPodcasts__People_Sound_Engineer\",\n notion: \"Sound.Engineer\",\n relation: {\n database_id: \"Podcasts\",\n synced_property_name: \"Podcasts.Sound.Engineer\",\n },\n type: \"relation\",\n },\n relationShows__Events: {\n init: false,\n key: \"relationShows__Events\",\n notion: \"Events\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Shows\",\n },\n type: \"relation\",\n },\n relationShows__Events_Lineup: {\n init: false,\n key: \"relationShows__Events_Lineup\",\n notion: \"Events.Lineup\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Shows.Lineup\",\n },\n type: \"relation\",\n },\n relationShows__People_Cast: {\n init: true,\n key: \"relationShows__People_Cast\",\n notion: \"Cast\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Cast\",\n },\n type: \"relation\",\n },\n relationShows__People_Cast_Past: {\n init: true,\n key: \"relationShows__People_Cast_Past\",\n notion: \"Cast.Past\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Cast.Past\",\n },\n type: \"relation\",\n },\n relationShows__People_Director: {\n init: true,\n key: \"relationShows__People_Director\",\n notion: \"Director\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Director\",\n },\n type: \"relation\",\n },\n relationShows__People_Director_Musical: {\n init: true,\n key: \"relationShows__People_Director_Musical\",\n notion: \"Director.Musical\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Director.Musical\",\n },\n type: \"relation\",\n },\n relationShows__People_Director_Technical: {\n init: true,\n key: \"relationShows__People_Director_Technical\",\n notion: \"Director.Technical\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Director.Technical\",\n },\n type: \"relation\",\n },\n relationShows__People_Producer: {\n init: true,\n key: \"relationShows__People_Producer\",\n notion: \"Producer\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Producer\",\n },\n type: \"relation\",\n },\n relationShows__People_Thanks: {\n init: true,\n key: \"relationShows__People_Thanks\",\n notion: \"Thanks\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Thanks\",\n },\n type: \"relation\",\n },\n relationShows__People_Writer: {\n init: true,\n key: \"relationShows__People_Writer\",\n notion: \"Writer\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Writer\",\n },\n type: \"relation\",\n },\n relationShows__Tags: {\n init: true,\n key: \"relationShows__Tags\",\n notion: \"Tags\",\n relation: {\n database_id: \"Tags\",\n synced_property_name: \"Shows\",\n },\n type: \"relation\",\n },\n relationShows_People_Crew: {\n init: true,\n key: \"relationShows_People_Crew\",\n notion: \"Crew\",\n relation: {\n database_id: \"People\",\n synced_property_name: \"Shows.Crew\",\n },\n type: \"relation\",\n },\n relationTags__Shows: {\n init: false,\n key: \"relationTags__Shows\",\n notion: \"Shows\",\n relation: {\n database_id: \"Shows\",\n synced_property_name: \"Tags\",\n },\n type: \"relation\",\n },\n relationVenues__Episodes: {\n init: false,\n key: \"relationVenues__Episodes\",\n notion: \"Episodes\",\n relation: {\n database_id: \"Episodes\",\n synced_property_name: \"Venues\",\n },\n type: \"relation\",\n },\n relationVenues__Events: {\n init: false,\n key: \"relationVenues__Events\",\n notion: \"Events\",\n relation: {\n database_id: \"Events\",\n synced_property_name: \"Venues\",\n },\n type: \"relation\",\n },\n rollupEpisodes__Podcasts: {\n init: false,\n key: \"rollupEpisodes__Podcasts\",\n notion: \"Podcasts.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Podcasts\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEpisodes__PodcastsSlugs: {\n init: false,\n key: \"rollupEpisodes__PodcastsSlugs\",\n notion: \"Podcasts.Slug.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Podcasts\",\n rollup_property_id: \"Slug\",\n },\n type: \"rollup\",\n },\n //\n rollupEvents__People_Cast: {\n init: false,\n key: \"rollupEvents__People_Cast\",\n notion: \"Cast.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Shows\",\n rollup_property_id: \"Cast\",\n },\n type: \"rollup\",\n },\n rollupEvents__People_Guest: {\n init: false,\n key: \"rollupEvents__People_Guest\",\n notion: \"Guest.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Guest\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEvents__People_Guest_Music: {\n init: false,\n key: \"rollupEvents__People_Guest_Music\",\n notion: \"Guest.Music.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Guest.Music\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEvents__People_Host: {\n init: false,\n key: \"rollupEvents__People_Host\",\n notion: \"Host.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Host\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEvents__Shows: {\n init: false,\n key: \"rollupEvents__Shows\",\n notion: \"Shows.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Shows\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEvents__Shows_Lineup: {\n init: false,\n key: \"rollupEvents__Shows_Lineup\",\n notion: \"Shows.Lineup.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Shows.Lineup\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupEvents__Venues: {\n init: false,\n key: \"rollupEvents__Venues\",\n notion: \"Venues.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Venues\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupPodcasts__Episodes: {\n init: false,\n key: \"rollupPodcasts__Episodes\",\n notion: \"Episodes.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Episodes\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupPodcasts__EpisodesSlugs: {\n init: false,\n key: \"rollupPodcasts__EpisodesSlugs\",\n notion: \"Episodes.Slug.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Episodes\",\n rollup_property_id: \"Slug\",\n },\n type: \"rollup\",\n },\n /**\n * @rollup\n */\n rollupShows__People_Cast: {\n init: false,\n key: \"rollupShows__People_Cast\",\n notion: \"Cast.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Cast\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Cast_Past: {\n init: false,\n key: \"rollupShows__People_Cast_Past\",\n notion: \"Cast.Past.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Cast.Past\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Cast_Slug: {\n init: false,\n key: \"rollupShows__People_Cast_Slug\",\n notion: \"Cast.Rollup.Slug\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Cast\",\n rollup_property_name: \"Slug\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Crew: {\n init: false,\n key: \"rollupShows__People_Crew\",\n notion: \"Crew.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Crew\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Director: {\n init: false,\n key: \"rollupShows__People_Director\",\n notion: \"Director.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Director\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Director_Musical: {\n init: false,\n key: \"rollupShows__People_Director_Musical\",\n notion: \"Director.Musical.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Director.Musical\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Director_Technical: {\n init: false,\n key: \"rollupShows__People_Director_Technical\",\n notion: \"Director.Technical.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Director.Technical\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Music: {\n init: false,\n key: \"rollupShows__People_Music\",\n notion: \"Music.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Music\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Producer: {\n init: false,\n key: \"rollupShows__People_Producer\",\n notion: \"Producer.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Producer\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Thanks: {\n init: false,\n key: \"rollupShows__People_Thanks\",\n notion: \"Thanks.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Thanks\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__People_Writer: {\n init: false,\n key: \"rollupShows__People_Writer\",\n notion: \"Writer.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Writer\",\n rollup_property_name: \"Title\",\n },\n type: \"rollup\",\n },\n rollupShows__Tags: {\n init: false,\n key: \"rollupShows__Tags\",\n notion: \"Tags.Rollup\",\n rollup: {\n function: \"show_original\",\n relation_property_name: \"Tags\",\n rollup_property_id: \"Title\",\n },\n type: \"rollup\",\n },\n season: {\n format: \"number\",\n init: true,\n key: \"season\",\n notion: \"Season\",\n type: \"number\",\n },\n seoDescription: {\n init: true,\n key: \"seoDescription\",\n notion: \"SEO.Description\",\n type: \"rich_text\",\n },\n seoImage: {\n init: true,\n key: \"seoImage\",\n notion: \"SEO.Image\",\n type: \"files\",\n },\n seoImageDescription: {\n init: true,\n key: \"seoImageDescription\",\n notion: \"SEO.Image.Description\",\n type: \"rich_text\",\n },\n seoKeywords: {\n init: true,\n key: \"seoKeywords\",\n notion: \"SEO.Keywords\",\n type: \"rich_text\",\n },\n slug: {\n init: true,\n key: \"slug\",\n notion: \"Slug\",\n type: \"rich_text\",\n },\n socialApple: {\n init: true,\n key: \"socialApple\",\n notion: \"Social.Apple\",\n type: \"url\",\n },\n socialFacebook: {\n init: true,\n key: \"socialFacebook\",\n notion: \"Social.Facebook\",\n type: \"url\",\n },\n socialInstagram: {\n init: true,\n key: \"socialInstagram\",\n notion: \"Social.Instagram\",\n type: \"url\",\n },\n socialSpotify: {\n init: true,\n key: \"socialSpotify\",\n notion: \"Social.Spotify\",\n type: \"url\",\n },\n socialTwitter: {\n init: true,\n key: \"socialTwitter\",\n notion: \"Social.Twitter\",\n type: \"url\",\n },\n socialWebsite: {\n init: true,\n key: \"socialWebsite\",\n notion: \"Social.Website\",\n type: \"url\",\n },\n status: {\n init: true,\n key: \"status\",\n notion: \"Status\",\n type: \"select\",\n },\n subtitle: {\n init: true,\n key: \"subtitle\",\n notion: \"Subtitle\",\n type: \"rich_text\",\n },\n ticketUrl: {\n init: true,\n key: \"ticketUrl\",\n notion: \"TicketUrl\",\n type: \"url\",\n },\n title: {\n init: true,\n key: \"title\",\n notion: \"Title\",\n type: \"title\",\n },\n type: {\n init: true,\n key: \"type\",\n notion: \"Type\",\n type: \"select\",\n },\n};\n\n/**\n * @note\n * Limit Each Database (Route Type) to _only_\n * have valid data for its schema\n */\n\nconst PROPERTIES_DEFAULT = [\n PROPERTIES.authors,\n // PROPERTIES.dateCreated,\n PROPERTIES.datePublished,\n PROPERTIES.isIndexed,\n PROPERTIES.isPublished,\n PROPERTIES.slug,\n PROPERTIES.seoDescription,\n PROPERTIES.seoImage,\n PROPERTIES.seoImageDescription,\n PROPERTIES.seoKeywords,\n PROPERTIES.title,\n];\n\nconst BLOG = [...PROPERTIES_DEFAULT];\n\nconst BOOKS = [...PROPERTIES_DEFAULT, PROPERTIES.author, PROPERTIES.status, PROPERTIES.subtitle];\n\nconst EPISODES = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.dateRecorded,\n PROPERTIES.duration,\n PROPERTIES.episode,\n PROPERTIES.mp3,\n PROPERTIES.season,\n PROPERTIES.relationEpisodes__People_Guest,\n PROPERTIES.relationEpisodes__People_Sound_Engineer,\n PROPERTIES.relationEpisodes__People_Thanks,\n PROPERTIES.relationEpisodes__Podcasts,\n PROPERTIES.relationEpisodes__Venues,\n PROPERTIES.socialApple,\n PROPERTIES.socialSpotify,\n PROPERTIES.type,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n // PROPERTIES.rollupEpisodes__People_Guest,\n // PROPERTIES.rollupEpisodes__People_Sound_Engineer,\n // PROPERTIES.rollupEpisodes__People_Thanks,\n PROPERTIES.rollupEpisodes__Podcasts,\n PROPERTIES.rollupEpisodes__PodcastsSlugs,\n // PROPERTIES.rollupEpisodes__Venues,\n];\n\nconst EVENTS = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.dateEvent,\n PROPERTIES.relationEvents__People_Guest_Music,\n PROPERTIES.relationEvents__People_Guest,\n PROPERTIES.relationEvents__People_Host,\n PROPERTIES.relationEvents__Shows_Lineup,\n PROPERTIES.relationEvents__Shows,\n PROPERTIES.relationEvents__Venues,\n PROPERTIES.socialFacebook,\n PROPERTIES.socialWebsite,\n PROPERTIES.ticketUrl,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n PROPERTIES.rollupEvents__People_Cast,\n PROPERTIES.rollupEvents__People_Guest_Music,\n PROPERTIES.rollupEvents__People_Guest,\n PROPERTIES.rollupEvents__People_Host,\n PROPERTIES.rollupEvents__Shows_Lineup,\n PROPERTIES.rollupEvents__Shows,\n PROPERTIES.rollupEvents__Venues,\n /**\n * -------------------------------------\n */\n];\n\nconst PAGES = [...PROPERTIES_DEFAULT];\n\nconst PEOPLE = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.email,\n PROPERTIES.nameFirst,\n PROPERTIES.nameLast,\n PROPERTIES.namePreferred,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n PROPERTIES.relationPeople__Episodes_Guest,\n PROPERTIES.relationPeople__Episodes_Sound_Engineer,\n PROPERTIES.relationPeople__Episodes_Thanks,\n PROPERTIES.relationPeople__Events_Guest,\n PROPERTIES.relationPeople__Events_Guest_Music,\n PROPERTIES.relationPeople__Events_Host,\n PROPERTIES.relationPeople__Podcasts_Host,\n PROPERTIES.relationPeople__Podcasts_Sound_Engineer,\n PROPERTIES.relationPeople__Shows_Cast,\n PROPERTIES.relationPeople__Shows_Cast_Past,\n PROPERTIES.relationPeople__Shows_Director,\n PROPERTIES.relationPeople__Shows_Director_Musical,\n PROPERTIES.relationPeople__Shows_Director_Technical,\n PROPERTIES.relationPeople__Shows_Producer,\n PROPERTIES.relationPeople__Shows_Thanks,\n PROPERTIES.relationPeople__Shows_Writer,\n /**\n * -------------------------------------\n */\n];\n\nconst PODCASTS = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.categories,\n PROPERTIES.explicit,\n PROPERTIES.podcastAuthor,\n PROPERTIES.podcastAuthorEmail,\n PROPERTIES.relationPodcasts__People_Host,\n PROPERTIES.relationPodcasts__People_Sound_Engineer,\n PROPERTIES.socialApple,\n PROPERTIES.socialSpotify,\n PROPERTIES.type,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n PROPERTIES.relationPodcasts__Episodes,\n PROPERTIES.rollupPodcasts__Episodes,\n PROPERTIES.rollupPodcasts__EpisodesSlugs,\n /**\n * -------------------------------------\n */\n];\n\nconst SEO = [...PROPERTIES_DEFAULT];\n\nconst SHOWS = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.relationShows__People_Cast,\n PROPERTIES.relationShows__People_Cast_Past,\n PROPERTIES.relationShows__People_Director,\n PROPERTIES.relationShows__People_Director_Musical,\n PROPERTIES.relationShows__People_Director_Technical,\n PROPERTIES.relationShows__People_Producer,\n PROPERTIES.relationShows__People_Thanks,\n PROPERTIES.relationShows__People_Writer,\n PROPERTIES.relationShows__Tags,\n PROPERTIES.socialFacebook,\n PROPERTIES.socialInstagram,\n PROPERTIES.socialTwitter,\n PROPERTIES.socialWebsite,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n PROPERTIES.relationShows__Events,\n PROPERTIES.relationShows__Events_Lineup,\n PROPERTIES.rollupShows__People_Cast,\n PROPERTIES.rollupShows__People_Cast_Slug,\n PROPERTIES.rollupShows__People_Cast_Past,\n PROPERTIES.rollupShows__People_Crew,\n PROPERTIES.rollupShows__People_Director,\n PROPERTIES.rollupShows__People_Director_Musical,\n PROPERTIES.rollupShows__People_Director_Technical,\n PROPERTIES.rollupShows__People_Music,\n PROPERTIES.rollupShows__People_Producer,\n PROPERTIES.rollupShows__People_Thanks,\n PROPERTIES.rollupShows__People_Writer,\n PROPERTIES.rollupShows__Tags,\n /**\n * -------------------------------------\n */\n];\n\nconst VENUES = [\n ...PROPERTIES_DEFAULT,\n PROPERTIES.addressCity,\n PROPERTIES.addressLatitude,\n PROPERTIES.addressLongitude,\n PROPERTIES.addressNeighborhood,\n PROPERTIES.addressState,\n PROPERTIES.addressStreet,\n PROPERTIES.addressZipCode,\n PROPERTIES.phoneNumber,\n PROPERTIES.socialFacebook,\n PROPERTIES.socialInstagram,\n PROPERTIES.socialTwitter,\n PROPERTIES.socialWebsite,\n /**\n * @note(notion)\n * do not init/seed these values, they are updated _after_ init\n */\n PROPERTIES.relationVenues__Episodes,\n PROPERTIES.relationVenues__Events,\n /**\n * -------------------------------------\n */\n];\n\n/**\n * @note\n * hyper-specific for the init / see (secret/create/init)\n *\n * 0. Create DB w/o Relations|Rollups\n * 1. Update DB w/ Relations\n * 2. Update DB w/ Relation Naming Preference\n * 3. Update DB w/ Rollups\n */\nconst INIT = {\n BLOG: _filter(BLOG, { init: true }),\n BOOKS: _filter(BOOKS, { init: true }),\n EPISODES: _filter(EPISODES, { init: true }),\n EVENTS: _filter(EVENTS, { init: true }),\n PAGES: _filter(PAGES, { init: true }),\n PEOPLE: _filter(PEOPLE, { init: true }),\n PODCASTS: _filter(PODCASTS, { init: true }),\n SEO: _filter(SEO, { init: true }),\n SHOWS: _filter(SHOWS, { init: true }),\n VENUES: _filter(VENUES, { init: true }),\n};\n\nconst LOOKUP = {\n BLOG: BLOG.map((item) => getLookup(item)),\n BOOKS: BOOKS.map((item) => getLookup(item)),\n EPISODES: EPISODES.map((item) => getLookup(item)),\n EVENTS: EVENTS.map((item) => getLookup(item)),\n PAGES: PAGES.map((item) => getLookup(item)),\n PEOPLE: PEOPLE.map((item) => getLookup(item)),\n PODCASTS: PODCASTS.map((item) => getLookup(item)),\n SEO: SEO.map((item) => getLookup(item)),\n SHOWS: SHOWS.map((item) => getLookup(item)),\n VENUES: VENUES.map((item) => getLookup(item)),\n};\n\nconst PROPERTIES_LOOKUP = _map(PROPERTIES, (item) => getLookup(item));\n\nconst dateTimestamp = new Date().toISOString();\n// const dateTimestampBlog = new Date('2020-01-01').toISOString()\n\n/**\n * @note(notion) right now we are only using `QUERIES.slug`\n */\nconst QUERIES = {\n // @todo(notion) Published or Event?\n dateBefore: {\n date: {\n before: dateTimestamp,\n },\n property: PROPERTIES.datePublished.notion,\n },\n // @todo(notion) Published or Event?\n dateOnOrAfter: {\n date: {\n on_or_after: dateTimestamp,\n },\n property: PROPERTIES.datePublished.notion,\n },\n published: {\n checkbox: {\n equals: false,\n },\n property: PROPERTIES.isPublished.notion,\n },\n slug: {\n property: PROPERTIES.slug.notion,\n rich_text: {\n equals: \"\",\n },\n },\n};\n\nconst LISTING: DataTypes = \"LISTING\";\nconst LISTING_BY_DATE: DataTypes = \"LISTING_BY_DATE\";\nconst SLUG: DataTypes = \"SLUG\";\nconst SLUG_BY_ROUTE: DataTypes = \"SLUG_BY_ROUTE\";\n\nconst getDataTypes: DataTypes[] = [LISTING, LISTING_BY_DATE, SLUG, SLUG_BY_ROUTE];\n\nconst DATA_TYPES: DataTypesObject = Object.assign(\n {},\n // @ts-ignore\n ...getDataTypes.flatMap((d) => ({ [d]: d })),\n);\n\nexport { DATA_TYPES, getDataTypes, INIT, LOOKUP, PROPERTIES, PROPERTIES_LOOKUP, QUERIES };\n"],"mappings":"4CAIA,MAAM,GAAa,CAAE,MAAK,SAAQ,WAAY,CAC5C,MACA,SACA,MACF,GAeM,EAAuC,CAC3C,YAAa,CACX,KAAM,GACN,IAAK,cACL,OAAQ,eACR,KAAM,WACR,EACA,gBAAiB,CACf,OAAQ,SACR,KAAM,GACN,IAAK,kBACL,OAAQ,mBACR,KAAM,QACR,EACA,iBAAkB,CAChB,OAAQ,SACR,KAAM,GACN,IAAK,mBACL,OAAQ,oBACR,KAAM,QACR,EACA,oBAAqB,CACnB,KAAM,GACN,IAAK,sBACL,OAAQ,uBACR,KAAM,WACR,EACA,aAAc,CACZ,KAAM,GACN,IAAK,eACL,OAAQ,gBACR,KAAM,QACR,EACA,cAAe,CACb,KAAM,GACN,IAAK,gBACL,OAAQ,iBACR,KAAM,WACR,EACA,eAAgB,CACd,OAAQ,SACR,KAAM,GACN,IAAK,iBACL,OAAQ,kBACR,KAAM,QACR,EACA,OAAQ,CACN,KAAM,GACN,IAAK,SACL,OAAQ,SACR,KAAM,WACR,EACA,QAAS,CACP,KAAM,GACN,IAAK,UACL,OAAQ,UACR,KAAM,QACR,EACA,WAAY,CACV,KAAM,GACN,IAAK,aACL,OAAQ,aACR,KAAM,cACR,EACA,YAAa,CACX,KAAM,GACN,IAAK,cACL,OAAQ,eACR,KAAM,cACR,EACA,WAAY,CACV,KAAM,GACN,IAAK,aACL,OAAQ,cACR,KAAM,kBACR,EACA,UAAW,CACT,KAAM,GACN,IAAK,YACL,OAAQ,aACR,KAAM,MACR,EACA,cAAe,CACb,KAAM,GACN,IAAK,gBACL,OAAQ,iBACR,KAAM,MACR,EACA,aAAc,CACZ,KAAM,GACN,IAAK,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AAC,EAC5C,MAAO,EAAM,IAAK,GAAS,EAAU,CAAI,CAAC,EAC1C,OAAQ,EAAO,IAAK,GAAS,EAAU,CAAI,CAAC,EAC5C,SAAU,EAAS,IAAK,GAAS,EAAU,CAAI,CAAC,EAChD,IAAK,EAAI,IAAK,GAAS,EAAU,CAAI,CAAC,EACtC,MAAO,EAAM,IAAK,GAAS,EAAU,CAAI,CAAC,EAC1C,OAAQ,EAAO,IAAK,GAAS,EAAU,CAAI,CAAC,CAC9C,EAEM,EAAoBC,EAAK,EAAa,GAAS,EAAU,CAAI,CAAC,EAE9D,EAAgB,IAAI,KAAK,CAAC,CAAC,YAAY,EAMvC,EAAU,CAEd,WAAY,CACV,KAAM,CACJ,OAAQ,CACV,EACA,SAAU,EAAW,cAAc,MACrC,EAEA,cAAe,CACb,KAAM,CACJ,YAAa,CACf,EACA,SAAU,EAAW,cAAc,MACrC,EACA,UAAW,CACT,SAAU,CACR,OAAQ,EACV,EACA,SAAU,EAAW,YAAY,MACnC,EACA,KAAM,CACJ,SAAU,EAAW,KAAK,OAC1B,UAAW,CACT,OAAQ,EACV,CACF,CACF,EAOM,EAA4B,CAAC,UAAS,kBAAiB,OAAM,eAAa,EAE1E,EAA8B,OAAO,OACzC,CAAC,EAED,GAAG,EAAa,QAAS,IAAO,EAAG,GAAI,CAAE,EAAE,CAC7C"}
@@ -1,2 +0,0 @@
1
- import e from"./utils/get-types/_unsupported.mjs";import t from"./utils/get-types/checkbox.mjs";import n from"./utils/get-types/date.mjs";import r from"./utils/get-types/email.mjs";import i from"./utils/get-types/files.mjs";import a from"./utils/get-types/multi-select.mjs";import o from"./utils/get-types/number.mjs";import s from"./utils/get-types/people.mjs";import c from"./utils/get-types/phone-number.mjs";import l from"./utils/get-types/rich-text.mjs";import u from"./utils/get-types/select.mjs";import d from"./utils/get-types/title.mjs";import f from"./utils/get-types/url.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-7QEbhRzY.mjs.map
@@ -1 +0,0 @@
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;WAIH,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/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- import{DATA_TYPES as e}from"./constants/index.mjs";import t from"./queries/get-blocks-by-id-children/index.mjs";import n from"./queries/get-databases-by-id-query/index.mjs";import r from"./queries/get-deep-fetch-all-children/index.mjs";import i from"./queries/get-info-type/index.mjs";import a from"./queries/get-notion-listing-by-date/index.mjs";import o from"./queries/get-notion-listing/index.mjs";import s from"./queries/get-notion-slug-by-route/index.mjs";import c from"./queries/get-notion-slug/index.mjs";import l from"./queries/get-pages-by-id/index.mjs";import u from"./queries/get-path-variables/index.mjs";import d from"./queries/get-query/index.mjs";import"./queries/index.mjs";import{Client as f}from"@notionhq/client";var p=class extends f{#e;custom={getBlocksByIdChildren:async e=>await t({...e,getBlocksChildrenList:this.blocks.children.list}),getDatabasesByIdQuery:async e=>await n({...e,getDatabasesQuery:this.databases.query}),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.databases.query})};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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_Client","#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 // @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.databases.query,\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.databases.query,\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 };\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B,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/queries/get-blocks-by-id-children/index.ts"],"mappings":";cAGM,qBAAA;EAA+B,QAAA;EAAA;AAAA;;;MAAmC,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/queries/get-blocks-by-id-children/index.ts"],"sourcesContent":["import { avoidRateLimit, isUndefined } from \"@jeromefitz/utils\";\n\n// @todo(types)\nconst getBlocksByIdChildren = async ({ block_id, getBlocksChildrenList }) => {\n if (isUndefined(block_id)) return [];\n await avoidRateLimit(0);\n return await getBlocksChildrenList({\n block_id,\n });\n};\n\nexport default getBlocksByIdChildren;\n"],"mappings":"oEAGA,MAAM,EAAwB,MAAO,CAAE,WAAU,2BAC3C,EAAY,CAAQ,EAAU,CAAC,GACnC,MAAM,EAAe,CAAC,EACf,MAAM,EAAsB,CACjC,UACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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,2 +0,0 @@
1
- import{PROPERTIES as e}from"../../constants/index.mjs";const t={sorts:[{direction:`ascending`,property:e.slug.notion}]},n=async({database_id:e,filter:n=t?.filter,getDatabasesQuery:r,sorts:i=t?.sorts})=>e?await r({database_id:e,filter:n,sorts:i}):[];export{n as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/queries/get-databases-by-id-query/index.ts"],"sourcesContent":["import { PROPERTIES } from \"../../constants/index\";\nimport type { SortMock } from \"../../schema/index\";\n\nconst sortDefault: SortMock = {\n sorts: [\n {\n direction: \"ascending\",\n property: PROPERTIES.slug.notion,\n },\n ],\n};\n\n// @todo(types)\nconst getDatabasesByIdQuery = async ({\n database_id,\n filter = sortDefault?.filter,\n getDatabasesQuery,\n sorts = sortDefault?.sorts,\n}) => {\n if (!database_id) return [];\n return await getDatabasesQuery({\n database_id,\n filter,\n sorts,\n });\n};\n\nexport default getDatabasesByIdQuery;\n"],"mappings":"uDAGA,MAAM,EAAwB,CAC5B,MAAO,CACL,CACE,UAAW,YACX,SAAU,EAAW,KAAK,MAC5B,CACF,CACF,EAGM,EAAwB,MAAO,CACnC,cACA,SAAS,GAAa,OACtB,oBACA,QAAQ,GAAa,SAEhB,EACE,MAAM,EAAkB,CAC7B,cACA,SACA,OACF,CAAC,EALwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/queries/get-deep-fetch-all-children/index.ts"],"mappings":";cAAM,uBAAA;EAAiC,MAAA;EAAA;AAAA;;;MAGnC,OAAA,CAAQ,KAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/queries/get-deep-fetch-all-children/index.ts"],"sourcesContent":["const getDeepFetchAllChildren = async ({\n blocks,\n getBlocksChildrenList,\n}): Promise<Array<any | any[]>> => {\n if (blocks === null || blocks === undefined) return blocks;\n const fetchChildrenMap = blocks\n .filter((block: { has_children: any }) => block.has_children)\n .map((parent_block: { id: string }) => {\n const { id: block_id } = parent_block;\n return {\n parent_block,\n promise: getBlocksChildrenList({\n block_id,\n page_size: 100,\n }),\n };\n });\n\n const results = await Promise.all<any>(fetchChildrenMap.map((value) => value.promise));\n\n for (let i = 0; i < results.length; i++) {\n const blocks = results[i].results;\n await getDeepFetchAllChildren({\n blocks,\n getBlocksChildrenList,\n });\n if (fetchChildrenMap[i]) {\n const parent: any = fetchChildrenMap[i].parent_block;\n parent[parent.type].children = blocks;\n }\n }\n return blocks;\n};\n\nexport default getDeepFetchAllChildren;\n"],"mappings":"AAAA,MAAM,EAA0B,MAAO,CACrC,SACA,2BACiC,CACjC,GAAI,GAAW,KAA8B,OAAO,EACpD,IAAM,EAAmB,EACtB,OAAQ,GAAiC,EAAM,YAAY,CAAC,CAC5D,IAAK,GAAiC,CACrC,GAAM,CAAE,GAAI,GAAa,EACzB,MAAO,CACL,eACA,QAAS,EAAsB,CAC7B,WACA,UAAW,GACb,CAAC,CACH,CACF,CAAC,EAEG,EAAU,MAAM,QAAQ,IAAS,EAAiB,IAAK,GAAU,EAAM,OAAO,CAAC,EAErF,IAAK,IAAI,EAAI,EAAG,EAAI,EAAQ,OAAQ,IAAK,CACvC,IAAM,EAAS,EAAQ,EAAE,CAAC,QAK1B,GAJA,MAAM,EAAwB,CAC5B,SACA,uBACF,CAAC,EACG,EAAiB,GAAI,CACvB,IAAM,EAAc,EAAiB,EAAE,CAAC,aACxC,EAAO,EAAO,KAAK,CAAC,SAAW,CACjC,CACF,CACA,OAAO,CACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/queries/get-info-type/index.ts"],"mappings":";cAAM,WAAA;EAAe,MAAA;EAAA,IAAA;EAAA,IAAA;EAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/queries/get-info-type/index.ts"],"sourcesContent":["const getInfoType = ({ config, item, meta, routeType }) => {\n const { NOTION } = config;\n\n let date = \"\";\n const slug = item.properties?.slug;\n\n let as = \"\";\n const href = `/[...catchAll]`;\n\n switch (routeType) {\n case NOTION.BLOG.routeType:\n case NOTION.EVENTS.routeType:\n date = item.properties[NOTION[routeType.toUpperCase()].infoType.key]?.start.slice(0, 10);\n // oxlint-disable-next-line no-unsafe-optional-chaining\n const [year, month, day] = date?.split(\"-\");\n as = `/${routeType}/${year}/${month}/${day}/${slug}`;\n break;\n case NOTION.EPISODES.routeType:\n as = `/${meta?.join(\"/\")}/${slug}`;\n break;\n // case NOTION.PODCASTS.routeType:\n // case NOTION.PEOPLE.routeType:\n // case NOTION.SHOWS.routeType:\n // case NOTION.VENUES.routeType:\n default:\n as = `/${routeType}/${slug}`;\n break;\n }\n\n as = as.replace(\"//\", \"/\");\n\n return {\n as,\n date,\n href,\n slug,\n };\n};\n\nexport default getInfoType;\n"],"mappings":"AAAA,MAAM,GAAe,CAAE,SAAQ,OAAM,OAAM,eAAgB,CACzD,GAAM,CAAE,UAAW,EAEf,EAAO,GACL,EAAO,EAAK,YAAY,KAE1B,EAAK,GAGT,OAAQ,EAAR,CACE,KAAK,EAAO,KAAK,UACjB,KAAK,EAAO,OAAO,UACjB,EAAO,EAAK,WAAW,EAAO,EAAU,YAAY,EAAE,CAAC,SAAS,IAAI,EAAE,MAAM,MAAM,EAAG,EAAE,EAEvF,GAAM,CAAC,EAAM,EAAO,GAAO,GAAM,MAAM,GAAG,EAC1C,EAAK,IAAI,EAAU,GAAG,EAAK,GAAG,EAAM,GAAG,EAAI,GAAG,IAC9C,MACF,KAAK,EAAO,SAAS,UACnB,EAAK,IAAI,GAAM,KAAK,GAAG,EAAE,GAAG,IAC5B,MAKF,QACE,EAAK,IAAI,EAAU,GAAG,IACtB,KACJ,CAIA,MAFA,GAAK,EAAG,QAAQ,KAAM,GAAG,EAElB,CACL,KACA,OACA,sBACA,MACF,CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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"}
@@ -1,2 +0,0 @@
1
- import{PROPERTIES as e}from"../../constants/index.mjs";import{t}from"../../utils-SxsCJsDP.mjs";import{map as n,omit as r}from"lodash-es";import{sortObject as i}from"@jeromefitz/utils";const a=async({config:a,getBlocksByIdChildren:o,getDatabasesByIdQuery:s,getPagesById:c,pathVariables:l,routeType:u})=>{let{NOTION:d}=a,f={},p=d[u.toUpperCase()].page_id__seo,m=await c({page_id:p});if(!m)return{};m?.object===`page`&&(f=r(m,`properties`),f.properties=i(t({config:a,data:m,pageId:f.id,pathVariables:l})));let h=d[u.toUpperCase()].infoType.notion??e.datePublished.notion,g=h===e.datePublished.notion?new Date(`2020-01-01`).toISOString():new Date().toISOString(),_=await o({block_id:f.id}),v=await s({database_id:d[u.toUpperCase()].database_id,filter:{and:[{date:{on_or_after:g},property:h}]}}),y=[];n(v.results,e=>{let n=e;n=r(n,`properties`),n.properties=i(t({config:a,data:e,pageId:e.id,pathVariables:l})),y.push(n)});let b=r(v,`results`);return b.results=y,{content:_,images:{},info:f,items:b}};export{a as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_omit"],"sources":["../../../src/queries/get-notion-listing/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit } from \"lodash-es\";\n\nimport { PROPERTIES } from \"../../constants/index\";\nimport { dataNormalized } from \"../../utils/index\";\n\nconst getNotionListing = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getPagesById,\n pathVariables,\n routeType,\n}) => {\n const { NOTION } = config;\n\n let info: any = {};\n\n const page_id = NOTION[routeType.toUpperCase()].page_id__seo;\n const _info = await getPagesById({\n page_id,\n });\n // @refactor(404)\n if (!_info) {\n return {};\n }\n if (_info?.object === \"page\") {\n info = _omit(_info, \"properties\");\n info.properties = sortObject(\n dataNormalized({ config, data: _info, pageId: info.id, pathVariables }),\n );\n }\n\n const property =\n NOTION[routeType.toUpperCase()].infoType.notion ?? PROPERTIES.datePublished.notion;\n\n /**\n * @todo Can we make the date dynamic?\n * This can be considered the date you want to go back in time to on build.\n * Can be construed as the website creation date, too I guess.\n *\n * For those routeTypes that do not go off of datePublished,\n * we want to get their listing by the current date.\n *\n * ex) /events => Only want events that are in the future.\n *\n */\n const timestamp =\n property === PROPERTIES.datePublished.notion\n ? new Date(\"2020-01-01\").toISOString()\n : new Date().toISOString();\n\n const content = await getBlocksByIdChildren({ block_id: info.id });\n const _items: any = await getDatabasesByIdQuery({\n database_id: NOTION[routeType.toUpperCase()].database_id,\n filter: {\n and: [\n {\n date: {\n on_or_after: timestamp,\n },\n property,\n },\n ],\n },\n });\n const results: any[] = [];\n _map(_items.results, (item) => {\n let itemInit = item;\n itemInit = _omit(itemInit, \"properties\");\n itemInit.properties = sortObject(\n dataNormalized({ config, data: item, pageId: item.id, pathVariables }),\n );\n results.push(itemInit);\n // console.dir(`> last_edited_time`)\n // console.dir(item.id)\n // console.dir(item.last_edited_time)\n // console.dir(`---`)\n });\n const items = _omit(_items, \"results\");\n items.results = results;\n\n /**\n * @note(plaiceholder)\n *\n * Pass empty `images` object for SSR/API takeover\n */\n return { content, images: {}, info, items };\n};\n\nexport default getNotionListing;\n"],"mappings":"wLAMA,MAAM,EAAmB,MAAO,CAC9B,SACA,wBACA,wBACA,eACA,gBACA,eACI,CACJ,GAAM,CAAE,UAAW,EAEf,EAAY,CAAC,EAEX,EAAU,EAAO,EAAU,YAAY,EAAE,CAAC,aAC1C,EAAQ,MAAM,EAAa,CAC/B,SACF,CAAC,EAED,GAAI,CAAC,EACH,MAAO,CAAC,EAEN,GAAO,SAAW,SACpB,EAAOA,EAAM,EAAO,YAAY,EAChC,EAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAO,OAAQ,EAAK,GAAI,eAAc,CAAC,CACxE,GAGF,IAAM,EACJ,EAAO,EAAU,YAAY,EAAE,CAAC,SAAS,QAAU,EAAW,cAAc,OAaxE,EACJ,IAAa,EAAW,cAAc,OAClC,IAAI,KAAK,YAAY,CAAC,CAAC,YAAY,EACnC,IAAI,KAAK,CAAC,CAAC,YAAY,EAEvB,EAAU,MAAM,EAAsB,CAAE,SAAU,EAAK,EAAG,CAAC,EAC3D,EAAc,MAAM,EAAsB,CAC9C,YAAa,EAAO,EAAU,YAAY,EAAE,CAAC,YAC7C,OAAQ,CACN,IAAK,CACH,CACE,KAAM,CACJ,YAAa,CACf,EACA,UACF,CACF,CACF,CACF,CAAC,EACK,EAAiB,CAAC,EACxB,EAAK,EAAO,QAAU,GAAS,CAC7B,IAAI,EAAW,EACf,EAAWA,EAAM,EAAU,YAAY,EACvC,EAAS,WAAa,EACpB,EAAe,CAAE,SAAQ,KAAM,EAAM,OAAQ,EAAK,GAAI,eAAc,CAAC,CACvE,EACA,EAAQ,KAAK,CAAQ,CAKvB,CAAC,EACD,IAAM,EAAQA,EAAM,EAAQ,SAAS,EAQrC,MAPA,GAAM,QAAU,EAOT,CAAE,UAAS,OAAQ,CAAC,EAAG,OAAM,OAAM,CAC5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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"}
@@ -1,2 +0,0 @@
1
- import{PROPERTIES as e,QUERIES as t}from"../../constants/index.mjs";import n from"../../utils/add-time/index.mjs";import{t as r}from"../../utils-SxsCJsDP.mjs";import{map as i,omit as a,size as o}from"lodash-es";import{sortObject as s}from"@jeromefitz/utils";const c=({config:r,pathVariables:i,routeType:a,slug:s})=>{let{NOTION:c}=r,{meta:l}=i,[u,d,f]=l,p=o(l),m=new Date().toISOString(),h=new Date(`${u||m.slice(0,4)}-${d||`01`}-${f||`01`}`),g=c[a.toUpperCase()]?.infoType?.notion??e.datePublished.notion;switch(p){case 1:return{and:[{date:{on_or_after:n(h,``)},property:g},{date:{before:n(h,`year`)},property:g}]};case 2:return{and:[{date:{on_or_after:n(h,``)},property:g},{date:{before:n(h,`month`)},property:g}]};case 3:return{and:[{date:{on_or_after:n(h,``)},property:g},{date:{before:n(h,`day`)},property:g}]};default:return{and:[{date:{on_or_after:n(h,``)},property:g},{date:{before:n(h,`day`)},property:g},{...t.slug,rich_text:{equals:s}}]}}},l=async({config:t,getBlocksByIdChildren:n,getDatabasesByIdQuery:o,getPagesById:l,pathVariables:u,routeType:d,slug:f})=>{let{NOTION:p}=t,m={},h={},g=p[d.toUpperCase()].page_id__seo,_=await l({page_id:g});_.object===`page`&&(h=a(_,`properties`),h.properties=s(r({config:t,data:_,pageId:_.id,pathVariables:u}))),m=await n({block_id:h.id});let v=[{direction:`descending`,property:e.datePublished.notion}],y=c({config:t,pathVariables:u,routeType:d,slug:f}),b=p[d.toUpperCase()].database_id,x=await o({database_id:b,filter:y,sorts:v}),S=[];i(x.results,e=>{let n=a(e,`properties`);n.properties=s(r({config:t,data:e,pageId:n.id,pathVariables:u})),n&&S.push(n)});let C=a(x,`results`);C.results=S;let w=a(C,`data`);return{content:m,images:{},info:h,items:w}};export{l as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_size","_omit"],"sources":["../../../src/queries/get-notion-listing-by-date/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit, size as _size } from \"lodash-es\";\n\nimport { PROPERTIES, QUERIES } from \"../../constants/index\";\nimport type { SortItem } from \"../../schema/index\";\nimport { addTime, dataNormalized } from \"../../utils/index\";\n\nconst getNotionListingByDate__getFilter = ({ config, pathVariables, routeType, slug }) => {\n const { NOTION } = config;\n const { meta } = pathVariables;\n const [year, month, day] = meta;\n const metaCount = _size(meta);\n // @hack nothing to see here, haha\n const dateTimestamp = new Date().toISOString();\n const timestampQuery = new Date(\n `${year ? year : dateTimestamp.slice(0, 4)}-${month ? month : \"01\"}-${day ? day : \"01\"}`,\n );\n\n /**\n * @filter\n * @note metaCount breakdown:\n * 1 = yyyy\n * 2 = yyyy/mm\n * 3 = yyyy/mm/dd\n * ? = yyyy/mm/dd/slug (SLUG_BY_ROUTE takes this over)\n */\n const property =\n NOTION[routeType.toUpperCase()]?.infoType?.notion ?? PROPERTIES.datePublished.notion;\n\n switch (metaCount) {\n /**\n * @note yyyy\n */\n case 1:\n return {\n and: [\n {\n date: {\n on_or_after: addTime(timestampQuery, \"\"),\n },\n property,\n },\n {\n date: {\n before: addTime(timestampQuery, \"year\"),\n },\n property,\n },\n ],\n };\n\n /**\n * @note yyyy/mm\n */\n case 2:\n return {\n and: [\n {\n date: {\n on_or_after: addTime(timestampQuery, \"\"),\n },\n property,\n },\n {\n date: {\n before: addTime(timestampQuery, \"month\"),\n },\n property,\n },\n ],\n };\n\n /**\n * @note yyyy/mm/dd\n */\n case 3:\n return {\n and: [\n {\n date: {\n on_or_after: addTime(timestampQuery, \"\"),\n },\n property,\n },\n {\n date: {\n before: addTime(timestampQuery, \"day\"),\n },\n property,\n },\n ],\n };\n\n /**\n * @note yyyy/mm/dd/slug\n *\n * Technically this is picked up by `getNotionSlugByRoute` SLUG_BY_ROUTE\n */\n default:\n return {\n and: [\n {\n date: {\n on_or_after: addTime(timestampQuery, \"\"),\n },\n property,\n },\n {\n date: {\n before: addTime(timestampQuery, \"day\"),\n },\n property,\n },\n {\n ...QUERIES.slug,\n rich_text: { equals: slug },\n },\n ],\n };\n }\n};\n\nconst getNotionListingByDate = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getPagesById,\n pathVariables,\n routeType,\n slug,\n}) => {\n const { NOTION } = config;\n\n let content: any = {},\n info: any = {};\n\n const page_id = NOTION[routeType.toUpperCase()].page_id__seo;\n const _info = await getPagesById({\n page_id,\n });\n if (_info.object === \"page\") {\n info = _omit(_info, \"properties\");\n info.properties = sortObject(\n dataNormalized({ config, data: _info, pageId: _info.id, pathVariables }),\n );\n }\n\n content = await getBlocksByIdChildren({ block_id: info.id });\n\n const sorts: SortItem[] = [\n {\n direction: \"descending\",\n property: PROPERTIES.datePublished.notion,\n },\n ];\n const filter = getNotionListingByDate__getFilter({\n config,\n pathVariables,\n routeType,\n slug,\n });\n\n const database_id = NOTION[routeType.toUpperCase()].database_id;\n\n const ___items: any = await getDatabasesByIdQuery({\n database_id,\n filter,\n sorts,\n });\n const __items: any[] = [];\n _map(___items.results, (i) => {\n const item = _omit(i, \"properties\");\n item.properties = sortObject(\n dataNormalized({ config, data: i, pageId: item.id, pathVariables }),\n );\n !!item && __items.push(item);\n });\n const _items = _omit(___items, \"results\");\n _items.results = __items;\n const items = _omit(_items, \"data\");\n\n /**\n * @note(plaiceholder)\n *\n * Pass empty `images` object for SSR/API takeover\n */\n return { content, images: {}, info, items };\n};\n\nexport default getNotionListingByDate;\n"],"mappings":"kQAOA,MAAM,GAAqC,CAAE,SAAQ,gBAAe,YAAW,UAAW,CACxF,GAAM,CAAE,UAAW,EACb,CAAE,QAAS,EACX,CAAC,EAAM,EAAO,GAAO,EACrB,EAAYA,EAAM,CAAI,EAEtB,EAAgB,IAAI,KAAK,CAAC,CAAC,YAAY,EACvC,EAAiB,IAAI,KACzB,GAAG,GAAc,EAAc,MAAM,EAAG,CAAC,EAAE,GAAG,GAAgB,KAAK,GAAG,GAAY,MACpF,EAUM,EACJ,EAAO,EAAU,YAAY,EAAE,EAAE,UAAU,QAAU,EAAW,cAAc,OAEhF,OAAQ,EAAR,CAIE,IAAK,GACH,MAAO,CACL,IAAK,CACH,CACE,KAAM,CACJ,YAAa,EAAQ,EAAgB,EAAE,CACzC,EACA,UACF,EACA,CACE,KAAM,CACJ,OAAQ,EAAQ,EAAgB,MAAM,CACxC,EACA,UACF,CACF,CACF,EAKF,IAAK,GACH,MAAO,CACL,IAAK,CACH,CACE,KAAM,CACJ,YAAa,EAAQ,EAAgB,EAAE,CACzC,EACA,UACF,EACA,CACE,KAAM,CACJ,OAAQ,EAAQ,EAAgB,OAAO,CACzC,EACA,UACF,CACF,CACF,E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AK,CAAI,CAC7B,CAAC,EACD,IAAM,EAASA,EAAM,EAAU,SAAS,EACxC,EAAO,QAAU,EACjB,IAAM,EAAQA,EAAM,EAAQ,MAAM,EAOlC,MAAO,CAAE,UAAS,OAAQ,CAAC,EAAG,OAAM,OAAM,CAC5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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,2 +0,0 @@
1
- import{QUERIES as e}from"../../constants/index.mjs";import{t}from"../../utils-SxsCJsDP.mjs";import{omit as n}from"lodash-es";import{sortObject as r}from"@jeromefitz/utils";const i=async({config:i,getBlocksByIdChildren:a,getDatabasesByIdQuery:o,getDeepFetchAllChildren:s,pathVariables:c,routeType:l,slug:u})=>{let{NOTION:d}=i,f=l?.toUpperCase();if(!Object.keys(d).includes(f))return{content:{},images:{},info:{},items:{}};let p=await o({database_id:d[f].database_id,filter:{and:[{...e.slug,rich_text:{equals:u}}]}}),m=p?.object===`list`&&p.results[0];if(!m)return{};let h=n(m,`properties`);return h.properties=r(t({config:i,data:m,pageId:h.id,pathVariables:c})),{content:[...await s({blocks:(await a({block_id:h.id})).results})],images:{},info:h,items:{}}};export{i as default};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_omit"],"sources":["../../../src/queries/get-notion-slug/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { omit as _omit } from \"lodash-es\";\n\nimport { QUERIES } from \"../../constants/index\";\nimport { dataNormalized } from \"../../utils/index\";\n\nconst getNotionSlug = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getDeepFetchAllChildren,\n pathVariables,\n routeType,\n slug,\n}) => {\n const { NOTION } = config;\n\n const DB_TYPE = routeType?.toUpperCase();\n const isValid = Object.keys(NOTION).includes(DB_TYPE);\n\n if (!isValid) return { content: {}, images: {}, info: {}, items: {} };\n\n const __info: any = await getDatabasesByIdQuery({\n database_id: NOTION[DB_TYPE].database_id,\n filter: {\n and: [\n {\n ...QUERIES.slug,\n rich_text: { equals: slug },\n },\n ],\n },\n });\n\n const _info = __info?.object === \"list\" && __info.results[0];\n // @refactor(404)\n if (!_info) {\n return {};\n }\n\n const info = _omit(_info, \"properties\");\n info.properties = sortObject(\n dataNormalized({ config, data: _info, pageId: info.id, pathVariables }),\n );\n\n const _content = await getBlocksByIdChildren({ block_id: info.id });\n const blocks = [...(await getDeepFetchAllChildren({ blocks: _content.results }))];\n const content = blocks;\n\n /**\n * @question if this is reached, there are no `items`\n */\n // const items: any = {}\n // items.results = _filter(items?.results, { properties: { isPublished: true } })\n\n /**\n * @note(plaiceholder)\n *\n * Pass empty `images` object for SSR/API takeover\n */\n return { content, images: {}, info, items: {} };\n};\n\nexport default getNotionSlug;\n"],"mappings":"4KAMA,MAAM,EAAgB,MAAO,CAC3B,SACA,wBACA,wBACA,0BACA,gBACA,YACA,UACI,CACJ,GAAM,CAAE,UAAW,EAEb,EAAU,GAAW,YAAY,EAGvC,GAAI,CAFY,OAAO,KAAK,CAAM,CAAC,CAAC,SAAS,CAExC,EAAS,MAAO,CAAE,QAAS,CAAC,EAAG,OAAQ,CAAC,EAAG,KAAM,CAAC,EAAG,MAAO,CAAC,CAAE,EAEpE,IAAM,EAAc,MAAM,EAAsB,CAC9C,YAAa,EAAO,EAAQ,CAAC,YAC7B,OAAQ,CACN,IAAK,CACH,CACE,GAAG,EAAQ,KACX,UAAW,CAAE,OAAQ,CAAK,CAC5B,CACF,CACF,CACF,CAAC,EAEK,EAAQ,GAAQ,SAAW,QAAU,EAAO,QAAQ,GAE1D,GAAI,CAAC,EACH,MAAO,CAAC,EAGV,IAAM,EAAOA,EAAM,EAAO,YAAY,EAoBtC,MAnBA,GAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAO,OAAQ,EAAK,GAAI,eAAc,CAAC,CACxE,EAiBO,CAAE,SAdO,GAAI,MAAM,EAAwB,CAAE,QAAQ,MADrC,EAAsB,CAAE,SAAU,EAAK,EAAG,CAAC,EACN,CAAS,OAAQ,CAAC,CAcrE,EAAS,OAAQ,CAAC,EAAG,OAAM,MAAO,CAAC,CAAE,CAChD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.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"}