@uptime.app/contracts 3.0.53-rc.2 → 3.0.54-rc.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/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/draft-hack-generation/draft-hack-generation-events.d.ts +3 -0
- package/dist/cjs/draft-hack-generation/draft-hack-generation-events.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/flashcard/flashcard.d.ts +1 -3
- package/dist/cjs/flashcard/flashcard.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-metadata.d.ts +1 -0
- package/dist/cjs/knowledge-source-parsing/knowledge-source-metadata.d.ts.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/knowledge-source-parsing/podcast-metadata.d.ts +1 -0
- package/dist/cjs/knowledge-source-parsing/podcast-metadata.d.ts.map +1 -1
- package/dist/cjs/knowledge-source-parsing/podcast-metadata.js.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/draft-hack-generation/draft-hack-generation-events.d.ts +3 -0
- package/dist/esm/draft-hack-generation/draft-hack-generation-events.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/flashcard/flashcard.d.ts +1 -3
- package/dist/esm/flashcard/flashcard.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-metadata.d.ts +1 -0
- package/dist/esm/knowledge-source-parsing/knowledge-source-metadata.d.ts.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/knowledge-source-parsing/podcast-metadata.d.ts +1 -0
- package/dist/esm/knowledge-source-parsing/podcast-metadata.d.ts.map +1 -1
- package/dist/esm/knowledge-source-parsing/podcast-metadata.js.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/draft-hack-generation/draft-hack-generation-events.ts +11 -8
- package/src/enriched-hack/enriched-hack.ts +0 -2
- package/src/flashcard/flashcard.ts +1 -24
- 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-metadata.ts +6 -4
- package/src/knowledge-source-parsing/knowledge-source-parsing-commands.ts +50 -41
- package/src/knowledge-source-parsing/podcast-metadata.ts +3 -2
- 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
|
@@ -14,14 +14,17 @@ export interface DraftHackGenerated {
|
|
|
14
14
|
|
|
15
15
|
hackGenerationTriggerId: string;
|
|
16
16
|
|
|
17
|
-
// introduced 11/09/2024
|
|
18
|
-
researchNotes?: {
|
|
19
|
-
insight1: string;
|
|
20
|
-
insight2: string;
|
|
21
|
-
insight3: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
// introduced 11/09/2024
|
|
18
|
+
researchNotes?: {
|
|
19
|
+
insight1: string;
|
|
20
|
+
insight2: string;
|
|
21
|
+
insight3: string;
|
|
22
|
+
};
|
|
23
|
+
transcriptSource?: {
|
|
24
|
+
s3Path: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
25
28
|
|
|
26
29
|
export interface DraftHackGenerationFailed {
|
|
27
30
|
id: string;
|
|
@@ -5,7 +5,6 @@ import { Theme } from '../theme/theme';
|
|
|
5
5
|
import { HackWithVoice } from '../hack/hack-with-voice';
|
|
6
6
|
import { ExtractedSubject } from '../hack/extracted-subject';
|
|
7
7
|
import { SegmentType, SegmentAction, SegmentSpeech, SegmentSection, SegmentTextCard } from '../segment/segment';
|
|
8
|
-
import { PrimaryTopic } from '../topics/primary-topic';
|
|
9
8
|
|
|
10
9
|
export interface EnrichedHack {
|
|
11
10
|
/** The hack id */
|
|
@@ -45,7 +44,6 @@ export interface EnrichedHack {
|
|
|
45
44
|
segments: HackWithVoice['segments']; // Use the 'HackWithVoice' type
|
|
46
45
|
affiliate?: HackAffiliate;
|
|
47
46
|
topics: HackTopic[];
|
|
48
|
-
primaryTopics: PrimaryTopic[];
|
|
49
47
|
contributors?: HackContributor[];
|
|
50
48
|
type: HackType;
|
|
51
49
|
sourceData?: HackSourceData;
|
|
@@ -66,7 +66,7 @@ export interface Flashcard {
|
|
|
66
66
|
/*
|
|
67
67
|
A hack with an enriched theme, so that the flashcard can be displayed when the hack becomes unavailable. This structure is consistent with Sparks.
|
|
68
68
|
*/
|
|
69
|
-
hack:
|
|
69
|
+
hack: Hack;
|
|
70
70
|
|
|
71
71
|
/*
|
|
72
72
|
A hack's ACL. The Hack model doesn't have an ACL, this is from the equivalent enriched hack.
|
|
@@ -136,26 +136,3 @@ export interface KeyPhrase {
|
|
|
136
136
|
phrase: string;
|
|
137
137
|
score: number;
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
export interface FlashcardHack extends Pick<Hack,
|
|
141
|
-
'id'
|
|
142
|
-
| 'title'
|
|
143
|
-
| 'sourceId'
|
|
144
|
-
| 'owner'
|
|
145
|
-
| 'themeId'
|
|
146
|
-
| 'isHidden'
|
|
147
|
-
| 'editorialTags'
|
|
148
|
-
| 'coverUrl'
|
|
149
|
-
| 'segments'
|
|
150
|
-
| 'type'
|
|
151
|
-
| 'affiliate'
|
|
152
|
-
| 'contributors'
|
|
153
|
-
| 'createdAt'
|
|
154
|
-
| 'updatedAt'
|
|
155
|
-
| 'v'
|
|
156
|
-
| 'sourceData'
|
|
157
|
-
| 'baseLocaleHackId'
|
|
158
|
-
| 'locale'
|
|
159
|
-
| 'draftHackId'
|
|
160
|
-
| 'draftHackVersion'> {
|
|
161
|
-
}
|
package/src/hack/hack.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PrimaryTopic } from '../topics/primary-topic';
|
|
2
1
|
import { ExtractedSubject } from './extracted-subject';
|
|
3
2
|
export interface Hack {
|
|
4
3
|
/** The unique id of the hack. */
|
|
@@ -92,7 +91,6 @@ export interface Hack {
|
|
|
92
91
|
};
|
|
93
92
|
affiliate?: HackAffiliate;
|
|
94
93
|
topics: HackTopic[];
|
|
95
|
-
primaryTopics: PrimaryTopic[];
|
|
96
94
|
contributors?: HackContributor[];
|
|
97
95
|
type: HackType;
|
|
98
96
|
sourceData?: HackSourceData;
|
|
@@ -26,7 +26,6 @@ export function mapToAppHackMetadata(hack: EnrichedHack): AppHackMetadata {
|
|
|
26
26
|
description: hack.description,
|
|
27
27
|
segments: toHackAppMetadataSegments(hack.segments),
|
|
28
28
|
topics: hack.topics,
|
|
29
|
-
primaryTopics: hack.primaryTopics,
|
|
30
29
|
contributors: hack.contributors,
|
|
31
30
|
type: hack.type,
|
|
32
31
|
sourceData: hack.sourceData,
|
|
@@ -2554,27 +2554,22 @@
|
|
|
2554
2554
|
},
|
|
2555
2555
|
"timeSaved": 499,
|
|
2556
2556
|
"title": "Rich Dad Poor Dad",
|
|
2557
|
-
"topics": [
|
|
2558
|
-
{
|
|
2559
|
-
"name": "Money & Investing"
|
|
2560
|
-
},
|
|
2561
|
-
{
|
|
2562
|
-
"name": "Business"
|
|
2557
|
+
"topics": [
|
|
2558
|
+
{
|
|
2559
|
+
"name": "Money & Investing"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
"name": "Business"
|
|
2563
2563
|
},
|
|
2564
2564
|
{
|
|
2565
2565
|
"name": "Career & Success"
|
|
2566
2566
|
},
|
|
2567
|
-
{
|
|
2568
|
-
"name": "Leadership & Entrepreneurship"
|
|
2569
|
-
}
|
|
2570
|
-
],
|
|
2571
|
-
"
|
|
2572
|
-
|
|
2573
|
-
"name": "Money & Investing"
|
|
2574
|
-
}
|
|
2575
|
-
],
|
|
2576
|
-
"type": "book",
|
|
2577
|
-
"draftHackId": "3b24ef40-a60c-5767-93b5-f2c9dd94ceed",
|
|
2567
|
+
{
|
|
2568
|
+
"name": "Leadership & Entrepreneurship"
|
|
2569
|
+
}
|
|
2570
|
+
],
|
|
2571
|
+
"type": "book",
|
|
2572
|
+
"draftHackId": "3b24ef40-a60c-5767-93b5-f2c9dd94ceed",
|
|
2578
2573
|
"draftHackVersion": 4,
|
|
2579
2574
|
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
2580
2575
|
"v": 402
|
|
@@ -2489,26 +2489,21 @@
|
|
|
2489
2489
|
},
|
|
2490
2490
|
"timeSaved": 499,
|
|
2491
2491
|
"title": "Rich Dad Poor Dad",
|
|
2492
|
-
"topics": [
|
|
2493
|
-
{
|
|
2494
|
-
"name": "Money & Investing"
|
|
2495
|
-
},
|
|
2496
|
-
{
|
|
2497
|
-
"name": "Business"
|
|
2492
|
+
"topics": [
|
|
2493
|
+
{
|
|
2494
|
+
"name": "Money & Investing"
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
"name": "Business"
|
|
2498
2498
|
},
|
|
2499
2499
|
{
|
|
2500
2500
|
"name": "Career & Success"
|
|
2501
2501
|
},
|
|
2502
|
-
{
|
|
2503
|
-
"name": "Leadership & Entrepreneurship"
|
|
2504
|
-
}
|
|
2505
|
-
],
|
|
2506
|
-
"
|
|
2507
|
-
|
|
2508
|
-
"name": "Money & Investing"
|
|
2509
|
-
}
|
|
2510
|
-
],
|
|
2511
|
-
"type": "book",
|
|
2512
|
-
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
2502
|
+
{
|
|
2503
|
+
"name": "Leadership & Entrepreneurship"
|
|
2504
|
+
}
|
|
2505
|
+
],
|
|
2506
|
+
"type": "book",
|
|
2507
|
+
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
2513
2508
|
"v": 402
|
|
2514
2509
|
}
|
|
@@ -73,26 +73,21 @@
|
|
|
73
73
|
"themeId": "34",
|
|
74
74
|
"timeSaved": 499,
|
|
75
75
|
"title": "Rich Dad Poor Dad",
|
|
76
|
-
"topics": [
|
|
77
|
-
{
|
|
78
|
-
"name": "Money & Investing"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"name": "Business"
|
|
76
|
+
"topics": [
|
|
77
|
+
{
|
|
78
|
+
"name": "Money & Investing"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "Business"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"name": "Career & Success"
|
|
85
85
|
},
|
|
86
|
-
{
|
|
87
|
-
"name": "Leadership & Entrepreneurship"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
"name": "Money & Investing"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"type": "book",
|
|
96
|
-
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
86
|
+
{
|
|
87
|
+
"name": "Leadership & Entrepreneurship"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"type": "book",
|
|
91
|
+
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
97
92
|
"v": 402
|
|
98
93
|
}
|
|
@@ -779,26 +779,21 @@
|
|
|
779
779
|
},
|
|
780
780
|
"timeSaved": 499,
|
|
781
781
|
"title": "Rich Dad Poor Dad",
|
|
782
|
-
"topics": [
|
|
783
|
-
{
|
|
784
|
-
"name": "Money & Investing"
|
|
785
|
-
},
|
|
786
|
-
{
|
|
787
|
-
"name": "Business"
|
|
782
|
+
"topics": [
|
|
783
|
+
{
|
|
784
|
+
"name": "Money & Investing"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "Business"
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
790
|
"name": "Career & Success"
|
|
791
791
|
},
|
|
792
|
-
{
|
|
793
|
-
"name": "Leadership & Entrepreneurship"
|
|
794
|
-
}
|
|
795
|
-
],
|
|
796
|
-
"
|
|
797
|
-
|
|
798
|
-
"name": "Money & Investing"
|
|
799
|
-
}
|
|
800
|
-
],
|
|
801
|
-
"type": "book",
|
|
802
|
-
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
792
|
+
{
|
|
793
|
+
"name": "Leadership & Entrepreneurship"
|
|
794
|
+
}
|
|
795
|
+
],
|
|
796
|
+
"type": "book",
|
|
797
|
+
"updatedAt": "2023-07-21T07:02:16.240Z",
|
|
803
798
|
"v": 402
|
|
804
799
|
}
|
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
hackFromUrlWithMetadata?: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
payload: TriggerHackGenerationCommandPayload;
|
|
45
|
-
}
|
|
1
|
+
import { KnowledgeSourceLocation } from './knowledge-source-location';
|
|
2
|
+
|
|
3
|
+
export interface TriggerHackGenerationCommandPayload {
|
|
4
|
+
reference: string;
|
|
5
|
+
userId?: string;
|
|
6
|
+
|
|
7
|
+
hackFromUrl?: KnowledgeSourceLocation
|
|
8
|
+
|
|
9
|
+
hackFromUrlWithMetadata?: KnowledgeSourceLocation & {
|
|
10
|
+
typeOfHack: string; // in words e.g. "annual report", free text
|
|
11
|
+
toneOfVoice: string; // e.g. "professional", "casual", "enthusiastic", free text
|
|
12
|
+
insightsToEmphasise: string; // e.g. "key statistics", "quotes", "key facts", "keep it general", free text
|
|
13
|
+
takeawaysToEmphasise?: string; // e.g. "practical steps", "strategic advice", free text, for the "insights in action". If "shouldCreateTakeaways" is false, this will be omitted
|
|
14
|
+
shouldCreateTakeaways: boolean; // whether to create "insights in action"
|
|
15
|
+
title?: string;
|
|
16
|
+
contributors?: string;
|
|
17
|
+
useB2CSegmentLimits: boolean; // if true, use the B2C segment length limits (e.g. 850+ characters for insight bodies)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
hackFromPodcastUrl?: KnowledgeSourceLocation & {
|
|
21
|
+
useB2CSegmentLimits?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
hackFromPodcastRSS?: {
|
|
25
|
+
rssUrl: string;
|
|
26
|
+
episodeNumber: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
hackFromPodcastWithMetadata?: KnowledgeSourceLocation & {
|
|
30
|
+
podcastName: string;
|
|
31
|
+
episodeName: string;
|
|
32
|
+
episodeDescription: string;
|
|
33
|
+
episodeReleaseDate: string;
|
|
34
|
+
episodeImageUrl: string;
|
|
35
|
+
useB2CSegmentLimits: boolean;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface TriggerHackGenerationCommand {
|
|
40
|
+
id: string;
|
|
41
|
+
type: 'TriggerHackGeneration';
|
|
42
|
+
payload: TriggerHackGenerationCommandPayload;
|
|
43
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SupportedDraftHackGenerationType } from '../knowledge-source-parsing/knowledge-source-parsing-commands';
|
|
2
|
+
import { KnowledgeSourceLocation } from './knowledge-source-location';
|
|
2
3
|
|
|
3
4
|
export interface HackGenerationTrigger {
|
|
4
5
|
id: string;
|
|
@@ -8,12 +9,9 @@ export interface HackGenerationTrigger {
|
|
|
8
9
|
userId?: string;
|
|
9
10
|
reference?: string;
|
|
10
11
|
|
|
11
|
-
hackFromUrl?:
|
|
12
|
-
knowledgeSourceUrl: string;
|
|
13
|
-
}
|
|
12
|
+
hackFromUrl?: KnowledgeSourceLocation
|
|
14
13
|
|
|
15
|
-
hackFromUrlWithMetadata?: {
|
|
16
|
-
knowledgeSourceUrl: string;
|
|
14
|
+
hackFromUrlWithMetadata?: KnowledgeSourceLocation & {
|
|
17
15
|
typeOfHack: string; // in words e.g. "annual report", free text
|
|
18
16
|
toneOfVoice: string; // e.g. "professional", "casual", "enthusiastic", free text
|
|
19
17
|
insightsToEmphasise: string; // e.g. "key statistics", "quotes", "key facts", "keep it general", free text
|
|
@@ -24,8 +22,8 @@ export interface HackGenerationTrigger {
|
|
|
24
22
|
useB2CSegmentLimits: boolean; // if true, use the B2C segment length limits (e.g. 850+ characters for insight bodies)
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
hackFromPodcastUrl?: {
|
|
28
|
-
|
|
25
|
+
hackFromPodcastUrl?: KnowledgeSourceLocation & {
|
|
26
|
+
useB2CSegmentLimits?: boolean;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
hackFromPodcastRSS?: {
|
|
@@ -33,8 +31,7 @@ export interface HackGenerationTrigger {
|
|
|
33
31
|
episodeNumber: number;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
hackFromPodcastWithMetadata?: {
|
|
37
|
-
knowledgeSourceUrl: string;
|
|
34
|
+
hackFromPodcastWithMetadata?: KnowledgeSourceLocation & {
|
|
38
35
|
podcastName: string;
|
|
39
36
|
episodeName: string;
|
|
40
37
|
episodeDescription: string;
|
|
@@ -30,6 +30,8 @@ export interface IdentityProviderConfig {
|
|
|
30
30
|
'custom:ext_organisation_id'?: string;
|
|
31
31
|
'custom:ext_user_id'?: string;
|
|
32
32
|
'custom:country_code'?: string;
|
|
33
|
+
'custom:team_name'?: string;
|
|
34
|
+
'custom:is_manager'?: string;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -44,4 +46,6 @@ export interface IdentityProviderClaims {
|
|
|
44
46
|
given_name?: string;
|
|
45
47
|
externalUserId?: string;
|
|
46
48
|
countryCode?: string;
|
|
47
|
-
|
|
49
|
+
teamName?: string;
|
|
50
|
+
isManager?: string
|
|
51
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -166,9 +166,6 @@ export * from './text-to-speech/text-segment';
|
|
|
166
166
|
export * from './theme/theme';
|
|
167
167
|
export * from './theme/theme-events';
|
|
168
168
|
|
|
169
|
-
export * from './topics/primary-topic';
|
|
170
|
-
export * from './topics/primary-topic-mapping';
|
|
171
|
-
|
|
172
169
|
export * from './translation/translation-events';
|
|
173
170
|
export * from './translation/translation';
|
|
174
171
|
|
|
@@ -20,10 +20,12 @@ export interface KnowledgeSourceMetadata {
|
|
|
20
20
|
|
|
21
21
|
// the original source of the knowledge source (e.g. URL, file path in hackbot-service s3, etc)
|
|
22
22
|
url: string;
|
|
23
|
-
// the location where the original knowledge source file is stored
|
|
24
|
-
s3Path: string;
|
|
25
|
-
// the location where the
|
|
26
|
-
|
|
23
|
+
// the location where the original knowledge source file is stored
|
|
24
|
+
s3Path: string;
|
|
25
|
+
// the location where the transcript-only file is stored, when a transcript exists
|
|
26
|
+
transcriptS3Path?: string;
|
|
27
|
+
// the location where the parsed knowledge source content is stored
|
|
28
|
+
parsedContentS3Path: string;
|
|
27
29
|
// path of parsed tables stored in s3, of type TableEntry[]
|
|
28
30
|
tablesS3Path?: string;
|
|
29
31
|
}
|
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import { KnowledgeSourceUserDefinedMetadata } from './knowledge-source-metadata';
|
|
2
|
-
|
|
3
|
-
export enum SupportedDraftHackGenerationType {
|
|
4
|
-
Book = 'book',
|
|
5
|
-
Podcast = 'podcast',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ParseKnowledgeSourceCommand {
|
|
9
|
-
id: string;
|
|
10
|
-
type: 'ParseKnowledgeSource';
|
|
11
|
-
payload: {
|
|
12
|
-
knowledgeSourceUrl: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { KnowledgeSourceUserDefinedMetadata } from './knowledge-source-metadata';
|
|
2
|
+
|
|
3
|
+
export enum SupportedDraftHackGenerationType {
|
|
4
|
+
Book = 'book',
|
|
5
|
+
Podcast = 'podcast',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ParseKnowledgeSourceCommand {
|
|
9
|
+
id: string;
|
|
10
|
+
type: 'ParseKnowledgeSource';
|
|
11
|
+
payload: {
|
|
12
|
+
knowledgeSourceUrl: string;
|
|
13
|
+
knowledgeSourceBucket?: string;
|
|
14
|
+
knowledgeSourceKey?: string;
|
|
15
|
+
reference: string;
|
|
16
|
+
hackGenerationTriggerId?: string;
|
|
17
|
+
triggerDraftHackGeneration: boolean;
|
|
18
|
+
typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ParseKnowledgeSourceWithMetadataCommand {
|
|
23
|
+
id: string;
|
|
24
|
+
type: 'ParseKnowledgeSourceWithMetadata';
|
|
25
|
+
payload: {
|
|
26
|
+
knowledgeSourceUrl: string;
|
|
27
|
+
knowledgeSourceBucket?: string;
|
|
28
|
+
knowledgeSourceKey?: string;
|
|
29
|
+
reference: string;
|
|
30
|
+
hackGenerationTriggerId?: string;
|
|
31
|
+
triggerDraftHackGeneration: boolean;
|
|
32
|
+
typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
|
|
33
|
+
userDefinedMetadata: KnowledgeSourceUserDefinedMetadata;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ParseKnowledgeSourceFromPodcastCommand {
|
|
38
|
+
id: string;
|
|
39
|
+
type: 'ParseKnowledgeSourceFromPodcast';
|
|
40
|
+
payload: {
|
|
41
|
+
podcastUrl: string;
|
|
42
|
+
podcastBucket?: string;
|
|
43
|
+
podcastKey?: string;
|
|
44
|
+
rssEpisodeNumber?: number;
|
|
45
|
+
reference: string;
|
|
46
|
+
hackGenerationTriggerId?: string;
|
|
47
|
+
triggerDraftHackGeneration: boolean;
|
|
48
|
+
typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -21,8 +21,9 @@ export interface PodcastMetadata extends PodcastMetadataWithoutTranscript {
|
|
|
21
21
|
createdAt: string;
|
|
22
22
|
updatedAt: string;
|
|
23
23
|
|
|
24
|
-
transcript: string;
|
|
25
|
-
|
|
24
|
+
transcript: string;
|
|
25
|
+
transcriptS3Path?: string;
|
|
26
|
+
summary: string;
|
|
26
27
|
vectorDbNamespace: string;
|
|
27
28
|
purpose: string;
|
|
28
29
|
hosts: PodcastConfirmedContributor[];
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { ExtractedSubject } from '../hack/extracted-subject';
|
|
3
3
|
import { HackAffiliate, HackContributor, HackType, HackSourceData, HackTopic, HackExternalLink } from '../hack/hack';
|
|
4
4
|
import { Segment } from '../segment/segment';
|
|
5
|
-
import { PrimaryTopic } from '../topics/primary-topic';
|
|
6
5
|
|
|
7
6
|
export interface PendingHack {
|
|
8
7
|
id: string;
|
|
@@ -25,7 +24,6 @@ export interface PendingHack {
|
|
|
25
24
|
copyrightFreeCoverUrl?: string;
|
|
26
25
|
affiliate?: HackAffiliate;
|
|
27
26
|
topics: HackTopic[];
|
|
28
|
-
primaryTopics: PrimaryTopic[];
|
|
29
27
|
contributors: HackContributor[];
|
|
30
28
|
type: HackType;
|
|
31
29
|
sourceData?: HackSourceData;
|
package/src/spark/spark.ts
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PrimaryTopic } from './primary-topic';
|
|
2
|
-
export declare const VALID_PRIMARY_TOPIC_TAGS: string[];
|
|
3
|
-
export declare const OLD_TOPIC_TAGS: string[];
|
|
4
|
-
export type PrimaryTopicTag = (typeof VALID_PRIMARY_TOPIC_TAGS)[number];
|
|
5
|
-
export type OldTopicTag = (typeof OLD_TOPIC_TAGS)[number];
|
|
6
|
-
export declare function mapPrimaryTopicsToOldTopics(primaryTopics: Array<PrimaryTopic | string>): OldTopicTag[];
|
|
7
|
-
//# sourceMappingURL=primary-topic-mapping.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primary-topic-mapping.d.ts","sourceRoot":"","sources":["../../../src/topics/primary-topic-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,wBAAwB,UAiCpC,CAAC;AAEF,eAAO,MAAM,cAAc,UAmB1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AA0C1D,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC,GAAG,WAAW,EAAE,CAQtG"}
|