@jeromefitz/notion 5.1.12 → 5.1.13-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.
- package/LICENSE +1 -1
- package/chunk-pm2C21R4.mjs +1 -0
- package/constants/index.d.mts +129 -0
- package/constants/index.d.mts.map +1 -0
- package/constants/index.mjs +2 -0
- package/constants/index.mjs.map +1 -0
- package/getTypes-C_NXtnf-.mjs +2 -0
- package/getTypes-C_NXtnf-.mjs.map +1 -0
- package/index-CvmUSReI.d.mts +245 -0
- package/index-CvmUSReI.d.mts.map +1 -0
- package/index.d.mts +119 -0
- package/index.d.mts.map +1 -0
- package/index.mjs +2 -0
- package/index.mjs.map +1 -0
- package/package.json +52 -14
- package/queries/getBlocksByIdChildren/index.d.mts +11 -0
- package/queries/getBlocksByIdChildren/index.d.mts.map +1 -0
- package/queries/getBlocksByIdChildren/index.mjs +2 -0
- package/queries/getBlocksByIdChildren/index.mjs.map +1 -0
- package/queries/getDatabasesByIdQuery/index.d.mts +17 -0
- package/queries/getDatabasesByIdQuery/index.d.mts.map +1 -0
- package/queries/getDatabasesByIdQuery/index.mjs +2 -0
- package/queries/getDatabasesByIdQuery/index.mjs.map +1 -0
- package/queries/getDeepFetchAllChildren/index.d.mts +11 -0
- package/queries/getDeepFetchAllChildren/index.d.mts.map +1 -0
- package/queries/getDeepFetchAllChildren/index.mjs +2 -0
- package/queries/getDeepFetchAllChildren/index.mjs.map +1 -0
- package/queries/getInfoType/index.d.mts +22 -0
- package/queries/getInfoType/index.d.mts.map +1 -0
- package/queries/getInfoType/index.mjs +2 -0
- package/queries/getInfoType/index.mjs.map +1 -0
- package/queries/getNotionListing/index.d.mts +29 -0
- package/queries/getNotionListing/index.d.mts.map +1 -0
- package/queries/getNotionListing/index.mjs +2 -0
- package/queries/getNotionListing/index.mjs.map +1 -0
- package/queries/getNotionListingByDate/index.d.mts +26 -0
- package/queries/getNotionListingByDate/index.d.mts.map +1 -0
- package/queries/getNotionListingByDate/index.mjs +2 -0
- package/queries/getNotionListingByDate/index.mjs.map +1 -0
- package/queries/getNotionSlug/index.d.mts +36 -0
- package/queries/getNotionSlug/index.d.mts.map +1 -0
- package/queries/getNotionSlug/index.mjs +2 -0
- package/queries/getNotionSlug/index.mjs.map +1 -0
- package/queries/getNotionSlugByRoute/index.d.mts +26 -0
- package/queries/getNotionSlugByRoute/index.d.mts.map +1 -0
- package/queries/getNotionSlugByRoute/index.mjs +2 -0
- package/queries/getNotionSlugByRoute/index.mjs.map +1 -0
- package/queries/getPagesById/index.d.mts +11 -0
- package/queries/getPagesById/index.d.mts.map +1 -0
- package/queries/getPagesById/index.mjs +2 -0
- package/queries/getPagesById/index.mjs.map +1 -0
- package/queries/getPathVariables/index.d.mts +22 -0
- package/queries/getPathVariables/index.d.mts.map +1 -0
- package/queries/getPathVariables/index.mjs +2 -0
- package/queries/getPathVariables/index.mjs.map +1 -0
- package/queries/getQuery/index.d.mts +13 -0
- package/queries/getQuery/index.d.mts.map +1 -0
- package/queries/getQuery/index.mjs +2 -0
- package/queries/getQuery/index.mjs.map +1 -0
- package/queries/index.d.mts +12 -0
- package/queries/index.mjs +1 -0
- package/schema/index.d.mts +2 -0
- package/schema/index.mjs +1 -0
- package/utils/addTime/index.d.mts +5 -0
- package/utils/addTime/index.d.mts.map +1 -0
- package/utils/addTime/index.mjs +2 -0
- package/utils/addTime/index.mjs.map +1 -0
- package/utils/dataNormalized/index.d.mts +20 -0
- package/utils/dataNormalized/index.d.mts.map +1 -0
- package/utils/dataNormalized/index.mjs +1 -0
- package/utils/dataNormalizedResults/index.d.mts +19 -0
- package/utils/dataNormalizedResults/index.d.mts.map +1 -0
- package/utils/dataNormalizedResults/index.mjs +1 -0
- package/utils/getDataType/{index.d.ts → index.d.mts} +12 -6
- package/utils/getDataType/index.d.mts.map +1 -0
- package/utils/getDataType/index.mjs +2 -0
- package/utils/getDataType/index.mjs.map +1 -0
- package/utils/getTitle/{index.d.ts → index.d.mts} +3 -1
- package/utils/getTitle/index.d.mts.map +1 -0
- package/utils/getTitle/index.mjs +2 -0
- package/utils/getTitle/index.mjs.map +1 -0
- package/utils/getTypes/_unsupported.d.mts +6 -0
- package/utils/getTypes/_unsupported.d.mts.map +1 -0
- package/utils/getTypes/_unsupported.mjs +2 -0
- package/utils/getTypes/_unsupported.mjs.map +1 -0
- package/utils/getTypes/checkbox.d.mts +5 -0
- package/utils/getTypes/checkbox.d.mts.map +1 -0
- package/utils/getTypes/checkbox.mjs +2 -0
- package/utils/getTypes/checkbox.mjs.map +1 -0
- package/utils/getTypes/date.d.mts +5 -0
- package/utils/getTypes/date.d.mts.map +1 -0
- package/utils/getTypes/date.mjs +2 -0
- package/utils/getTypes/date.mjs.map +1 -0
- package/utils/getTypes/email.d.mts +5 -0
- package/utils/getTypes/email.d.mts.map +1 -0
- package/utils/getTypes/email.mjs +2 -0
- package/utils/getTypes/email.mjs.map +1 -0
- package/utils/getTypes/files.d.mts +5 -0
- package/utils/getTypes/files.d.mts.map +1 -0
- package/utils/getTypes/files.mjs +2 -0
- package/utils/getTypes/files.mjs.map +1 -0
- package/utils/getTypes/index.d.mts +28 -0
- package/utils/getTypes/index.d.mts.map +1 -0
- package/utils/getTypes/index.mjs +1 -0
- package/utils/getTypes/multi_select.d.mts +5 -0
- package/utils/getTypes/multi_select.d.mts.map +1 -0
- package/utils/getTypes/multi_select.mjs +2 -0
- package/utils/getTypes/multi_select.mjs.map +1 -0
- package/utils/getTypes/number.d.mts +5 -0
- package/utils/getTypes/number.d.mts.map +1 -0
- package/utils/getTypes/number.mjs +2 -0
- package/utils/getTypes/number.mjs.map +1 -0
- package/utils/getTypes/people.d.mts +5 -0
- package/utils/getTypes/people.d.mts.map +1 -0
- package/utils/getTypes/people.mjs +2 -0
- package/utils/getTypes/people.mjs.map +1 -0
- package/utils/getTypes/phone_number.d.mts +5 -0
- package/utils/getTypes/phone_number.d.mts.map +1 -0
- package/utils/getTypes/phone_number.mjs +2 -0
- package/utils/getTypes/phone_number.mjs.map +1 -0
- package/utils/getTypes/relation.d.mts +5 -0
- package/utils/getTypes/relation.d.mts.map +1 -0
- package/utils/getTypes/relation.mjs +1 -0
- package/utils/getTypes/rich_text.d.mts +5 -0
- package/utils/getTypes/rich_text.d.mts.map +1 -0
- package/utils/getTypes/rich_text.mjs +2 -0
- package/utils/getTypes/rich_text.mjs.map +1 -0
- package/utils/getTypes/rollup.d.mts +5 -0
- package/utils/getTypes/rollup.d.mts.map +1 -0
- package/utils/getTypes/rollup.mjs +1 -0
- package/utils/getTypes/select.d.mts +7 -0
- package/utils/getTypes/select.d.mts.map +1 -0
- package/utils/getTypes/select.mjs +2 -0
- package/utils/getTypes/select.mjs.map +1 -0
- package/utils/getTypes/title.d.mts +5 -0
- package/utils/getTypes/title.d.mts.map +1 -0
- package/utils/getTypes/title.mjs +2 -0
- package/utils/getTypes/title.mjs.map +1 -0
- package/utils/getTypes/url.d.mts +5 -0
- package/utils/getTypes/url.d.mts.map +1 -0
- package/utils/getTypes/url.mjs +2 -0
- package/utils/getTypes/url.mjs.map +1 -0
- package/utils/index.d.mts +7 -0
- package/utils/index.mjs +1 -0
- package/utils-CyUrB6XV.mjs +2 -0
- package/utils-CyUrB6XV.mjs.map +1 -0
- package/constants/index.d.ts +0 -127
- package/constants/index.js +0 -1
- package/index.d.ts +0 -117
- package/index.js +0 -1
- package/queries/getBlocksByIdChildren/index.d.ts +0 -6
- package/queries/getBlocksByIdChildren/index.js +0 -1
- package/queries/getDatabasesByIdQuery/index.d.ts +0 -10
- package/queries/getDatabasesByIdQuery/index.js +0 -1
- package/queries/getDeepFetchAllChildren/index.d.ts +0 -6
- package/queries/getDeepFetchAllChildren/index.js +0 -1
- package/queries/getInfoType/index.d.ts +0 -13
- package/queries/getInfoType/index.js +0 -1
- package/queries/getNotionListing/index.d.ts +0 -20
- package/queries/getNotionListing/index.js +0 -1
- package/queries/getNotionListingByDate/index.d.ts +0 -16
- package/queries/getNotionListingByDate/index.js +0 -1
- package/queries/getNotionSlug/index.d.ts +0 -26
- package/queries/getNotionSlug/index.js +0 -1
- package/queries/getNotionSlugByRoute/index.d.ts +0 -16
- package/queries/getNotionSlugByRoute/index.js +0 -1
- package/queries/getPagesById/index.d.ts +0 -6
- package/queries/getPagesById/index.js +0 -1
- package/queries/getPathVariables/index.d.ts +0 -17
- package/queries/getPathVariables/index.js +0 -1
- package/queries/getQuery/index.d.ts +0 -7
- package/queries/getQuery/index.js +0 -1
- package/queries/index.d.ts +0 -12
- package/queries/index.js +0 -1
- package/schema/index.d.ts +0 -243
- package/schema/index.js +0 -0
- package/utils/addTime/index.d.ts +0 -3
- package/utils/addTime/index.js +0 -1
- package/utils/dataNormalized/index.d.ts +0 -13
- package/utils/dataNormalized/index.js +0 -1
- package/utils/dataNormalizedResults/index.d.ts +0 -13
- package/utils/dataNormalizedResults/index.js +0 -1
- package/utils/getDataType/index.js +0 -1
- package/utils/getTitle/index.js +0 -1
- package/utils/getTypes/_unsupported.d.ts +0 -3
- package/utils/getTypes/_unsupported.js +0 -1
- package/utils/getTypes/checkbox.d.ts +0 -3
- package/utils/getTypes/checkbox.js +0 -1
- package/utils/getTypes/date.d.ts +0 -3
- package/utils/getTypes/date.js +0 -1
- package/utils/getTypes/email.d.ts +0 -3
- package/utils/getTypes/email.js +0 -1
- package/utils/getTypes/files.d.ts +0 -3
- package/utils/getTypes/files.js +0 -1
- package/utils/getTypes/index.d.ts +0 -26
- package/utils/getTypes/index.js +0 -1
- package/utils/getTypes/multi_select.d.ts +0 -3
- package/utils/getTypes/multi_select.js +0 -1
- package/utils/getTypes/number.d.ts +0 -3
- package/utils/getTypes/number.js +0 -1
- package/utils/getTypes/people.d.ts +0 -3
- package/utils/getTypes/people.js +0 -1
- package/utils/getTypes/phone_number.d.ts +0 -3
- package/utils/getTypes/phone_number.js +0 -1
- package/utils/getTypes/relation.d.ts +0 -3
- package/utils/getTypes/relation.js +0 -1
- package/utils/getTypes/rich_text.d.ts +0 -3
- package/utils/getTypes/rich_text.js +0 -1
- package/utils/getTypes/rollup.d.ts +0 -3
- package/utils/getTypes/rollup.js +0 -1
- package/utils/getTypes/select.d.ts +0 -5
- package/utils/getTypes/select.js +0 -1
- package/utils/getTypes/title.d.ts +0 -3
- package/utils/getTypes/title.js +0 -1
- package/utils/getTypes/url.d.ts +0 -3
- package/utils/getTypes/url.js +0 -1
- package/utils/index.d.ts +0 -7
- package/utils/index.js +0 -1
package/utils/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-pm2C21R4.mjs";import e from"./addTime/index.mjs";import{n as t,t as n}from"../utils-CyUrB6XV.mjs";import r from"./getDataType/index.mjs";import i from"./getTitle/index.mjs";import{t as a}from"../getTypes-C_NXtnf-.mjs";export{e as addTime,t as dataNormalized,n as dataNormalizedResults,r as getDataType,i as getTitle,a as getTypes};
|
|
@@ -0,0 +1,2 @@
|
|
|
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-C_NXtnf-.mjs";import r from"lodash/map.js";import{sortObject as i}from"@jeromefitz/utils";import a from"lodash/omit.js";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=a(t,`properties`);r.properties=i(o({config:e,data:t,pageId:t?.id,pathVariables:n})),s.push(r)}),s};export{o as n,s as t};
|
|
2
|
+
//# sourceMappingURL=utils-CyUrB6XV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-CyUrB6XV.mjs","names":[],"sources":["../src/utils/dataNormalized/index.ts","../src/utils/dataNormalizedResults/index.ts"],"sourcesContent":["import _map from 'lodash/map.js'\n\nimport { LOOKUP, PROPERTIES_LOOKUP } from '../../constants/index.js'\nimport { getTypes } from '../../utils/index.js'\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 from 'lodash/map.js'\nimport _omit from 'lodash/omit.js'\n\nimport { dataNormalized } from '../../utils/index.js'\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":"uUAUA,MAAM,GAAkB,CAAE,SAAQ,OAAM,SAAQ,mBAAoB,CAClE,GAAM,CAAE,UAAW,EACb,EAAkB,EAAE,CAC1B,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,EAqBR,OAhBA,EAFc,EAAY,EAAO,EAAU,aAAa,EAAI,EAE/C,GAAS,CACpB,IAAI,EAEE,EAAiB,EAAW,EAAK,QAMvC,EAAgB,EAAK,KAAO,KACxB,IACF,EAAkB,EAAS,EAAK,MAAM,EAAgB,EAAO,CAC7D,EAAgB,EAAK,KAAO,GAAoC,OAElE,CAEK,GC/BH,GAAyB,CAAE,SAAQ,UAAS,eAAgB,CAChE,IAAM,EAA2B,EAAE,CAanC,OAZA,EAAK,EAAU,GAAW,CACxB,IAAM,EAAmB,EAAM,EAAQ,aAAa,CACpD,EAAiB,WAAa,EAC5B,EAAe,CACb,SACA,KAAM,EACN,OAAQ,GAAQ,GAChB,cAAe,EAChB,CAAC,CACH,CACD,EAAkB,KAAK,EAAiB,EACxC,CACK"}
|
package/constants/index.d.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { DataTypesObject, DataTypes, Property } from '../schema/index.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @note
|
|
5
|
-
* Valid Notion Property Types mapped to Normalizer w/ init info
|
|
6
|
-
*
|
|
7
|
-
* *********************
|
|
8
|
-
* RELATIONS and ROLLUPS
|
|
9
|
-
* *********************
|
|
10
|
-
*
|
|
11
|
-
* For each RELATION or ROLLUP there can be only one init
|
|
12
|
-
* During the build process this happens in waves
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
declare const PROPERTIES: Record<string, Property>;
|
|
17
|
-
/**
|
|
18
|
-
* @note
|
|
19
|
-
* hyper-specific for the init / see (secret/create/init)
|
|
20
|
-
*
|
|
21
|
-
* 0. Create DB w/o Relations|Rollups
|
|
22
|
-
* 1. Update DB w/ Relations
|
|
23
|
-
* 2. Update DB w/ Relation Naming Preference
|
|
24
|
-
* 3. Update DB w/ Rollups
|
|
25
|
-
*/
|
|
26
|
-
declare const INIT: {
|
|
27
|
-
BLOG: Property[];
|
|
28
|
-
BOOKS: Property[];
|
|
29
|
-
EPISODES: Property[];
|
|
30
|
-
EVENTS: Property[];
|
|
31
|
-
PAGES: Property[];
|
|
32
|
-
PEOPLE: Property[];
|
|
33
|
-
PODCASTS: Property[];
|
|
34
|
-
SEO: Property[];
|
|
35
|
-
SHOWS: Property[];
|
|
36
|
-
VENUES: Property[];
|
|
37
|
-
};
|
|
38
|
-
declare const LOOKUP: {
|
|
39
|
-
BLOG: {
|
|
40
|
-
key: any;
|
|
41
|
-
notion: any;
|
|
42
|
-
type: any;
|
|
43
|
-
}[];
|
|
44
|
-
BOOKS: {
|
|
45
|
-
key: any;
|
|
46
|
-
notion: any;
|
|
47
|
-
type: any;
|
|
48
|
-
}[];
|
|
49
|
-
EPISODES: {
|
|
50
|
-
key: any;
|
|
51
|
-
notion: any;
|
|
52
|
-
type: any;
|
|
53
|
-
}[];
|
|
54
|
-
EVENTS: {
|
|
55
|
-
key: any;
|
|
56
|
-
notion: any;
|
|
57
|
-
type: any;
|
|
58
|
-
}[];
|
|
59
|
-
PAGES: {
|
|
60
|
-
key: any;
|
|
61
|
-
notion: any;
|
|
62
|
-
type: any;
|
|
63
|
-
}[];
|
|
64
|
-
PEOPLE: {
|
|
65
|
-
key: any;
|
|
66
|
-
notion: any;
|
|
67
|
-
type: any;
|
|
68
|
-
}[];
|
|
69
|
-
PODCASTS: {
|
|
70
|
-
key: any;
|
|
71
|
-
notion: any;
|
|
72
|
-
type: any;
|
|
73
|
-
}[];
|
|
74
|
-
SEO: {
|
|
75
|
-
key: any;
|
|
76
|
-
notion: any;
|
|
77
|
-
type: any;
|
|
78
|
-
}[];
|
|
79
|
-
SHOWS: {
|
|
80
|
-
key: any;
|
|
81
|
-
notion: any;
|
|
82
|
-
type: any;
|
|
83
|
-
}[];
|
|
84
|
-
VENUES: {
|
|
85
|
-
key: any;
|
|
86
|
-
notion: any;
|
|
87
|
-
type: any;
|
|
88
|
-
}[];
|
|
89
|
-
};
|
|
90
|
-
declare const PROPERTIES_LOOKUP: {
|
|
91
|
-
key: any;
|
|
92
|
-
notion: any;
|
|
93
|
-
type: any;
|
|
94
|
-
}[];
|
|
95
|
-
/**
|
|
96
|
-
* @note(notion) right now we are only using `QUERIES.slug`
|
|
97
|
-
*/
|
|
98
|
-
declare const QUERIES: {
|
|
99
|
-
dateBefore: {
|
|
100
|
-
date: {
|
|
101
|
-
before: string;
|
|
102
|
-
};
|
|
103
|
-
property: string;
|
|
104
|
-
};
|
|
105
|
-
dateOnOrAfter: {
|
|
106
|
-
date: {
|
|
107
|
-
on_or_after: string;
|
|
108
|
-
};
|
|
109
|
-
property: string;
|
|
110
|
-
};
|
|
111
|
-
published: {
|
|
112
|
-
checkbox: {
|
|
113
|
-
equals: boolean;
|
|
114
|
-
};
|
|
115
|
-
property: string;
|
|
116
|
-
};
|
|
117
|
-
slug: {
|
|
118
|
-
property: string;
|
|
119
|
-
rich_text: {
|
|
120
|
-
equals: string;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
declare const getDataTypes: DataTypes[];
|
|
125
|
-
declare const DATA_TYPES: DataTypesObject;
|
|
126
|
-
|
|
127
|
-
export { DATA_TYPES, INIT, LOOKUP, PROPERTIES, PROPERTIES_LOOKUP, QUERIES, getDataTypes };
|
package/constants/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import i from"lodash/filter.js";import E from"lodash/map.js";var t=({key:o,notion:P,type:S})=>({key:o,notion:P,type:S}),e={addressCity:{init:!0,key:"addressCity",notion:"Address.City",type:"rich_text"},addressLatitude:{format:"number",init:!0,key:"addressLatitude",notion:"Address.Latitude",type:"number"},addressLongitude:{format:"number",init:!0,key:"addressLongitude",notion:"Address.Longitude",type:"number"},addressNeighborhood:{init:!0,key:"addressNeighborhood",notion:"Address.Neighborhood",type:"rich_text"},addressState:{init:!0,key:"addressState",notion:"Address.State",type:"select"},addressStreet:{init:!0,key:"addressStreet",notion:"Address.Street",type:"rich_text"},addressZipCode:{format:"number",init:!0,key:"addressZipCode",notion:"Address.ZipCode",type:"number"},author:{init:!0,key:"author",notion:"Author",type:"rich_text"},authors:{init:!0,key:"authors",notion:"Authors",type:"people"},categories:{init:!0,key:"categories",notion:"Categories",type:"multi_select"},dateCreated:{init:!1,key:"dateCreated",notion:"Date.Created",type:"created_time"},dateEdited:{init:!1,key:"dateEdited",notion:"Date.Edited",type:"last_edited_time"},dateEvent:{init:!0,key:"dateEvent",notion:"Date.Event",type:"date"},datePublished:{init:!0,key:"datePublished",notion:"Date.Published",type:"date"},dateRecorded:{init:!0,key:"dateRecorded",notion:"Date.Recorded",type:"date"},duration:{init:!0,key:"duration",notion:"Duration",type:"rich_text"},email:{init:!0,key:"email",notion:"Email",type:"rich_text"},episode:{format:"number",init:!0,key:"episode",notion:"Episode",type:"number"},explicit:{init:!0,key:"explicit",notion:"Explicit",type:"checkbox"},festivals:{init:!0,key:"festivals",notion:"Festival",type:"multi_select"},food:{init:!0,key:"food",notion:"Food",type:"rich_text"},isIndexed:{init:!0,key:"isIndexed",notion:"Is.Indexed",type:"checkbox"},isPublished:{init:!0,key:"isPublished",notion:"Is.Published",type:"checkbox"},mp3:{init:!0,key:"mp3",notion:"MP3",type:"files"},name:{init:!0,key:"name",notion:"Name",type:"rich_text"},nameFirst:{init:!0,key:"nameFirst",notion:"Name.First",type:"rich_text"},nameLast:{init:!0,key:"nameLast",notion:"Name.Last",type:"rich_text"},namePreferred:{init:!0,key:"namePreferred",notion:"Name.Preferred",type:"rich_text"},phoneNumber:{init:!0,key:"phoneNumber",notion:"Phone",type:"rich_text"},podcastAuthor:{init:!0,key:"podcastAuthor",notion:"Author",type:"rich_text"},podcastAuthorEmail:{init:!0,key:"podcastAuthorEmail",notion:"Author.Email",type:"rich_text"},relationEpisodes__People_Guest:{init:!0,key:"relationEpisodes__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Episodes.Guest"},type:"relation"},relationEpisodes__People_Sound_Engineer:{init:!0,key:"relationEpisodes__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"People",synced_property_name:"Episodes.Sound.Engineer"},type:"relation"},relationEpisodes__People_Thanks:{init:!0,key:"relationEpisodes__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Episodes.Thanks"},type:"relation"},relationEpisodes__Podcasts:{init:!0,key:"relationEpisodes__Podcasts",notion:"Podcasts",relation:{database_id:"Podcasts",synced_property_name:"Episodes"},type:"relation"},relationEpisodes__Venues:{init:!0,key:"relationEpisodes__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Episodes"},type:"relation"},relationEvents__People_Guest:{init:!0,key:"relationEvents__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Events.Guest"},type:"relation"},relationEvents__People_Guest_Music:{init:!0,key:"relationEvents__People_Guest_Music",notion:"Guest.Music",relation:{database_id:"People",synced_property_name:"Events.Guest.Music"},type:"relation"},relationEvents__People_Host:{init:!0,key:"relationEvents__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Events.Host"},type:"relation"},relationEvents__Shows:{init:!0,key:"relationEvents__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Events"},type:"relation"},relationEvents__Shows_Lineup:{init:!0,key:"relationEvents__Shows_Lineup",notion:"Shows.Lineup",relation:{database_id:"Shows",synced_property_name:"Events.Lineup"},type:"relation"},relationEvents__Venues:{init:!0,key:"relationEvents__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Events"},type:"relation"},relationPeople__Episodes_Guest:{init:!1,key:"relationPeople__Episodes_Guest",notion:"Episodes.Guest",relation:{database_id:"Episodes",synced_property_name:"Guest"},type:"relation"},relationPeople__Episodes_Sound_Engineer:{init:!1,key:"relationPeople__Episodes_Sound_Engineer",notion:"Episodes.Sound.Engineer",relation:{database_id:"Episodes",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Episodes_Thanks:{init:!1,key:"relationPeople__Episodes_Thanks",notion:"Episodes.Thanks",relation:{database_id:"Episodes",synced_property_name:"Thanks"},type:"relation"},relationPeople__Events_Guest:{init:!1,key:"relationEvents__People_Guest",notion:"Events.Guest",relation:{database_id:"Events",synced_property_name:"Guest"},type:"relation"},relationPeople__Events_Guest_Music:{init:!1,key:"relationPeople__Events_Guest_Music",notion:"Events.Guest.Music",relation:{database_id:"Events",synced_property_name:"Guest.Music"},type:"relation"},relationPeople__Events_Host:{init:!1,key:"relationPeople__Events_Host",notion:"Events.Host",relation:{database_id:"Events",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Host:{init:!1,key:"relationPeople__Podcasts_Host",notion:"Podcasts.Host",relation:{database_id:"Podcasts",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Sound_Engineer:{init:!1,key:"relationPeople__Podcasts_Sound_Engineer",notion:"Podcasts.Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Shows_Cast:{init:!1,key:"relationPeople__Shows_Cast",notion:"Shows.Cast",relation:{database_id:"Shows",synced_property_name:"Cast"},type:"relation"},relationPeople__Shows_Cast_Past:{init:!1,key:"relationPeople__Shows_Cast_Past",notion:"Shows.Cast.Past",relation:{database_id:"Shows",synced_property_name:"Cast.Past"},type:"relation"},relationPeople__Shows_Crew:{init:!0,key:"relationPeople__Shows_Crew",notion:"Shows.Crew",relation:{database_id:"Shows",synced_property_name:"Crew"},type:"relation"},relationPeople__Shows_Director:{init:!1,key:"relationPeople__Shows_Director",notion:"Shows.Director",relation:{database_id:"Shows",synced_property_name:"Director"},type:"relation"},relationPeople__Shows_Director_Musical:{init:!1,key:"relationPeople__Shows_Director_Musical",notion:"Shows.Director.Musical",relation:{database_id:"Shows",synced_property_name:"Director.Musical"},type:"relation"},relationPeople__Shows_Director_Technical:{init:!1,key:"relationPeople__Shows_Director_Technical",notion:"Shows.Director.Technical",relation:{database_id:"Shows",synced_property_name:"Director.Technical"},type:"relation"},relationPeople__Shows_Producer:{init:!1,key:"relationPeople__Shows_Producer",notion:"Shows.Producer",relation:{database_id:"Shows",synced_property_name:"Producer"},type:"relation"},relationPeople__Shows_Thanks:{init:!1,key:"relationPeople__Shows_Thanks",notion:"Shows.Thanks",relation:{database_id:"Shows",synced_property_name:"Thanks"},type:"relation"},relationPeople__Shows_Writer:{init:!1,key:"relationPeople__Shows_Writer",notion:"Shows.Writer",relation:{database_id:"Shows",synced_property_name:"Writer"},type:"relation"},relationPodcasts__Episodes:{init:!1,key:"relationPodcasts__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Podcasts"},type:"relation"},relationPodcasts__People_Host:{init:!0,key:"relationPodcasts__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Podcasts.Host"},type:"relation"},relationPodcasts__People_Sound_Engineer:{init:!0,key:"relationPodcasts__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Podcasts.Sound.Engineer"},type:"relation"},relationShows__Events:{init:!1,key:"relationShows__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Shows"},type:"relation"},relationShows__Events_Lineup:{init:!1,key:"relationShows__Events_Lineup",notion:"Events.Lineup",relation:{database_id:"Events",synced_property_name:"Shows.Lineup"},type:"relation"},relationShows__People_Cast:{init:!0,key:"relationShows__People_Cast",notion:"Cast",relation:{database_id:"People",synced_property_name:"Shows.Cast"},type:"relation"},relationShows__People_Cast_Past:{init:!0,key:"relationShows__People_Cast_Past",notion:"Cast.Past",relation:{database_id:"People",synced_property_name:"Shows.Cast.Past"},type:"relation"},relationShows__People_Director:{init:!0,key:"relationShows__People_Director",notion:"Director",relation:{database_id:"People",synced_property_name:"Shows.Director"},type:"relation"},relationShows__People_Director_Musical:{init:!0,key:"relationShows__People_Director_Musical",notion:"Director.Musical",relation:{database_id:"People",synced_property_name:"Shows.Director.Musical"},type:"relation"},relationShows__People_Director_Technical:{init:!0,key:"relationShows__People_Director_Technical",notion:"Director.Technical",relation:{database_id:"People",synced_property_name:"Shows.Director.Technical"},type:"relation"},relationShows__People_Producer:{init:!0,key:"relationShows__People_Producer",notion:"Producer",relation:{database_id:"People",synced_property_name:"Shows.Producer"},type:"relation"},relationShows__People_Thanks:{init:!0,key:"relationShows__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Shows.Thanks"},type:"relation"},relationShows__People_Writer:{init:!0,key:"relationShows__People_Writer",notion:"Writer",relation:{database_id:"People",synced_property_name:"Shows.Writer"},type:"relation"},relationShows__Tags:{init:!0,key:"relationShows__Tags",notion:"Tags",relation:{database_id:"Tags",synced_property_name:"Shows"},type:"relation"},relationShows_People_Crew:{init:!0,key:"relationShows_People_Crew",notion:"Crew",relation:{database_id:"People",synced_property_name:"Shows.Crew"},type:"relation"},relationTags__Shows:{init:!1,key:"relationTags__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Tags"},type:"relation"},relationVenues__Episodes:{init:!1,key:"relationVenues__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Venues"},type:"relation"},relationVenues__Events:{init:!1,key:"relationVenues__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Venues"},type:"relation"},rollupEpisodes__Podcasts:{init:!1,key:"rollupEpisodes__Podcasts",notion:"Podcasts.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Title"},type:"rollup"},rollupEpisodes__PodcastsSlugs:{init:!1,key:"rollupEpisodes__PodcastsSlugs",notion:"Podcasts.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Slug"},type:"rollup"},rollupEvents__People_Cast:{init:!1,key:"rollupEvents__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Cast"},type:"rollup"},rollupEvents__People_Guest:{init:!1,key:"rollupEvents__People_Guest",notion:"Guest.Rollup",rollup:{function:"show_original",relation_property_name:"Guest",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Guest_Music:{init:!1,key:"rollupEvents__People_Guest_Music",notion:"Guest.Music.Rollup",rollup:{function:"show_original",relation_property_name:"Guest.Music",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Host:{init:!1,key:"rollupEvents__People_Host",notion:"Host.Rollup",rollup:{function:"show_original",relation_property_name:"Host",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows:{init:!1,key:"rollupEvents__Shows",notion:"Shows.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows_Lineup:{init:!1,key:"rollupEvents__Shows_Lineup",notion:"Shows.Lineup.Rollup",rollup:{function:"show_original",relation_property_name:"Shows.Lineup",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Venues:{init:!1,key:"rollupEvents__Venues",notion:"Venues.Rollup",rollup:{function:"show_original",relation_property_name:"Venues",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__Episodes:{init:!1,key:"rollupPodcasts__Episodes",notion:"Episodes.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__EpisodesSlugs:{init:!1,key:"rollupPodcasts__EpisodesSlugs",notion:"Episodes.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Slug"},type:"rollup"},rollupShows__People_Cast:{init:!1,key:"rollupShows__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Past:{init:!1,key:"rollupShows__People_Cast_Past",notion:"Cast.Past.Rollup",rollup:{function:"show_original",relation_property_name:"Cast.Past",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Slug:{init:!1,key:"rollupShows__People_Cast_Slug",notion:"Cast.Rollup.Slug",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_name:"Slug"},type:"rollup"},rollupShows__People_Crew:{init:!1,key:"rollupShows__People_Crew",notion:"Crew.Rollup",rollup:{function:"show_original",relation_property_name:"Crew",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director:{init:!1,key:"rollupShows__People_Director",notion:"Director.Rollup",rollup:{function:"show_original",relation_property_name:"Director",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Musical:{init:!1,key:"rollupShows__People_Director_Musical",notion:"Director.Musical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Musical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Technical:{init:!1,key:"rollupShows__People_Director_Technical",notion:"Director.Technical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Technical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Music:{init:!1,key:"rollupShows__People_Music",notion:"Music.Rollup",rollup:{function:"show_original",relation_property_name:"Music",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Producer:{init:!1,key:"rollupShows__People_Producer",notion:"Producer.Rollup",rollup:{function:"show_original",relation_property_name:"Producer",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Thanks:{init:!1,key:"rollupShows__People_Thanks",notion:"Thanks.Rollup",rollup:{function:"show_original",relation_property_name:"Thanks",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Writer:{init:!1,key:"rollupShows__People_Writer",notion:"Writer.Rollup",rollup:{function:"show_original",relation_property_name:"Writer",rollup_property_name:"Title"},type:"rollup"},rollupShows__Tags:{init:!1,key:"rollupShows__Tags",notion:"Tags.Rollup",rollup:{function:"show_original",relation_property_name:"Tags",rollup_property_id:"Title"},type:"rollup"},season:{format:"number",init:!0,key:"season",notion:"Season",type:"number"},seoDescription:{init:!0,key:"seoDescription",notion:"SEO.Description",type:"rich_text"},seoImage:{init:!0,key:"seoImage",notion:"SEO.Image",type:"files"},seoImageDescription:{init:!0,key:"seoImageDescription",notion:"SEO.Image.Description",type:"rich_text"},seoKeywords:{init:!0,key:"seoKeywords",notion:"SEO.Keywords",type:"rich_text"},slug:{init:!0,key:"slug",notion:"Slug",type:"rich_text"},socialApple:{init:!0,key:"socialApple",notion:"Social.Apple",type:"url"},socialFacebook:{init:!0,key:"socialFacebook",notion:"Social.Facebook",type:"url"},socialInstagram:{init:!0,key:"socialInstagram",notion:"Social.Instagram",type:"url"},socialSpotify:{init:!0,key:"socialSpotify",notion:"Social.Spotify",type:"url"},socialTwitter:{init:!0,key:"socialTwitter",notion:"Social.Twitter",type:"url"},socialWebsite:{init:!0,key:"socialWebsite",notion:"Social.Website",type:"url"},status:{init:!0,key:"status",notion:"Status",type:"select"},subtitle:{init:!0,key:"subtitle",notion:"Subtitle",type:"rich_text"},ticketUrl:{init:!0,key:"ticketUrl",notion:"TicketUrl",type:"url"},title:{init:!0,key:"title",notion:"Title",type:"title"},type:{init:!0,key:"type",notion:"Type",type:"select"}},n=[e.authors,e.datePublished,e.isIndexed,e.isPublished,e.slug,e.seoDescription,e.seoImage,e.seoImageDescription,e.seoKeywords,e.title],r=[...n],l=[...n,e.author,e.status,e.subtitle],a=[...n,e.dateRecorded,e.duration,e.episode,e.mp3,e.season,e.relationEpisodes__People_Guest,e.relationEpisodes__People_Sound_Engineer,e.relationEpisodes__People_Thanks,e.relationEpisodes__Podcasts,e.relationEpisodes__Venues,e.socialApple,e.socialSpotify,e.type,e.rollupEpisodes__Podcasts,e.rollupEpisodes__PodcastsSlugs],_=[...n,e.dateEvent,e.relationEvents__People_Guest_Music,e.relationEvents__People_Guest,e.relationEvents__People_Host,e.relationEvents__Shows_Lineup,e.relationEvents__Shows,e.relationEvents__Venues,e.socialFacebook,e.socialWebsite,e.ticketUrl,e.rollupEvents__People_Cast,e.rollupEvents__People_Guest_Music,e.rollupEvents__People_Guest,e.rollupEvents__People_Host,e.rollupEvents__Shows_Lineup,e.rollupEvents__Shows,e.rollupEvents__Venues],p=[...n],u=[...n,e.email,e.nameFirst,e.nameLast,e.namePreferred,e.relationPeople__Episodes_Guest,e.relationPeople__Episodes_Sound_Engineer,e.relationPeople__Episodes_Thanks,e.relationPeople__Events_Guest,e.relationPeople__Events_Guest_Music,e.relationPeople__Events_Host,e.relationPeople__Podcasts_Host,e.relationPeople__Podcasts_Sound_Engineer,e.relationPeople__Shows_Cast,e.relationPeople__Shows_Cast_Past,e.relationPeople__Shows_Director,e.relationPeople__Shows_Director_Musical,e.relationPeople__Shows_Director_Technical,e.relationPeople__Shows_Producer,e.relationPeople__Shows_Thanks,e.relationPeople__Shows_Writer],d=[...n,e.categories,e.explicit,e.podcastAuthor,e.podcastAuthorEmail,e.relationPodcasts__People_Host,e.relationPodcasts__People_Sound_Engineer,e.socialApple,e.socialSpotify,e.type,e.relationPodcasts__Episodes,e.rollupPodcasts__Episodes,e.rollupPodcasts__EpisodesSlugs],y=[...n],c=[...n,e.relationShows__People_Cast,e.relationShows__People_Cast_Past,e.relationShows__People_Director,e.relationShows__People_Director_Musical,e.relationShows__People_Director_Technical,e.relationShows__People_Producer,e.relationShows__People_Thanks,e.relationShows__People_Writer,e.relationShows__Tags,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationShows__Events,e.relationShows__Events_Lineup,e.rollupShows__People_Cast,e.rollupShows__People_Cast_Slug,e.rollupShows__People_Cast_Past,e.rollupShows__People_Crew,e.rollupShows__People_Director,e.rollupShows__People_Director_Musical,e.rollupShows__People_Director_Technical,e.rollupShows__People_Music,e.rollupShows__People_Producer,e.rollupShows__People_Thanks,e.rollupShows__People_Writer,e.rollupShows__Tags],h=[...n,e.addressCity,e.addressLatitude,e.addressLongitude,e.addressNeighborhood,e.addressState,e.addressStreet,e.addressZipCode,e.phoneNumber,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationVenues__Episodes,e.relationVenues__Events],v={BLOG:i(r,{init:!0}),BOOKS:i(l,{init:!0}),EPISODES:i(a,{init:!0}),EVENTS:i(_,{init:!0}),PAGES:i(p,{init:!0}),PEOPLE:i(u,{init:!0}),PODCASTS:i(d,{init:!0}),SEO:i(y,{init:!0}),SHOWS:i(c,{init:!0}),VENUES:i(h,{init:!0})},D={BLOG:r.map(o=>t(o)),BOOKS:l.map(o=>t(o)),EPISODES:a.map(o=>t(o)),EVENTS:_.map(o=>t(o)),PAGES:p.map(o=>t(o)),PEOPLE:u.map(o=>t(o)),PODCASTS:d.map(o=>t(o)),SEO:y.map(o=>t(o)),SHOWS:c.map(o=>t(o)),VENUES:h.map(o=>t(o))},C=E(e,o=>t(o)),s=new Date().toISOString(),G={dateBefore:{date:{before:s},property:e.datePublished.notion},dateOnOrAfter:{date:{on_or_after:s},property:e.datePublished.notion},published:{checkbox:{equals:!1},property:e.isPublished.notion},slug:{property:e.slug.notion,rich_text:{equals:""}}},w="LISTING",m="LISTING_BY_DATE",k="SLUG",T="SLUG_BY_ROUTE",g=[w,m,k,T],L=Object.assign({},...g.map(o=>({[o]:o})).flat(1));export{L as DATA_TYPES,v as INIT,D as LOOKUP,e as PROPERTIES,C as PROPERTIES_LOOKUP,G as QUERIES,g as getDataTypes};
|
package/index.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { DataTypes } from './schema/index.js';
|
|
2
|
-
import { Client as Client$1 } from '@notionhq/client';
|
|
3
|
-
import { DATA_TYPES } from './constants/index.js';
|
|
4
|
-
|
|
5
|
-
type ClientProps = {
|
|
6
|
-
custom: CustomProps;
|
|
7
|
-
dataTypes: DataTypesProps;
|
|
8
|
-
};
|
|
9
|
-
type CredentialProps = {
|
|
10
|
-
auth: string;
|
|
11
|
-
config: any;
|
|
12
|
-
};
|
|
13
|
-
type CustomProps = {
|
|
14
|
-
getBlocksByIdChildren: any;
|
|
15
|
-
getDatabasesByIdQuery: any;
|
|
16
|
-
getDeepFetchAllChildren: any;
|
|
17
|
-
getInfoType: any;
|
|
18
|
-
getPagesById: any;
|
|
19
|
-
getPathVariables: any;
|
|
20
|
-
getQuery: any;
|
|
21
|
-
};
|
|
22
|
-
type DataTypesProps = {
|
|
23
|
-
LISTING: any;
|
|
24
|
-
LISTING_BY_DATE: any;
|
|
25
|
-
SLUG: any;
|
|
26
|
-
SLUG_BY_ROUTE: any;
|
|
27
|
-
};
|
|
28
|
-
declare class Client extends Client$1 {
|
|
29
|
-
#private;
|
|
30
|
-
readonly custom: {
|
|
31
|
-
getBlocksByIdChildren: (props: any) => Promise<any>;
|
|
32
|
-
getDatabasesByIdQuery: (props: any) => Promise<any>;
|
|
33
|
-
getDeepFetchAllChildren: (props: any) => Promise<any[]>;
|
|
34
|
-
getInfoType: (props: any) => {
|
|
35
|
-
as: string;
|
|
36
|
-
date: string;
|
|
37
|
-
href: string;
|
|
38
|
-
slug: any;
|
|
39
|
-
};
|
|
40
|
-
getPagesById: (props: any) => Promise<any>;
|
|
41
|
-
getPathVariables: (props: any) => {
|
|
42
|
-
dataType: DataTypes;
|
|
43
|
-
hasMeta: boolean;
|
|
44
|
-
isIndex: boolean;
|
|
45
|
-
isPage: boolean;
|
|
46
|
-
meta: unknown[];
|
|
47
|
-
routeType: any;
|
|
48
|
-
slug: any;
|
|
49
|
-
url: string;
|
|
50
|
-
};
|
|
51
|
-
getQuery: (props: any) => Promise<any>;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* @info details at: ../../utils/getDataType
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
readonly dataTypes: {
|
|
58
|
-
[DATA_TYPES.LISTING]: (props: {
|
|
59
|
-
pathVariables: any;
|
|
60
|
-
routeType: any;
|
|
61
|
-
slug?: any;
|
|
62
|
-
}) => Promise<{
|
|
63
|
-
content?: undefined;
|
|
64
|
-
images?: undefined;
|
|
65
|
-
info?: undefined;
|
|
66
|
-
items?: undefined;
|
|
67
|
-
} | {
|
|
68
|
-
content: any;
|
|
69
|
-
images: {};
|
|
70
|
-
info: any;
|
|
71
|
-
items: Pick<any, string | number | symbol>;
|
|
72
|
-
}>;
|
|
73
|
-
[DATA_TYPES.LISTING_BY_DATE]: (props: {
|
|
74
|
-
pathVariables: any;
|
|
75
|
-
routeType: any;
|
|
76
|
-
slug: any;
|
|
77
|
-
}) => Promise<{
|
|
78
|
-
content: any;
|
|
79
|
-
images: {};
|
|
80
|
-
info: any;
|
|
81
|
-
items: Pick<Pick<any, string | number | symbol>, string | number | symbol>;
|
|
82
|
-
}>;
|
|
83
|
-
[DATA_TYPES.SLUG]: (props: {
|
|
84
|
-
pathVariables: any;
|
|
85
|
-
routeType: any;
|
|
86
|
-
slug: any;
|
|
87
|
-
}) => Promise<{
|
|
88
|
-
content: {};
|
|
89
|
-
images: {};
|
|
90
|
-
info: {};
|
|
91
|
-
items: {};
|
|
92
|
-
} | {
|
|
93
|
-
content?: undefined;
|
|
94
|
-
images?: undefined;
|
|
95
|
-
info?: undefined;
|
|
96
|
-
items?: undefined;
|
|
97
|
-
} | {
|
|
98
|
-
content: any[];
|
|
99
|
-
images: {};
|
|
100
|
-
info: Pick<any, string | number | symbol>;
|
|
101
|
-
items: {};
|
|
102
|
-
}>;
|
|
103
|
-
[DATA_TYPES.SLUG_BY_ROUTE]: (props: {
|
|
104
|
-
pathVariables: any;
|
|
105
|
-
routeType: any;
|
|
106
|
-
slug: any;
|
|
107
|
-
}) => Promise<{
|
|
108
|
-
content: any;
|
|
109
|
-
images: {};
|
|
110
|
-
info: Pick<any, string | number | symbol>;
|
|
111
|
-
items: {};
|
|
112
|
-
}>;
|
|
113
|
-
};
|
|
114
|
-
constructor(options?: any);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export { Client, type ClientProps, type CredentialProps };
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Client as eo}from"@notionhq/client";import T from"lodash/filter.js";import Re from"lodash/map.js";var w=({key:t,notion:o,type:i})=>({key:t,notion:o,type:i}),e={addressCity:{init:!0,key:"addressCity",notion:"Address.City",type:"rich_text"},addressLatitude:{format:"number",init:!0,key:"addressLatitude",notion:"Address.Latitude",type:"number"},addressLongitude:{format:"number",init:!0,key:"addressLongitude",notion:"Address.Longitude",type:"number"},addressNeighborhood:{init:!0,key:"addressNeighborhood",notion:"Address.Neighborhood",type:"rich_text"},addressState:{init:!0,key:"addressState",notion:"Address.State",type:"select"},addressStreet:{init:!0,key:"addressStreet",notion:"Address.Street",type:"rich_text"},addressZipCode:{format:"number",init:!0,key:"addressZipCode",notion:"Address.ZipCode",type:"number"},author:{init:!0,key:"author",notion:"Author",type:"rich_text"},authors:{init:!0,key:"authors",notion:"Authors",type:"people"},categories:{init:!0,key:"categories",notion:"Categories",type:"multi_select"},dateCreated:{init:!1,key:"dateCreated",notion:"Date.Created",type:"created_time"},dateEdited:{init:!1,key:"dateEdited",notion:"Date.Edited",type:"last_edited_time"},dateEvent:{init:!0,key:"dateEvent",notion:"Date.Event",type:"date"},datePublished:{init:!0,key:"datePublished",notion:"Date.Published",type:"date"},dateRecorded:{init:!0,key:"dateRecorded",notion:"Date.Recorded",type:"date"},duration:{init:!0,key:"duration",notion:"Duration",type:"rich_text"},email:{init:!0,key:"email",notion:"Email",type:"rich_text"},episode:{format:"number",init:!0,key:"episode",notion:"Episode",type:"number"},explicit:{init:!0,key:"explicit",notion:"Explicit",type:"checkbox"},festivals:{init:!0,key:"festivals",notion:"Festival",type:"multi_select"},food:{init:!0,key:"food",notion:"Food",type:"rich_text"},isIndexed:{init:!0,key:"isIndexed",notion:"Is.Indexed",type:"checkbox"},isPublished:{init:!0,key:"isPublished",notion:"Is.Published",type:"checkbox"},mp3:{init:!0,key:"mp3",notion:"MP3",type:"files"},name:{init:!0,key:"name",notion:"Name",type:"rich_text"},nameFirst:{init:!0,key:"nameFirst",notion:"Name.First",type:"rich_text"},nameLast:{init:!0,key:"nameLast",notion:"Name.Last",type:"rich_text"},namePreferred:{init:!0,key:"namePreferred",notion:"Name.Preferred",type:"rich_text"},phoneNumber:{init:!0,key:"phoneNumber",notion:"Phone",type:"rich_text"},podcastAuthor:{init:!0,key:"podcastAuthor",notion:"Author",type:"rich_text"},podcastAuthorEmail:{init:!0,key:"podcastAuthorEmail",notion:"Author.Email",type:"rich_text"},relationEpisodes__People_Guest:{init:!0,key:"relationEpisodes__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Episodes.Guest"},type:"relation"},relationEpisodes__People_Sound_Engineer:{init:!0,key:"relationEpisodes__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"People",synced_property_name:"Episodes.Sound.Engineer"},type:"relation"},relationEpisodes__People_Thanks:{init:!0,key:"relationEpisodes__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Episodes.Thanks"},type:"relation"},relationEpisodes__Podcasts:{init:!0,key:"relationEpisodes__Podcasts",notion:"Podcasts",relation:{database_id:"Podcasts",synced_property_name:"Episodes"},type:"relation"},relationEpisodes__Venues:{init:!0,key:"relationEpisodes__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Episodes"},type:"relation"},relationEvents__People_Guest:{init:!0,key:"relationEvents__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Events.Guest"},type:"relation"},relationEvents__People_Guest_Music:{init:!0,key:"relationEvents__People_Guest_Music",notion:"Guest.Music",relation:{database_id:"People",synced_property_name:"Events.Guest.Music"},type:"relation"},relationEvents__People_Host:{init:!0,key:"relationEvents__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Events.Host"},type:"relation"},relationEvents__Shows:{init:!0,key:"relationEvents__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Events"},type:"relation"},relationEvents__Shows_Lineup:{init:!0,key:"relationEvents__Shows_Lineup",notion:"Shows.Lineup",relation:{database_id:"Shows",synced_property_name:"Events.Lineup"},type:"relation"},relationEvents__Venues:{init:!0,key:"relationEvents__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Events"},type:"relation"},relationPeople__Episodes_Guest:{init:!1,key:"relationPeople__Episodes_Guest",notion:"Episodes.Guest",relation:{database_id:"Episodes",synced_property_name:"Guest"},type:"relation"},relationPeople__Episodes_Sound_Engineer:{init:!1,key:"relationPeople__Episodes_Sound_Engineer",notion:"Episodes.Sound.Engineer",relation:{database_id:"Episodes",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Episodes_Thanks:{init:!1,key:"relationPeople__Episodes_Thanks",notion:"Episodes.Thanks",relation:{database_id:"Episodes",synced_property_name:"Thanks"},type:"relation"},relationPeople__Events_Guest:{init:!1,key:"relationEvents__People_Guest",notion:"Events.Guest",relation:{database_id:"Events",synced_property_name:"Guest"},type:"relation"},relationPeople__Events_Guest_Music:{init:!1,key:"relationPeople__Events_Guest_Music",notion:"Events.Guest.Music",relation:{database_id:"Events",synced_property_name:"Guest.Music"},type:"relation"},relationPeople__Events_Host:{init:!1,key:"relationPeople__Events_Host",notion:"Events.Host",relation:{database_id:"Events",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Host:{init:!1,key:"relationPeople__Podcasts_Host",notion:"Podcasts.Host",relation:{database_id:"Podcasts",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Sound_Engineer:{init:!1,key:"relationPeople__Podcasts_Sound_Engineer",notion:"Podcasts.Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Shows_Cast:{init:!1,key:"relationPeople__Shows_Cast",notion:"Shows.Cast",relation:{database_id:"Shows",synced_property_name:"Cast"},type:"relation"},relationPeople__Shows_Cast_Past:{init:!1,key:"relationPeople__Shows_Cast_Past",notion:"Shows.Cast.Past",relation:{database_id:"Shows",synced_property_name:"Cast.Past"},type:"relation"},relationPeople__Shows_Crew:{init:!0,key:"relationPeople__Shows_Crew",notion:"Shows.Crew",relation:{database_id:"Shows",synced_property_name:"Crew"},type:"relation"},relationPeople__Shows_Director:{init:!1,key:"relationPeople__Shows_Director",notion:"Shows.Director",relation:{database_id:"Shows",synced_property_name:"Director"},type:"relation"},relationPeople__Shows_Director_Musical:{init:!1,key:"relationPeople__Shows_Director_Musical",notion:"Shows.Director.Musical",relation:{database_id:"Shows",synced_property_name:"Director.Musical"},type:"relation"},relationPeople__Shows_Director_Technical:{init:!1,key:"relationPeople__Shows_Director_Technical",notion:"Shows.Director.Technical",relation:{database_id:"Shows",synced_property_name:"Director.Technical"},type:"relation"},relationPeople__Shows_Producer:{init:!1,key:"relationPeople__Shows_Producer",notion:"Shows.Producer",relation:{database_id:"Shows",synced_property_name:"Producer"},type:"relation"},relationPeople__Shows_Thanks:{init:!1,key:"relationPeople__Shows_Thanks",notion:"Shows.Thanks",relation:{database_id:"Shows",synced_property_name:"Thanks"},type:"relation"},relationPeople__Shows_Writer:{init:!1,key:"relationPeople__Shows_Writer",notion:"Shows.Writer",relation:{database_id:"Shows",synced_property_name:"Writer"},type:"relation"},relationPodcasts__Episodes:{init:!1,key:"relationPodcasts__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Podcasts"},type:"relation"},relationPodcasts__People_Host:{init:!0,key:"relationPodcasts__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Podcasts.Host"},type:"relation"},relationPodcasts__People_Sound_Engineer:{init:!0,key:"relationPodcasts__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Podcasts.Sound.Engineer"},type:"relation"},relationShows__Events:{init:!1,key:"relationShows__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Shows"},type:"relation"},relationShows__Events_Lineup:{init:!1,key:"relationShows__Events_Lineup",notion:"Events.Lineup",relation:{database_id:"Events",synced_property_name:"Shows.Lineup"},type:"relation"},relationShows__People_Cast:{init:!0,key:"relationShows__People_Cast",notion:"Cast",relation:{database_id:"People",synced_property_name:"Shows.Cast"},type:"relation"},relationShows__People_Cast_Past:{init:!0,key:"relationShows__People_Cast_Past",notion:"Cast.Past",relation:{database_id:"People",synced_property_name:"Shows.Cast.Past"},type:"relation"},relationShows__People_Director:{init:!0,key:"relationShows__People_Director",notion:"Director",relation:{database_id:"People",synced_property_name:"Shows.Director"},type:"relation"},relationShows__People_Director_Musical:{init:!0,key:"relationShows__People_Director_Musical",notion:"Director.Musical",relation:{database_id:"People",synced_property_name:"Shows.Director.Musical"},type:"relation"},relationShows__People_Director_Technical:{init:!0,key:"relationShows__People_Director_Technical",notion:"Director.Technical",relation:{database_id:"People",synced_property_name:"Shows.Director.Technical"},type:"relation"},relationShows__People_Producer:{init:!0,key:"relationShows__People_Producer",notion:"Producer",relation:{database_id:"People",synced_property_name:"Shows.Producer"},type:"relation"},relationShows__People_Thanks:{init:!0,key:"relationShows__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Shows.Thanks"},type:"relation"},relationShows__People_Writer:{init:!0,key:"relationShows__People_Writer",notion:"Writer",relation:{database_id:"People",synced_property_name:"Shows.Writer"},type:"relation"},relationShows__Tags:{init:!0,key:"relationShows__Tags",notion:"Tags",relation:{database_id:"Tags",synced_property_name:"Shows"},type:"relation"},relationShows_People_Crew:{init:!0,key:"relationShows_People_Crew",notion:"Crew",relation:{database_id:"People",synced_property_name:"Shows.Crew"},type:"relation"},relationTags__Shows:{init:!1,key:"relationTags__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Tags"},type:"relation"},relationVenues__Episodes:{init:!1,key:"relationVenues__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Venues"},type:"relation"},relationVenues__Events:{init:!1,key:"relationVenues__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Venues"},type:"relation"},rollupEpisodes__Podcasts:{init:!1,key:"rollupEpisodes__Podcasts",notion:"Podcasts.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Title"},type:"rollup"},rollupEpisodes__PodcastsSlugs:{init:!1,key:"rollupEpisodes__PodcastsSlugs",notion:"Podcasts.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Slug"},type:"rollup"},rollupEvents__People_Cast:{init:!1,key:"rollupEvents__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Cast"},type:"rollup"},rollupEvents__People_Guest:{init:!1,key:"rollupEvents__People_Guest",notion:"Guest.Rollup",rollup:{function:"show_original",relation_property_name:"Guest",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Guest_Music:{init:!1,key:"rollupEvents__People_Guest_Music",notion:"Guest.Music.Rollup",rollup:{function:"show_original",relation_property_name:"Guest.Music",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Host:{init:!1,key:"rollupEvents__People_Host",notion:"Host.Rollup",rollup:{function:"show_original",relation_property_name:"Host",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows:{init:!1,key:"rollupEvents__Shows",notion:"Shows.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows_Lineup:{init:!1,key:"rollupEvents__Shows_Lineup",notion:"Shows.Lineup.Rollup",rollup:{function:"show_original",relation_property_name:"Shows.Lineup",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Venues:{init:!1,key:"rollupEvents__Venues",notion:"Venues.Rollup",rollup:{function:"show_original",relation_property_name:"Venues",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__Episodes:{init:!1,key:"rollupPodcasts__Episodes",notion:"Episodes.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__EpisodesSlugs:{init:!1,key:"rollupPodcasts__EpisodesSlugs",notion:"Episodes.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Slug"},type:"rollup"},rollupShows__People_Cast:{init:!1,key:"rollupShows__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Past:{init:!1,key:"rollupShows__People_Cast_Past",notion:"Cast.Past.Rollup",rollup:{function:"show_original",relation_property_name:"Cast.Past",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Slug:{init:!1,key:"rollupShows__People_Cast_Slug",notion:"Cast.Rollup.Slug",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_name:"Slug"},type:"rollup"},rollupShows__People_Crew:{init:!1,key:"rollupShows__People_Crew",notion:"Crew.Rollup",rollup:{function:"show_original",relation_property_name:"Crew",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director:{init:!1,key:"rollupShows__People_Director",notion:"Director.Rollup",rollup:{function:"show_original",relation_property_name:"Director",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Musical:{init:!1,key:"rollupShows__People_Director_Musical",notion:"Director.Musical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Musical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Technical:{init:!1,key:"rollupShows__People_Director_Technical",notion:"Director.Technical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Technical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Music:{init:!1,key:"rollupShows__People_Music",notion:"Music.Rollup",rollup:{function:"show_original",relation_property_name:"Music",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Producer:{init:!1,key:"rollupShows__People_Producer",notion:"Producer.Rollup",rollup:{function:"show_original",relation_property_name:"Producer",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Thanks:{init:!1,key:"rollupShows__People_Thanks",notion:"Thanks.Rollup",rollup:{function:"show_original",relation_property_name:"Thanks",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Writer:{init:!1,key:"rollupShows__People_Writer",notion:"Writer.Rollup",rollup:{function:"show_original",relation_property_name:"Writer",rollup_property_name:"Title"},type:"rollup"},rollupShows__Tags:{init:!1,key:"rollupShows__Tags",notion:"Tags.Rollup",rollup:{function:"show_original",relation_property_name:"Tags",rollup_property_id:"Title"},type:"rollup"},season:{format:"number",init:!0,key:"season",notion:"Season",type:"number"},seoDescription:{init:!0,key:"seoDescription",notion:"SEO.Description",type:"rich_text"},seoImage:{init:!0,key:"seoImage",notion:"SEO.Image",type:"files"},seoImageDescription:{init:!0,key:"seoImageDescription",notion:"SEO.Image.Description",type:"rich_text"},seoKeywords:{init:!0,key:"seoKeywords",notion:"SEO.Keywords",type:"rich_text"},slug:{init:!0,key:"slug",notion:"Slug",type:"rich_text"},socialApple:{init:!0,key:"socialApple",notion:"Social.Apple",type:"url"},socialFacebook:{init:!0,key:"socialFacebook",notion:"Social.Facebook",type:"url"},socialInstagram:{init:!0,key:"socialInstagram",notion:"Social.Instagram",type:"url"},socialSpotify:{init:!0,key:"socialSpotify",notion:"Social.Spotify",type:"url"},socialTwitter:{init:!0,key:"socialTwitter",notion:"Social.Twitter",type:"url"},socialWebsite:{init:!0,key:"socialWebsite",notion:"Social.Website",type:"url"},status:{init:!0,key:"status",notion:"Status",type:"select"},subtitle:{init:!0,key:"subtitle",notion:"Subtitle",type:"rich_text"},ticketUrl:{init:!0,key:"ticketUrl",notion:"TicketUrl",type:"url"},title:{init:!0,key:"title",notion:"Title",type:"title"},type:{init:!0,key:"type",notion:"Type",type:"select"}},k=[e.authors,e.datePublished,e.isIndexed,e.isPublished,e.slug,e.seoDescription,e.seoImage,e.seoImageDescription,e.seoKeywords,e.title],$=[...k],K=[...k,e.author,e.status,e.subtitle],q=[...k,e.dateRecorded,e.duration,e.episode,e.mp3,e.season,e.relationEpisodes__People_Guest,e.relationEpisodes__People_Sound_Engineer,e.relationEpisodes__People_Thanks,e.relationEpisodes__Podcasts,e.relationEpisodes__Venues,e.socialApple,e.socialSpotify,e.type,e.rollupEpisodes__Podcasts,e.rollupEpisodes__PodcastsSlugs],Z=[...k,e.dateEvent,e.relationEvents__People_Guest_Music,e.relationEvents__People_Guest,e.relationEvents__People_Host,e.relationEvents__Shows_Lineup,e.relationEvents__Shows,e.relationEvents__Venues,e.socialFacebook,e.socialWebsite,e.ticketUrl,e.rollupEvents__People_Cast,e.rollupEvents__People_Guest_Music,e.rollupEvents__People_Guest,e.rollupEvents__People_Host,e.rollupEvents__Shows_Lineup,e.rollupEvents__Shows,e.rollupEvents__Venues],J=[...k],X=[...k,e.email,e.nameFirst,e.nameLast,e.namePreferred,e.relationPeople__Episodes_Guest,e.relationPeople__Episodes_Sound_Engineer,e.relationPeople__Episodes_Thanks,e.relationPeople__Events_Guest,e.relationPeople__Events_Guest_Music,e.relationPeople__Events_Host,e.relationPeople__Podcasts_Host,e.relationPeople__Podcasts_Sound_Engineer,e.relationPeople__Shows_Cast,e.relationPeople__Shows_Cast_Past,e.relationPeople__Shows_Director,e.relationPeople__Shows_Director_Musical,e.relationPeople__Shows_Director_Technical,e.relationPeople__Shows_Producer,e.relationPeople__Shows_Thanks,e.relationPeople__Shows_Writer],ee=[...k,e.categories,e.explicit,e.podcastAuthor,e.podcastAuthorEmail,e.relationPodcasts__People_Host,e.relationPodcasts__People_Sound_Engineer,e.socialApple,e.socialSpotify,e.type,e.relationPodcasts__Episodes,e.rollupPodcasts__Episodes,e.rollupPodcasts__EpisodesSlugs],te=[...k],oe=[...k,e.relationShows__People_Cast,e.relationShows__People_Cast_Past,e.relationShows__People_Director,e.relationShows__People_Director_Musical,e.relationShows__People_Director_Technical,e.relationShows__People_Producer,e.relationShows__People_Thanks,e.relationShows__People_Writer,e.relationShows__Tags,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationShows__Events,e.relationShows__Events_Lineup,e.rollupShows__People_Cast,e.rollupShows__People_Cast_Slug,e.rollupShows__People_Cast_Past,e.rollupShows__People_Crew,e.rollupShows__People_Director,e.rollupShows__People_Director_Musical,e.rollupShows__People_Director_Technical,e.rollupShows__People_Music,e.rollupShows__People_Producer,e.rollupShows__People_Thanks,e.rollupShows__People_Writer,e.rollupShows__Tags],re=[...k,e.addressCity,e.addressLatitude,e.addressLongitude,e.addressNeighborhood,e.addressState,e.addressStreet,e.addressZipCode,e.phoneNumber,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationVenues__Episodes,e.relationVenues__Events],ro={BLOG:T($,{init:!0}),BOOKS:T(K,{init:!0}),EPISODES:T(q,{init:!0}),EVENTS:T(Z,{init:!0}),PAGES:T(J,{init:!0}),PEOPLE:T(X,{init:!0}),PODCASTS:T(ee,{init:!0}),SEO:T(te,{init:!0}),SHOWS:T(oe,{init:!0}),VENUES:T(re,{init:!0})},ie={BLOG:$.map(t=>w(t)),BOOKS:K.map(t=>w(t)),EPISODES:q.map(t=>w(t)),EVENTS:Z.map(t=>w(t)),PAGES:J.map(t=>w(t)),PEOPLE:X.map(t=>w(t)),PODCASTS:ee.map(t=>w(t)),SEO:te.map(t=>w(t)),SHOWS:oe.map(t=>w(t)),VENUES:re.map(t=>w(t))},ne=Re(e,t=>w(t)),z=new Date().toISOString(),b={dateBefore:{date:{before:z},property:e.datePublished.notion},dateOnOrAfter:{date:{on_or_after:z},property:e.datePublished.notion},published:{checkbox:{equals:!1},property:e.isPublished.notion},slug:{property:e.slug.notion,rich_text:{equals:""}}},Ne="LISTING",Be="LISTING_BY_DATE",Le="SLUG",Ge="SLUG_BY_ROUTE",Ae=[Ne,Be,Le,Ge],g=Object.assign({},...Ae.map(t=>({[t]:t})).flat(1));import{avoidRateLimit as Ue,isUndefined as Me}from"@jeromefitz/utils";var Ve=async({block_id:t,getBlocksChildrenList:o})=>Me(t)?[]:(await Ue(0),await o({block_id:t})),R=Ve;var se={sorts:[{direction:"ascending",property:e.slug.notion}]},He=async({database_id:t,filter:o=se?.filter,getDatabasesQuery:i,sorts:s=se?.sorts})=>t?await i({database_id:t,filter:o,sorts:s}):[],N=He;var ae=async({blocks:t,getBlocksChildrenList:o})=>{if(t==null)return t;let i=t.filter(r=>r.has_children).map(r=>{let{id:n}=r;return{parent_block:r,promise:o({block_id:n,page_size:100})}}),s=await Promise.all(i.map(r=>r.promise));for(let r=0;r<s.length;r++){let n=s[r].results;if(await ae({blocks:n,getBlocksChildrenList:o}),i[r]){let l=i[r].parent_block;l[l.type].children=n}}return t},B=ae;var Fe=({config:t,item:o,meta:i,routeType:s})=>{let{NOTION:r}=t,n="",l=o.properties?.slug,a="",c="/[...catchAll]";switch(s){case r.BLOG.routeType:case r.EVENTS.routeType:n=o.properties[r[s.toUpperCase()].infoType.key]?.start.slice(0,10);let[_,u,p]=n?.split("-");a=`/${s}/${_}/${u}/${p}/${l}`;break;case r.PODCASTS.routeType:case r.EPISODES.routeType:a=`/${i?.join("/")}/${l}`;break;default:a=`/${s}/${l}`;break}return a=a.replace("//","/"),{as:a,date:n,href:c,slug:l}},L=Fe;import{sortObject as ke}from"@jeromefitz/utils";import bt from"lodash/map.js";import U from"lodash/omit.js";import{addDays as le,addMonths as Qe,addYears as We}from"date-fns";var Ye=(t,o)=>{switch(o){case"year":return We(t,1).toISOString();case"month":return Qe(t,1).toISOString();case"day":return le(t,2).toISOString()}return le(t,-1).toISOString()},E=Ye;import je from"lodash/map.js";var ze=({config:t,data:o,pageId:i,pathVariables:s})=>{let{NOTION:r}=t,n={};if(!o?.properties)return n;let{properties:l}=o,a="";if(s){let{meta:_,routeType:u}=s;a=u===r?.PODCASTS?.routeType&&_.length>1?r?.EPISODES?.routeType:u}let c=a?ie[a.toUpperCase()]:ne;return je(c,_=>{let u,p=l[_.notion];n[_.key]=null,p&&(u=I[_.type](p,i),n[_.key]=u||null)}),n},f=ze;import{sortObject as $e}from"@jeromefitz/utils";import Ke from"lodash/map.js";import qe from"lodash/omit.js";var Ze=({config:t,results:o,routeType:i})=>{let s=[];return Ke(o,r=>{let n=qe(r,"properties");n.properties=$e(f({config:t,data:r,pageId:r?.id,pathVariables:i})),s.push(n)}),s},pe=Ze;var Je=({hasMeta:t,isIndex:o,isPage:i})=>i?g.SLUG:o&&!t?g.LISTING:o&&t?g.LISTING_BY_DATE:t?g.SLUG_BY_ROUTE:g.SLUG,G=Je;var Xe=t=>(console.dir("@notion(_unsupported)"),t),C=Xe;var et=t=>t.checkbox||!1,_e=et;var tt=t=>{let{type:o}=t;return t[o]},O=tt;var ot=t=>t.email||null,ue=ot;import{stringToUUID as rt}from"@jeromefitz/utils";import it from"github-slugger";import nt from"lodash/size.js";var st="https://www.notion.so/image/{{FILENAME}}?table=block&id={{PAGE_ID}}&cache=v2&w1dth=600",at=(t,o)=>st.replace("{{FILENAME}}",encodeURIComponent(t)).replace("{{PAGE_ID}}",rt(o)),lt=(t,o)=>{let i=new it,s={};return nt(t.files)<=0||t.files.map(r=>{if(r?.type==="file"){let n=r?.file?.url.split("?")[0],l=i.slug(n);s[l]={type:r?.type,url:at(n,o)}}if(r?.type==="external"){let n=r?.external?.url.split("?")[0],l=i.slug(n);s[l]={type:r?.type,url:n}}}),s},A=lt;import pt from"github-slugger";import _t from"lodash/map.js";var ut=t=>{let o=new pt,i={};return _t(t.multi_select,s=>{let r=s;r.slug=o.slug(r.name),i[r.id]=r}),i},de=ut;var dt=t=>t?.number||null,ce=dt;import ct from"github-slugger";var yt=t=>{let o=new ct;return t.people.map(i=>{let{avatar_url:s,id:r,name:n,person:l}=i,{email:a}=l;return{[o.slug(n)]:{avatar_url:s,email:a,id:r,name:n}}})[0]},ye=yt;var mt=t=>t?.phone_number||null,me=mt;import he from"lodash/map.js";var ht=t=>t.type==="rollup"?t.rollup.type==="array"&&he(t.rollup.array,o=>I[o.type](o))[0]:he(t.relation,o=>o.id),Pe=ht;var Pt=t=>t?.rich_text?t?.rich_text[0]?.plain_text:null,Se=Pt;import fe from"lodash/map.js";import St from"lodash/sortBy.js";var ft=t=>{let o=t?.rollup;return St(fe(o?.array,i=>fe(i[i?.type],s=>I[i?.type]({[i?.type]:[s],type:i?.type})))).flat()},ge=ft;import gt from"github-slugger";var Et=t=>{let o=new gt,i=t.select;return i?(i.slug=o.slug(t.select.name),{[i.id]:i}):null},Ee=Et;var wt=t=>t?.title?t?.title[0]?.plain_text:null,we=wt;var Tt=t=>t.url||null,Te=Tt;var kt={checkbox:_e,created_by:C,created_time:O,date:O,email:ue,files:A,formula:C,image:A,last_edited_by:C,last_edited_time:O,multi_select:de,number:ce,people:ye,phone_number:me,relation:Pe,rich_text:Se,rollup:ge,select:Ee,title:we,url:Te},I=kt;var It=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getPagesById:s,pathVariables:r,routeType:n})=>{let{NOTION:l}=t,a={},c=l[n.toUpperCase()].page_id__seo,_=await s({page_id:c});if(!_)return{};_?.object==="page"&&(a=U(_,"properties"),a.properties=ke(f({config:t,data:_,pageId:a.id,pathVariables:r})));let u=l[n.toUpperCase()].infoType.notion??e.datePublished.notion,p=u===e.datePublished.notion?new Date("2020-01-01").toISOString():new Date().toISOString(),d=await o({block_id:a.id}),y=await i({database_id:l[n.toUpperCase()].database_id,filter:{and:[{date:{on_or_after:p},property:u}]}}),h=[];bt(y.results,P=>{let S=P;S=U(S,"properties"),S.properties=ke(f({config:t,data:P,pageId:P.id,pathVariables:r})),h.push(S)});let m=U(y,"results");return m.results=h,{content:d,images:{},info:a,items:m}},M=It;import{sortObject as be}from"@jeromefitz/utils";import Dt from"lodash/map.js";import x from"lodash/omit.js";import Ct from"lodash/size.js";var Ot=({config:t,pathVariables:o,routeType:i,slug:s})=>{let{NOTION:r}=t,{meta:n}=o,[l,a,c]=n,_=Ct(n),u=new Date().toISOString(),p=new Date(`${l||u.slice(0,4)}-${a||"01"}-${c||"01"}`),d=r[i.toUpperCase()]?.infoType?.notion??e.datePublished.notion;switch(_){case 1:return{and:[{date:{on_or_after:E(p,"")},property:d},{date:{before:E(p,"year")},property:d}]};case 2:return{and:[{date:{on_or_after:E(p,"")},property:d},{date:{before:E(p,"month")},property:d}]};case 3:return{and:[{date:{on_or_after:E(p,"")},property:d},{date:{before:E(p,"day")},property:d}]};default:return{and:[{date:{on_or_after:E(p,"")},property:d},{date:{before:E(p,"day")},property:d},{...b.slug,rich_text:{equals:s}}]}}},xt=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getPagesById:s,pathVariables:r,routeType:n,slug:l})=>{let{NOTION:a}=t,c={},_={},u=a[n.toUpperCase()].page_id__seo,p=await s({page_id:u});p.object==="page"&&(_=x(p,"properties"),_.properties=be(f({config:t,data:p,pageId:p.id,pathVariables:r}))),c=await o({block_id:_.id});let d=[{direction:"descending",property:e.datePublished.notion}],y=Ot({config:t,pathVariables:r,routeType:n,slug:l}),h=a[n.toUpperCase()].database_id,m=await i({database_id:h,filter:y,sorts:d}),P=[];Dt(m.results,j=>{let D=x(j,"properties");D.properties=be(f({config:t,data:j,pageId:D.id,pathVariables:r})),D&&P.push(D)});let S=x(m,"results");S.results=P;let v=x(S,"data");return{content:c,images:{},info:_,items:v}},V=xt;import{sortObject as vt}from"@jeromefitz/utils";import Rt from"lodash/omit.js";var Nt=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getDeepFetchAllChildren:s,pathVariables:r,routeType:n,slug:l})=>{let{NOTION:a}=t,c=n?.toUpperCase();if(!Object.keys(a).includes(c))return{content:{},images:{},info:{},items:{}};let u=await i({database_id:a[c].database_id,filter:{and:[{...b.slug,rich_text:{equals:l}}]}}),p=u?.object==="list"&&u.results[0];if(!p)return{};let d=Rt(p,"properties");d.properties=vt(f({config:t,data:p,pageId:d.id,pathVariables:r}));let y=await o({block_id:d.id});return{content:[...await s({blocks:y.results})],images:{},info:d,items:{}}},H=Nt;import{sortObject as Ie}from"@jeromefitz/utils";import De from"lodash/omit.js";import Bt from"lodash/size.js";var Lt=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getQuery:s,pathVariables:r,routeType:n})=>{let{NOTION:l}=t,{meta:a}=r,c=n.toUpperCase(),[_,u]=a,p=Bt(a)===2,d=l[c]?.hasChild?.toUpperCase(),y=await i({database_id:l[p?l[d].routeType.toUpperCase():c].database_id,filter:{and:[{...b.slug,rich_text:{equals:p?u:_}}]}}),h=y?.object==="list"&&y.results[0];if(!h)return{content:{},images:{},info:{},items:{}};let m=De(h,"properties");m.properties=Ie(f({config:t,data:h,pageId:m.id,pathVariables:r}));let P=await o({block_id:m.id}),S={};return p||(S=await s({config:t,reqQuery:{databaseType:l[d].routeType.toUpperCase(),podcasts:m.id}})),{content:P,images:{},info:m,items:S}},Gt=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,pathVariables:s,routeType:r,slug:n})=>{let l=new Date().toISOString(),{NOTION:a}=t,{meta:c}=s,[_,u,p]=c,d=new Date(`${_||l.slice(0,4)}-${u||"01"}-${p||"01"}`),y=a[r.toUpperCase()]?.infoType?.notion??e.datePublished.notion,h=await i({database_id:a[r.toUpperCase()].database_id,filter:{and:[{date:{on_or_after:E(d,"")},property:y},{date:{before:E(d,"day")},property:y},{...b.slug,rich_text:{equals:n}}]}}),m=h?.object==="list"&&h.results[0];if(!m)return{content:{},images:{},info:{},items:{}};let P=De(m,"properties");return P.properties=Ie(f({config:t,data:m,pageId:P.id,pathVariables:s})),{content:await o({block_id:P.id}),images:{},info:P,items:{}}},At=async({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getQuery:s,pathVariables:r,routeType:n,slug:l})=>{let{NOTION:a,ROUTE_TYPES_BY_DATA_TYPES:c}=t;return a[n?.toUpperCase()]?.hasChild?await Lt({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,getQuery:s,pathVariables:r,routeType:n}):c[g.LISTING_BY_DATE].includes(n.toUpperCase())?await Gt({config:t,getBlocksByIdChildren:o,getDatabasesByIdQuery:i,pathVariables:r,routeType:n,slug:l}):{content:{},images:{},info:{},items:{}}},F=At;import{avoidRateLimit as Ut,isUndefined as Mt}from"@jeromefitz/utils";var Vt=async({getPagesRetrieve:t,page_id:o})=>Mt(o)?[]:(await Ut(0),await t({page_id:o})),Q=Vt;import Ce from"lodash/drop.js";import Ht from"lodash/dropRight.js";import Ft from"lodash/first.js";import Oe from"lodash/includes.js";import Qt from"lodash/isInteger.js";import Wt from"lodash/join.js";import Yt from"lodash/last.js";import xe from"lodash/size.js";var jt=({catchAll:t,config:o})=>{let{NOTION:i,PAGES__HOMEPAGE:s,ROUTE_META:r,ROUTE_TYPES:n}=o,l=xe(t),a=Ft(t),c=a.toUpperCase(),_=Yt(t),u=l>1&&Oe(r,c)?Ce(t):Ce(Ht(t)),p=a===_&&!Oe(n,c)?i.PAGES.routeType:a,d=a!==_&&!Qt(parseInt(_))?_:a,y=p===i.PAGES.routeType.toLowerCase(),h=d===a,m=!!u&&xe(u)!==0,P=y&&a===s?"":Wt(t,"/"),S={hasMeta:m,isIndex:h,isPage:y,meta:u,routeType:p,slug:d,url:P},v=G(S);return{...S,dataType:v}},W=jt;import{avoidRateLimit as zt,isObjectEmpty as $t}from"@jeromefitz/utils";import Kt from"lodash/map.js";import qt from"lodash/omit.js";import Zt from"lodash/size.js";var Jt=[{direction:"ascending",property:e.slug.notion}],Xt=async({config:t,notionDatabasesQuery:o,reqQuery:i})=>{let{NOTION:s}=t,{databaseType:r}=i,n=r,l=!1,a=r.toUpperCase(),c=s[a].database_id;if(!c)return[];let _={},u={},p,d;if(r==="EPISODES"){d=Jt;let{podcasts:y}=i,h=[],m=[];y&&m.push(...y?.split(",")),Zt(m)>0&&Kt(m,P=>h.push({property:e.relationEpisodes__Podcasts.notion,relation:{contains:P}})),p={or:[...h]}}else l=!0;if(!l&&(!_||$t(_))){await zt(0);let y;p?(p?.or.length===0&&(p={and:[{property:e.slug.notion,rich_text:{equals:"@hack(notion)-do-not-return"}}]}),y=await o({database_id:c,filter:p,sorts:d}),_=y,u=pe({config:t,results:y.results,routeType:n}),_=qt(_,"results"),_.results=u):l=!0}return _},Y=Xt;var ve=class extends eo{#e;custom={getBlocksByIdChildren:async o=>await R({...o,getBlocksChildrenList:this.blocks.children.list}),getDatabasesByIdQuery:async o=>await N({...o,getDatabasesQuery:this.databases.query}),getDeepFetchAllChildren:async o=>await B({...o,getBlocksChildrenList:this.blocks.children.list}),getInfoType:o=>L({...o,config:this.#e}),getPagesById:async o=>await Q({...o,getPagesRetrieve:this.pages.retrieve}),getPathVariables:o=>W({...o,config:this.#e}),getQuery:async o=>await Y({...o,config:this.#e,notionDatabasesQuery:this.databases.query})};dataTypes={[g.LISTING]:async o=>await M({...o,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[g.LISTING_BY_DATE]:async o=>await V({...o,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getPagesById:this.custom.getPagesById}),[g.SLUG]:async o=>await H({...o,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getDeepFetchAllChildren:this.custom.getDeepFetchAllChildren}),[g.SLUG_BY_ROUTE]:async o=>await F({...o,config:this.#e,getBlocksByIdChildren:this.custom.getBlocksByIdChildren,getDatabasesByIdQuery:this.custom.getDatabasesByIdQuery,getQuery:this.custom.getQuery})};constructor(o){super(o),this.#e=o?.config}};export{ve as Client};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{avoidRateLimit as i,isUndefined as a}from"@jeromefitz/utils";var r=async({block_id:t,getBlocksChildrenList:e})=>a(t)?[]:(await i(0),await e({block_id:t})),d=r;export{d as default};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SortItem } from '../../schema/index.js';
|
|
2
|
-
|
|
3
|
-
declare const getDatabasesByIdQuery: ({ database_id, filter, getDatabasesQuery, sorts, }: {
|
|
4
|
-
database_id: any;
|
|
5
|
-
filter?: any[] | undefined;
|
|
6
|
-
getDatabasesQuery: any;
|
|
7
|
-
sorts?: SortItem[] | undefined;
|
|
8
|
-
}) => Promise<any>;
|
|
9
|
-
|
|
10
|
-
export { getDatabasesByIdQuery as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import i from"lodash/filter.js";import m from"lodash/map.js";var t=({key:o,notion:s,type:r})=>({key:o,notion:s,type:r}),e={addressCity:{init:!0,key:"addressCity",notion:"Address.City",type:"rich_text"},addressLatitude:{format:"number",init:!0,key:"addressLatitude",notion:"Address.Latitude",type:"number"},addressLongitude:{format:"number",init:!0,key:"addressLongitude",notion:"Address.Longitude",type:"number"},addressNeighborhood:{init:!0,key:"addressNeighborhood",notion:"Address.Neighborhood",type:"rich_text"},addressState:{init:!0,key:"addressState",notion:"Address.State",type:"select"},addressStreet:{init:!0,key:"addressStreet",notion:"Address.Street",type:"rich_text"},addressZipCode:{format:"number",init:!0,key:"addressZipCode",notion:"Address.ZipCode",type:"number"},author:{init:!0,key:"author",notion:"Author",type:"rich_text"},authors:{init:!0,key:"authors",notion:"Authors",type:"people"},categories:{init:!0,key:"categories",notion:"Categories",type:"multi_select"},dateCreated:{init:!1,key:"dateCreated",notion:"Date.Created",type:"created_time"},dateEdited:{init:!1,key:"dateEdited",notion:"Date.Edited",type:"last_edited_time"},dateEvent:{init:!0,key:"dateEvent",notion:"Date.Event",type:"date"},datePublished:{init:!0,key:"datePublished",notion:"Date.Published",type:"date"},dateRecorded:{init:!0,key:"dateRecorded",notion:"Date.Recorded",type:"date"},duration:{init:!0,key:"duration",notion:"Duration",type:"rich_text"},email:{init:!0,key:"email",notion:"Email",type:"rich_text"},episode:{format:"number",init:!0,key:"episode",notion:"Episode",type:"number"},explicit:{init:!0,key:"explicit",notion:"Explicit",type:"checkbox"},festivals:{init:!0,key:"festivals",notion:"Festival",type:"multi_select"},food:{init:!0,key:"food",notion:"Food",type:"rich_text"},isIndexed:{init:!0,key:"isIndexed",notion:"Is.Indexed",type:"checkbox"},isPublished:{init:!0,key:"isPublished",notion:"Is.Published",type:"checkbox"},mp3:{init:!0,key:"mp3",notion:"MP3",type:"files"},name:{init:!0,key:"name",notion:"Name",type:"rich_text"},nameFirst:{init:!0,key:"nameFirst",notion:"Name.First",type:"rich_text"},nameLast:{init:!0,key:"nameLast",notion:"Name.Last",type:"rich_text"},namePreferred:{init:!0,key:"namePreferred",notion:"Name.Preferred",type:"rich_text"},phoneNumber:{init:!0,key:"phoneNumber",notion:"Phone",type:"rich_text"},podcastAuthor:{init:!0,key:"podcastAuthor",notion:"Author",type:"rich_text"},podcastAuthorEmail:{init:!0,key:"podcastAuthorEmail",notion:"Author.Email",type:"rich_text"},relationEpisodes__People_Guest:{init:!0,key:"relationEpisodes__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Episodes.Guest"},type:"relation"},relationEpisodes__People_Sound_Engineer:{init:!0,key:"relationEpisodes__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"People",synced_property_name:"Episodes.Sound.Engineer"},type:"relation"},relationEpisodes__People_Thanks:{init:!0,key:"relationEpisodes__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Episodes.Thanks"},type:"relation"},relationEpisodes__Podcasts:{init:!0,key:"relationEpisodes__Podcasts",notion:"Podcasts",relation:{database_id:"Podcasts",synced_property_name:"Episodes"},type:"relation"},relationEpisodes__Venues:{init:!0,key:"relationEpisodes__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Episodes"},type:"relation"},relationEvents__People_Guest:{init:!0,key:"relationEvents__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Events.Guest"},type:"relation"},relationEvents__People_Guest_Music:{init:!0,key:"relationEvents__People_Guest_Music",notion:"Guest.Music",relation:{database_id:"People",synced_property_name:"Events.Guest.Music"},type:"relation"},relationEvents__People_Host:{init:!0,key:"relationEvents__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Events.Host"},type:"relation"},relationEvents__Shows:{init:!0,key:"relationEvents__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Events"},type:"relation"},relationEvents__Shows_Lineup:{init:!0,key:"relationEvents__Shows_Lineup",notion:"Shows.Lineup",relation:{database_id:"Shows",synced_property_name:"Events.Lineup"},type:"relation"},relationEvents__Venues:{init:!0,key:"relationEvents__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Events"},type:"relation"},relationPeople__Episodes_Guest:{init:!1,key:"relationPeople__Episodes_Guest",notion:"Episodes.Guest",relation:{database_id:"Episodes",synced_property_name:"Guest"},type:"relation"},relationPeople__Episodes_Sound_Engineer:{init:!1,key:"relationPeople__Episodes_Sound_Engineer",notion:"Episodes.Sound.Engineer",relation:{database_id:"Episodes",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Episodes_Thanks:{init:!1,key:"relationPeople__Episodes_Thanks",notion:"Episodes.Thanks",relation:{database_id:"Episodes",synced_property_name:"Thanks"},type:"relation"},relationPeople__Events_Guest:{init:!1,key:"relationEvents__People_Guest",notion:"Events.Guest",relation:{database_id:"Events",synced_property_name:"Guest"},type:"relation"},relationPeople__Events_Guest_Music:{init:!1,key:"relationPeople__Events_Guest_Music",notion:"Events.Guest.Music",relation:{database_id:"Events",synced_property_name:"Guest.Music"},type:"relation"},relationPeople__Events_Host:{init:!1,key:"relationPeople__Events_Host",notion:"Events.Host",relation:{database_id:"Events",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Host:{init:!1,key:"relationPeople__Podcasts_Host",notion:"Podcasts.Host",relation:{database_id:"Podcasts",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Sound_Engineer:{init:!1,key:"relationPeople__Podcasts_Sound_Engineer",notion:"Podcasts.Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Shows_Cast:{init:!1,key:"relationPeople__Shows_Cast",notion:"Shows.Cast",relation:{database_id:"Shows",synced_property_name:"Cast"},type:"relation"},relationPeople__Shows_Cast_Past:{init:!1,key:"relationPeople__Shows_Cast_Past",notion:"Shows.Cast.Past",relation:{database_id:"Shows",synced_property_name:"Cast.Past"},type:"relation"},relationPeople__Shows_Crew:{init:!0,key:"relationPeople__Shows_Crew",notion:"Shows.Crew",relation:{database_id:"Shows",synced_property_name:"Crew"},type:"relation"},relationPeople__Shows_Director:{init:!1,key:"relationPeople__Shows_Director",notion:"Shows.Director",relation:{database_id:"Shows",synced_property_name:"Director"},type:"relation"},relationPeople__Shows_Director_Musical:{init:!1,key:"relationPeople__Shows_Director_Musical",notion:"Shows.Director.Musical",relation:{database_id:"Shows",synced_property_name:"Director.Musical"},type:"relation"},relationPeople__Shows_Director_Technical:{init:!1,key:"relationPeople__Shows_Director_Technical",notion:"Shows.Director.Technical",relation:{database_id:"Shows",synced_property_name:"Director.Technical"},type:"relation"},relationPeople__Shows_Producer:{init:!1,key:"relationPeople__Shows_Producer",notion:"Shows.Producer",relation:{database_id:"Shows",synced_property_name:"Producer"},type:"relation"},relationPeople__Shows_Thanks:{init:!1,key:"relationPeople__Shows_Thanks",notion:"Shows.Thanks",relation:{database_id:"Shows",synced_property_name:"Thanks"},type:"relation"},relationPeople__Shows_Writer:{init:!1,key:"relationPeople__Shows_Writer",notion:"Shows.Writer",relation:{database_id:"Shows",synced_property_name:"Writer"},type:"relation"},relationPodcasts__Episodes:{init:!1,key:"relationPodcasts__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Podcasts"},type:"relation"},relationPodcasts__People_Host:{init:!0,key:"relationPodcasts__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Podcasts.Host"},type:"relation"},relationPodcasts__People_Sound_Engineer:{init:!0,key:"relationPodcasts__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Podcasts.Sound.Engineer"},type:"relation"},relationShows__Events:{init:!1,key:"relationShows__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Shows"},type:"relation"},relationShows__Events_Lineup:{init:!1,key:"relationShows__Events_Lineup",notion:"Events.Lineup",relation:{database_id:"Events",synced_property_name:"Shows.Lineup"},type:"relation"},relationShows__People_Cast:{init:!0,key:"relationShows__People_Cast",notion:"Cast",relation:{database_id:"People",synced_property_name:"Shows.Cast"},type:"relation"},relationShows__People_Cast_Past:{init:!0,key:"relationShows__People_Cast_Past",notion:"Cast.Past",relation:{database_id:"People",synced_property_name:"Shows.Cast.Past"},type:"relation"},relationShows__People_Director:{init:!0,key:"relationShows__People_Director",notion:"Director",relation:{database_id:"People",synced_property_name:"Shows.Director"},type:"relation"},relationShows__People_Director_Musical:{init:!0,key:"relationShows__People_Director_Musical",notion:"Director.Musical",relation:{database_id:"People",synced_property_name:"Shows.Director.Musical"},type:"relation"},relationShows__People_Director_Technical:{init:!0,key:"relationShows__People_Director_Technical",notion:"Director.Technical",relation:{database_id:"People",synced_property_name:"Shows.Director.Technical"},type:"relation"},relationShows__People_Producer:{init:!0,key:"relationShows__People_Producer",notion:"Producer",relation:{database_id:"People",synced_property_name:"Shows.Producer"},type:"relation"},relationShows__People_Thanks:{init:!0,key:"relationShows__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Shows.Thanks"},type:"relation"},relationShows__People_Writer:{init:!0,key:"relationShows__People_Writer",notion:"Writer",relation:{database_id:"People",synced_property_name:"Shows.Writer"},type:"relation"},relationShows__Tags:{init:!0,key:"relationShows__Tags",notion:"Tags",relation:{database_id:"Tags",synced_property_name:"Shows"},type:"relation"},relationShows_People_Crew:{init:!0,key:"relationShows_People_Crew",notion:"Crew",relation:{database_id:"People",synced_property_name:"Shows.Crew"},type:"relation"},relationTags__Shows:{init:!1,key:"relationTags__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Tags"},type:"relation"},relationVenues__Episodes:{init:!1,key:"relationVenues__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Venues"},type:"relation"},relationVenues__Events:{init:!1,key:"relationVenues__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Venues"},type:"relation"},rollupEpisodes__Podcasts:{init:!1,key:"rollupEpisodes__Podcasts",notion:"Podcasts.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Title"},type:"rollup"},rollupEpisodes__PodcastsSlugs:{init:!1,key:"rollupEpisodes__PodcastsSlugs",notion:"Podcasts.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Slug"},type:"rollup"},rollupEvents__People_Cast:{init:!1,key:"rollupEvents__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Cast"},type:"rollup"},rollupEvents__People_Guest:{init:!1,key:"rollupEvents__People_Guest",notion:"Guest.Rollup",rollup:{function:"show_original",relation_property_name:"Guest",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Guest_Music:{init:!1,key:"rollupEvents__People_Guest_Music",notion:"Guest.Music.Rollup",rollup:{function:"show_original",relation_property_name:"Guest.Music",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Host:{init:!1,key:"rollupEvents__People_Host",notion:"Host.Rollup",rollup:{function:"show_original",relation_property_name:"Host",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows:{init:!1,key:"rollupEvents__Shows",notion:"Shows.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows_Lineup:{init:!1,key:"rollupEvents__Shows_Lineup",notion:"Shows.Lineup.Rollup",rollup:{function:"show_original",relation_property_name:"Shows.Lineup",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Venues:{init:!1,key:"rollupEvents__Venues",notion:"Venues.Rollup",rollup:{function:"show_original",relation_property_name:"Venues",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__Episodes:{init:!1,key:"rollupPodcasts__Episodes",notion:"Episodes.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__EpisodesSlugs:{init:!1,key:"rollupPodcasts__EpisodesSlugs",notion:"Episodes.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Slug"},type:"rollup"},rollupShows__People_Cast:{init:!1,key:"rollupShows__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Past:{init:!1,key:"rollupShows__People_Cast_Past",notion:"Cast.Past.Rollup",rollup:{function:"show_original",relation_property_name:"Cast.Past",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Slug:{init:!1,key:"rollupShows__People_Cast_Slug",notion:"Cast.Rollup.Slug",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_name:"Slug"},type:"rollup"},rollupShows__People_Crew:{init:!1,key:"rollupShows__People_Crew",notion:"Crew.Rollup",rollup:{function:"show_original",relation_property_name:"Crew",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director:{init:!1,key:"rollupShows__People_Director",notion:"Director.Rollup",rollup:{function:"show_original",relation_property_name:"Director",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Musical:{init:!1,key:"rollupShows__People_Director_Musical",notion:"Director.Musical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Musical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Technical:{init:!1,key:"rollupShows__People_Director_Technical",notion:"Director.Technical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Technical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Music:{init:!1,key:"rollupShows__People_Music",notion:"Music.Rollup",rollup:{function:"show_original",relation_property_name:"Music",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Producer:{init:!1,key:"rollupShows__People_Producer",notion:"Producer.Rollup",rollup:{function:"show_original",relation_property_name:"Producer",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Thanks:{init:!1,key:"rollupShows__People_Thanks",notion:"Thanks.Rollup",rollup:{function:"show_original",relation_property_name:"Thanks",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Writer:{init:!1,key:"rollupShows__People_Writer",notion:"Writer.Rollup",rollup:{function:"show_original",relation_property_name:"Writer",rollup_property_name:"Title"},type:"rollup"},rollupShows__Tags:{init:!1,key:"rollupShows__Tags",notion:"Tags.Rollup",rollup:{function:"show_original",relation_property_name:"Tags",rollup_property_id:"Title"},type:"rollup"},season:{format:"number",init:!0,key:"season",notion:"Season",type:"number"},seoDescription:{init:!0,key:"seoDescription",notion:"SEO.Description",type:"rich_text"},seoImage:{init:!0,key:"seoImage",notion:"SEO.Image",type:"files"},seoImageDescription:{init:!0,key:"seoImageDescription",notion:"SEO.Image.Description",type:"rich_text"},seoKeywords:{init:!0,key:"seoKeywords",notion:"SEO.Keywords",type:"rich_text"},slug:{init:!0,key:"slug",notion:"Slug",type:"rich_text"},socialApple:{init:!0,key:"socialApple",notion:"Social.Apple",type:"url"},socialFacebook:{init:!0,key:"socialFacebook",notion:"Social.Facebook",type:"url"},socialInstagram:{init:!0,key:"socialInstagram",notion:"Social.Instagram",type:"url"},socialSpotify:{init:!0,key:"socialSpotify",notion:"Social.Spotify",type:"url"},socialTwitter:{init:!0,key:"socialTwitter",notion:"Social.Twitter",type:"url"},socialWebsite:{init:!0,key:"socialWebsite",notion:"Social.Website",type:"url"},status:{init:!0,key:"status",notion:"Status",type:"select"},subtitle:{init:!0,key:"subtitle",notion:"Subtitle",type:"rich_text"},ticketUrl:{init:!0,key:"ticketUrl",notion:"TicketUrl",type:"url"},title:{init:!0,key:"title",notion:"Title",type:"title"},type:{init:!0,key:"type",notion:"Type",type:"select"}},n=[e.authors,e.datePublished,e.isIndexed,e.isPublished,e.slug,e.seoDescription,e.seoImage,e.seoImageDescription,e.seoKeywords,e.title],a=[...n],_=[...n,e.author,e.status,e.subtitle],p=[...n,e.dateRecorded,e.duration,e.episode,e.mp3,e.season,e.relationEpisodes__People_Guest,e.relationEpisodes__People_Sound_Engineer,e.relationEpisodes__People_Thanks,e.relationEpisodes__Podcasts,e.relationEpisodes__Venues,e.socialApple,e.socialSpotify,e.type,e.rollupEpisodes__Podcasts,e.rollupEpisodes__PodcastsSlugs],u=[...n,e.dateEvent,e.relationEvents__People_Guest_Music,e.relationEvents__People_Guest,e.relationEvents__People_Host,e.relationEvents__Shows_Lineup,e.relationEvents__Shows,e.relationEvents__Venues,e.socialFacebook,e.socialWebsite,e.ticketUrl,e.rollupEvents__People_Cast,e.rollupEvents__People_Guest_Music,e.rollupEvents__People_Guest,e.rollupEvents__People_Host,e.rollupEvents__Shows_Lineup,e.rollupEvents__Shows,e.rollupEvents__Venues],d=[...n],y=[...n,e.email,e.nameFirst,e.nameLast,e.namePreferred,e.relationPeople__Episodes_Guest,e.relationPeople__Episodes_Sound_Engineer,e.relationPeople__Episodes_Thanks,e.relationPeople__Events_Guest,e.relationPeople__Events_Guest_Music,e.relationPeople__Events_Host,e.relationPeople__Podcasts_Host,e.relationPeople__Podcasts_Sound_Engineer,e.relationPeople__Shows_Cast,e.relationPeople__Shows_Cast_Past,e.relationPeople__Shows_Director,e.relationPeople__Shows_Director_Musical,e.relationPeople__Shows_Director_Technical,e.relationPeople__Shows_Producer,e.relationPeople__Shows_Thanks,e.relationPeople__Shows_Writer],c=[...n,e.categories,e.explicit,e.podcastAuthor,e.podcastAuthorEmail,e.relationPodcasts__People_Host,e.relationPodcasts__People_Sound_Engineer,e.socialApple,e.socialSpotify,e.type,e.relationPodcasts__Episodes,e.rollupPodcasts__Episodes,e.rollupPodcasts__EpisodesSlugs],h=[...n],P=[...n,e.relationShows__People_Cast,e.relationShows__People_Cast_Past,e.relationShows__People_Director,e.relationShows__People_Director_Musical,e.relationShows__People_Director_Technical,e.relationShows__People_Producer,e.relationShows__People_Thanks,e.relationShows__People_Writer,e.relationShows__Tags,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationShows__Events,e.relationShows__Events_Lineup,e.rollupShows__People_Cast,e.rollupShows__People_Cast_Slug,e.rollupShows__People_Cast_Past,e.rollupShows__People_Crew,e.rollupShows__People_Director,e.rollupShows__People_Director_Musical,e.rollupShows__People_Director_Technical,e.rollupShows__People_Music,e.rollupShows__People_Producer,e.rollupShows__People_Thanks,e.rollupShows__People_Writer,e.rollupShows__Tags],S=[...n,e.addressCity,e.addressLatitude,e.addressLongitude,e.addressNeighborhood,e.addressState,e.addressStreet,e.addressZipCode,e.phoneNumber,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationVenues__Episodes,e.relationVenues__Events],G={BLOG:i(a,{init:!0}),BOOKS:i(_,{init:!0}),EPISODES:i(p,{init:!0}),EVENTS:i(u,{init:!0}),PAGES:i(d,{init:!0}),PEOPLE:i(y,{init:!0}),PODCASTS:i(c,{init:!0}),SEO:i(h,{init:!0}),SHOWS:i(P,{init:!0}),VENUES:i(S,{init:!0})},L={BLOG:a.map(o=>t(o)),BOOKS:_.map(o=>t(o)),EPISODES:p.map(o=>t(o)),EVENTS:u.map(o=>t(o)),PAGES:d.map(o=>t(o)),PEOPLE:y.map(o=>t(o)),PODCASTS:c.map(o=>t(o)),SEO:h.map(o=>t(o)),SHOWS:P.map(o=>t(o)),VENUES:S.map(o=>t(o))},O=m(e,o=>t(o)),l=new Date().toISOString(),I={dateBefore:{date:{before:l},property:e.datePublished.notion},dateOnOrAfter:{date:{on_or_after:l},property:e.datePublished.notion},published:{checkbox:{equals:!1},property:e.isPublished.notion},slug:{property:e.slug.notion,rich_text:{equals:""}}},k="LISTING",T="LISTING_BY_DATE",g="SLUG",f="SLUG_BY_ROUTE",b=[k,T,g,f],R=Object.assign({},...b.map(o=>({[o]:o})).flat(1));var E={sorts:[{direction:"ascending",property:e.slug.notion}]},v=async({database_id:o,filter:s=E?.filter,getDatabasesQuery:r,sorts:w=E?.sorts})=>o?await r({database_id:o,filter:s,sorts:w}):[],A=v;export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=async({blocks:n,getBlocksChildrenList:a})=>{if(n==null)return n;let t=n.filter(e=>e.has_children).map(e=>{let{id:r}=e;return{parent_block:e,promise:a({block_id:r,page_size:100})}}),i=await Promise.all(t.map(e=>e.promise));for(let e=0;e<i.length;e++){let r=i[e].results;if(await l({blocks:r,getBlocksChildrenList:a}),t[e]){let s=t[e].parent_block;s[s.type].children=r}}return n},d=l;export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=({config:o,item:c,meta:p,routeType:s})=>{let{NOTION:t}=o,r="",a=c.properties?.slug,e="",l="/[...catchAll]";switch(s){case t.BLOG.routeType:case t.EVENTS.routeType:r=c.properties[t[s.toUpperCase()].infoType.key]?.start.slice(0,10);let[n,$,i]=r?.split("-");e=`/${s}/${n}/${$}/${i}/${a}`;break;case t.PODCASTS.routeType:case t.EPISODES.routeType:e=`/${p?.join("/")}/${a}`;break;default:e=`/${s}/${a}`;break}return e=e.replace("//","/"),{as:e,date:r,href:l,slug:a}},y=u;export{y as default};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare const getNotionListing: ({ config, getBlocksByIdChildren, getDatabasesByIdQuery, getPagesById, pathVariables, routeType, }: {
|
|
2
|
-
config: any;
|
|
3
|
-
getBlocksByIdChildren: any;
|
|
4
|
-
getDatabasesByIdQuery: any;
|
|
5
|
-
getPagesById: any;
|
|
6
|
-
pathVariables: any;
|
|
7
|
-
routeType: any;
|
|
8
|
-
}) => Promise<{
|
|
9
|
-
content?: undefined;
|
|
10
|
-
images?: undefined;
|
|
11
|
-
info?: undefined;
|
|
12
|
-
items?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
content: any;
|
|
15
|
-
images: {};
|
|
16
|
-
info: any;
|
|
17
|
-
items: Pick<any, string | number | symbol>;
|
|
18
|
-
}>;
|
|
19
|
-
|
|
20
|
-
export { getNotionListing as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{sortObject as ee}from"@jeromefitz/utils";import Me from"lodash/map.js";import g from"lodash/omit.js";import u from"lodash/filter.js";import te from"lodash/map.js";var _=({key:o,notion:t,type:i})=>({key:o,notion:t,type:i}),e={addressCity:{init:!0,key:"addressCity",notion:"Address.City",type:"rich_text"},addressLatitude:{format:"number",init:!0,key:"addressLatitude",notion:"Address.Latitude",type:"number"},addressLongitude:{format:"number",init:!0,key:"addressLongitude",notion:"Address.Longitude",type:"number"},addressNeighborhood:{init:!0,key:"addressNeighborhood",notion:"Address.Neighborhood",type:"rich_text"},addressState:{init:!0,key:"addressState",notion:"Address.State",type:"select"},addressStreet:{init:!0,key:"addressStreet",notion:"Address.Street",type:"rich_text"},addressZipCode:{format:"number",init:!0,key:"addressZipCode",notion:"Address.ZipCode",type:"number"},author:{init:!0,key:"author",notion:"Author",type:"rich_text"},authors:{init:!0,key:"authors",notion:"Authors",type:"people"},categories:{init:!0,key:"categories",notion:"Categories",type:"multi_select"},dateCreated:{init:!1,key:"dateCreated",notion:"Date.Created",type:"created_time"},dateEdited:{init:!1,key:"dateEdited",notion:"Date.Edited",type:"last_edited_time"},dateEvent:{init:!0,key:"dateEvent",notion:"Date.Event",type:"date"},datePublished:{init:!0,key:"datePublished",notion:"Date.Published",type:"date"},dateRecorded:{init:!0,key:"dateRecorded",notion:"Date.Recorded",type:"date"},duration:{init:!0,key:"duration",notion:"Duration",type:"rich_text"},email:{init:!0,key:"email",notion:"Email",type:"rich_text"},episode:{format:"number",init:!0,key:"episode",notion:"Episode",type:"number"},explicit:{init:!0,key:"explicit",notion:"Explicit",type:"checkbox"},festivals:{init:!0,key:"festivals",notion:"Festival",type:"multi_select"},food:{init:!0,key:"food",notion:"Food",type:"rich_text"},isIndexed:{init:!0,key:"isIndexed",notion:"Is.Indexed",type:"checkbox"},isPublished:{init:!0,key:"isPublished",notion:"Is.Published",type:"checkbox"},mp3:{init:!0,key:"mp3",notion:"MP3",type:"files"},name:{init:!0,key:"name",notion:"Name",type:"rich_text"},nameFirst:{init:!0,key:"nameFirst",notion:"Name.First",type:"rich_text"},nameLast:{init:!0,key:"nameLast",notion:"Name.Last",type:"rich_text"},namePreferred:{init:!0,key:"namePreferred",notion:"Name.Preferred",type:"rich_text"},phoneNumber:{init:!0,key:"phoneNumber",notion:"Phone",type:"rich_text"},podcastAuthor:{init:!0,key:"podcastAuthor",notion:"Author",type:"rich_text"},podcastAuthorEmail:{init:!0,key:"podcastAuthorEmail",notion:"Author.Email",type:"rich_text"},relationEpisodes__People_Guest:{init:!0,key:"relationEpisodes__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Episodes.Guest"},type:"relation"},relationEpisodes__People_Sound_Engineer:{init:!0,key:"relationEpisodes__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"People",synced_property_name:"Episodes.Sound.Engineer"},type:"relation"},relationEpisodes__People_Thanks:{init:!0,key:"relationEpisodes__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Episodes.Thanks"},type:"relation"},relationEpisodes__Podcasts:{init:!0,key:"relationEpisodes__Podcasts",notion:"Podcasts",relation:{database_id:"Podcasts",synced_property_name:"Episodes"},type:"relation"},relationEpisodes__Venues:{init:!0,key:"relationEpisodes__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Episodes"},type:"relation"},relationEvents__People_Guest:{init:!0,key:"relationEvents__People_Guest",notion:"Guest",relation:{database_id:"People",synced_property_name:"Events.Guest"},type:"relation"},relationEvents__People_Guest_Music:{init:!0,key:"relationEvents__People_Guest_Music",notion:"Guest.Music",relation:{database_id:"People",synced_property_name:"Events.Guest.Music"},type:"relation"},relationEvents__People_Host:{init:!0,key:"relationEvents__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Events.Host"},type:"relation"},relationEvents__Shows:{init:!0,key:"relationEvents__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Events"},type:"relation"},relationEvents__Shows_Lineup:{init:!0,key:"relationEvents__Shows_Lineup",notion:"Shows.Lineup",relation:{database_id:"Shows",synced_property_name:"Events.Lineup"},type:"relation"},relationEvents__Venues:{init:!0,key:"relationEvents__Venues",notion:"Venues",relation:{database_id:"Venues",synced_property_name:"Events"},type:"relation"},relationPeople__Episodes_Guest:{init:!1,key:"relationPeople__Episodes_Guest",notion:"Episodes.Guest",relation:{database_id:"Episodes",synced_property_name:"Guest"},type:"relation"},relationPeople__Episodes_Sound_Engineer:{init:!1,key:"relationPeople__Episodes_Sound_Engineer",notion:"Episodes.Sound.Engineer",relation:{database_id:"Episodes",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Episodes_Thanks:{init:!1,key:"relationPeople__Episodes_Thanks",notion:"Episodes.Thanks",relation:{database_id:"Episodes",synced_property_name:"Thanks"},type:"relation"},relationPeople__Events_Guest:{init:!1,key:"relationEvents__People_Guest",notion:"Events.Guest",relation:{database_id:"Events",synced_property_name:"Guest"},type:"relation"},relationPeople__Events_Guest_Music:{init:!1,key:"relationPeople__Events_Guest_Music",notion:"Events.Guest.Music",relation:{database_id:"Events",synced_property_name:"Guest.Music"},type:"relation"},relationPeople__Events_Host:{init:!1,key:"relationPeople__Events_Host",notion:"Events.Host",relation:{database_id:"Events",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Host:{init:!1,key:"relationPeople__Podcasts_Host",notion:"Podcasts.Host",relation:{database_id:"Podcasts",synced_property_name:"Host"},type:"relation"},relationPeople__Podcasts_Sound_Engineer:{init:!1,key:"relationPeople__Podcasts_Sound_Engineer",notion:"Podcasts.Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Sound.Engineer"},type:"relation"},relationPeople__Shows_Cast:{init:!1,key:"relationPeople__Shows_Cast",notion:"Shows.Cast",relation:{database_id:"Shows",synced_property_name:"Cast"},type:"relation"},relationPeople__Shows_Cast_Past:{init:!1,key:"relationPeople__Shows_Cast_Past",notion:"Shows.Cast.Past",relation:{database_id:"Shows",synced_property_name:"Cast.Past"},type:"relation"},relationPeople__Shows_Crew:{init:!0,key:"relationPeople__Shows_Crew",notion:"Shows.Crew",relation:{database_id:"Shows",synced_property_name:"Crew"},type:"relation"},relationPeople__Shows_Director:{init:!1,key:"relationPeople__Shows_Director",notion:"Shows.Director",relation:{database_id:"Shows",synced_property_name:"Director"},type:"relation"},relationPeople__Shows_Director_Musical:{init:!1,key:"relationPeople__Shows_Director_Musical",notion:"Shows.Director.Musical",relation:{database_id:"Shows",synced_property_name:"Director.Musical"},type:"relation"},relationPeople__Shows_Director_Technical:{init:!1,key:"relationPeople__Shows_Director_Technical",notion:"Shows.Director.Technical",relation:{database_id:"Shows",synced_property_name:"Director.Technical"},type:"relation"},relationPeople__Shows_Producer:{init:!1,key:"relationPeople__Shows_Producer",notion:"Shows.Producer",relation:{database_id:"Shows",synced_property_name:"Producer"},type:"relation"},relationPeople__Shows_Thanks:{init:!1,key:"relationPeople__Shows_Thanks",notion:"Shows.Thanks",relation:{database_id:"Shows",synced_property_name:"Thanks"},type:"relation"},relationPeople__Shows_Writer:{init:!1,key:"relationPeople__Shows_Writer",notion:"Shows.Writer",relation:{database_id:"Shows",synced_property_name:"Writer"},type:"relation"},relationPodcasts__Episodes:{init:!1,key:"relationPodcasts__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Podcasts"},type:"relation"},relationPodcasts__People_Host:{init:!0,key:"relationPodcasts__People_Host",notion:"Host",relation:{database_id:"People",synced_property_name:"Podcasts.Host"},type:"relation"},relationPodcasts__People_Sound_Engineer:{init:!0,key:"relationPodcasts__People_Sound_Engineer",notion:"Sound.Engineer",relation:{database_id:"Podcasts",synced_property_name:"Podcasts.Sound.Engineer"},type:"relation"},relationShows__Events:{init:!1,key:"relationShows__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Shows"},type:"relation"},relationShows__Events_Lineup:{init:!1,key:"relationShows__Events_Lineup",notion:"Events.Lineup",relation:{database_id:"Events",synced_property_name:"Shows.Lineup"},type:"relation"},relationShows__People_Cast:{init:!0,key:"relationShows__People_Cast",notion:"Cast",relation:{database_id:"People",synced_property_name:"Shows.Cast"},type:"relation"},relationShows__People_Cast_Past:{init:!0,key:"relationShows__People_Cast_Past",notion:"Cast.Past",relation:{database_id:"People",synced_property_name:"Shows.Cast.Past"},type:"relation"},relationShows__People_Director:{init:!0,key:"relationShows__People_Director",notion:"Director",relation:{database_id:"People",synced_property_name:"Shows.Director"},type:"relation"},relationShows__People_Director_Musical:{init:!0,key:"relationShows__People_Director_Musical",notion:"Director.Musical",relation:{database_id:"People",synced_property_name:"Shows.Director.Musical"},type:"relation"},relationShows__People_Director_Technical:{init:!0,key:"relationShows__People_Director_Technical",notion:"Director.Technical",relation:{database_id:"People",synced_property_name:"Shows.Director.Technical"},type:"relation"},relationShows__People_Producer:{init:!0,key:"relationShows__People_Producer",notion:"Producer",relation:{database_id:"People",synced_property_name:"Shows.Producer"},type:"relation"},relationShows__People_Thanks:{init:!0,key:"relationShows__People_Thanks",notion:"Thanks",relation:{database_id:"People",synced_property_name:"Shows.Thanks"},type:"relation"},relationShows__People_Writer:{init:!0,key:"relationShows__People_Writer",notion:"Writer",relation:{database_id:"People",synced_property_name:"Shows.Writer"},type:"relation"},relationShows__Tags:{init:!0,key:"relationShows__Tags",notion:"Tags",relation:{database_id:"Tags",synced_property_name:"Shows"},type:"relation"},relationShows_People_Crew:{init:!0,key:"relationShows_People_Crew",notion:"Crew",relation:{database_id:"People",synced_property_name:"Shows.Crew"},type:"relation"},relationTags__Shows:{init:!1,key:"relationTags__Shows",notion:"Shows",relation:{database_id:"Shows",synced_property_name:"Tags"},type:"relation"},relationVenues__Episodes:{init:!1,key:"relationVenues__Episodes",notion:"Episodes",relation:{database_id:"Episodes",synced_property_name:"Venues"},type:"relation"},relationVenues__Events:{init:!1,key:"relationVenues__Events",notion:"Events",relation:{database_id:"Events",synced_property_name:"Venues"},type:"relation"},rollupEpisodes__Podcasts:{init:!1,key:"rollupEpisodes__Podcasts",notion:"Podcasts.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Title"},type:"rollup"},rollupEpisodes__PodcastsSlugs:{init:!1,key:"rollupEpisodes__PodcastsSlugs",notion:"Podcasts.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Podcasts",rollup_property_id:"Slug"},type:"rollup"},rollupEvents__People_Cast:{init:!1,key:"rollupEvents__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Cast"},type:"rollup"},rollupEvents__People_Guest:{init:!1,key:"rollupEvents__People_Guest",notion:"Guest.Rollup",rollup:{function:"show_original",relation_property_name:"Guest",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Guest_Music:{init:!1,key:"rollupEvents__People_Guest_Music",notion:"Guest.Music.Rollup",rollup:{function:"show_original",relation_property_name:"Guest.Music",rollup_property_id:"Title"},type:"rollup"},rollupEvents__People_Host:{init:!1,key:"rollupEvents__People_Host",notion:"Host.Rollup",rollup:{function:"show_original",relation_property_name:"Host",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows:{init:!1,key:"rollupEvents__Shows",notion:"Shows.Rollup",rollup:{function:"show_original",relation_property_name:"Shows",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Shows_Lineup:{init:!1,key:"rollupEvents__Shows_Lineup",notion:"Shows.Lineup.Rollup",rollup:{function:"show_original",relation_property_name:"Shows.Lineup",rollup_property_id:"Title"},type:"rollup"},rollupEvents__Venues:{init:!1,key:"rollupEvents__Venues",notion:"Venues.Rollup",rollup:{function:"show_original",relation_property_name:"Venues",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__Episodes:{init:!1,key:"rollupPodcasts__Episodes",notion:"Episodes.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Title"},type:"rollup"},rollupPodcasts__EpisodesSlugs:{init:!1,key:"rollupPodcasts__EpisodesSlugs",notion:"Episodes.Slug.Rollup",rollup:{function:"show_original",relation_property_name:"Episodes",rollup_property_id:"Slug"},type:"rollup"},rollupShows__People_Cast:{init:!1,key:"rollupShows__People_Cast",notion:"Cast.Rollup",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Past:{init:!1,key:"rollupShows__People_Cast_Past",notion:"Cast.Past.Rollup",rollup:{function:"show_original",relation_property_name:"Cast.Past",rollup_property_id:"Title"},type:"rollup"},rollupShows__People_Cast_Slug:{init:!1,key:"rollupShows__People_Cast_Slug",notion:"Cast.Rollup.Slug",rollup:{function:"show_original",relation_property_name:"Cast",rollup_property_name:"Slug"},type:"rollup"},rollupShows__People_Crew:{init:!1,key:"rollupShows__People_Crew",notion:"Crew.Rollup",rollup:{function:"show_original",relation_property_name:"Crew",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director:{init:!1,key:"rollupShows__People_Director",notion:"Director.Rollup",rollup:{function:"show_original",relation_property_name:"Director",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Musical:{init:!1,key:"rollupShows__People_Director_Musical",notion:"Director.Musical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Musical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Director_Technical:{init:!1,key:"rollupShows__People_Director_Technical",notion:"Director.Technical.Rollup",rollup:{function:"show_original",relation_property_name:"Director.Technical",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Music:{init:!1,key:"rollupShows__People_Music",notion:"Music.Rollup",rollup:{function:"show_original",relation_property_name:"Music",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Producer:{init:!1,key:"rollupShows__People_Producer",notion:"Producer.Rollup",rollup:{function:"show_original",relation_property_name:"Producer",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Thanks:{init:!1,key:"rollupShows__People_Thanks",notion:"Thanks.Rollup",rollup:{function:"show_original",relation_property_name:"Thanks",rollup_property_name:"Title"},type:"rollup"},rollupShows__People_Writer:{init:!1,key:"rollupShows__People_Writer",notion:"Writer.Rollup",rollup:{function:"show_original",relation_property_name:"Writer",rollup_property_name:"Title"},type:"rollup"},rollupShows__Tags:{init:!1,key:"rollupShows__Tags",notion:"Tags.Rollup",rollup:{function:"show_original",relation_property_name:"Tags",rollup_property_id:"Title"},type:"rollup"},season:{format:"number",init:!0,key:"season",notion:"Season",type:"number"},seoDescription:{init:!0,key:"seoDescription",notion:"SEO.Description",type:"rich_text"},seoImage:{init:!0,key:"seoImage",notion:"SEO.Image",type:"files"},seoImageDescription:{init:!0,key:"seoImageDescription",notion:"SEO.Image.Description",type:"rich_text"},seoKeywords:{init:!0,key:"seoKeywords",notion:"SEO.Keywords",type:"rich_text"},slug:{init:!0,key:"slug",notion:"Slug",type:"rich_text"},socialApple:{init:!0,key:"socialApple",notion:"Social.Apple",type:"url"},socialFacebook:{init:!0,key:"socialFacebook",notion:"Social.Facebook",type:"url"},socialInstagram:{init:!0,key:"socialInstagram",notion:"Social.Instagram",type:"url"},socialSpotify:{init:!0,key:"socialSpotify",notion:"Social.Spotify",type:"url"},socialTwitter:{init:!0,key:"socialTwitter",notion:"Social.Twitter",type:"url"},socialWebsite:{init:!0,key:"socialWebsite",notion:"Social.Website",type:"url"},status:{init:!0,key:"status",notion:"Status",type:"select"},subtitle:{init:!0,key:"subtitle",notion:"Subtitle",type:"rich_text"},ticketUrl:{init:!0,key:"ticketUrl",notion:"TicketUrl",type:"url"},title:{init:!0,key:"title",notion:"Title",type:"title"},type:{init:!0,key:"type",notion:"Type",type:"select"}},d=[e.authors,e.datePublished,e.isIndexed,e.isPublished,e.slug,e.seoDescription,e.seoImage,e.seoImageDescription,e.seoKeywords,e.title],C=[...d],x=[...d,e.author,e.status,e.subtitle],O=[...d,e.dateRecorded,e.duration,e.episode,e.mp3,e.season,e.relationEpisodes__People_Guest,e.relationEpisodes__People_Sound_Engineer,e.relationEpisodes__People_Thanks,e.relationEpisodes__Podcasts,e.relationEpisodes__Venues,e.socialApple,e.socialSpotify,e.type,e.rollupEpisodes__Podcasts,e.rollupEpisodes__PodcastsSlugs],G=[...d,e.dateEvent,e.relationEvents__People_Guest_Music,e.relationEvents__People_Guest,e.relationEvents__People_Host,e.relationEvents__Shows_Lineup,e.relationEvents__Shows,e.relationEvents__Venues,e.socialFacebook,e.socialWebsite,e.ticketUrl,e.rollupEvents__People_Cast,e.rollupEvents__People_Guest_Music,e.rollupEvents__People_Guest,e.rollupEvents__People_Host,e.rollupEvents__Shows_Lineup,e.rollupEvents__Shows,e.rollupEvents__Venues],I=[...d],L=[...d,e.email,e.nameFirst,e.nameLast,e.namePreferred,e.relationPeople__Episodes_Guest,e.relationPeople__Episodes_Sound_Engineer,e.relationPeople__Episodes_Thanks,e.relationPeople__Events_Guest,e.relationPeople__Events_Guest_Music,e.relationPeople__Events_Host,e.relationPeople__Podcasts_Host,e.relationPeople__Podcasts_Sound_Engineer,e.relationPeople__Shows_Cast,e.relationPeople__Shows_Cast_Past,e.relationPeople__Shows_Director,e.relationPeople__Shows_Director_Musical,e.relationPeople__Shows_Director_Technical,e.relationPeople__Shows_Producer,e.relationPeople__Shows_Thanks,e.relationPeople__Shows_Writer],R=[...d,e.categories,e.explicit,e.podcastAuthor,e.podcastAuthorEmail,e.relationPodcasts__People_Host,e.relationPodcasts__People_Sound_Engineer,e.socialApple,e.socialSpotify,e.type,e.relationPodcasts__Episodes,e.rollupPodcasts__Episodes,e.rollupPodcasts__EpisodesSlugs],A=[...d],M=[...d,e.relationShows__People_Cast,e.relationShows__People_Cast_Past,e.relationShows__People_Director,e.relationShows__People_Director_Musical,e.relationShows__People_Director_Technical,e.relationShows__People_Producer,e.relationShows__People_Thanks,e.relationShows__People_Writer,e.relationShows__Tags,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationShows__Events,e.relationShows__Events_Lineup,e.rollupShows__People_Cast,e.rollupShows__People_Cast_Slug,e.rollupShows__People_Cast_Past,e.rollupShows__People_Crew,e.rollupShows__People_Director,e.rollupShows__People_Director_Musical,e.rollupShows__People_Director_Technical,e.rollupShows__People_Music,e.rollupShows__People_Producer,e.rollupShows__People_Thanks,e.rollupShows__People_Writer,e.rollupShows__Tags],N=[...d,e.addressCity,e.addressLatitude,e.addressLongitude,e.addressNeighborhood,e.addressState,e.addressStreet,e.addressZipCode,e.phoneNumber,e.socialFacebook,e.socialInstagram,e.socialTwitter,e.socialWebsite,e.relationVenues__Episodes,e.relationVenues__Events],Ve={BLOG:u(C,{init:!0}),BOOKS:u(x,{init:!0}),EPISODES:u(O,{init:!0}),EVENTS:u(G,{init:!0}),PAGES:u(I,{init:!0}),PEOPLE:u(L,{init:!0}),PODCASTS:u(R,{init:!0}),SEO:u(A,{init:!0}),SHOWS:u(M,{init:!0}),VENUES:u(N,{init:!0})},H={BLOG:C.map(o=>_(o)),BOOKS:x.map(o=>_(o)),EPISODES:O.map(o=>_(o)),EVENTS:G.map(o=>_(o)),PAGES:I.map(o=>_(o)),PEOPLE:L.map(o=>_(o)),PODCASTS:R.map(o=>_(o)),SEO:A.map(o=>_(o)),SHOWS:M.map(o=>_(o)),VENUES:N.map(o=>_(o))},U=te(e,o=>_(o)),v=new Date().toISOString(),We={dateBefore:{date:{before:v},property:e.datePublished.notion},dateOnOrAfter:{date:{on_or_after:v},property:e.datePublished.notion},published:{checkbox:{equals:!1},property:e.isPublished.notion},slug:{property:e.slug.notion,rich_text:{equals:""}}},ie="LISTING",ne="LISTING_BY_DATE",re="SLUG",se="SLUG_BY_ROUTE",le=[ie,ne,re,se],Fe=Object.assign({},...le.map(o=>({[o]:o})).flat(1));import ae from"lodash/map.js";var pe=({config:o,data:t,pageId:i,pathVariables:s})=>{let{NOTION:n}=o,r={};if(!t?.properties)return r;let{properties:l}=t,a="";if(s){let{meta:p,routeType:y}=s;a=y===n?.PODCASTS?.routeType&&p.length>1?n?.EPISODES?.routeType:y}let h=a?H[a.toUpperCase()]:U;return ae(h,p=>{let y,P=l[p.notion];r[p.key]=null,P&&(y=c[p.type](P,i),r[p.key]=y||null)}),r},S=pe;var _e=o=>(console.dir("@notion(_unsupported)"),o),E=_e;var ue=o=>o.checkbox||!1,V=ue;var de=o=>{let{type:t}=o;return o[t]},w=de;var ye=o=>o.email||null,W=ye;import{stringToUUID as ce}from"@jeromefitz/utils";import he from"github-slugger";import Pe from"lodash/size.js";var me="https://www.notion.so/image/{{FILENAME}}?table=block&id={{PAGE_ID}}&cache=v2&w1dth=600",Se=(o,t)=>me.replace("{{FILENAME}}",encodeURIComponent(o)).replace("{{PAGE_ID}}",ce(t)),Ee=(o,t)=>{let i=new he,s={};return Pe(o.files)<=0||o.files.map(n=>{if(n?.type==="file"){let r=n?.file?.url.split("?")[0],l=i.slug(r);s[l]={type:n?.type,url:Se(r,t)}}if(n?.type==="external"){let r=n?.external?.url.split("?")[0],l=i.slug(r);s[l]={type:n?.type,url:r}}}),s},k=Ee;import we from"github-slugger";import fe from"lodash/map.js";var ke=o=>{let t=new we,i={};return fe(o.multi_select,s=>{let n=s;n.slug=t.slug(n.name),i[n.id]=n}),i},F=ke;var ge=o=>o?.number||null,B=ge;import Te from"github-slugger";var be=o=>{let t=new Te;return o.people.map(i=>{let{avatar_url:s,id:n,name:r,person:l}=i,{email:a}=l;return{[t.slug(r)]:{avatar_url:s,email:a,id:n,name:r}}})[0]},K=be;var De=o=>o?.phone_number||null,j=De;import z from"lodash/map.js";var ve=o=>o.type==="rollup"?o.rollup.type==="array"&&z(o.rollup.array,t=>c[t.type](t))[0]:z(o.relation,t=>t.id),Y=ve;var Ce=o=>o?.rich_text?o?.rich_text[0]?.plain_text:null,Z=Ce;import q from"lodash/map.js";import xe from"lodash/sortBy.js";var Oe=o=>{let t=o?.rollup;return xe(q(t?.array,i=>q(i[i?.type],s=>c[i?.type]({[i?.type]:[s],type:i?.type})))).flat()},Q=Oe;import Ge from"github-slugger";var Ie=o=>{let t=new Ge,i=o.select;return i?(i.slug=t.slug(o.select.name),{[i.id]:i}):null},J=Ie;var Le=o=>o?.title?o?.title[0]?.plain_text:null,X=Le;var Re=o=>o.url||null,$=Re;var Ae={checkbox:V,created_by:E,created_time:w,date:w,email:W,files:k,formula:E,image:k,last_edited_by:E,last_edited_time:w,multi_select:F,number:B,people:K,phone_number:j,relation:Y,rich_text:Z,rollup:Q,select:J,title:X,url:$},c=Ae;var Ne=async({config:o,getBlocksByIdChildren:t,getDatabasesByIdQuery:i,getPagesById:s,pathVariables:n,routeType:r})=>{let{NOTION:l}=o,a={},h=l[r.toUpperCase()].page_id__seo,p=await s({page_id:h});if(!p)return{};p?.object==="page"&&(a=g(p,"properties"),a.properties=ee(S({config:o,data:p,pageId:a.id,pathVariables:n})));let y=l[r.toUpperCase()].infoType.notion??e.datePublished.notion,P=y===e.datePublished.notion?new Date("2020-01-01").toISOString():new Date().toISOString(),oe=await t({block_id:a.id}),T=await i({database_id:l[r.toUpperCase()].database_id,filter:{and:[{date:{on_or_after:P},property:y}]}}),b=[];Me(T.results,f=>{let m=f;m=g(m,"properties"),m.properties=ee(S({config:o,data:f,pageId:f.id,pathVariables:n})),b.push(m)});let D=g(T,"results");return D.results=b,{content:oe,images:{},info:a,items:D}},zo=Ne;export{zo as default};
|