@jeromefitz/notion 6.1.0 → 6.2.0-canary.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 (268) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.turbo/turbo-lint$colon$ts.log +1 -0
  3. package/README.md +12 -12
  4. package/{constants → dist/constants}/index.d.mts +1 -1
  5. package/{constants → dist/constants}/index.d.mts.map +1 -1
  6. package/dist/constants/index.mjs.map +1 -0
  7. package/dist/get-types-7QEbhRzY.mjs +2 -0
  8. package/dist/get-types-7QEbhRzY.mjs.map +1 -0
  9. package/{index-CQ1IEP2W.d.mts → dist/index-BAoq6yHe.d.mts} +7 -7
  10. package/{index-CQ1IEP2W.d.mts.map → dist/index-BAoq6yHe.d.mts.map} +1 -1
  11. package/{index.d.mts → dist/index.d.mts} +1 -1
  12. package/dist/index.d.mts.map +1 -0
  13. package/dist/index.mjs +2 -0
  14. package/dist/index.mjs.map +1 -0
  15. package/{queries/getBlocksByIdChildren → dist/queries/get-blocks-by-id-children}/index.d.mts +1 -1
  16. package/dist/queries/get-blocks-by-id-children/index.d.mts.map +1 -0
  17. package/dist/queries/get-blocks-by-id-children/index.mjs.map +1 -0
  18. package/{queries/getDatabasesByIdQuery → dist/queries/get-databases-by-id-query}/index.d.mts +2 -2
  19. package/dist/queries/get-databases-by-id-query/index.d.mts.map +1 -0
  20. package/dist/queries/get-databases-by-id-query/index.mjs.map +1 -0
  21. package/{queries/getDeepFetchAllChildren → dist/queries/get-deep-fetch-all-children}/index.d.mts +1 -1
  22. package/dist/queries/get-deep-fetch-all-children/index.d.mts.map +1 -0
  23. package/dist/queries/get-deep-fetch-all-children/index.mjs.map +1 -0
  24. package/{queries/getInfoType → dist/queries/get-info-type}/index.d.mts +1 -3
  25. package/dist/queries/get-info-type/index.d.mts.map +1 -0
  26. package/dist/queries/get-info-type/index.mjs.map +1 -0
  27. package/{queries/getNotionListing → dist/queries/get-notion-listing}/index.d.mts +1 -1
  28. package/dist/queries/get-notion-listing/index.d.mts.map +1 -0
  29. package/dist/queries/get-notion-listing/index.mjs +2 -0
  30. package/dist/queries/get-notion-listing/index.mjs.map +1 -0
  31. package/{queries/getNotionListingByDate → dist/queries/get-notion-listing-by-date}/index.d.mts +1 -1
  32. package/dist/queries/get-notion-listing-by-date/index.d.mts.map +1 -0
  33. package/dist/queries/get-notion-listing-by-date/index.mjs +2 -0
  34. package/dist/queries/get-notion-listing-by-date/index.mjs.map +1 -0
  35. package/{queries/getNotionSlug → dist/queries/get-notion-slug}/index.d.mts +1 -1
  36. package/dist/queries/get-notion-slug/index.d.mts.map +1 -0
  37. package/dist/queries/get-notion-slug/index.mjs +2 -0
  38. package/dist/queries/get-notion-slug/index.mjs.map +1 -0
  39. package/{queries/getNotionSlugByRoute → dist/queries/get-notion-slug-by-route}/index.d.mts +1 -1
  40. package/dist/queries/get-notion-slug-by-route/index.d.mts.map +1 -0
  41. package/dist/queries/get-notion-slug-by-route/index.mjs +2 -0
  42. package/dist/queries/get-notion-slug-by-route/index.mjs.map +1 -0
  43. package/{queries/getPagesById → dist/queries/get-pages-by-id}/index.d.mts +1 -1
  44. package/dist/queries/get-pages-by-id/index.d.mts.map +1 -0
  45. package/dist/queries/get-pages-by-id/index.mjs.map +1 -0
  46. package/{queries/getPathVariables → dist/queries/get-path-variables}/index.d.mts +2 -2
  47. package/dist/queries/get-path-variables/index.d.mts.map +1 -0
  48. package/dist/queries/get-path-variables/index.mjs +2 -0
  49. package/dist/queries/get-path-variables/index.mjs.map +1 -0
  50. package/{queries/getQuery → dist/queries/get-query}/index.d.mts +1 -1
  51. package/dist/queries/get-query/index.d.mts.map +1 -0
  52. package/dist/queries/get-query/index.mjs +2 -0
  53. package/dist/queries/get-query/index.mjs.map +1 -0
  54. package/dist/queries/index.d.mts +12 -0
  55. package/dist/queries/index.mjs +1 -0
  56. package/{schema → dist/schema}/index.d.mts +1 -1
  57. package/{utils/addTime → dist/utils/add-time}/index.d.mts +1 -1
  58. package/dist/utils/add-time/index.d.mts.map +1 -0
  59. package/dist/utils/add-time/index.mjs.map +1 -0
  60. package/{utils/dataNormalized → dist/utils/data-normalized}/index.d.mts +1 -1
  61. package/dist/utils/data-normalized/index.d.mts.map +1 -0
  62. package/dist/utils/data-normalized/index.mjs +1 -0
  63. package/{utils/dataNormalizedResults → dist/utils/data-normalized-results}/index.d.mts +1 -1
  64. package/dist/utils/data-normalized-results/index.d.mts.map +1 -0
  65. package/dist/utils/data-normalized-results/index.mjs +1 -0
  66. package/{utils/getDataType → dist/utils/get-data-type}/index.d.mts +2 -2
  67. package/dist/utils/get-data-type/index.d.mts.map +1 -0
  68. package/dist/utils/get-data-type/index.mjs.map +1 -0
  69. package/{utils/getTitle → dist/utils/get-title}/index.d.mts +1 -1
  70. package/dist/utils/get-title/index.d.mts.map +1 -0
  71. package/dist/utils/get-title/index.mjs.map +1 -0
  72. package/dist/utils/get-types/_unsupported.d.mts +5 -0
  73. package/dist/utils/get-types/_unsupported.d.mts.map +1 -0
  74. package/dist/utils/get-types/_unsupported.mjs.map +1 -0
  75. package/{utils/getTypes → dist/utils/get-types}/checkbox.d.mts +1 -1
  76. package/dist/utils/get-types/checkbox.d.mts.map +1 -0
  77. package/dist/utils/get-types/checkbox.mjs.map +1 -0
  78. package/{utils/getTypes → dist/utils/get-types}/date.d.mts +1 -1
  79. package/dist/utils/get-types/date.d.mts.map +1 -0
  80. package/dist/utils/get-types/date.mjs.map +1 -0
  81. package/{utils/getTypes → dist/utils/get-types}/email.d.mts +1 -1
  82. package/dist/utils/get-types/email.d.mts.map +1 -0
  83. package/dist/utils/get-types/email.mjs.map +1 -0
  84. package/{utils/getTypes → dist/utils/get-types}/files.d.mts +1 -1
  85. package/dist/utils/get-types/files.d.mts.map +1 -0
  86. package/dist/utils/get-types/files.mjs.map +1 -0
  87. package/{utils/getTypes → dist/utils/get-types}/index.d.mts +1 -1
  88. package/{utils/getTypes → dist/utils/get-types}/index.d.mts.map +1 -1
  89. package/dist/utils/get-types/index.mjs +1 -0
  90. package/{utils/getTypes/multi_select.d.mts → dist/utils/get-types/multi-select.d.mts} +2 -2
  91. package/dist/utils/get-types/multi-select.d.mts.map +1 -0
  92. package/{utils/getTypes/multi_select.mjs → dist/utils/get-types/multi-select.mjs} +1 -1
  93. package/dist/utils/get-types/multi-select.mjs.map +1 -0
  94. package/{utils/getTypes → dist/utils/get-types}/number.d.mts +1 -1
  95. package/dist/utils/get-types/number.d.mts.map +1 -0
  96. package/dist/utils/get-types/number.mjs.map +1 -0
  97. package/{utils/getTypes → dist/utils/get-types}/people.d.mts +1 -1
  98. package/dist/utils/get-types/people.d.mts.map +1 -0
  99. package/dist/utils/get-types/people.mjs.map +1 -0
  100. package/{utils/getTypes/phone_number.d.mts → dist/utils/get-types/phone-number.d.mts} +2 -2
  101. package/dist/utils/get-types/phone-number.d.mts.map +1 -0
  102. package/{utils/getTypes/phone_number.mjs → dist/utils/get-types/phone-number.mjs} +1 -1
  103. package/dist/utils/get-types/phone-number.mjs.map +1 -0
  104. package/{utils/getTypes → dist/utils/get-types}/relation.d.mts +1 -1
  105. package/dist/utils/get-types/relation.d.mts.map +1 -0
  106. package/dist/utils/get-types/relation.mjs +1 -0
  107. package/{utils/getTypes/rich_text.d.mts → dist/utils/get-types/rich-text.d.mts} +2 -2
  108. package/dist/utils/get-types/rich-text.d.mts.map +1 -0
  109. package/{utils/getTypes/rich_text.mjs → dist/utils/get-types/rich-text.mjs} +1 -1
  110. package/dist/utils/get-types/rich-text.mjs.map +1 -0
  111. package/{utils/getTypes → dist/utils/get-types}/rollup.d.mts +1 -1
  112. package/dist/utils/get-types/rollup.d.mts.map +1 -0
  113. package/dist/utils/get-types/rollup.mjs +1 -0
  114. package/{utils/getTypes → dist/utils/get-types}/select.d.mts +1 -1
  115. package/dist/utils/get-types/select.d.mts.map +1 -0
  116. package/dist/utils/get-types/select.mjs.map +1 -0
  117. package/{utils/getTypes → dist/utils/get-types}/title.d.mts +1 -1
  118. package/dist/utils/get-types/title.d.mts.map +1 -0
  119. package/dist/utils/get-types/title.mjs.map +1 -0
  120. package/{utils/getTypes → dist/utils/get-types}/url.d.mts +1 -1
  121. package/{utils/getTypes → dist/utils/get-types}/url.d.mts.map +1 -1
  122. package/dist/utils/get-types/url.mjs.map +1 -0
  123. package/dist/utils/index.d.mts +7 -0
  124. package/dist/utils/index.mjs +1 -0
  125. package/dist/utils-SxsCJsDP.mjs +2 -0
  126. package/dist/utils-SxsCJsDP.mjs.map +1 -0
  127. package/package.json +213 -64
  128. package/release.config.js +25 -0
  129. package/src/constants/index.ts +1326 -0
  130. package/src/index.ts +151 -0
  131. package/src/queries/get-blocks-by-id-children/index.ts +12 -0
  132. package/src/queries/get-databases-by-id-query/index.ts +28 -0
  133. package/src/queries/get-deep-fetch-all-children/index.ts +35 -0
  134. package/src/queries/get-info-type/index.ts +40 -0
  135. package/src/queries/get-notion-listing/index.ts +91 -0
  136. package/src/queries/get-notion-listing-by-date/index.ts +190 -0
  137. package/src/queries/get-notion-slug/index.ts +64 -0
  138. package/src/queries/get-notion-slug-by-route/index.ts +201 -0
  139. package/src/queries/get-pages-by-id/index.ts +12 -0
  140. package/src/queries/get-path-variables/index.ts +60 -0
  141. package/src/queries/get-query/index.ts +140 -0
  142. package/src/queries/index.ts +25 -0
  143. package/src/schema/index.ts +386 -0
  144. package/src/utils/add-time/index.ts +16 -0
  145. package/src/utils/data-normalized/index.ts +49 -0
  146. package/src/utils/data-normalized-results/index.ts +29 -0
  147. package/src/utils/get-data-type/index.ts +62 -0
  148. package/src/utils/get-title/index.ts +21 -0
  149. package/src/utils/get-types/_unsupported.ts +7 -0
  150. package/src/utils/get-types/checkbox.ts +3 -0
  151. package/src/utils/get-types/date.ts +6 -0
  152. package/src/utils/get-types/email.ts +3 -0
  153. package/src/utils/get-types/files.ts +67 -0
  154. package/src/utils/get-types/index.ts +41 -0
  155. package/src/utils/get-types/multi-select.ts +16 -0
  156. package/src/utils/get-types/number.ts +6 -0
  157. package/src/utils/get-types/people.ts +22 -0
  158. package/src/utils/get-types/phone-number.ts +3 -0
  159. package/src/utils/get-types/relation.ts +18 -0
  160. package/src/utils/get-types/rich-text.ts +5 -0
  161. package/src/utils/get-types/rollup.ts +30 -0
  162. package/src/utils/get-types/select.ts +21 -0
  163. package/src/utils/get-types/title.ts +4 -0
  164. package/src/utils/get-types/url.ts +3 -0
  165. package/src/utils/index.ts +16 -0
  166. package/tsconfig.json +15 -0
  167. package/tsdown.config.ts +14 -0
  168. package/constants/index.mjs.map +0 -1
  169. package/getTypes-D-cwjcBl.mjs +0 -2
  170. package/getTypes-D-cwjcBl.mjs.map +0 -1
  171. package/index.d.mts.map +0 -1
  172. package/index.mjs +0 -2
  173. package/index.mjs.map +0 -1
  174. package/queries/getBlocksByIdChildren/index.d.mts.map +0 -1
  175. package/queries/getBlocksByIdChildren/index.mjs.map +0 -1
  176. package/queries/getDatabasesByIdQuery/index.d.mts.map +0 -1
  177. package/queries/getDatabasesByIdQuery/index.mjs.map +0 -1
  178. package/queries/getDeepFetchAllChildren/index.d.mts.map +0 -1
  179. package/queries/getDeepFetchAllChildren/index.mjs.map +0 -1
  180. package/queries/getInfoType/index.d.mts.map +0 -1
  181. package/queries/getInfoType/index.mjs.map +0 -1
  182. package/queries/getNotionListing/index.d.mts.map +0 -1
  183. package/queries/getNotionListing/index.mjs +0 -2
  184. package/queries/getNotionListing/index.mjs.map +0 -1
  185. package/queries/getNotionListingByDate/index.d.mts.map +0 -1
  186. package/queries/getNotionListingByDate/index.mjs +0 -2
  187. package/queries/getNotionListingByDate/index.mjs.map +0 -1
  188. package/queries/getNotionSlug/index.d.mts.map +0 -1
  189. package/queries/getNotionSlug/index.mjs +0 -2
  190. package/queries/getNotionSlug/index.mjs.map +0 -1
  191. package/queries/getNotionSlugByRoute/index.d.mts.map +0 -1
  192. package/queries/getNotionSlugByRoute/index.mjs +0 -2
  193. package/queries/getNotionSlugByRoute/index.mjs.map +0 -1
  194. package/queries/getPagesById/index.d.mts.map +0 -1
  195. package/queries/getPagesById/index.mjs.map +0 -1
  196. package/queries/getPathVariables/index.d.mts.map +0 -1
  197. package/queries/getPathVariables/index.mjs +0 -2
  198. package/queries/getPathVariables/index.mjs.map +0 -1
  199. package/queries/getQuery/index.d.mts.map +0 -1
  200. package/queries/getQuery/index.mjs +0 -2
  201. package/queries/getQuery/index.mjs.map +0 -1
  202. package/queries/index.d.mts +0 -12
  203. package/queries/index.mjs +0 -1
  204. package/utils/addTime/index.d.mts.map +0 -1
  205. package/utils/addTime/index.mjs.map +0 -1
  206. package/utils/dataNormalized/index.d.mts.map +0 -1
  207. package/utils/dataNormalized/index.mjs +0 -1
  208. package/utils/dataNormalizedResults/index.d.mts.map +0 -1
  209. package/utils/dataNormalizedResults/index.mjs +0 -1
  210. package/utils/getDataType/index.d.mts.map +0 -1
  211. package/utils/getDataType/index.mjs.map +0 -1
  212. package/utils/getTitle/index.d.mts.map +0 -1
  213. package/utils/getTitle/index.mjs.map +0 -1
  214. package/utils/getTypes/_unsupported.d.mts +0 -6
  215. package/utils/getTypes/_unsupported.d.mts.map +0 -1
  216. package/utils/getTypes/_unsupported.mjs.map +0 -1
  217. package/utils/getTypes/checkbox.d.mts.map +0 -1
  218. package/utils/getTypes/checkbox.mjs.map +0 -1
  219. package/utils/getTypes/date.d.mts.map +0 -1
  220. package/utils/getTypes/date.mjs.map +0 -1
  221. package/utils/getTypes/email.d.mts.map +0 -1
  222. package/utils/getTypes/email.mjs.map +0 -1
  223. package/utils/getTypes/files.d.mts.map +0 -1
  224. package/utils/getTypes/files.mjs.map +0 -1
  225. package/utils/getTypes/index.mjs +0 -1
  226. package/utils/getTypes/multi_select.d.mts.map +0 -1
  227. package/utils/getTypes/multi_select.mjs.map +0 -1
  228. package/utils/getTypes/number.d.mts.map +0 -1
  229. package/utils/getTypes/number.mjs.map +0 -1
  230. package/utils/getTypes/people.d.mts.map +0 -1
  231. package/utils/getTypes/people.mjs.map +0 -1
  232. package/utils/getTypes/phone_number.d.mts.map +0 -1
  233. package/utils/getTypes/phone_number.mjs.map +0 -1
  234. package/utils/getTypes/relation.d.mts.map +0 -1
  235. package/utils/getTypes/relation.mjs +0 -1
  236. package/utils/getTypes/rich_text.d.mts.map +0 -1
  237. package/utils/getTypes/rich_text.mjs.map +0 -1
  238. package/utils/getTypes/rollup.d.mts.map +0 -1
  239. package/utils/getTypes/rollup.mjs +0 -1
  240. package/utils/getTypes/select.d.mts.map +0 -1
  241. package/utils/getTypes/select.mjs.map +0 -1
  242. package/utils/getTypes/title.d.mts.map +0 -1
  243. package/utils/getTypes/title.mjs.map +0 -1
  244. package/utils/getTypes/url.mjs.map +0 -1
  245. package/utils/index.d.mts +0 -7
  246. package/utils/index.mjs +0 -1
  247. package/utils-VfbevQkn.mjs +0 -2
  248. package/utils-VfbevQkn.mjs.map +0 -1
  249. /package/{constants → dist/constants}/index.mjs +0 -0
  250. /package/{queries/getBlocksByIdChildren → dist/queries/get-blocks-by-id-children}/index.mjs +0 -0
  251. /package/{queries/getDatabasesByIdQuery → dist/queries/get-databases-by-id-query}/index.mjs +0 -0
  252. /package/{queries/getDeepFetchAllChildren → dist/queries/get-deep-fetch-all-children}/index.mjs +0 -0
  253. /package/{queries/getInfoType → dist/queries/get-info-type}/index.mjs +0 -0
  254. /package/{queries/getPagesById → dist/queries/get-pages-by-id}/index.mjs +0 -0
  255. /package/{schema → dist/schema}/index.mjs +0 -0
  256. /package/{utils/addTime → dist/utils/add-time}/index.mjs +0 -0
  257. /package/{utils/getDataType → dist/utils/get-data-type}/index.mjs +0 -0
  258. /package/{utils/getTitle → dist/utils/get-title}/index.mjs +0 -0
  259. /package/{utils/getTypes → dist/utils/get-types}/_unsupported.mjs +0 -0
  260. /package/{utils/getTypes → dist/utils/get-types}/checkbox.mjs +0 -0
  261. /package/{utils/getTypes → dist/utils/get-types}/date.mjs +0 -0
  262. /package/{utils/getTypes → dist/utils/get-types}/email.mjs +0 -0
  263. /package/{utils/getTypes → dist/utils/get-types}/files.mjs +0 -0
  264. /package/{utils/getTypes → dist/utils/get-types}/number.mjs +0 -0
  265. /package/{utils/getTypes → dist/utils/get-types}/people.mjs +0 -0
  266. /package/{utils/getTypes → dist/utils/get-types}/select.mjs +0 -0
  267. /package/{utils/getTypes → dist/utils/get-types}/title.mjs +0 -0
  268. /package/{utils/getTypes → dist/utils/get-types}/url.mjs +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/utils/dataNormalizedResults/index.ts"],"mappings":";;;;;;;cAYM,qBAAA;EAAyB,MAAA;EAAA,OAAA;EAAA;AAAA"}
