@jeromefitz/notion 6.1.1-canary.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{utils/getTypes/_unsupported.mjs → _unsupported-BUIwc9lr.mjs} +2 -2
- package/_unsupported-BUIwc9lr.mjs.map +1 -0
- package/{utils/addTime/index.mjs → add-time-B_LfV4Ex.mjs} +2 -2
- package/add-time-B_LfV4Ex.mjs.map +1 -0
- package/checkbox-Cil1erOZ.mjs +2 -0
- package/checkbox-Cil1erOZ.mjs.map +1 -0
- package/constants/index.d.mts +2 -129
- package/constants/index.mjs +1 -2
- package/constants-C2jPji6h.mjs +2 -0
- package/constants-C2jPji6h.mjs.map +1 -0
- package/date-IJAT1r3Y.mjs +2 -0
- package/date-IJAT1r3Y.mjs.map +1 -0
- package/dist-BQciLh9t.mjs +2 -0
- package/dist-BQciLh9t.mjs.map +1 -0
- package/email-DygPLxSo.mjs +2 -0
- package/email-DygPLxSo.mjs.map +1 -0
- package/{utils/getTypes/files.mjs → files-Dx1jw5iY.mjs} +2 -2
- package/files-Dx1jw5iY.mjs.map +1 -0
- package/{queries/getBlocksByIdChildren/index.mjs → get-blocks-by-id-children-BRe4p0pZ.mjs} +2 -2
- package/get-blocks-by-id-children-BRe4p0pZ.mjs.map +1 -0
- package/get-data-type-B5X5VOmp.mjs +2 -0
- package/get-data-type-B5X5VOmp.mjs.map +1 -0
- package/get-databases-by-id-query-CI9TMkPN.mjs +2 -0
- package/get-databases-by-id-query-CI9TMkPN.mjs.map +1 -0
- package/{queries/getDeepFetchAllChildren/index.mjs → get-deep-fetch-all-children-DVZ-HFbN.mjs} +2 -2
- package/get-deep-fetch-all-children-DVZ-HFbN.mjs.map +1 -0
- package/{queries/getInfoType/index.mjs → get-info-type-CUsHqtfs.mjs} +2 -2
- package/get-info-type-CUsHqtfs.mjs.map +1 -0
- package/get-notion-listing-JJxOipMx.mjs +2 -0
- package/get-notion-listing-JJxOipMx.mjs.map +1 -0
- package/get-notion-listing-by-date-CSKBdFDQ.mjs +2 -0
- package/get-notion-listing-by-date-CSKBdFDQ.mjs.map +1 -0
- package/get-notion-slug-BecwpT0b.mjs +2 -0
- package/get-notion-slug-BecwpT0b.mjs.map +1 -0
- package/get-notion-slug-by-route-Dh428D_m.mjs +2 -0
- package/get-notion-slug-by-route-Dh428D_m.mjs.map +1 -0
- package/{queries/getPagesById/index.mjs → get-pages-by-id-D_3I7OED.mjs} +2 -2
- package/get-pages-by-id-D_3I7OED.mjs.map +1 -0
- package/get-path-variables-CnBrxTgg.mjs +2 -0
- package/get-path-variables-CnBrxTgg.mjs.map +1 -0
- package/get-query-ljtSpKL5.mjs +2 -0
- package/get-query-ljtSpKL5.mjs.map +1 -0
- package/{utils/getTitle/index.mjs → get-title-BWc2Ckhi.mjs} +2 -2
- package/get-title-BWc2Ckhi.mjs.map +1 -0
- package/get-types-Clb6OmBv.mjs +2 -0
- package/get-types-Clb6OmBv.mjs.map +1 -0
- package/index-BD5kzRhY.d.mts +129 -0
- package/index-BD5kzRhY.d.mts.map +1 -0
- package/{utils/getDataType/index.d.mts → index-BGofpiiB.d.mts} +4 -4
- package/index-BGofpiiB.d.mts.map +1 -0
- package/{queries/getNotionListingByDate/index.d.mts → index-BIttGCzA.d.mts} +3 -3
- package/index-BIttGCzA.d.mts.map +1 -0
- package/{queries/getPagesById/index.d.mts → index-C-J3ICp0.d.mts} +3 -3
- package/index-C-J3ICp0.d.mts.map +1 -0
- package/{queries/getNotionSlugByRoute/index.d.mts → index-CLQVoKDp.d.mts} +3 -3
- package/index-CLQVoKDp.d.mts.map +1 -0
- package/{queries/getDatabasesByIdQuery/index.d.mts → index-CucnheQT.d.mts} +4 -4
- package/index-CucnheQT.d.mts.map +1 -0
- package/{queries/getPathVariables/index.d.mts → index-D16uYjWr.d.mts} +4 -4
- package/index-D16uYjWr.d.mts.map +1 -0
- package/{queries/getNotionListing/index.d.mts → index-D4Gn1cYC.d.mts} +3 -3
- package/index-D4Gn1cYC.d.mts.map +1 -0
- package/{utils/dataNormalizedResults/index.d.mts → index-DMqCumJi.d.mts} +3 -3
- package/index-DMqCumJi.d.mts.map +1 -0
- package/{utils/getTypes/index.d.mts → index-DZSqTeBx.d.mts} +3 -3
- package/index-DZSqTeBx.d.mts.map +1 -0
- package/{utils/dataNormalized/index.d.mts → index-DZjFlXjH.d.mts} +3 -3
- package/index-DZjFlXjH.d.mts.map +1 -0
- package/{queries/getDeepFetchAllChildren/index.d.mts → index-D_fBH_D4.d.mts} +3 -3
- package/index-D_fBH_D4.d.mts.map +1 -0
- package/{queries/getNotionSlug/index.d.mts → index-Dx2yW5u0.d.mts} +3 -3
- package/index-Dx2yW5u0.d.mts.map +1 -0
- package/index-DxiWPo1l.d.mts +5 -0
- package/index-DxiWPo1l.d.mts.map +1 -0
- package/{queries/getInfoType/index.d.mts → index-H5Qko6iL.d.mts} +3 -3
- package/index-H5Qko6iL.d.mts.map +1 -0
- package/{utils/getTitle/index.d.mts → index-iru-ct3u.d.mts} +3 -3
- package/index-iru-ct3u.d.mts.map +1 -0
- package/{queries/getBlocksByIdChildren/index.d.mts → index-oAghjuN5.d.mts} +3 -3
- package/index-oAghjuN5.d.mts.map +1 -0
- package/{queries/getQuery/index.d.mts → index-wMZIVRBv.d.mts} +3 -3
- package/index-wMZIVRBv.d.mts.map +1 -0
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/index.test.d.mts +1 -0
- package/index.test.mjs +129 -0
- package/index.test.mjs.map +1 -0
- package/magic-string.es-D6kIB8Km.mjs +18 -0
- package/magic-string.es-D6kIB8Km.mjs.map +1 -0
- package/{utils/getTypes/multi_select.mjs → multi-select-BTDQCZWJ.mjs} +2 -2
- package/multi-select-BTDQCZWJ.mjs.map +1 -0
- package/number-DXsVfS7U.mjs +2 -0
- package/number-DXsVfS7U.mjs.map +1 -0
- package/package.json +52 -52
- package/{utils/getTypes/people.mjs → people-Ognwaka4.mjs} +2 -2
- package/people-Ognwaka4.mjs.map +1 -0
- package/phone-number-D-jSJ6fm.mjs +2 -0
- package/phone-number-D-jSJ6fm.mjs.map +1 -0
- package/queries/get-blocks-by-id-children/index.d.mts +2 -0
- package/queries/get-blocks-by-id-children/index.mjs +1 -0
- package/queries/get-databases-by-id-query/index.d.mts +2 -0
- package/queries/get-databases-by-id-query/index.mjs +1 -0
- package/queries/get-deep-fetch-all-children/index.d.mts +2 -0
- package/queries/get-deep-fetch-all-children/index.mjs +1 -0
- package/queries/get-info-type/index.d.mts +2 -0
- package/queries/get-info-type/index.mjs +1 -0
- package/queries/get-notion-listing/index.d.mts +2 -0
- package/queries/get-notion-listing/index.mjs +1 -0
- package/queries/get-notion-listing-by-date/index.d.mts +2 -0
- package/queries/get-notion-listing-by-date/index.mjs +1 -0
- package/queries/get-notion-slug/index.d.mts +2 -0
- package/queries/get-notion-slug/index.mjs +1 -0
- package/queries/get-notion-slug-by-route/index.d.mts +2 -0
- package/queries/get-notion-slug-by-route/index.mjs +1 -0
- package/queries/get-pages-by-id/index.d.mts +2 -0
- package/queries/get-pages-by-id/index.mjs +1 -0
- package/queries/get-path-variables/index.d.mts +2 -0
- package/queries/get-path-variables/index.mjs +1 -0
- package/queries/get-query/index.d.mts +2 -0
- package/queries/get-query/index.mjs +1 -0
- package/queries/index.d.mts +11 -11
- package/queries/index.mjs +1 -1
- package/queries-CCGQpuUT.mjs +1 -0
- package/{utils/getTypes/rich_text.mjs → rich-text-pNpMuY2o.mjs} +2 -2
- package/rich-text-pNpMuY2o.mjs.map +1 -0
- package/{utils/getTypes/select.mjs → select-i6mHDBMN.mjs} +2 -2
- package/select-i6mHDBMN.mjs.map +1 -0
- package/title-vmIyt8-r.mjs +2 -0
- package/title-vmIyt8-r.mjs.map +1 -0
- package/url-D7qu9nU2.mjs +2 -0
- package/url-D7qu9nU2.mjs.map +1 -0
- package/utils/add-time/index.d.mts +2 -0
- package/utils/add-time/index.mjs +1 -0
- package/utils/data-normalized/index.d.mts +2 -0
- package/utils/data-normalized/index.mjs +1 -0
- package/utils/data-normalized-results/index.d.mts +2 -0
- package/utils/data-normalized-results/index.mjs +1 -0
- package/utils/get-data-type/index.d.mts +2 -0
- package/utils/get-data-type/index.mjs +1 -0
- package/utils/get-title/index.d.mts +2 -0
- package/utils/get-title/index.mjs +1 -0
- package/utils/{getTypes → get-types}/_unsupported.d.mts +1 -1
- package/utils/get-types/_unsupported.d.mts.map +1 -0
- package/utils/get-types/_unsupported.mjs +1 -0
- package/utils/{getTypes → get-types}/checkbox.d.mts +1 -1
- package/utils/get-types/checkbox.d.mts.map +1 -0
- package/utils/get-types/checkbox.mjs +1 -0
- package/utils/{getTypes → get-types}/date.d.mts +1 -1
- package/utils/get-types/date.d.mts.map +1 -0
- package/utils/get-types/date.mjs +1 -0
- package/utils/{getTypes → get-types}/email.d.mts +1 -1
- package/utils/get-types/email.d.mts.map +1 -0
- package/utils/get-types/email.mjs +1 -0
- package/utils/{getTypes → get-types}/files.d.mts +1 -1
- package/utils/get-types/files.d.mts.map +1 -0
- package/utils/get-types/files.mjs +1 -0
- package/utils/get-types/index.d.mts +2 -0
- package/utils/get-types/index.mjs +1 -0
- package/utils/{getTypes/multi_select.d.mts → get-types/multi-select.d.mts} +2 -2
- package/utils/get-types/multi-select.d.mts.map +1 -0
- package/utils/get-types/multi-select.mjs +1 -0
- package/utils/{getTypes → get-types}/number.d.mts +1 -1
- package/utils/get-types/number.d.mts.map +1 -0
- package/utils/get-types/number.mjs +1 -0
- package/utils/{getTypes → get-types}/people.d.mts +1 -1
- package/utils/get-types/people.d.mts.map +1 -0
- package/utils/get-types/people.mjs +1 -0
- package/utils/{getTypes/phone_number.d.mts → get-types/phone-number.d.mts} +2 -2
- package/utils/get-types/phone-number.d.mts.map +1 -0
- package/utils/get-types/phone-number.mjs +1 -0
- package/utils/{getTypes → get-types}/relation.d.mts +1 -1
- package/utils/get-types/relation.d.mts.map +1 -0
- package/utils/get-types/relation.mjs +1 -0
- package/utils/{getTypes/rich_text.d.mts → get-types/rich-text.d.mts} +2 -2
- package/utils/get-types/rich-text.d.mts.map +1 -0
- package/utils/get-types/rich-text.mjs +1 -0
- package/utils/{getTypes → get-types}/rollup.d.mts +1 -1
- package/utils/get-types/rollup.d.mts.map +1 -0
- package/utils/get-types/rollup.mjs +1 -0
- package/utils/{getTypes → get-types}/select.d.mts +1 -1
- package/utils/get-types/select.d.mts.map +1 -0
- package/utils/get-types/select.mjs +1 -0
- package/utils/{getTypes → get-types}/title.d.mts +1 -1
- package/utils/get-types/title.d.mts.map +1 -0
- package/utils/get-types/title.mjs +1 -0
- package/utils/{getTypes → get-types}/url.d.mts +1 -1
- package/utils/{getTypes → get-types}/url.d.mts.map +1 -1
- package/utils/get-types/url.mjs +1 -0
- package/utils/index.d.mts +6 -6
- package/utils/index.mjs +1 -1
- package/utils-B1QU_ezs.mjs +2 -0
- package/utils-B1QU_ezs.mjs.map +1 -0
- package/constants/index.d.mts.map +0 -1
- package/constants/index.mjs.map +0 -1
- package/getTypes-D-cwjcBl.mjs +0 -2
- package/getTypes-D-cwjcBl.mjs.map +0 -1
- package/queries/getBlocksByIdChildren/index.d.mts.map +0 -1
- package/queries/getBlocksByIdChildren/index.mjs.map +0 -1
- package/queries/getDatabasesByIdQuery/index.d.mts.map +0 -1
- package/queries/getDatabasesByIdQuery/index.mjs +0 -2
- package/queries/getDatabasesByIdQuery/index.mjs.map +0 -1
- package/queries/getDeepFetchAllChildren/index.d.mts.map +0 -1
- package/queries/getDeepFetchAllChildren/index.mjs.map +0 -1
- package/queries/getInfoType/index.d.mts.map +0 -1
- package/queries/getInfoType/index.mjs.map +0 -1
- package/queries/getNotionListing/index.d.mts.map +0 -1
- package/queries/getNotionListing/index.mjs +0 -2
- package/queries/getNotionListing/index.mjs.map +0 -1
- package/queries/getNotionListingByDate/index.d.mts.map +0 -1
- package/queries/getNotionListingByDate/index.mjs +0 -2
- package/queries/getNotionListingByDate/index.mjs.map +0 -1
- package/queries/getNotionSlug/index.d.mts.map +0 -1
- package/queries/getNotionSlug/index.mjs +0 -2
- package/queries/getNotionSlug/index.mjs.map +0 -1
- package/queries/getNotionSlugByRoute/index.d.mts.map +0 -1
- package/queries/getNotionSlugByRoute/index.mjs +0 -2
- package/queries/getNotionSlugByRoute/index.mjs.map +0 -1
- package/queries/getPagesById/index.d.mts.map +0 -1
- package/queries/getPagesById/index.mjs.map +0 -1
- package/queries/getPathVariables/index.d.mts.map +0 -1
- package/queries/getPathVariables/index.mjs +0 -2
- package/queries/getPathVariables/index.mjs.map +0 -1
- package/queries/getQuery/index.d.mts.map +0 -1
- package/queries/getQuery/index.mjs +0 -2
- package/queries/getQuery/index.mjs.map +0 -1
- package/utils/addTime/index.d.mts +0 -5
- package/utils/addTime/index.d.mts.map +0 -1
- package/utils/addTime/index.mjs.map +0 -1
- package/utils/dataNormalized/index.d.mts.map +0 -1
- package/utils/dataNormalized/index.mjs +0 -1
- package/utils/dataNormalizedResults/index.d.mts.map +0 -1
- package/utils/dataNormalizedResults/index.mjs +0 -1
- package/utils/getDataType/index.d.mts.map +0 -1
- package/utils/getDataType/index.mjs +0 -2
- package/utils/getDataType/index.mjs.map +0 -1
- package/utils/getTitle/index.d.mts.map +0 -1
- package/utils/getTitle/index.mjs.map +0 -1
- package/utils/getTypes/_unsupported.d.mts.map +0 -1
- package/utils/getTypes/_unsupported.mjs.map +0 -1
- package/utils/getTypes/checkbox.d.mts.map +0 -1
- package/utils/getTypes/checkbox.mjs +0 -2
- package/utils/getTypes/checkbox.mjs.map +0 -1
- package/utils/getTypes/date.d.mts.map +0 -1
- package/utils/getTypes/date.mjs +0 -2
- package/utils/getTypes/date.mjs.map +0 -1
- package/utils/getTypes/email.d.mts.map +0 -1
- package/utils/getTypes/email.mjs +0 -2
- package/utils/getTypes/email.mjs.map +0 -1
- package/utils/getTypes/files.d.mts.map +0 -1
- package/utils/getTypes/files.mjs.map +0 -1
- package/utils/getTypes/index.d.mts.map +0 -1
- package/utils/getTypes/index.mjs +0 -1
- package/utils/getTypes/multi_select.d.mts.map +0 -1
- package/utils/getTypes/multi_select.mjs.map +0 -1
- package/utils/getTypes/number.d.mts.map +0 -1
- package/utils/getTypes/number.mjs +0 -2
- package/utils/getTypes/number.mjs.map +0 -1
- package/utils/getTypes/people.d.mts.map +0 -1
- package/utils/getTypes/people.mjs.map +0 -1
- package/utils/getTypes/phone_number.d.mts.map +0 -1
- package/utils/getTypes/phone_number.mjs +0 -2
- package/utils/getTypes/phone_number.mjs.map +0 -1
- package/utils/getTypes/relation.d.mts.map +0 -1
- package/utils/getTypes/relation.mjs +0 -1
- package/utils/getTypes/rich_text.d.mts.map +0 -1
- package/utils/getTypes/rich_text.mjs.map +0 -1
- package/utils/getTypes/rollup.d.mts.map +0 -1
- package/utils/getTypes/rollup.mjs +0 -1
- package/utils/getTypes/select.d.mts.map +0 -1
- package/utils/getTypes/select.mjs.map +0 -1
- package/utils/getTypes/title.d.mts.map +0 -1
- package/utils/getTypes/title.mjs +0 -2
- package/utils/getTypes/title.mjs.map +0 -1
- package/utils/getTypes/url.mjs +0 -2
- package/utils/getTypes/url.mjs.map +0 -1
- package/utils-VfbevQkn.mjs +0 -2
- package/utils-VfbevQkn.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-notion-listing-by-date-CSKBdFDQ.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":"4OAOA,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,EAKF,IAAK,GACH,MAAO,CACL,IAAK,CACH,CACE,KAAM,CACJ,YAAa,EAAQ,EAAgB,EAAE,CACzC,EACA,UACF,EACA,CACE,KAAM,CACJ,OAAQ,EAAQ,EAAgB,KAAK,CACvC,EACA,UACF,CACF,CACF,EAOF,QACE,MAAO,CACL,IAAK,CACH,CACE,KAAM,CACJ,YAAa,EAAQ,EAAgB,EAAE,CACzC,EACA,UACF,EACA,CACE,KAAM,CACJ,OAAQ,EAAQ,EAAgB,KAAK,CACvC,EACA,UACF,EACA,CACE,GAAG,EAAQ,KACX,UAAW,CAAE,OAAQ,CAAK,CAC5B,CACF,CACF,CACJ,CACF,EAEM,EAAyB,MAAO,CACpC,SACA,wBACA,wBACA,eACA,gBACA,YACA,UACI,CACJ,GAAM,CAAE,UAAW,EAEf,EAAe,CAAC,EAClB,EAAY,CAAC,EAET,EAAU,EAAO,EAAU,YAAY,EAAE,CAAC,aAC1C,EAAQ,MAAM,EAAa,CAC/B,SACF,CAAC,EACG,EAAM,SAAW,SACnB,EAAOC,EAAM,EAAO,YAAY,EAChC,EAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAO,OAAQ,EAAM,GAAI,eAAc,CAAC,CACzE,GAGF,EAAU,MAAM,EAAsB,CAAE,SAAU,EAAK,EAAG,CAAC,EAE3D,IAAM,EAAoB,CACxB,CACE,UAAW,aACX,SAAU,EAAW,cAAc,MACrC,CACF,EACM,EAAS,EAAkC,CAC/C,SACA,gBACA,YACA,MACF,CAAC,EAEK,EAAc,EAAO,EAAU,YAAY,EAAE,CAAC,YAE9C,EAAgB,MAAM,EAAsB,CAChD,cACA,SACA,OACF,CAAC,EACK,EAAiB,CAAC,EACxB,EAAK,EAAS,QAAU,GAAM,CAC5B,IAAM,EAAOA,EAAM,EAAG,YAAY,EAClC,EAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAG,OAAQ,EAAK,GAAI,eAAc,CAAC,CACpE,EACE,GAAQ,EAAQ,KAAK,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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./constants-C2jPji6h.mjs";import{t}from"./utils-B1QU_ezs.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 t};
|
|
2
|
+
//# sourceMappingURL=get-notion-slug-BecwpT0b.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-notion-slug-BecwpT0b.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":"iKAMA,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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,o as t,t as n}from"./constants-C2jPji6h.mjs";import{t as r}from"./add-time-B_LfV4Ex.mjs";import{t as i}from"./utils-B1QU_ezs.mjs";import{omit as a,size as o}from"lodash-es";import{sortObject as s}from"@jeromefitz/utils";const c=async({config:e,getBlocksByIdChildren:n,getDatabasesByIdQuery:r,getQuery:c,pathVariables:l,routeType:u})=>{let{NOTION:d}=e,{meta:f}=l,p=u.toUpperCase(),[m,h]=f,g=o(f)===2,_=d[p]?.hasChild?.toUpperCase(),v=await r({database_id:d[g?d[_].routeType.toUpperCase():p].database_id,filter:{and:[{...t.slug,rich_text:{equals:g?h:m}}]}}),y=v?.object===`list`&&v.results[0];if(!y)return{content:{},images:{},info:{},items:{}};let b=a(y,`properties`);b.properties=s(i({config:e,data:y,pageId:b.id,pathVariables:l}));let x=await n({block_id:b.id}),S={};return g||(S=await c({config:e,reqQuery:{databaseType:d[_].routeType.toUpperCase(),podcasts:b.id}})),{content:x,images:{},info:b,items:S}},l=async({config:n,getBlocksByIdChildren:o,getDatabasesByIdQuery:c,pathVariables:l,routeType:u,slug:d})=>{let f=new Date().toISOString(),{NOTION:p}=n,{meta:m}=l,[h,g,_]=m,v=new Date(`${h||f.slice(0,4)}-${g||`01`}-${_||`01`}`),y=p[u.toUpperCase()]?.infoType?.notion??e.datePublished.notion,b=await c({database_id:p[u.toUpperCase()].database_id,filter:{and:[{date:{on_or_after:r(v,``)},property:y},{date:{before:r(v,`day`)},property:y},{...t.slug,rich_text:{equals:d}}]}}),x=b?.object===`list`&&b.results[0];if(!x)return{content:{},images:{},info:{},items:{}};let S=a(x,`properties`);return S.properties=s(i({config:n,data:x,pageId:S.id,pathVariables:l})),{content:await o({block_id:S.id}),images:{},info:S,items:{}}},u=async({config:e,getBlocksByIdChildren:t,getDatabasesByIdQuery:r,getQuery:i,pathVariables:a,routeType:o,slug:s})=>{let{NOTION:u,ROUTE_TYPES_BY_DATA_TYPES:d}=e;return u[o?.toUpperCase()]?.hasChild?await c({config:e,getBlocksByIdChildren:t,getDatabasesByIdQuery:r,getQuery:i,pathVariables:a,routeType:o}):d[n.LISTING_BY_DATE].includes(o.toUpperCase())?await l({config:e,getBlocksByIdChildren:t,getDatabasesByIdQuery:r,pathVariables:a,routeType:o,slug:s}):{content:{},images:{},info:{},items:{}}};export{u as t};
|
|
2
|
+
//# sourceMappingURL=get-notion-slug-by-route-Dh428D_m.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-notion-slug-by-route-Dh428D_m.mjs","names":["_size","_omit"],"sources":["../src/queries/get-notion-slug-by-route/index.ts"],"sourcesContent":["import { sortObject } from \"@jeromefitz/utils\";\nimport { omit as _omit, size as _size } from \"lodash-es\";\n\nimport { DATA_TYPES, PROPERTIES, QUERIES } from \"../../constants/index\";\nimport { addTime, dataNormalized } from \"../../utils/index\";\n\n/**\n * @note Determine if PARENT|CHILD should be returned:\n *\n * PARENT\n * - /[parent-routeType]/[slug]\n * - /podcasts/jer-and-ky-and-guest\n *\n * CHILD\n * - /[parent-routeType]/[child-routeType]/[slug]\n * - /podcasts/jer-and-ky-and-guest/am-i-dracula-greg-gillotti\n\n *\n */\nconst getNotionSlugByRoute__getDataByParentRouteType = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getQuery,\n pathVariables,\n routeType,\n // slug,\n}) => {\n const { NOTION } = config;\n const { meta } = pathVariables;\n\n const ROUTE_TYPE = routeType.toUpperCase();\n\n const [parentSlug, slug] = meta;\n const isChild = _size(meta) === 2;\n\n const CHILD = NOTION[ROUTE_TYPE]?.hasChild?.toUpperCase();\n\n const __info: any = await getDatabasesByIdQuery({\n database_id: NOTION[isChild ? NOTION[CHILD].routeType.toUpperCase() : ROUTE_TYPE].database_id,\n filter: {\n and: [\n {\n ...QUERIES.slug,\n rich_text: { equals: isChild ? slug : parentSlug },\n },\n ],\n },\n });\n\n const _info = __info?.object === \"list\" && __info.results[0];\n // @refactor(404)\n if (!_info) {\n return { content: {}, images: {}, info: {}, items: {} };\n }\n const info = _omit(_info, \"properties\");\n info.properties = sortObject(\n dataNormalized({ config, data: _info, pageId: info.id, pathVariables }),\n );\n const content = await getBlocksByIdChildren({ block_id: info.id });\n let items = {};\n\n /**\n * @note if PARENT then get CHILDREN via `items`\n */\n if (!isChild) {\n items = await getQuery({\n config,\n reqQuery: {\n databaseType: NOTION[CHILD].routeType.toUpperCase(),\n podcasts: info.id,\n },\n });\n }\n\n return { content, images: {}, info, items };\n};\n\n/**\n * @note This is unique because the following are different:\n *\n * - /events/2020/05/01/jerome-and\n * - /events/2020/05/08/jerome-and\n * - /[routeType]/[yyyy/mm/dd]/[slug]\n *\n * We actually _do_ use the date for this.\n *\n */\nconst getNotionSlugByRoute__getDataByListingDate = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n // getQuery,\n pathVariables,\n routeType,\n slug,\n}) => {\n const dateTimestamp = new Date().toISOString();\n\n const { NOTION } = config;\n const { meta } = pathVariables;\n\n const [year, month, day] = meta;\n /**\n * @hack uh... nothing to see here, haha\n */\n const timestampQuery = new Date(\n `${year ? year : dateTimestamp.slice(0, 4)}-${month ? month : \"01\"}-${day ? day : \"01\"}`,\n );\n const property =\n NOTION[routeType.toUpperCase()]?.infoType?.notion ?? PROPERTIES.datePublished.notion;\n\n const __info: any = await getDatabasesByIdQuery({\n database_id: NOTION[routeType.toUpperCase()].database_id,\n filter: {\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 const _info = __info?.object === \"list\" && __info.results[0];\n // @refactor(404)\n if (!_info) {\n return { content: {}, images: {}, info: {}, items: {} };\n }\n\n const info = _omit(_info, \"properties\");\n info.properties = sortObject(\n dataNormalized({ config, data: _info, pageId: info.id, pathVariables }),\n );\n const content = await getBlocksByIdChildren({ block_id: info.id });\n\n return { content, images: {}, info, items: {} };\n};\n\nconst getNotionSlugByRoute = async ({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getQuery,\n pathVariables,\n routeType,\n slug,\n}) => {\n const { NOTION, ROUTE_TYPES_BY_DATA_TYPES } = config;\n\n /**\n * @custom (notion) DATA_TYPES.SLUG_BY_ROUTE -- but customized:\n * Determine if `routeType` is a parent|child\n *\n * // @todo(next-notion) move to `isChild`\n *\n */\n if (NOTION[routeType?.toUpperCase()]?.hasChild) {\n return await getNotionSlugByRoute__getDataByParentRouteType({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n getQuery,\n pathVariables,\n routeType,\n // slug,\n });\n }\n\n /**\n * @custom (notion) DATA_TYPES.LISTING_BY_DATE\n *\n */\n if (ROUTE_TYPES_BY_DATA_TYPES[DATA_TYPES.LISTING_BY_DATE].includes(routeType.toUpperCase())) {\n return await getNotionSlugByRoute__getDataByListingDate({\n config,\n getBlocksByIdChildren,\n getDatabasesByIdQuery,\n // getQuery,\n pathVariables,\n routeType,\n slug,\n });\n }\n\n return { content: {}, images: {}, info: {}, items: {} };\n};\n\nexport default getNotionSlugByRoute;\n"],"mappings":"0OAmBA,MAAM,EAAiD,MAAO,CAC5D,SACA,wBACA,wBACA,WACA,gBACA,eAEI,CACJ,GAAM,CAAE,UAAW,EACb,CAAE,QAAS,EAEX,EAAa,EAAU,YAAY,EAEnC,CAAC,EAAY,GAAQ,EACrB,EAAUA,EAAM,CAAI,IAAM,EAE1B,EAAQ,EAAO,EAAW,EAAE,UAAU,YAAY,EAElD,EAAc,MAAM,EAAsB,CAC9C,YAAa,EAAO,EAAU,EAAO,EAAM,CAAC,UAAU,YAAY,EAAI,EAAW,CAAC,YAClF,OAAQ,CACN,IAAK,CACH,CACE,GAAG,EAAQ,KACX,UAAW,CAAE,OAAQ,EAAU,EAAO,CAAW,CACnD,CACF,CACF,CACF,CAAC,EAEK,EAAQ,GAAQ,SAAW,QAAU,EAAO,QAAQ,GAE1D,GAAI,CAAC,EACH,MAAO,CAAE,QAAS,CAAC,EAAG,OAAQ,CAAC,EAAG,KAAM,CAAC,EAAG,MAAO,CAAC,CAAE,EAExD,IAAM,EAAOC,EAAM,EAAO,YAAY,EACtC,EAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAO,OAAQ,EAAK,GAAI,eAAc,CAAC,CACxE,EACA,IAAM,EAAU,MAAM,EAAsB,CAAE,SAAU,EAAK,EAAG,CAAC,EAC7D,EAAQ,CAAC,EAeb,OAVK,IACH,EAAQ,MAAM,EAAS,CACrB,SACA,SAAU,CACR,aAAc,EAAO,EAAM,CAAC,UAAU,YAAY,EAClD,SAAU,EAAK,EACjB,CACF,CAAC,GAGI,CAAE,UAAS,OAAQ,CAAC,EAAG,OAAM,OAAM,CAC5C,EAYM,EAA6C,MAAO,CACxD,SACA,wBACA,wBAEA,gBACA,YACA,UACI,CACJ,IAAM,EAAgB,IAAI,KAAK,CAAC,CAAC,YAAY,EAEvC,CAAE,UAAW,EACb,CAAE,QAAS,EAEX,CAAC,EAAM,EAAO,GAAO,EAIrB,EAAiB,IAAI,KACzB,GAAG,GAAc,EAAc,MAAM,EAAG,CAAC,EAAE,GAAG,GAAgB,KAAK,GAAG,GAAY,MACpF,EACM,EACJ,EAAO,EAAU,YAAY,EAAE,EAAE,UAAU,QAAU,EAAW,cAAc,OAE1E,EAAc,MAAM,EAAsB,CAC9C,YAAa,EAAO,EAAU,YAAY,EAAE,CAAC,YAC7C,OAAQ,CACN,IAAK,CACH,CACE,KAAM,CACJ,YAAa,EAAQ,EAAgB,EAAE,CACzC,EACA,UACF,EACA,CACE,KAAM,CACJ,OAAQ,EAAQ,EAAgB,KAAK,CACvC,EACA,UACF,EACA,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,CAAE,QAAS,CAAC,EAAG,OAAQ,CAAC,EAAG,KAAM,CAAC,EAAG,MAAO,CAAC,CAAE,EAGxD,IAAM,EAAOA,EAAM,EAAO,YAAY,EAMtC,MALA,GAAK,WAAa,EAChB,EAAe,CAAE,SAAQ,KAAM,EAAO,OAAQ,EAAK,GAAI,eAAc,CAAC,CACxE,EAGO,CAAE,cAFa,EAAsB,CAAE,SAAU,EAAK,EAAG,CAAC,EAE/C,OAAQ,CAAC,EAAG,OAAM,MAAO,CAAC,CAAE,CAChD,EAEM,EAAuB,MAAO,CAClC,SACA,wBACA,wBACA,WACA,gBACA,YACA,UACI,CACJ,GAAM,CAAE,SAAQ,6BAA8B,EAqC9C,OA5BI,EAAO,GAAW,YAAY,EAAE,EAAE,SAC7B,MAAM,EAA+C,CAC1D,SACA,wBACA,wBACA,WACA,gBACA,WAEF,CAAC,EAOC,EAA0B,EAAW,gBAAgB,CAAC,SAAS,EAAU,YAAY,CAAC,EACjF,MAAM,EAA2C,CACtD,SACA,wBACA,wBAEA,gBACA,YACA,MACF,CAAC,EAGI,CAAE,QAAS,CAAC,EAAG,OAAQ,CAAC,EAAG,KAAM,CAAC,EAAG,MAAO,CAAC,CAAE,CACxD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{avoidRateLimit as e,isUndefined as t}from"@jeromefitz/utils";const n=async({getPagesRetrieve:n,page_id:r})=>t(r)?[]:(await e(0),await n({page_id:r}));export{n as
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{avoidRateLimit as e,isUndefined as t}from"@jeromefitz/utils";const n=async({getPagesRetrieve:n,page_id:r})=>t(r)?[]:(await e(0),await n({page_id:r}));export{n as t};
|
|
2
|
+
//# sourceMappingURL=get-pages-by-id-D_3I7OED.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pages-by-id-D_3I7OED.mjs","names":[],"sources":["../src/queries/get-pages-by-id/index.ts"],"sourcesContent":["import { avoidRateLimit, isUndefined } from \"@jeromefitz/utils\";\n\n// @todo(types)\nconst getPagesById = async ({ getPagesRetrieve, page_id }) => {\n if (isUndefined(page_id)) return [];\n await avoidRateLimit(0);\n return await getPagesRetrieve({\n page_id,\n });\n};\n\nexport default getPagesById;\n"],"mappings":"oEAGA,MAAM,EAAe,MAAO,CAAE,mBAAkB,aAC1C,EAAY,CAAO,EAAU,CAAC,GAClC,MAAM,EAAe,CAAC,EACf,MAAM,EAAiB,CAC5B,SACF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./utils-B1QU_ezs.mjs";import{t as e}from"./get-data-type-B5X5VOmp.mjs";import{drop as t,dropRight as n,first as r,includes as i,isInteger as a,join as o,last as s,size as c}from"lodash-es";const l=({catchAll:l,config:u})=>{let{NOTION:d,PAGES__HOMEPAGE:f,ROUTE_META:p,ROUTE_TYPES:m}=u,h=c(l),g=r(l),_=g.toUpperCase(),v=s(l),y=h>1&&i(p,_)?t(l):t(n(l)),b=g===v&&!i(m,_)?d.PAGES.routeType:g,x=g!==v&&!a(parseInt(v))?v:g,S=b===d.PAGES.routeType.toLowerCase(),C=x===g,w={hasMeta:!!y&&c(y)!==0,isIndex:C,isPage:S,meta:y,routeType:b,slug:x,url:S&&g===f?``:o(l,`/`)},T=e(w);return{...w,dataType:T}};export{l as t};
|
|
2
|
+
//# sourceMappingURL=get-path-variables-CnBrxTgg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-path-variables-CnBrxTgg.mjs","names":["size","_size","first","_first","last","_last","_includes","_drop","_dropRight","_isInteger","_join"],"sources":["../src/queries/get-path-variables/index.ts"],"sourcesContent":["/**\n * @refactor(lodash)\n */\nimport {\n drop as _drop,\n dropRight as _dropRight,\n first as _first,\n includes as _includes,\n isInteger as _isInteger,\n join as _join,\n last as _last,\n size as _size,\n} from \"lodash-es\";\n\n// import { DATA_TYPES } from '../../constants/index'\nimport { getDataType } from \"../../utils/index\";\n\nconst getPathVariables = ({ catchAll, config }) => {\n const { NOTION, PAGES__HOMEPAGE, ROUTE_META, ROUTE_TYPES } = config;\n const size: number = _size(catchAll);\n const first: any = _first(catchAll);\n const FIRST = first.toUpperCase();\n const last: any = _last(catchAll);\n // const LAST = last.toUpperCase()\n\n const meta =\n size > 1 && _includes(ROUTE_META, FIRST) ? _drop(catchAll) : _drop(_dropRight(catchAll));\n\n const routeType =\n first === last && !_includes(ROUTE_TYPES, FIRST) ? NOTION.PAGES.routeType : first;\n const slug = first !== last && !_isInteger(parseInt(last)) ? last : first;\n\n const isPage = routeType === NOTION.PAGES.routeType.toLowerCase();\n const isIndex = slug === first;\n const hasMeta = !!meta && _size(meta) !== 0;\n\n const url = isPage && first === PAGES__HOMEPAGE ? \"\" : _join(catchAll, \"/\");\n\n const pathVariables = {\n hasMeta,\n isIndex,\n isPage,\n meta,\n routeType,\n slug,\n url,\n };\n\n // console.dir(`> pathVariables`)\n // console.dir(pathVariables)\n\n const dataType = getDataType(pathVariables);\n\n return {\n ...pathVariables,\n dataType,\n };\n};\n\nexport default getPathVariables;\n"],"mappings":"oMAiBA,MAAM,GAAoB,CAAE,WAAU,YAAa,CACjD,GAAM,CAAE,SAAQ,kBAAiB,aAAY,eAAgB,EACvDA,EAAeC,EAAM,CAAQ,EAC7BC,EAAaC,EAAO,CAAQ,EAC5B,EAAQD,EAAM,YAAY,EAC1BE,EAAYC,EAAM,CAAQ,EAG1B,EACJL,EAAO,GAAKM,EAAU,EAAY,CAAK,EAAIC,EAAM,CAAQ,EAAIA,EAAMC,EAAW,CAAQ,CAAC,EAEnF,EACJN,IAAUE,GAAQ,CAACE,EAAU,EAAa,CAAK,EAAI,EAAO,MAAM,UAAYJ,EACxE,EAAOA,IAAUE,GAAQ,CAACK,EAAW,SAASL,CAAI,CAAC,EAAIA,EAAOF,EAE9D,EAAS,IAAc,EAAO,MAAM,UAAU,YAAY,EAC1D,EAAU,IAASA,EAKnB,EAAgB,CACpB,QALc,CAAC,CAAC,GAAQD,EAAM,CAAI,IAAM,EAMxC,UACA,SACA,OACA,YACA,OACA,IATU,GAAUC,IAAU,EAAkB,GAAKQ,EAAM,EAAU,GAAG,CAU1E,EAKM,EAAW,EAAY,CAAa,EAE1C,MAAO,CACL,GAAG,EACH,UACF,CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./constants-C2jPji6h.mjs";import{n as t}from"./utils-B1QU_ezs.mjs";import{map as n,omit as r,size as i}from"lodash-es";import{avoidRateLimit as a,isObjectEmpty as o}from"@jeromefitz/utils";const s=[{direction:`ascending`,property:e.slug.notion}],c=async({config:c,notionDatabasesQuery:l,reqQuery:u})=>{let{NOTION:d}=c,{databaseType:f}=u,p=f,m=!1,h=d[f.toUpperCase()].database_id;if(!h)return[];let g={},_={},v,y;if(f===`EPISODES`){y=s;let{podcasts:t}=u,r=[],a=[];t&&a.push(...t?.split(`,`)),i(a)>0&&n(a,t=>r.push({property:e.relationEpisodes__Podcasts.notion,relation:{contains:t}})),v={or:[...r]}}else m=!0;if(!m&&(!g||o(g))){await a(0);let n;v?(v?.or.length===0&&(v={and:[{property:e.slug.notion,rich_text:{equals:`@hack(notion)-do-not-return`}}]}),n=await l({database_id:h,filter:v,sorts:y}),g=n,_=t({config:c,results:n.results,routeType:p}),g=r(g,`results`),g.results=_):m=!0}return g};export{c as t};
|
|
2
|
+
//# sourceMappingURL=get-query-ljtSpKL5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-query-ljtSpKL5.mjs","names":["_map","_omit"],"sources":["../src/queries/get-query/index.ts"],"sourcesContent":["import { avoidRateLimit, isObjectEmpty } from \"@jeromefitz/utils\";\nimport { map as _map, omit as _omit, size as _size } from \"lodash-es\";\n\nimport { PROPERTIES } from \"../../constants/index\";\nimport type { SortItem } from \"../../schema/index\";\nimport dataNormalizedResults from \"../../utils/data-normalized-results/index\";\n\n// const useCache = process.env.NEXT_PUBLIC__NOTION_USE_CACHE\n// const useCache = false\n\nconst SORTS: SortItem[] = [\n {\n direction: \"ascending\",\n property: PROPERTIES.slug.notion,\n },\n];\n\n// @todo(complexity) 12\n// oxlint-disable-next-line complexity\nconst getQuery = async ({ config, notionDatabasesQuery, reqQuery }) => {\n const { NOTION } = config;\n const { databaseType } = reqQuery;\n const routeType = databaseType;\n let hasError = false;\n\n /**\n * @setup\n */\n const DATABASE_TYPE = databaseType.toUpperCase();\n const database_id = NOTION[DATABASE_TYPE].database_id;\n if (!database_id) return [];\n\n // @todo(types) any\n let data: any = {},\n items: any = {};\n let filter: any, sorts: any;\n\n /**\n * @todo(notion) move this to the api so it can be re-used\n * not hidden in here all hacky\n *\n * @note(notion) right now only need this for episodes of podcasts\n * _OR_ Related Databases (PODCASTS => EPISODES)\n *\n * This is not needed often and can/should probably be handled instead\n * with Relations & Rollups rather than this customization\n */\n\n if (databaseType === \"EPISODES\") {\n sorts = SORTS;\n const { podcasts } = reqQuery;\n\n // @todo(types)\n const filterTagEpisodesByPodcasts: any = [];\n const podcastIds: any = [];\n\n // oxlint-disable-next-line no-unused-expressions\n !!podcasts && podcastIds.push(...podcasts?.split(\",\"));\n // oxlint-disable-next-line no-unused-expressions\n _size(podcastIds) > 0 &&\n _map(podcastIds, (id) =>\n filterTagEpisodesByPodcasts.push({\n property: PROPERTIES.relationEpisodes__Podcasts.notion,\n relation: {\n contains: id,\n },\n }),\n );\n filter = { or: [...filterTagEpisodesByPodcasts] };\n } else {\n // console.dir(`no filter`)\n hasError = true;\n }\n\n // /**\n // * @cache pre\n // */\n // if (useCache) {\n // const url = catchAll.join('/')\n // const cacheData = await getCache(url)\n // if (!!cacheData) {\n // data = cacheData\n // }\n // }\n\n if (!hasError && (!data || isObjectEmpty(data))) {\n await avoidRateLimit(0);\n // @todo(types) any\n let contentData: Pick<any, number | string | symbol>;\n\n // oxlint-disable-next-line no-extra-boolean-cast\n if (!!filter) {\n // @hack(notion)-do-not-return'\n if (filter?.or.length === 0) {\n filter = {\n and: [\n {\n property: PROPERTIES.slug.notion,\n rich_text: { equals: \"@hack(notion)-do-not-return\" },\n },\n ],\n };\n }\n contentData = await notionDatabasesQuery({\n database_id,\n filter,\n sorts,\n });\n\n data = contentData;\n items = dataNormalizedResults({\n config,\n results: contentData.results,\n routeType,\n });\n data = _omit(data, \"results\");\n data.results = items;\n } else {\n // console.dir(`no filter`)\n hasError = true;\n }\n\n // /**\n // * @cache post\n // */\n // if (useCache && !!data) {\n // const url = catchAll.join('/')\n // // console.dir(url)\n // const isCacheExists = await getCache(url)\n // // console.dir(isCacheExists)\n // if (!isCacheExists || isCacheExists === undefined) {\n // setCache(data, url)\n // }\n // }\n }\n\n return data;\n};\n\nexport default getQuery;\n"],"mappings":"gNAUA,MAAM,EAAoB,CACxB,CACE,UAAW,YACX,SAAU,EAAW,KAAK,MAC5B,CACF,EAIM,EAAW,MAAO,CAAE,SAAQ,uBAAsB,cAAe,CACrE,GAAM,CAAE,UAAW,EACb,CAAE,gBAAiB,EACnB,EAAY,EACd,EAAW,GAMT,EAAc,EADE,EAAa,YACR,EAAc,CAAC,YAC1C,GAAI,CAAC,EAAa,MAAO,CAAC,EAG1B,IAAI,EAAY,CAAC,EACf,EAAa,CAAC,EACZ,EAAa,EAajB,GAAI,IAAiB,WAAY,CAC/B,EAAQ,EACR,GAAM,CAAE,YAAa,EAGf,EAAmC,CAAC,EACpC,EAAkB,CAAC,EAGvB,GAAY,EAAW,KAAK,GAAG,GAAU,MAAM,GAAG,CAAC,EAErD,EAAM,CAAU,EAAI,GAClBA,EAAK,EAAa,GAChB,EAA4B,KAAK,CAC/B,SAAU,EAAW,2BAA2B,OAChD,SAAU,CACR,SAAU,CACZ,CACF,CAAC,CACH,EACF,EAAS,CAAE,GAAI,CAAC,GAAG,CAA2B,CAAE,CAClD,KAEE,GAAW,GAcb,GAAI,CAAC,IAAa,CAAC,GAAQ,EAAc,CAAI,GAAI,CAC/C,MAAM,EAAe,CAAC,EAEtB,IAAI,EAGE,GAEA,GAAQ,GAAG,SAAW,IACxB,EAAS,CACP,IAAK,CACH,CACE,SAAU,EAAW,KAAK,OAC1B,UAAW,CAAE,OAAQ,6BAA8B,CACrD,CACF,CACF,GAEF,EAAc,MAAM,EAAqB,CACvC,cACA,SACA,OACF,CAAC,EAED,EAAO,EACP,EAAQ,EAAsB,CAC5B,SACA,QAAS,EAAY,QACrB,WACF,CAAC,EACD,EAAOC,EAAM,EAAM,SAAS,EAC5B,EAAK,QAAU,GAGf,EAAW,EAef,CAEA,OAAO,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{last as e}from"lodash-es";const t=t=>{let n=e(t.split(`_`))??``;return n&&n.replace(`Past`,`Cast Emeritus`).replace(`Musical`,`Musical Director`).replace(`Technical`,`Technical Director`)};export{t
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{last as e}from"lodash-es";const t=t=>{let n=e(t.split(`_`))??``;return n&&n.replace(`Past`,`Cast Emeritus`).replace(`Musical`,`Musical Director`).replace(`Technical`,`Technical Director`)};export{t};
|
|
2
|
+
//# sourceMappingURL=get-title-BWc2Ckhi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-title-BWc2Ckhi.mjs","names":["_last"],"sources":["../src/utils/get-title/index.ts"],"sourcesContent":["import { last as _last } from \"lodash-es\";\n\n/**\n * @note this should be in the website repo as it’s custom\n * *cough* more custom than _waves vaguely all-around_ all of this\n */\nconst getTitle = (title: string) => {\n const _title: string = _last(title.split(\"_\")) ?? \"\";\n\n // oxlint-disable-next-line no-extra-boolean-cast\n if (!!_title) {\n return _title\n .replace(\"Past\", \"Cast Emeritus\")\n .replace(\"Musical\", \"Musical Director\")\n .replace(\"Technical\", \"Technical Director\");\n }\n\n return _title;\n};\n\nexport default getTitle;\n"],"mappings":"iCAMA,MAAM,EAAY,GAAkB,CAClC,IAAM,EAAiBA,EAAM,EAAM,MAAM,GAAG,CAAC,GAAK,GAUlD,OAPM,GACG,EACJ,QAAQ,OAAQ,eAAe,CAAC,CAChC,QAAQ,UAAW,kBAAkB,CAAC,CACtC,QAAQ,YAAa,oBAAoB,CAIhD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./_unsupported-BUIwc9lr.mjs";import{t}from"./checkbox-Cil1erOZ.mjs";import{t as n}from"./date-IJAT1r3Y.mjs";import{t as r}from"./email-DygPLxSo.mjs";import{t as i}from"./files-Dx1jw5iY.mjs";import{t as a}from"./multi-select-BTDQCZWJ.mjs";import{t as o}from"./number-DXsVfS7U.mjs";import{t as s}from"./people-Ognwaka4.mjs";import{t as c}from"./phone-number-D-jSJ6fm.mjs";import{t as l}from"./rich-text-pNpMuY2o.mjs";import{t as u}from"./select-i6mHDBMN.mjs";import{t as d}from"./title-vmIyt8-r.mjs";import{t as f}from"./url-D7qu9nU2.mjs";import{map as p,sortBy as m}from"lodash-es";const h=e=>e.type===`rollup`?e.rollup.type===`array`&&p(e.rollup.array,e=>_[e.type](e))[0]:p(e.relation,e=>e.id),g=e=>{let t=e?.rollup;return m(p(t?.array,e=>p(e[e?.type],t=>_[e?.type]({[e?.type]:[t],type:e?.type})))).flat()},_={checkbox:t,created_by:e,created_time:n,date:n,email:r,files:i,formula:e,image:i,last_edited_by:e,last_edited_time:n,multi_select:a,number:o,people:s,phone_number:c,relation:h,rich_text:l,rollup:g,select:u,title:d,url:f};export{g as n,h as r,_ as t};
|
|
2
|
+
//# sourceMappingURL=get-types-Clb6OmBv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-types-Clb6OmBv.mjs","names":["_map","_sortBy","_map"],"sources":["../src/utils/get-types/relation.ts","../src/utils/get-types/rollup.ts","../src/utils/get-types/index.ts"],"sourcesContent":["import { map as _map } from \"lodash-es\";\n\nimport getTypes from \"../../utils/get-types/index\";\n\nconst relation = (data: any) => {\n if (data.type === \"rollup\") {\n return (\n data.rollup.type === \"array\" &&\n _map(data.rollup.array, (item: any) => {\n return getTypes[item.type](item);\n })[0]\n );\n } else {\n return _map(data.relation, (relation: any) => relation.id);\n }\n};\n\nexport default relation;\n","import { map as _map, sortBy as _sortBy } from \"lodash-es\";\n\nimport type { RollupFunction } from \"../../schema/index\";\nimport getTypes from \"../../utils/get-types/index\";\n\n/**\n * @note(notion) https://github.com/JeromeFitz/packages/issues/631\n */\ntype Rollup = {\n array: any;\n function: RollupFunction;\n type: \"array\";\n};\n\n// @todo(types)\nconst rollup = (data: any) => {\n const rollupData: Rollup = data?.rollup;\n return _sortBy(\n _map(rollupData?.array, (item) =>\n _map(item[item?.type], (itemData) =>\n getTypes[item?.type]({\n [item?.type]: [itemData],\n type: item?.type,\n }),\n ),\n ),\n ).flat();\n};\n\nexport default rollup;\n","import _unsupported from \"./_unsupported\";\nimport checkbox from \"./checkbox\";\nimport date from \"./date\";\nimport email from \"./email\";\nimport files from \"./files\";\n// import images from './images'\nimport multi_select from \"./multi-select\";\nimport number from \"./number\";\nimport people from \"./people\";\nimport phone_number from \"./phone-number\";\nimport relation from \"./relation\";\nimport rich_text from \"./rich-text\";\nimport rollup from \"./rollup\";\nimport select from \"./select\";\nimport title from \"./title\";\nimport url from \"./url\";\n\nconst getTypes = {\n checkbox,\n created_by: _unsupported,\n created_time: date,\n date,\n email,\n files,\n formula: _unsupported,\n image: files,\n last_edited_by: _unsupported,\n last_edited_time: date,\n multi_select,\n number,\n people,\n phone_number,\n relation,\n rich_text,\n rollup,\n select,\n title,\n url,\n};\n\nexport default getTypes;\n"],"mappings":"wlBAIA,MAAM,EAAY,GACZ,EAAK,OAAS,SAEd,EAAK,OAAO,OAAS,SACrBA,EAAK,EAAK,OAAO,MAAQ,GAChB,EAAS,EAAK,KAAK,CAAC,CAAI,CAChC,CAAC,CAAC,GAGEA,EAAK,EAAK,SAAW,GAAkB,EAAS,EAAE,ECEvD,EAAU,GAAc,CAC5B,IAAM,EAAqB,GAAM,OACjC,OAAOC,EACLC,EAAK,GAAY,MAAQ,GACvBA,EAAK,EAAK,GAAM,MAAQ,GACtB,EAAS,GAAM,KAAK,CAAC,EAClB,GAAM,MAAO,CAAC,CAAQ,EACvB,KAAM,GAAM,IACd,CAAC,CACH,CACF,CACF,CAAC,CAAC,KAAK,CACT,ECVM,EAAW,CACf,WACA,WAAY,EACZ,aAAc,EACd,OACA,QACA,QACA,QAAS,EACT,MAAO,EACP,eAAgB,EAChB,iBAAkB,EAClB,eACA,SACA,SACA,eACA,WACA,YACA,SACA,SACA,QACA,KACF"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { i as DataTypesObject, r as DataTypes, x as Property } from "./index-BAoq6yHe.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/constants/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @note
|
|
6
|
+
* Valid Notion Property Types mapped to Normalizer w/ init info
|
|
7
|
+
*
|
|
8
|
+
* *********************
|
|
9
|
+
* RELATIONS and ROLLUPS
|
|
10
|
+
* *********************
|
|
11
|
+
*
|
|
12
|
+
* For each RELATION or ROLLUP there can be only one init
|
|
13
|
+
* During the build process this happens in waves
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
declare const PROPERTIES: Record<string, Property>;
|
|
18
|
+
/**
|
|
19
|
+
* @note
|
|
20
|
+
* hyper-specific for the init / see (secret/create/init)
|
|
21
|
+
*
|
|
22
|
+
* 0. Create DB w/o Relations|Rollups
|
|
23
|
+
* 1. Update DB w/ Relations
|
|
24
|
+
* 2. Update DB w/ Relation Naming Preference
|
|
25
|
+
* 3. Update DB w/ Rollups
|
|
26
|
+
*/
|
|
27
|
+
declare const INIT: {
|
|
28
|
+
BLOG: Property[];
|
|
29
|
+
BOOKS: Property[];
|
|
30
|
+
EPISODES: Property[];
|
|
31
|
+
EVENTS: Property[];
|
|
32
|
+
PAGES: Property[];
|
|
33
|
+
PEOPLE: Property[];
|
|
34
|
+
PODCASTS: Property[];
|
|
35
|
+
SEO: Property[];
|
|
36
|
+
SHOWS: Property[];
|
|
37
|
+
VENUES: Property[];
|
|
38
|
+
};
|
|
39
|
+
declare const LOOKUP: {
|
|
40
|
+
BLOG: {
|
|
41
|
+
key: any;
|
|
42
|
+
notion: any;
|
|
43
|
+
type: any;
|
|
44
|
+
}[];
|
|
45
|
+
BOOKS: {
|
|
46
|
+
key: any;
|
|
47
|
+
notion: any;
|
|
48
|
+
type: any;
|
|
49
|
+
}[];
|
|
50
|
+
EPISODES: {
|
|
51
|
+
key: any;
|
|
52
|
+
notion: any;
|
|
53
|
+
type: any;
|
|
54
|
+
}[];
|
|
55
|
+
EVENTS: {
|
|
56
|
+
key: any;
|
|
57
|
+
notion: any;
|
|
58
|
+
type: any;
|
|
59
|
+
}[];
|
|
60
|
+
PAGES: {
|
|
61
|
+
key: any;
|
|
62
|
+
notion: any;
|
|
63
|
+
type: any;
|
|
64
|
+
}[];
|
|
65
|
+
PEOPLE: {
|
|
66
|
+
key: any;
|
|
67
|
+
notion: any;
|
|
68
|
+
type: any;
|
|
69
|
+
}[];
|
|
70
|
+
PODCASTS: {
|
|
71
|
+
key: any;
|
|
72
|
+
notion: any;
|
|
73
|
+
type: any;
|
|
74
|
+
}[];
|
|
75
|
+
SEO: {
|
|
76
|
+
key: any;
|
|
77
|
+
notion: any;
|
|
78
|
+
type: any;
|
|
79
|
+
}[];
|
|
80
|
+
SHOWS: {
|
|
81
|
+
key: any;
|
|
82
|
+
notion: any;
|
|
83
|
+
type: any;
|
|
84
|
+
}[];
|
|
85
|
+
VENUES: {
|
|
86
|
+
key: any;
|
|
87
|
+
notion: any;
|
|
88
|
+
type: any;
|
|
89
|
+
}[];
|
|
90
|
+
};
|
|
91
|
+
declare const PROPERTIES_LOOKUP: {
|
|
92
|
+
key: any;
|
|
93
|
+
notion: any;
|
|
94
|
+
type: any;
|
|
95
|
+
}[];
|
|
96
|
+
/**
|
|
97
|
+
* @note(notion) right now we are only using `QUERIES.slug`
|
|
98
|
+
*/
|
|
99
|
+
declare const QUERIES: {
|
|
100
|
+
dateBefore: {
|
|
101
|
+
date: {
|
|
102
|
+
before: string;
|
|
103
|
+
};
|
|
104
|
+
property: string;
|
|
105
|
+
};
|
|
106
|
+
dateOnOrAfter: {
|
|
107
|
+
date: {
|
|
108
|
+
on_or_after: string;
|
|
109
|
+
};
|
|
110
|
+
property: string;
|
|
111
|
+
};
|
|
112
|
+
published: {
|
|
113
|
+
checkbox: {
|
|
114
|
+
equals: boolean;
|
|
115
|
+
};
|
|
116
|
+
property: string;
|
|
117
|
+
};
|
|
118
|
+
slug: {
|
|
119
|
+
property: string;
|
|
120
|
+
rich_text: {
|
|
121
|
+
equals: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
declare const getDataTypes: DataTypes[];
|
|
126
|
+
declare const DATA_TYPES: DataTypesObject;
|
|
127
|
+
//#endregion
|
|
128
|
+
export { PROPERTIES_LOOKUP as a, PROPERTIES as i, INIT as n, QUERIES as o, LOOKUP as r, getDataTypes as s, DATA_TYPES as t };
|
|
129
|
+
//# sourceMappingURL=index-BD5kzRhY.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BD5kzRhY.d.mts","names":[],"sources":["../src/constants/index.ts"],"mappings":";;;;;AAE4E;;;;AAqBnC;AAAA;;;;;;cAAnC,UAAA,EAAY,MAAM,SAAS,QAAA;;;;;;;;;;cA0sC3B,IAAA;;;;;;;;;;;;cAaA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAaA,iBAAA;;;;;;;;cAQA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCA,YAAA,EAAc,SAAS;AAAA,cAEvB,UAAA,EAAY,eAIjB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as DataTypes } from "
|
|
1
|
+
import { r as DataTypes } from "./index-BAoq6yHe.mjs";
|
|
2
2
|
|
|
3
|
-
//#region src/utils/
|
|
3
|
+
//#region src/utils/get-data-type/index.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* @info dataType
|
|
6
6
|
* pathVariables via `../../queries/pathVariables`
|
|
@@ -62,5 +62,5 @@ declare const getDataType: ({
|
|
|
62
62
|
isPage: any;
|
|
63
63
|
}) => DataTypes;
|
|
64
64
|
//#endregion
|
|
65
|
-
export { getDataType as
|
|
66
|
-
//# sourceMappingURL=index.d.mts.map
|
|
65
|
+
export { getDataType as t };
|
|
66
|
+
//# sourceMappingURL=index-BGofpiiB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BGofpiiB.d.mts","names":[],"sources":["../src/utils/get-data-type/index.ts"],"mappings":";;;;;;AAqDiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA3C,WAAA;EAAe,OAAA;EAAA,OAAA;EAAA;AAAA;;;;MAAA,SAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-notion-listing-by-date/index.d.ts
|
|
2
2
|
declare const getNotionListingByDate: ({
|
|
3
3
|
config,
|
|
4
4
|
getBlocksByIdChildren,
|
|
@@ -22,5 +22,5 @@ declare const getNotionListingByDate: ({
|
|
|
22
22
|
items: Pick<Pick<any, string | number | symbol>, string | number | symbol>;
|
|
23
23
|
}>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { getNotionListingByDate as
|
|
26
|
-
//# sourceMappingURL=index.d.mts.map
|
|
25
|
+
export { getNotionListingByDate as t };
|
|
26
|
+
//# sourceMappingURL=index-BIttGCzA.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BIttGCzA.d.mts","names":[],"sources":["../src/queries/get-notion-listing-by-date/index.ts"],"mappings":";cA0HM,sBAAA;EAAgC,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,YAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQrC,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-pages-by-id/index.d.ts
|
|
2
2
|
declare const getPagesById: ({
|
|
3
3
|
getPagesRetrieve,
|
|
4
4
|
page_id
|
|
@@ -7,5 +7,5 @@ declare const getPagesById: ({
|
|
|
7
7
|
page_id: any;
|
|
8
8
|
}) => Promise<any>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getPagesById as
|
|
11
|
-
//# sourceMappingURL=index.d.mts.map
|
|
10
|
+
export { getPagesById as t };
|
|
11
|
+
//# sourceMappingURL=index-C-J3ICp0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-C-J3ICp0.d.mts","names":[],"sources":["../src/queries/get-pages-by-id/index.ts"],"mappings":";cAGM,YAAA;EAAsB,gBAAA;EAAA;AAAA;;;MAA6B,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-notion-slug-by-route/index.d.ts
|
|
2
2
|
declare const getNotionSlugByRoute: ({
|
|
3
3
|
config,
|
|
4
4
|
getBlocksByIdChildren,
|
|
@@ -22,5 +22,5 @@ declare const getNotionSlugByRoute: ({
|
|
|
22
22
|
items: {};
|
|
23
23
|
}>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { getNotionSlugByRoute as
|
|
26
|
-
//# sourceMappingURL=index.d.mts.map
|
|
25
|
+
export { getNotionSlugByRoute as t };
|
|
26
|
+
//# sourceMappingURL=index-CLQVoKDp.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CLQVoKDp.d.mts","names":[],"sources":["../src/queries/get-notion-slug-by-route/index.ts"],"mappings":";cAuJM,oBAAA;EAA8B,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,QAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQnC,OAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as SortItem } from "
|
|
1
|
+
import { O as SortItem } from "./index-BAoq6yHe.mjs";
|
|
2
2
|
|
|
3
|
-
//#region src/queries/
|
|
3
|
+
//#region src/queries/get-databases-by-id-query/index.d.ts
|
|
4
4
|
declare const getDatabasesByIdQuery: ({
|
|
5
5
|
database_id,
|
|
6
6
|
filter,
|
|
@@ -13,5 +13,5 @@ declare const getDatabasesByIdQuery: ({
|
|
|
13
13
|
sorts?: SortItem[] | undefined;
|
|
14
14
|
}) => Promise<any>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { getDatabasesByIdQuery as
|
|
17
|
-
//# sourceMappingURL=index.d.mts.map
|
|
16
|
+
export { getDatabasesByIdQuery as t };
|
|
17
|
+
//# sourceMappingURL=index-CucnheQT.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CucnheQT.d.mts","names":[],"sources":["../src/queries/get-databases-by-id-query/index.ts"],"mappings":";;;cAaM,qBAAA;EAA+B,WAAA;EAAA,MAAA;EAAA,iBAAA;EAAA;AAAA;;;;UAAA,QAAA;AAAA,MAKpC,OAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as DataTypes } from "
|
|
1
|
+
import { r as DataTypes } from "./index-BAoq6yHe.mjs";
|
|
2
2
|
|
|
3
|
-
//#region src/queries/
|
|
3
|
+
//#region src/queries/get-path-variables/index.d.ts
|
|
4
4
|
declare const getPathVariables: ({
|
|
5
5
|
catchAll,
|
|
6
6
|
config
|
|
@@ -18,5 +18,5 @@ declare const getPathVariables: ({
|
|
|
18
18
|
url: string;
|
|
19
19
|
};
|
|
20
20
|
//#endregion
|
|
21
|
-
export { getPathVariables as
|
|
22
|
-
//# sourceMappingURL=index.d.mts.map
|
|
21
|
+
export { getPathVariables as t };
|
|
22
|
+
//# sourceMappingURL=index-D16uYjWr.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D16uYjWr.d.mts","names":[],"sources":["../src/queries/get-path-variables/index.ts"],"mappings":";;;cAiBM,gBAAA;EAAoB,QAAA;EAAA;AAAA;;;;YAAA,SAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-notion-listing/index.d.ts
|
|
2
2
|
declare const getNotionListing: ({
|
|
3
3
|
config,
|
|
4
4
|
getBlocksByIdChildren,
|
|
@@ -25,5 +25,5 @@ declare const getNotionListing: ({
|
|
|
25
25
|
items: Pick<any, string | number | symbol>;
|
|
26
26
|
}>;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { getNotionListing as
|
|
29
|
-
//# sourceMappingURL=index.d.mts.map
|
|
28
|
+
export { getNotionListing as t };
|
|
29
|
+
//# sourceMappingURL=index-D4Gn1cYC.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D4Gn1cYC.d.mts","names":[],"sources":["../src/queries/get-notion-listing/index.ts"],"mappings":";cAMM,gBAAA;EAA0B,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,YAAA;EAAA,aAAA;EAAA;AAAA;;;;;;;MAO/B,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/utils/
|
|
1
|
+
//#region src/utils/data-normalized-results/index.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* @todo(notion)
|
|
4
4
|
*
|
|
@@ -15,5 +15,5 @@ declare const dataNormalizedResults: ({
|
|
|
15
15
|
routeType: any;
|
|
16
16
|
}) => any[];
|
|
17
17
|
//#endregion
|
|
18
|
-
export { dataNormalizedResults as
|
|
19
|
-
//# sourceMappingURL=index.d.mts.map
|
|
18
|
+
export { dataNormalizedResults as t };
|
|
19
|
+
//# sourceMappingURL=index-DMqCumJi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DMqCumJi.d.mts","names":[],"sources":["../src/utils/data-normalized-results/index.ts"],"mappings":";;;;;;;cAWM,qBAAA;EAAyB,MAAA;EAAA,OAAA;EAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/utils/
|
|
1
|
+
//#region src/utils/get-types/index.d.ts
|
|
2
2
|
declare const getTypes: {
|
|
3
3
|
checkbox: (data: any) => any;
|
|
4
4
|
created_by: (data: any) => any;
|
|
@@ -24,5 +24,5 @@ declare const getTypes: {
|
|
|
24
24
|
url: (data: any) => any;
|
|
25
25
|
};
|
|
26
26
|
//#endregion
|
|
27
|
-
export { getTypes as
|
|
28
|
-
//# sourceMappingURL=index.d.mts.map
|
|
27
|
+
export { getTypes as t };
|
|
28
|
+
//# sourceMappingURL=index-DZSqTeBx.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DZSqTeBx.d.mts","names":[],"sources":["../src/utils/get-types/index.ts"],"mappings":";cAiBM,QAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/utils/
|
|
1
|
+
//#region src/utils/data-normalized/index.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* @todo(notion)
|
|
4
4
|
*
|
|
@@ -16,5 +16,5 @@ declare const dataNormalized: ({
|
|
|
16
16
|
pathVariables: any;
|
|
17
17
|
}) => {};
|
|
18
18
|
//#endregion
|
|
19
|
-
export { dataNormalized as
|
|
20
|
-
//# sourceMappingURL=index.d.mts.map
|
|
19
|
+
export { dataNormalized as t };
|
|
20
|
+
//# sourceMappingURL=index-DZjFlXjH.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DZjFlXjH.d.mts","names":[],"sources":["../src/utils/data-normalized/index.ts"],"mappings":";;;;;;cAWM,cAAA;EAAkB,MAAA;EAAA,IAAA;EAAA,MAAA;EAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-deep-fetch-all-children/index.d.ts
|
|
2
2
|
declare const getDeepFetchAllChildren: ({
|
|
3
3
|
blocks,
|
|
4
4
|
getBlocksChildrenList
|
|
@@ -7,5 +7,5 @@ declare const getDeepFetchAllChildren: ({
|
|
|
7
7
|
getBlocksChildrenList: any;
|
|
8
8
|
}) => Promise<Array<any | any[]>>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getDeepFetchAllChildren as
|
|
11
|
-
//# sourceMappingURL=index.d.mts.map
|
|
10
|
+
export { getDeepFetchAllChildren as t };
|
|
11
|
+
//# sourceMappingURL=index-D_fBH_D4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-D_fBH_D4.d.mts","names":[],"sources":["../src/queries/get-deep-fetch-all-children/index.ts"],"mappings":";cAAM,uBAAA;EAAiC,MAAA;EAAA;AAAA;;;MAGnC,OAAA,CAAQ,KAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-notion-slug/index.d.ts
|
|
2
2
|
declare const getNotionSlug: ({
|
|
3
3
|
config,
|
|
4
4
|
getBlocksByIdChildren,
|
|
@@ -32,5 +32,5 @@ declare const getNotionSlug: ({
|
|
|
32
32
|
items: {};
|
|
33
33
|
}>;
|
|
34
34
|
//#endregion
|
|
35
|
-
export { getNotionSlug as
|
|
36
|
-
//# sourceMappingURL=index.d.mts.map
|
|
35
|
+
export { getNotionSlug as t };
|
|
36
|
+
//# sourceMappingURL=index-Dx2yW5u0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dx2yW5u0.d.mts","names":[],"sources":["../src/queries/get-notion-slug/index.ts"],"mappings":";cAMM,aAAA;EAAuB,MAAA;EAAA,qBAAA;EAAA,qBAAA;EAAA,uBAAA;EAAA,aAAA;EAAA,SAAA;EAAA;AAAA;;;;;;;;MAQ5B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DxiWPo1l.d.mts","names":[],"sources":["../src/utils/add-time/index.ts"],"mappings":";cAEM,OAAA,GAAW,IAAA,OAAM,IAAI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-info-type/index.d.ts
|
|
2
2
|
declare const getInfoType: ({
|
|
3
3
|
config,
|
|
4
4
|
item,
|
|
@@ -16,5 +16,5 @@ declare const getInfoType: ({
|
|
|
16
16
|
slug: any;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
|
-
export { getInfoType as
|
|
20
|
-
//# sourceMappingURL=index.d.mts.map
|
|
19
|
+
export { getInfoType as t };
|
|
20
|
+
//# sourceMappingURL=index-H5Qko6iL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-H5Qko6iL.d.mts","names":[],"sources":["../src/queries/get-info-type/index.ts"],"mappings":";cAAM,WAAA;EAAe,MAAA;EAAA,IAAA;EAAA,IAAA;EAAA;AAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//#region src/utils/
|
|
1
|
+
//#region src/utils/get-title/index.d.ts
|
|
2
2
|
/**
|
|
3
3
|
* @note this should be in the website repo as it’s custom
|
|
4
4
|
* *cough* more custom than _waves vaguely all-around_ all of this
|
|
5
5
|
*/
|
|
6
6
|
declare const getTitle: (title: string) => string;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { getTitle as
|
|
9
|
-
//# sourceMappingURL=index.d.mts.map
|
|
8
|
+
export { getTitle as t };
|
|
9
|
+
//# sourceMappingURL=index-iru-ct3u.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-iru-ct3u.d.mts","names":[],"sources":["../src/utils/get-title/index.ts"],"mappings":";;;;;cAMM,QAAA,GAAY,KAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-blocks-by-id-children/index.d.ts
|
|
2
2
|
declare const getBlocksByIdChildren: ({
|
|
3
3
|
block_id,
|
|
4
4
|
getBlocksChildrenList
|
|
@@ -7,5 +7,5 @@ declare const getBlocksByIdChildren: ({
|
|
|
7
7
|
getBlocksChildrenList: any;
|
|
8
8
|
}) => Promise<any>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { getBlocksByIdChildren as
|
|
11
|
-
//# sourceMappingURL=index.d.mts.map
|
|
10
|
+
export { getBlocksByIdChildren as t };
|
|
11
|
+
//# sourceMappingURL=index-oAghjuN5.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-oAghjuN5.d.mts","names":[],"sources":["../src/queries/get-blocks-by-id-children/index.ts"],"mappings":";cAGM,qBAAA;EAA+B,QAAA;EAAA;AAAA;;;MAAmC,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/queries/
|
|
1
|
+
//#region src/queries/get-query/index.d.ts
|
|
2
2
|
declare const getQuery: ({
|
|
3
3
|
config,
|
|
4
4
|
notionDatabasesQuery,
|
|
@@ -9,5 +9,5 @@ declare const getQuery: ({
|
|
|
9
9
|
reqQuery: any;
|
|
10
10
|
}) => Promise<any>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { getQuery as
|
|
13
|
-
//# sourceMappingURL=index.d.mts.map
|
|
12
|
+
export { getQuery as t };
|
|
13
|
+
//# sourceMappingURL=index-wMZIVRBv.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-wMZIVRBv.d.mts","names":[],"sources":["../src/queries/get-query/index.ts"],"mappings":";cAmBM,QAAA;EAAkB,MAAA;EAAA,oBAAA;EAAA;AAAA;;;;MAA0C,OAAA"}
|
package/index.d.mts
CHANGED
package/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;KAiBK,WAAA;EACH,MAAA,EAAQ,WAAA;EACR,SAAA,EAAW,cAAc;AAAA;AAAA,KAGtB,eAAA;EACH,IAAA;EACA,MAAM;AAAA;AAAA,KAGH,WAAA;EACH,qBAAA;EACA,qBAAA;EACA,uBAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,QAAA;AAAA;AAAA,KAGG,cAAA;EACH,OAAA;EACA,eAAA;EACA,IAAA;EACA,aAAA;AAAA;AAAA,cAGI,MAAA,SAAe,QAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;KAiBK,WAAA;EACH,MAAA,EAAQ,WAAA;EACR,SAAA,EAAW,cAAc;AAAA;AAAA,KAGtB,eAAA;EACH,IAAA;EACA,MAAM;AAAA;AAAA,KAGH,WAAA;EACH,qBAAA;EACA,qBAAA;EACA,uBAAA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,QAAA;AAAA;AAAA,KAGG,cAAA;EACH,OAAA;EACA,eAAA;EACA,IAAA;EACA,aAAA;AAAA;AAAA,cAGI,MAAA,SAAe,QAAA;EAAA;WAwBH,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;WAwCA,SAAA;IAAA,CACb,UAAA,CAAW,OAAA,IAAQ,KAAA;MAAkB,aAAA;MAAoB,SAAA;MAAgB,IAAA;IAAA,MAAY,OAAA;;;;;;;;;;;KAWrF,UAAA,CAAW,eAAA,IAAgB,KAAA;MAC1B,aAAA;MACA,SAAA;MACA,IAAA;IAAA,MACD,OAAA;;;;;;KAWA,UAAA,CAAW,IAAA,IAAK,KAAA;MAAkB,aAAA;MAAoB,SAAA;MAAgB,IAAA;IAAA,MAAW,OAAA;;;;;;;;;;;;;;;;KAWjF,UAAA,CAAW,aAAA,IAAc,KAAA;MACxB,aAAA;MACA,SAAA;MACA,IAAA;IAAA,MACD,OAAA;;;;;;;cAagB,OAAA;AAAA"}
|
package/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./constants-C2jPji6h.mjs";import{t}from"./get-blocks-by-id-children-BRe4p0pZ.mjs";import{t as n}from"./get-databases-by-id-query-CI9TMkPN.mjs";import{t as r}from"./get-deep-fetch-all-children-DVZ-HFbN.mjs";import{t as i}from"./get-info-type-CUsHqtfs.mjs";import{t as a}from"./get-notion-listing-by-date-CSKBdFDQ.mjs";import{t as o}from"./get-notion-listing-JJxOipMx.mjs";import{t as s}from"./get-notion-slug-by-route-Dh428D_m.mjs";import{t as c}from"./get-notion-slug-BecwpT0b.mjs";import{t as l}from"./get-pages-by-id-D_3I7OED.mjs";import{t as u}from"./get-path-variables-CnBrxTgg.mjs";import{t as d}from"./get-query-ljtSpKL5.mjs";import"./queries-CCGQpuUT.mjs";import{Client as f}from"@notionhq/client";var p=class extends f{#e;#t=async e=>{let t=await this.databases.retrieve({database_id:e}),n=`data_sources`in t?t.data_sources[0]?.id:void 0;if(!n)throw Error(`No data source found for Notion database ${e}`);return n};#n=async({database_id:e,...t})=>{let n=await this.#t(e);return await this.dataSources.query({data_source_id:n,...t})};custom={getBlocksByIdChildren:async e=>await t({...e,getBlocksChildrenList:this.blocks.children.list}),getDatabasesByIdQuery:async e=>await n({...e,getDatabasesQuery:this.#n}),getDeepFetchAllChildren:async e=>await r({...e,getBlocksChildrenList:this.blocks.children.list}),getInfoType:e=>i({...e,config:this.#e}),getPagesById:async e=>await l({...e,getPagesRetrieve:this.pages.retrieve}),getPathVariables:e=>u({...e,config:this.#e}),getQuery:async e=>await d({...e,config:this.#e,notionDatabasesQuery:this.#n})};dataTypes={[e.LISTING]:async e=>await o({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[e.LISTING_BY_DATE]:async e=>await a({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[e.SLUG]:async e=>await c({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getDeepFetchAllChildren:this.custom.getDeepFetchAllChildren}),[e.SLUG_BY_ROUTE]:async e=>await s({...e,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getQuery:this.custom.getQuery})};constructor(e){super(e),this.#e=e?.config}};export{p as Client};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|