@uptime.app/contracts 3.0.53-rc.1 → 3.0.54-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-hack/app-hack-metadata.d.ts +0 -1
- package/dist/cjs/app-hack/app-hack-metadata.d.ts.map +1 -1
- package/dist/cjs/cms-hack/cms-searchable-hack.d.ts +0 -2
- package/dist/cjs/cms-hack/cms-searchable-hack.d.ts.map +1 -1
- package/dist/cjs/draft-hack/draft-hack.d.ts +0 -2
- package/dist/cjs/draft-hack/draft-hack.d.ts.map +1 -1
- package/dist/cjs/enriched-hack/enriched-hack.d.ts +0 -2
- package/dist/cjs/enriched-hack/enriched-hack.d.ts.map +1 -1
- package/dist/cjs/hack/hack.d.ts +0 -2
- package/dist/cjs/hack/hack.d.ts.map +1 -1
- package/dist/cjs/hack-mapping/app-hack-metadata.d.ts.map +1 -1
- package/dist/cjs/hack-mapping/app-hack-metadata.js +0 -1
- package/dist/cjs/hack-mapping/app-hack-metadata.js.map +1 -1
- package/dist/cjs/hackbot/hack-generation-commands.d.ts +6 -9
- package/dist/cjs/hackbot/hack-generation-commands.d.ts.map +1 -1
- package/dist/cjs/hackbot/hack-generation-trigger.d.ts +6 -9
- package/dist/cjs/hackbot/hack-generation-trigger.d.ts.map +1 -1
- package/dist/cjs/hackbot/hack-generation-trigger.js.map +1 -1
- package/dist/cjs/hackbot/knowledge-source-location.d.ts +6 -0
- package/dist/cjs/hackbot/knowledge-source-location.d.ts.map +1 -0
- package/dist/cjs/{topics/primary-topic.js → hackbot/knowledge-source-location.js} +1 -1
- package/dist/cjs/hackbot/knowledge-source-location.js.map +1 -0
- package/dist/cjs/identity-provider/identity-provider.d.ts +4 -0
- package/dist/cjs/identity-provider/identity-provider.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts +9 -0
- package/dist/cjs/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts.map +1 -1
- package/dist/cjs/pending-hack/pending-hack.d.ts +0 -2
- package/dist/cjs/pending-hack/pending-hack.d.ts.map +1 -1
- package/dist/cjs/spark/spark.d.ts +1 -1
- package/dist/cjs/spark/spark.d.ts.map +1 -1
- package/dist/esm/app-hack/app-hack-metadata.d.ts +0 -1
- package/dist/esm/app-hack/app-hack-metadata.d.ts.map +1 -1
- package/dist/esm/cms-hack/cms-searchable-hack.d.ts +0 -2
- package/dist/esm/cms-hack/cms-searchable-hack.d.ts.map +1 -1
- package/dist/esm/draft-hack/draft-hack.d.ts +0 -2
- package/dist/esm/draft-hack/draft-hack.d.ts.map +1 -1
- package/dist/esm/enriched-hack/enriched-hack.d.ts +0 -2
- package/dist/esm/enriched-hack/enriched-hack.d.ts.map +1 -1
- package/dist/esm/hack/hack.d.ts +0 -2
- package/dist/esm/hack/hack.d.ts.map +1 -1
- package/dist/esm/hack-mapping/app-hack-metadata.d.ts.map +1 -1
- package/dist/esm/hack-mapping/app-hack-metadata.js +0 -1
- package/dist/esm/hack-mapping/app-hack-metadata.js.map +1 -1
- package/dist/esm/hackbot/hack-generation-commands.d.ts +6 -9
- package/dist/esm/hackbot/hack-generation-commands.d.ts.map +1 -1
- package/dist/esm/hackbot/hack-generation-trigger.d.ts +6 -9
- package/dist/esm/hackbot/hack-generation-trigger.d.ts.map +1 -1
- package/dist/esm/hackbot/hack-generation-trigger.js.map +1 -1
- package/dist/esm/hackbot/knowledge-source-location.d.ts +6 -0
- package/dist/esm/hackbot/knowledge-source-location.d.ts.map +1 -0
- package/dist/esm/hackbot/knowledge-source-location.js +2 -0
- package/dist/esm/hackbot/knowledge-source-location.js.map +1 -0
- package/dist/esm/identity-provider/identity-provider.d.ts +4 -0
- package/dist/esm/identity-provider/identity-provider.d.ts.map +1 -1
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts +9 -0
- package/dist/esm/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts.map +1 -1
- package/dist/esm/pending-hack/pending-hack.d.ts +0 -2
- package/dist/esm/pending-hack/pending-hack.d.ts.map +1 -1
- package/dist/esm/spark/spark.d.ts +1 -1
- package/dist/esm/spark/spark.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/app-hack/app-hack-metadata.ts +0 -1
- package/src/cms-hack/cms-searchable-hack.ts +0 -3
- package/src/draft-hack/draft-hack.ts +0 -2
- package/src/enriched-hack/enriched-hack.ts +0 -2
- package/src/hack/hack.ts +0 -2
- package/src/hack-mapping/app-hack-metadata.ts +0 -1
- package/src/hack-mapping/test-data/enriched-hack.json +12 -17
- package/src/hack-mapping/test-data/expected-app-full-hack.json +12 -17
- package/src/hack-mapping/test-data/expected-app-hack-metadata.json +12 -17
- package/src/hack-mapping/test-data/expected-app-restricted-hack.json +12 -17
- package/src/hackbot/hack-generation-commands.ts +43 -45
- package/src/hackbot/hack-generation-trigger.ts +6 -9
- package/src/hackbot/knowledge-source-location.ts +5 -0
- package/src/identity-provider/identity-provider.ts +5 -1
- package/src/index.ts +0 -3
- package/src/knowledge-source-parsing/knowledge-source-parsing-commands.ts +50 -41
- package/src/pending-hack/pending-hack.ts +0 -2
- package/src/spark/spark.ts +1 -0
- package/dist/cjs/topics/primary-topic-mapping.d.ts +0 -7
- package/dist/cjs/topics/primary-topic-mapping.d.ts.map +0 -1
- package/dist/cjs/topics/primary-topic-mapping.js +0 -98
- package/dist/cjs/topics/primary-topic-mapping.js.map +0 -1
- package/dist/cjs/topics/primary-topic.d.ts +0 -4
- package/dist/cjs/topics/primary-topic.d.ts.map +0 -1
- package/dist/cjs/topics/primary-topic.js.map +0 -1
- package/dist/esm/topics/primary-topic-mapping.d.ts +0 -7
- package/dist/esm/topics/primary-topic-mapping.d.ts.map +0 -1
- package/dist/esm/topics/primary-topic-mapping.js +0 -94
- package/dist/esm/topics/primary-topic-mapping.js.map +0 -1
- package/dist/esm/topics/primary-topic.d.ts +0 -4
- package/dist/esm/topics/primary-topic.d.ts.map +0 -1
- package/dist/esm/topics/primary-topic.js +0 -2
- package/dist/esm/topics/primary-topic.js.map +0 -1
- package/src/topics/primary-topic-mapping.test.ts +0 -36
- package/src/topics/primary-topic-mapping.ts +0 -110
- package/src/topics/primary-topic.ts +0 -3
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { PrimaryTopic } from './primary-topic';
|
|
2
|
-
|
|
3
|
-
export const VALID_PRIMARY_TOPIC_TAGS = [
|
|
4
|
-
'Arts & Design',
|
|
5
|
-
'Biographies',
|
|
6
|
-
'Business',
|
|
7
|
-
'Career Success',
|
|
8
|
-
'Communication',
|
|
9
|
-
'Education & Studying',
|
|
10
|
-
'Entrepreneurship',
|
|
11
|
-
'Environment',
|
|
12
|
-
'Fitness & Sports',
|
|
13
|
-
'History',
|
|
14
|
-
'Home & Hobbies',
|
|
15
|
-
'Humanity & Societies',
|
|
16
|
-
'Identity & Equality',
|
|
17
|
-
'Investing',
|
|
18
|
-
'Leadership & Management',
|
|
19
|
-
'Marketing',
|
|
20
|
-
'Media & Entertainment',
|
|
21
|
-
'Mental Health',
|
|
22
|
-
'Mindfulness',
|
|
23
|
-
'Money & Finances',
|
|
24
|
-
'Neurodiversity',
|
|
25
|
-
'Nutrition & Health',
|
|
26
|
-
'Parenting & Family',
|
|
27
|
-
'Personal Growth',
|
|
28
|
-
'Politics, Law & Economics',
|
|
29
|
-
'Psychology & Philosophy',
|
|
30
|
-
'Relationships',
|
|
31
|
-
'Religion',
|
|
32
|
-
'Sales',
|
|
33
|
-
'Science',
|
|
34
|
-
'Sex',
|
|
35
|
-
'AI & Technology'
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
export const OLD_TOPIC_TAGS = [
|
|
39
|
-
'Arts & Design',
|
|
40
|
-
'Biographies',
|
|
41
|
-
'Business',
|
|
42
|
-
'Culture & Society',
|
|
43
|
-
'Career & Success',
|
|
44
|
-
'Education',
|
|
45
|
-
'Health & Fitness',
|
|
46
|
-
'History',
|
|
47
|
-
'Leadership & Entrepreneurship',
|
|
48
|
-
'Lifestyle',
|
|
49
|
-
'Marketing & Sales',
|
|
50
|
-
'Mind & Philosophy',
|
|
51
|
-
'Money & Investing',
|
|
52
|
-
'Parenting & Relationships',
|
|
53
|
-
'Personal Growth',
|
|
54
|
-
'Religion & Spirituality',
|
|
55
|
-
'Science & the Environment',
|
|
56
|
-
'Technology & the Future'
|
|
57
|
-
];
|
|
58
|
-
|
|
59
|
-
export type PrimaryTopicTag = (typeof VALID_PRIMARY_TOPIC_TAGS)[number];
|
|
60
|
-
export type OldTopicTag = (typeof OLD_TOPIC_TAGS)[number];
|
|
61
|
-
|
|
62
|
-
const TOPIC_TO_PRIMARY_TOPIC_MAPPING: Record<OldTopicTag, PrimaryTopicTag[]> = {
|
|
63
|
-
'Arts & Design': ['Arts & Design', 'Media & Entertainment'],
|
|
64
|
-
'Biographies': ['Biographies'],
|
|
65
|
-
'Business': ['Business'],
|
|
66
|
-
'Culture & Society': ['Identity & Equality', 'Politics, Law & Economics', 'Humanity & Societies'],
|
|
67
|
-
'Career & Success': ['Career Success'],
|
|
68
|
-
'Education': ['Education & Studying'],
|
|
69
|
-
'Health & Fitness': ['Nutrition & Health', 'Fitness & Sports', 'Mental Health', 'Neurodiversity'],
|
|
70
|
-
'History': ['History'],
|
|
71
|
-
'Leadership & Entrepreneurship': ['Leadership & Management', 'Entrepreneurship'],
|
|
72
|
-
'Lifestyle': ['Home & Hobbies'],
|
|
73
|
-
'Marketing & Sales': ['Marketing', 'Sales'],
|
|
74
|
-
'Mind & Philosophy': ['Mindfulness', 'Psychology & Philosophy'],
|
|
75
|
-
'Money & Investing': ['Money & Finances', 'Investing'],
|
|
76
|
-
'Parenting & Relationships': ['Sex', 'Relationships', 'Parenting & Family'],
|
|
77
|
-
'Personal Growth': ['Personal Growth', 'Communication'],
|
|
78
|
-
'Religion & Spirituality': ['Religion'],
|
|
79
|
-
'Science & the Environment': ['Science', 'Environment'],
|
|
80
|
-
'Technology & the Future': ['AI & Technology']
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const PRIMARY_TOPIC_TO_OLD_TOPIC_MAPPING = Object.entries(TOPIC_TO_PRIMARY_TOPIC_MAPPING).reduce(
|
|
84
|
-
(mapping, [oldTopic, primaryTopics]) => {
|
|
85
|
-
for (const primaryTopic of primaryTopics) {
|
|
86
|
-
mapping[primaryTopic] = oldTopic as OldTopicTag;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return mapping;
|
|
90
|
-
},
|
|
91
|
-
{} as Record<PrimaryTopicTag, OldTopicTag>
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
function primaryTopicNameOf(primaryTopic: PrimaryTopic | string): string {
|
|
95
|
-
return typeof primaryTopic === 'string' ? primaryTopic : primaryTopic.name;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function mapPrimaryTopicToOldTopic(primaryTopic: PrimaryTopic | string): OldTopicTag | undefined {
|
|
99
|
-
return PRIMARY_TOPIC_TO_OLD_TOPIC_MAPPING[primaryTopicNameOf(primaryTopic) as PrimaryTopicTag];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function mapPrimaryTopicsToOldTopics(primaryTopics: Array<PrimaryTopic | string>): OldTopicTag[] {
|
|
103
|
-
return [
|
|
104
|
-
...new Set(
|
|
105
|
-
primaryTopics
|
|
106
|
-
.map(mapPrimaryTopicToOldTopic)
|
|
107
|
-
.filter((oldTopic): oldTopic is OldTopicTag => oldTopic !== undefined)
|
|
108
|
-
)
|
|
109
|
-
];
|
|
110
|
-
}
|