@@ -1 +0,0 @@
1
- import{t as e}from"../../utils-VfbevQkn.mjs";export{e as default};
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/utils/getDataType/index.ts"],"mappings":";;;;;;AAqDiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA3C,WAAA;EAAe,OAAA;EAAA,OAAA;EAAA;AAAA;;;;MAAA,SAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/utils/getDataType/index.ts"],"sourcesContent":["import { DATA_TYPES } from '../../constants/index'\n\n/**\n * @info dataType\n * pathVariables via `../../queries/pathVariables`\n *\n * 1 = (isPage) DATA_TYPES.SLUG\n * ex) /about\n * /colophon\n * /contact\n * => routeType = pages\n * @note no ability for second tier at the moment for non-db\n * otherwise these would have to be `/pages/about`\n *\n * 2 = (isIndex && !hasMeta) DATA_TYPES.LISTING\n * ex) /blog\n * /events\n * /podcasts\n * => routeType = routeType\n * @note\n * - events should only be \"upcoming events\"\n * - blog should be all-time (handled by pagination)\n *\n * 3 = (isIndex && hasMeta) DATA_TYPES.LISTING_BY_DATE\n * ex) /blog/yyyy\n * /blog/yyyy/mm\n * /blog/yyyy/mm/dd\n * /events/yyyy\n * /events/yyyy/mm\n * /events/yyyy/mm/dd\n * => routeType = routeType\n * @note These are each `index` pages for certain routeTypes\n *\n * 4 = (hasMeta) DATA_TYPES.SLUG_BY_ROUTE\n * ex) /blog/yyyy/mm/dd/[slug]\n * => parentRouteType = blog\n * => routeType = blog\n * @note determine [yyyy-mm-dd] from data via slug\n * /events/yyyy/mm/dd/[slug],\n * => parentRouteType = events\n * => routeType = events\n * @note determine [yyyy-mm-dd] from data via slug\n * /podcasts/[podcasts-slug]/[slug]\n * => parentRouteType = podcasts\n * => routeType = episodes\n * @note determine [podcasts-slug] from data via slug\n *\n * 5 = (else) DATA_TYPES.SLUG\n * ex) /shows/[slug]\n * /events/yyyy/mm/dd/[slug]\n * /podcasts/[slug]\n *\n */\nconst getDataType = ({ hasMeta, isIndex, isPage }) => {\n if (isPage) return DATA_TYPES.SLUG\n if (isIndex && !hasMeta) return DATA_TYPES.LISTING\n if (isIndex && hasMeta) return DATA_TYPES.LISTING_BY_DATE\n if (hasMeta) return DATA_TYPES.SLUG_BY_ROUTE\n return DATA_TYPES.SLUG\n}\n\nexport default getDataType\n"],"mappings":"uDAqDA,MAAM,GAAe,CAAE,UAAS,UAAS,YACnC,EAAe,EAAW,KAC1B,GAAW,CAAC,EAAgB,EAAW,QACvC,GAAW,EAAgB,EAAW,gBACtC,EAAgB,EAAW,cACxB,EAAW"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/utils/getTitle/index.ts"],"mappings":";;;;;cAMM,QAAA,GAAY,KAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["_last"],"sources":["../../../src/utils/getTitle/index.ts"],"sourcesContent":["import { last as _last } from 'lodash-es'\n\n/**\n * @note this should be in the website repo as it’s custom\n * *cough* more custom than _waves vaguely all-around_ all of this\n */\nconst getTitle = (title: string) => {\n const _title: string = _last(title.split('_')) ?? ''\n\n // biome-ignore lint/complexity/noExtraBooleanCast: migrate\n if (!!_title) {\n return _title\n .replace('Past', 'Cast Emeritus')\n .replace('Musical', 'Musical Director')\n .replace('Technical', 'Technical Director')\n }\n\n return _title\n}\n\nexport default getTitle\n"],"mappings":"iCAMA,MAAM,EAAY,GAAkB,CAClC,IAAM,EAAiBA,EAAM,EAAM,MAAM,GAAG,CAAC,GAAK,GAUlD,OAPM,GACG,EACJ,QAAQ,OAAQ,eAAe,EAC/B,QAAQ,UAAW,kBAAkB,EACrC,QAAQ,YAAa,oBAAoB,CAIhD"}
@@ -1,6 +0,0 @@
1
- //#region src/utils/getTypes/_unsupported.d.ts
2
- /** biome-ignore-all lint/suspicious/noConsole: migrate */
3
- declare const _unsupported: (data: any) => any;
4
- //#endregion
5
- export { _unsupported as default };
6
- //# sourceMappingURL=_unsupported.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_unsupported.d.mts","names":[],"sources":["../../../src/utils/getTypes/_unsupported.ts"],"mappings":";;cACM,YAAA,GAAgB,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_unsupported.mjs","names":[],"sources":["../../../src/utils/getTypes/_unsupported.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noConsole: migrate */\nconst _unsupported = (data: any) => {\n console.dir(`@notion(_unsupported)`)\n // console.dir(data)\n return data\n}\n\nexport default _unsupported\n"],"mappings":"AACA,MAAM,EAAgB,IACpB,QAAQ,IAAI,uBAAuB,EAE5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox.d.mts","names":[],"sources":["../../../src/utils/getTypes/checkbox.ts"],"mappings":";cAAM,QAAA,GAAY,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox.mjs","names":[],"sources":["../../../src/utils/getTypes/checkbox.ts"],"sourcesContent":["const checkbox = (data: any) => data.checkbox || false\n\nexport default checkbox\n"],"mappings":"AAAA,MAAM,EAAY,GAAc,EAAK,UAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.d.mts","names":[],"sources":["../../../src/utils/getTypes/date.ts"],"mappings":";cAAM,IAAA,GAAQ,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.mjs","names":[],"sources":["../../../src/utils/getTypes/date.ts"],"sourcesContent":["const date = (data: any) => {\n const { type } = data\n return data[type]\n}\n\nexport default date\n"],"mappings":"AAAA,MAAM,EAAQ,GAAc,CAC1B,GAAM,CAAE,QAAS,EACjB,OAAO,EAAK,EACd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.d.mts","names":[],"sources":["../../../src/utils/getTypes/email.ts"],"mappings":";cAAM,KAAA,GAAS,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.mjs","names":[],"sources":["../../../src/utils/getTypes/email.ts"],"sourcesContent":["const email = (data: any) => data.email || null\n\nexport default email\n"],"mappings":"AAAA,MAAM,EAAS,GAAc,EAAK,OAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.d.mts","names":[],"sources":["../../../src/utils/getTypes/files.ts"],"mappings":";cAYM,KAAA,GAAS,IAAA,OAAW,MAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.mjs","names":["_size"],"sources":["../../../src/utils/getTypes/files.ts"],"sourcesContent":["import { stringToUUID } from '@jeromefitz/utils'\n\nimport Slugger from 'github-slugger'\nimport { size as _size } from 'lodash-es'\n\nconst notionImageHosted = `https://www.notion.so/image/{{FILENAME}}?table=block&id={{PAGE_ID}}&cache=v2&w1dth=600`\n\nconst getNotionHostedUrl = (url: boolean | number | string, pageId: string) =>\n notionImageHosted\n .replace('{{FILENAME}}', encodeURIComponent(url))\n .replace('{{PAGE_ID}}', stringToUUID(pageId))\n\nconst files = (data: any, pageId: string) => {\n const slugger = new Slugger()\n const _files = {}\n\n if (_size(data.files) <= 0) return _files\n data.files.map(\n (file: { external: { url: string }; file: { url: string }; type: string }) => {\n if (file?.type === 'file') {\n const internalUrl = file?.file?.url.split('?')[0]\n const internalSlug = slugger.slug(internalUrl)\n /**\n * @note(plaiceholder)\n *\n * Do not handle here.\n */\n // const { base64: internalBase64, img: internalImg } = await getPlaiceholder(\n // internalUrl\n // )\n _files[internalSlug] = {\n type: file?.type,\n url: getNotionHostedUrl(internalUrl, pageId),\n // base64: internalBase64,\n // img: internalImg,\n }\n }\n if (file?.type === 'external') {\n const externalUrl = file?.external?.url.split('?')[0]\n const externalSlug = slugger.slug(externalUrl)\n /**\n * @note(plaiceholder)\n *\n * Do not handle here.\n */\n // const { base64: externalBase64, img: externalImg } = await getPlaiceholder(\n // externalUrl\n // )\n _files[externalSlug] = {\n type: file?.type,\n url: externalUrl,\n // base64: externalBase64,\n // img: externalImg,\n }\n }\n // if (file?.type === 'image') {\n // const externalUrl = file?.external?.url.split('?')[0]\n // const externalSlug = slugger.slug(externalUrl)\n // _files[externalSlug] = { type: file?.type, url: externalUrl }\n // }\n\n // return\n },\n )\n\n return _files\n}\n\nexport default files\n"],"mappings":"gHAKA,MAEM,GAAsB,EAAgC,IAC1D,yFACG,QAAQ,eAAgB,mBAAmB,CAAG,CAAC,EAC/C,QAAQ,cAAe,EAAa,CAAM,CAAC,EAE1C,GAAS,EAAW,IAAmB,CAC3C,IAAM,EAAU,IAAI,EACd,EAAS,CAAC,EAmDhB,OAjDIA,EAAM,EAAK,KAAK,GAAK,GACzB,EAAK,MAAM,IACR,GAA6E,CAC5E,GAAI,GAAM,OAAS,OAAQ,CACzB,IAAM,EAAc,GAAM,MAAM,IAAI,MAAM,GAAG,EAAE,GACzC,EAAe,EAAQ,KAAK,CAAW,EAS7C,EAAO,GAAgB,CACrB,KAAM,GAAM,KACZ,IAAK,EAAmB,EAAa,CAAM,CAG7C,CACF,CACA,GAAI,GAAM,OAAS,WAAY,CAC7B,IAAM,EAAc,GAAM,UAAU,IAAI,MAAM,GAAG,EAAE,GAC7C,EAAe,EAAQ,KAAK,CAAW,EAS7C,EAAO,GAAgB,CACrB,KAAM,GAAM,KACZ,IAAK,CAGP,CACF,CAQF,CACF,EA/CmC,CAkDrC"}
@@ -1 +0,0 @@
1
- import{t as e}from"../../getTypes-D-cwjcBl.mjs";export{e as default};
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi_select.d.mts","names":[],"sources":["../../../src/utils/getTypes/multi_select.ts"],"mappings":";cAGM,YAAA,GAAgB,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi_select.mjs","names":[],"sources":["../../../src/utils/getTypes/multi_select.ts"],"sourcesContent":["import Slugger from 'github-slugger'\nimport { map as _map } from 'lodash-es'\n\nconst multi_select = (data: any) => {\n const slugger = new Slugger()\n\n const dataReturn = {}\n _map(data.multi_select, (multiSelect: any) => {\n const ms = multiSelect\n ms.slug = slugger.slug(ms.name)\n dataReturn[ms.id] = ms\n })\n return dataReturn\n}\n\nexport default multi_select\n"],"mappings":"8DAGA,MAAM,EAAgB,GAAc,CAClC,IAAM,EAAU,IAAI,EAEd,EAAa,CAAC,EAMpB,OALA,EAAK,EAAK,aAAe,GAAqB,CAC5C,IAAM,EAAK,EACX,EAAG,KAAO,EAAQ,KAAK,EAAG,IAAI,EAC9B,EAAW,EAAG,IAAM,CACtB,CAAC,EACM,CACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.mts","names":[],"sources":["../../../src/utils/getTypes/number.ts"],"mappings":";cACM,MAAA,GAAU,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.mjs","names":[],"sources":["../../../src/utils/getTypes/number.ts"],"sourcesContent":["// @todo(notion) allow for format\nconst number = (data: any) => {\n return data?.number || null\n}\n\nexport default number\n"],"mappings":"AACA,MAAM,EAAU,GACP,GAAM,QAAU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"people.d.mts","names":[],"sources":["../../../src/utils/getTypes/people.ts"],"mappings":";cAEM,MAAA,GAAU,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"people.mjs","names":[],"sources":["../../../src/utils/getTypes/people.ts"],"sourcesContent":["import Slugger from 'github-slugger'\n\nconst people = (data: any) => {\n const slugger = new Slugger()\n return data.people.map((p) => {\n const { avatar_url, id, name, person } = p\n const { email } = person\n const slug = slugger.slug(name)\n\n return {\n [slug]: {\n avatar_url,\n email,\n id,\n name,\n },\n }\n })[0]\n // return data.people || null\n}\n\nexport default people\n"],"mappings":"8BAEA,MAAM,EAAU,GAAc,CAC5B,IAAM,EAAU,IAAI,EACpB,OAAO,EAAK,OAAO,IAAK,GAAM,CAC5B,GAAM,CAAE,aAAY,KAAI,OAAM,UAAW,EACnC,CAAE,SAAU,EAGlB,MAAO,EAFM,EAAQ,KAAK,CAGvB,GAAO,CACN,aACA,QACA,KACA,MACF,CACF,CACF,CAAC,EAAE,EAEL"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone_number.d.mts","names":[],"sources":["../../../src/utils/getTypes/phone_number.ts"],"mappings":";cAAM,YAAA,GAAgB,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"phone_number.mjs","names":[],"sources":["../../../src/utils/getTypes/phone_number.ts"],"sourcesContent":["const phone_number = (data: any) => data?.phone_number || null\n\nexport default phone_number\n"],"mappings":"AAAA,MAAM,EAAgB,GAAc,GAAM,cAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"relation.d.mts","names":[],"sources":["../../../src/utils/getTypes/relation.ts"],"mappings":";cAIM,QAAA,GAAY,IAAS"}
@@ -1 +0,0 @@
1
- import{r as e}from"../../getTypes-D-cwjcBl.mjs";export{e as default};
@@ -1 +0,0 @@
1
- {"version":3,"file":"rich_text.d.mts","names":[],"sources":["../../../src/utils/getTypes/rich_text.ts"],"mappings":";cAAM,SAAA,GAAa,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rich_text.mjs","names":[],"sources":["../../../src/utils/getTypes/rich_text.ts"],"sourcesContent":["const rich_text = (data: any) =>\n // biome-ignore lint/complexity/noExtraBooleanCast: migrate\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,IAAI,WAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rollup.d.mts","names":[],"sources":["../../../src/utils/getTypes/rollup.ts"],"mappings":";cAiBM,MAAA,GAAU,IAAS"}
@@ -1 +0,0 @@
1
- import{n as e}from"../../getTypes-D-cwjcBl.mjs";export{e as default};
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.d.mts","names":[],"sources":["../../../src/utils/getTypes/select.ts"],"mappings":";cAEM,MAAA,GAAU,IAAA;EAAA,CAAA,CAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"select.mjs","names":[],"sources":["../../../src/utils/getTypes/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 // biome-ignore lint/complexity/noExtraBooleanCast: migrate\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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"title.d.mts","names":[],"sources":["../../../src/utils/getTypes/title.ts"],"mappings":";cACM,KAAA,GAAS,IAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"title.mjs","names":[],"sources":["../../../src/utils/getTypes/title.ts"],"sourcesContent":["// biome-ignore lint/complexity/noExtraBooleanCast: migrate\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,IAAI,WAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"url.mjs","names":[],"sources":["../../../src/utils/getTypes/url.ts"],"sourcesContent":["const url = (data: any) => data.url || null\n\nexport default url\n"],"mappings":"AAAA,MAAM,EAAO,GAAc,EAAK,KAAO"}
package/utils/index.d.mts DELETED
@@ -1,7 +0,0 @@
1
- import addTime from "./addTime/index.mjs";
2
- import dataNormalized from "./dataNormalized/index.mjs";
3
- import dataNormalizedResults from "./dataNormalizedResults/index.mjs";
4
- import getDataType from "./getDataType/index.mjs";
5
- import getTitle from "./getTitle/index.mjs";
6
- import getTypes from "./getTypes/index.mjs";
7
- export { addTime, dataNormalized, dataNormalizedResults, getDataType, getTitle, getTypes };
package/utils/index.mjs DELETED
@@ -1 +0,0 @@
1
- import e from"./addTime/index.mjs";import{n as t,t as n}from"../utils-VfbevQkn.mjs";import r from"./getDataType/index.mjs";import i from"./getTitle/index.mjs";import{t as a}from"../getTypes-D-cwjcBl.mjs";export{e as addTime,t as dataNormalized,n as dataNormalizedResults,r as getDataType,i as getTitle,a as getTypes};
@@ -1,2 +0,0 @@
1
- import{LOOKUP as e,PROPERTIES_LOOKUP as t}from"./constants/index.mjs";import"./utils/addTime/index.mjs";import"./utils/getDataType/index.mjs";import"./utils/getTitle/index.mjs";import{t as n}from"./getTypes-D-cwjcBl.mjs";import{map as r,omit as i}from"lodash-es";import{sortObject as a}from"@jeromefitz/utils";const o=({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?e[d.toUpperCase()]:t,e=>{let t,r=u[e.notion];l[e.key]=null,r&&(t=n[e.type](r,o),l[e.key]=t||null)}),l},s=({config:e,results:t,routeType:n})=>{let s=[];return r(t,t=>{let r=i(t,`properties`);r.properties=a(o({config:e,data:t,pageId:t?.id,pathVariables:n})),s.push(r)}),s};export{o as n,s as t};
2
- //# sourceMappingURL=utils-VfbevQkn.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-VfbevQkn.mjs","names":["_omit"],"sources":["../src/utils/dataNormalized/index.ts","../src/utils/dataNormalizedResults/index.ts"],"sourcesContent":["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 */\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","import { sortObject } from '@jeromefitz/utils'\n\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"],"mappings":"sTAUA,MAAM,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,MAAM,EAAgB,CAAM,EAC5D,EAAgB,EAAK,KAAO,GAAoC,KAEpE,CAAC,EAEM,CACT,ECjCM,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"}
File without changes
File without changes