@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.
Files changed (127) hide show
  1. package/dist/cjs/app-hack/app-hack-metadata.d.ts +0 -1
  2. package/dist/cjs/app-hack/app-hack-metadata.d.ts.map +1 -1
  3. package/dist/cjs/cms-hack/cms-searchable-hack.d.ts +0 -2
  4. package/dist/cjs/cms-hack/cms-searchable-hack.d.ts.map +1 -1
  5. package/dist/cjs/draft-hack/draft-hack.d.ts +0 -2
  6. package/dist/cjs/draft-hack/draft-hack.d.ts.map +1 -1
  7. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts +3 -0
  8. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts.map +1 -1
  9. package/dist/cjs/enriched-hack/enriched-hack.d.ts +0 -2
  10. package/dist/cjs/enriched-hack/enriched-hack.d.ts.map +1 -1
  11. package/dist/cjs/flashcard/flashcard.d.ts +1 -3
  12. package/dist/cjs/flashcard/flashcard.d.ts.map +1 -1
  13. package/dist/cjs/hack/hack.d.ts +0 -2
  14. package/dist/cjs/hack/hack.d.ts.map +1 -1
  15. package/dist/cjs/hack-mapping/app-hack-metadata.d.ts.map +1 -1
  16. package/dist/cjs/hack-mapping/app-hack-metadata.js +0 -1
  17. package/dist/cjs/hack-mapping/app-hack-metadata.js.map +1 -1
  18. package/dist/cjs/hackbot/hack-generation-commands.d.ts +6 -9
  19. package/dist/cjs/hackbot/hack-generation-commands.d.ts.map +1 -1
  20. package/dist/cjs/hackbot/hack-generation-trigger.d.ts +6 -9
  21. package/dist/cjs/hackbot/hack-generation-trigger.d.ts.map +1 -1
  22. package/dist/cjs/hackbot/hack-generation-trigger.js.map +1 -1
  23. package/dist/cjs/hackbot/knowledge-source-location.d.ts +6 -0
  24. package/dist/cjs/hackbot/knowledge-source-location.d.ts.map +1 -0
  25. package/dist/cjs/{topics/primary-topic.js → hackbot/knowledge-source-location.js} +1 -1
  26. package/dist/cjs/hackbot/knowledge-source-location.js.map +1 -0
  27. package/dist/cjs/identity-provider/identity-provider.d.ts +4 -0
  28. package/dist/cjs/identity-provider/identity-provider.d.ts.map +1 -1
  29. package/dist/cjs/index.d.ts +0 -2
  30. package/dist/cjs/index.d.ts.map +1 -1
  31. package/dist/cjs/index.js +0 -2
  32. package/dist/cjs/index.js.map +1 -1
  33. package/dist/cjs/knowledge-source-parsing/knowledge-source-metadata.d.ts +1 -0
  34. package/dist/cjs/knowledge-source-parsing/knowledge-source-metadata.d.ts.map +1 -1
  35. package/dist/cjs/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts +9 -0
  36. package/dist/cjs/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts.map +1 -1
  37. package/dist/cjs/knowledge-source-parsing/podcast-metadata.d.ts +1 -0
  38. package/dist/cjs/knowledge-source-parsing/podcast-metadata.d.ts.map +1 -1
  39. package/dist/cjs/knowledge-source-parsing/podcast-metadata.js.map +1 -1
  40. package/dist/cjs/pending-hack/pending-hack.d.ts +0 -2
  41. package/dist/cjs/pending-hack/pending-hack.d.ts.map +1 -1
  42. package/dist/cjs/spark/spark.d.ts +1 -1
  43. package/dist/cjs/spark/spark.d.ts.map +1 -1
  44. package/dist/esm/app-hack/app-hack-metadata.d.ts +0 -1
  45. package/dist/esm/app-hack/app-hack-metadata.d.ts.map +1 -1
  46. package/dist/esm/cms-hack/cms-searchable-hack.d.ts +0 -2
  47. package/dist/esm/cms-hack/cms-searchable-hack.d.ts.map +1 -1
  48. package/dist/esm/draft-hack/draft-hack.d.ts +0 -2
  49. package/dist/esm/draft-hack/draft-hack.d.ts.map +1 -1
  50. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts +3 -0
  51. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts.map +1 -1
  52. package/dist/esm/enriched-hack/enriched-hack.d.ts +0 -2
  53. package/dist/esm/enriched-hack/enriched-hack.d.ts.map +1 -1
  54. package/dist/esm/flashcard/flashcard.d.ts +1 -3
  55. package/dist/esm/flashcard/flashcard.d.ts.map +1 -1
  56. package/dist/esm/hack/hack.d.ts +0 -2
  57. package/dist/esm/hack/hack.d.ts.map +1 -1
  58. package/dist/esm/hack-mapping/app-hack-metadata.d.ts.map +1 -1
  59. package/dist/esm/hack-mapping/app-hack-metadata.js +0 -1
  60. package/dist/esm/hack-mapping/app-hack-metadata.js.map +1 -1
  61. package/dist/esm/hackbot/hack-generation-commands.d.ts +6 -9
  62. package/dist/esm/hackbot/hack-generation-commands.d.ts.map +1 -1
  63. package/dist/esm/hackbot/hack-generation-trigger.d.ts +6 -9
  64. package/dist/esm/hackbot/hack-generation-trigger.d.ts.map +1 -1
  65. package/dist/esm/hackbot/hack-generation-trigger.js.map +1 -1
  66. package/dist/esm/hackbot/knowledge-source-location.d.ts +6 -0
  67. package/dist/esm/hackbot/knowledge-source-location.d.ts.map +1 -0
  68. package/dist/esm/hackbot/knowledge-source-location.js +2 -0
  69. package/dist/esm/hackbot/knowledge-source-location.js.map +1 -0
  70. package/dist/esm/identity-provider/identity-provider.d.ts +4 -0
  71. package/dist/esm/identity-provider/identity-provider.d.ts.map +1 -1
  72. package/dist/esm/index.d.ts +0 -2
  73. package/dist/esm/index.d.ts.map +1 -1
  74. package/dist/esm/index.js +0 -2
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/knowledge-source-parsing/knowledge-source-metadata.d.ts +1 -0
  77. package/dist/esm/knowledge-source-parsing/knowledge-source-metadata.d.ts.map +1 -1
  78. package/dist/esm/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts +9 -0
  79. package/dist/esm/knowledge-source-parsing/knowledge-source-parsing-commands.d.ts.map +1 -1
  80. package/dist/esm/knowledge-source-parsing/podcast-metadata.d.ts +1 -0
  81. package/dist/esm/knowledge-source-parsing/podcast-metadata.d.ts.map +1 -1
  82. package/dist/esm/knowledge-source-parsing/podcast-metadata.js.map +1 -1
  83. package/dist/esm/pending-hack/pending-hack.d.ts +0 -2
  84. package/dist/esm/pending-hack/pending-hack.d.ts.map +1 -1
  85. package/dist/esm/spark/spark.d.ts +1 -1
  86. package/dist/esm/spark/spark.d.ts.map +1 -1
  87. package/package.json +2 -2
  88. package/src/app-hack/app-hack-metadata.ts +0 -1
  89. package/src/cms-hack/cms-searchable-hack.ts +0 -3
  90. package/src/draft-hack/draft-hack.ts +0 -2
  91. package/src/draft-hack-generation/draft-hack-generation-events.ts +11 -8
  92. package/src/enriched-hack/enriched-hack.ts +0 -2
  93. package/src/flashcard/flashcard.ts +1 -24
  94. package/src/hack/hack.ts +0 -2
  95. package/src/hack-mapping/app-hack-metadata.ts +0 -1
  96. package/src/hack-mapping/test-data/enriched-hack.json +12 -17
  97. package/src/hack-mapping/test-data/expected-app-full-hack.json +12 -17
  98. package/src/hack-mapping/test-data/expected-app-hack-metadata.json +12 -17
  99. package/src/hack-mapping/test-data/expected-app-restricted-hack.json +12 -17
  100. package/src/hackbot/hack-generation-commands.ts +43 -45
  101. package/src/hackbot/hack-generation-trigger.ts +6 -9
  102. package/src/hackbot/knowledge-source-location.ts +5 -0
  103. package/src/identity-provider/identity-provider.ts +5 -1
  104. package/src/index.ts +0 -3
  105. package/src/knowledge-source-parsing/knowledge-source-metadata.ts +6 -4
  106. package/src/knowledge-source-parsing/knowledge-source-parsing-commands.ts +50 -41
  107. package/src/knowledge-source-parsing/podcast-metadata.ts +3 -2
  108. package/src/pending-hack/pending-hack.ts +0 -2
  109. package/src/spark/spark.ts +1 -0
  110. package/dist/cjs/topics/primary-topic-mapping.d.ts +0 -7
  111. package/dist/cjs/topics/primary-topic-mapping.d.ts.map +0 -1
  112. package/dist/cjs/topics/primary-topic-mapping.js +0 -98
  113. package/dist/cjs/topics/primary-topic-mapping.js.map +0 -1
  114. package/dist/cjs/topics/primary-topic.d.ts +0 -4
  115. package/dist/cjs/topics/primary-topic.d.ts.map +0 -1
  116. package/dist/cjs/topics/primary-topic.js.map +0 -1
  117. package/dist/esm/topics/primary-topic-mapping.d.ts +0 -7
  118. package/dist/esm/topics/primary-topic-mapping.d.ts.map +0 -1
  119. package/dist/esm/topics/primary-topic-mapping.js +0 -94
  120. package/dist/esm/topics/primary-topic-mapping.js.map +0 -1
  121. package/dist/esm/topics/primary-topic.d.ts +0 -4
  122. package/dist/esm/topics/primary-topic.d.ts.map +0 -1
  123. package/dist/esm/topics/primary-topic.js +0 -2
  124. package/dist/esm/topics/primary-topic.js.map +0 -1
  125. package/src/topics/primary-topic-mapping.test.ts +0 -36
  126. package/src/topics/primary-topic-mapping.ts +0 -110
  127. 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: FlashcardHack;
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
- "primaryTopics": [
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
- "primaryTopics": [
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
- "primaryTopics": [
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
- "primaryTopics": [
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
- export interface TriggerHackGenerationCommandPayload {
2
- reference: string;
3
- userId?: string;
4
-
5
- hackFromUrl?: {
6
- knowledgeSourceUrl: string;
7
- }
8
-
9
- hackFromUrlWithMetadata?: {
10
- knowledgeSourceUrl: string;
11
- typeOfHack: string; // in words e.g. "annual report", free text
12
- toneOfVoice: string; // e.g. "professional", "casual", "enthusiastic", free text
13
- insightsToEmphasise: string; // e.g. "key statistics", "quotes", "key facts", "keep it general", free text
14
- takeawaysToEmphasise?: string; // e.g. "practical steps", "strategic advice", free text, for the "insights in action". If "shouldCreateTakeaways" is false, this will be omitted
15
- shouldCreateTakeaways: boolean; // whether to create "insights in action"
16
- title?: string;
17
- contributors?: string;
18
- useB2CSegmentLimits: boolean; // if true, use the B2C segment length limits (e.g. 850+ characters for insight bodies)
19
- }
20
-
21
- hackFromPodcastUrl?: {
22
- knowledgeSourceUrl: string;
23
- }
24
-
25
- hackFromPodcastRSS?: {
26
- rssUrl: string;
27
- episodeNumber: number;
28
- }
29
-
30
- hackFromPodcastWithMetadata?: {
31
- knowledgeSourceUrl: string;
32
- podcastName: string;
33
- episodeName: string;
34
- episodeDescription: string;
35
- episodeReleaseDate: string;
36
- episodeImageUrl: string;
37
- useB2CSegmentLimits: boolean;
38
- }
39
- }
40
-
41
- export interface TriggerHackGenerationCommand {
42
- id: string;
43
- type: 'TriggerHackGeneration';
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
- knowledgeSourceUrl: string;
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;
@@ -0,0 +1,5 @@
1
+ export interface KnowledgeSourceLocation {
2
+ knowledgeSourceUrl: string;
3
+ knowledgeSourceBucket?: string;
4
+ knowledgeSourceKey?: string;
5
+ }
@@ -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 parsed knowledge source content is stored
26
- parsedContentS3Path: string;
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
- reference: string;
14
- triggerDraftHackGeneration: boolean;
15
- typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
16
- };
17
- }
18
-
19
- export interface ParseKnowledgeSourceWithMetadataCommand {
20
- id: string;
21
- type: 'ParseKnowledgeSourceWithMetadata';
22
- payload: {
23
- knowledgeSourceUrl: string;
24
- reference: string;
25
- triggerDraftHackGeneration: boolean;
26
- typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
27
- userDefinedMetadata: KnowledgeSourceUserDefinedMetadata;
28
- };
29
- }
30
-
31
- export interface ParseKnowledgeSourceFromPodcastCommand {
32
- id: string;
33
- type: 'ParseKnowledgeSourceFromPodcast';
34
- payload: {
35
- podcastUrl: string;
36
- rssEpisodeNumber?: number;
37
- reference: string;
38
- triggerDraftHackGeneration: boolean;
39
- typeOfDraftHackToGenerate: SupportedDraftHackGenerationType;
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
- summary: string;
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;
@@ -51,6 +51,7 @@ export type SparkHack = Pick<Hack,
51
51
  | 'isHidden'
52
52
  | 'editorialTags'
53
53
  | 'coverUrl'
54
+ | 'topics'
54
55
  | 'type'
55
56
  | 'affiliate'
56
57
  | 'contributors'
@@ -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"}