@uptime.app/contracts 1.0.13-rc.0 → 1.0.13

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 (75) hide show
  1. package/dist/cjs/index.d.ts +0 -2
  2. package/dist/cjs/index.d.ts.map +1 -1
  3. package/dist/cjs/index.js +0 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/esm/index.d.ts +0 -2
  6. package/dist/esm/index.d.ts.map +1 -1
  7. package/dist/esm/index.js +0 -2
  8. package/dist/esm/index.js.map +1 -1
  9. package/package.json +2 -2
  10. package/src/access-control/collection-access-control.ts +28 -28
  11. package/src/access-control/hack-access-control.ts +29 -29
  12. package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
  13. package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
  14. package/src/b2b-organisation/b2b-organisation-member.ts +8 -8
  15. package/src/b2b-organisation/b2b-organisation.ts +14 -14
  16. package/src/brand/brand-events.ts +21 -21
  17. package/src/brand/brand.ts +8 -8
  18. package/src/distribution/collection-distribution.ts +17 -17
  19. package/src/distribution/distribution-events.ts +61 -61
  20. package/src/distribution/hack-distribution.ts +18 -18
  21. package/src/draft-hack/draft-hack-events.ts +21 -21
  22. package/src/draft-hack/draft-hack.ts +184 -184
  23. package/src/enriched-hack/enriched-hack-events.ts +21 -21
  24. package/src/enriched-hack/enriched-hack.ts +101 -101
  25. package/src/hack/extracted-subject.ts +4 -4
  26. package/src/hack/hack-events.ts +21 -21
  27. package/src/hack/hack-with-voice-events.ts +20 -20
  28. package/src/hack/hack-with-voice.ts +33 -33
  29. package/src/hack/hack.ts +114 -114
  30. package/src/hack-metadata/hack-metadata-events.ts +21 -21
  31. package/src/hack-metadata/hack-metadata.ts +17 -17
  32. package/src/index.ts +61 -64
  33. package/src/knowledge-source/knowledge-source-events.ts +21 -21
  34. package/src/knowledge-source/knowledge-source.ts +43 -43
  35. package/src/localisation/live-locales.ts +32 -32
  36. package/src/localisation/locale-language.ts +4 -4
  37. package/src/localisation/supported-languages.ts +11 -11
  38. package/src/localisation/supported-locales.ts +42 -42
  39. package/src/pending-hack/pending-hack-events.ts +20 -20
  40. package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
  41. package/src/pending-hack/pending-hack-with-voice.ts +25 -25
  42. package/src/pending-hack/pending-hack.ts +75 -75
  43. package/src/profile/profile-events.ts +41 -41
  44. package/src/profile/profile.ts +27 -27
  45. package/src/profile/translated-profile.ts +13 -13
  46. package/src/segment/segment-commands.ts +70 -70
  47. package/src/segment/segment-with-voice.ts +8 -8
  48. package/src/segment/segment.ts +82 -82
  49. package/src/skin/skin-events.ts +21 -21
  50. package/src/skin/skin.ts +6 -6
  51. package/src/text-to-speech/create-speech-commands.ts +20 -20
  52. package/src/text-to-speech/speech-created-events.ts +11 -11
  53. package/src/text-to-speech/text-segment.ts +29 -29
  54. package/src/theme/theme-events.ts +21 -21
  55. package/src/theme/theme.ts +68 -68
  56. package/tsconfig.cjs.json +7 -7
  57. package/tsconfig.npm.json +21 -21
  58. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts +0 -36
  59. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts.map +0 -1
  60. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.js +0 -3
  61. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.js.map +0 -1
  62. package/dist/cjs/draft-hack-generation/draft-hack-generation.d.ts +0 -39
  63. package/dist/cjs/draft-hack-generation/draft-hack-generation.d.ts.map +0 -1
  64. package/dist/cjs/draft-hack-generation/draft-hack-generation.js +0 -3
  65. package/dist/cjs/draft-hack-generation/draft-hack-generation.js.map +0 -1
  66. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts +0 -36
  67. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts.map +0 -1
  68. package/dist/esm/draft-hack-generation/draft-hack-generation-events.js +0 -2
  69. package/dist/esm/draft-hack-generation/draft-hack-generation-events.js.map +0 -1
  70. package/dist/esm/draft-hack-generation/draft-hack-generation.d.ts +0 -39
  71. package/dist/esm/draft-hack-generation/draft-hack-generation.d.ts.map +0 -1
  72. package/dist/esm/draft-hack-generation/draft-hack-generation.js +0 -2
  73. package/dist/esm/draft-hack-generation/draft-hack-generation.js.map +0 -1
  74. package/src/draft-hack-generation/draft-hack-generation-events.ts +0 -42
  75. package/src/draft-hack-generation/draft-hack-generation.ts +0 -38
@@ -1,184 +1,184 @@
1
- import { SupportedLocale } from '../localisation/supported-locales';
2
-
3
- export interface DraftHack extends DraftHackContent {
4
- /** The unique id of the draft hack. */
5
- id: string;
6
- /** The locale (language and region) of the draft hack e.g. fr-FR. Mandatory property since 12/01/2023. */
7
- locale: SupportedLocale;
8
- /** @deprecated Temporarily added in 12/01/2023. Should not be used under any circumstance as only a handful of drafts will contain this property */
9
- baseLocaleDraftHackId?: string;
10
- /** The id of the hack. Mandatory property since Dec 2022. */
11
- hackId: string;
12
- /** The id of the hack in its original locale. Mandatory property since 01/02/2023. */
13
- baseLocaleHackId: string;
14
-
15
- v: number;
16
- createdAt: string;
17
- updatedAt: string;
18
- publishedAt?: string;
19
- publishedVersion?: number;
20
- owner?: string;
21
- /** workflowStatus was added in May 2022 as we move toward UGC. Older drafts have not been backfilled */
22
- workflowStatus?: DraftHackWorkflowStatus;
23
- /** added in Nov 2022. Set to true whenever content changes are made to the draft */
24
- hasUnpublishedChanges?: boolean;
25
- /** added in March 2023. Must be set whenever content changes are made to the draft */
26
- contentUpdatedAt?: string;
27
- /** added in late April 2023. Only set on translations. Set to the value of contentUpdatedAt of the base locale draft that was translated. Can be used to determine if the translated draft is out of sync with the original draft */
28
- baseLocaleContentUpdatedAt?: string;
29
- }
30
-
31
- export interface DraftHackContent {
32
- /**
33
- * @maxLength 150
34
- */
35
- title: string;
36
- /**
37
- * @maxLength 50
38
- */
39
- sourceId?: string;
40
- /**
41
- * @maxLength 50
42
- */
43
- themeId?: string;
44
- segments: DraftHackSegments;
45
- /**
46
- * @maxLength 1000
47
- */
48
- coverUrl?: string;
49
- notifications?: DraftHackNotifications;
50
- affiliate?: DraftAffiliate;
51
- /**
52
- * @maxItems 50
53
- */
54
- topics?: DraftTopic[];
55
- /**
56
- * @maxItems 10
57
- */
58
- contributors?: DraftContributor[];
59
- sourceData?: DraftSourceData;
60
- /** For creators only. We will tackle this validation once profiles are introduce*/
61
- externalLink?: DraftHackExternalLink;
62
- /** For recording purpose for now, we will use this value further in the future */
63
- contentRating?: DraftHackRating;
64
- /**
65
- * @maxItems 50
66
- * @items.maxLength 150
67
- */
68
- tags?: string[];
69
- type?: DraftHackType;
70
- isCopyrightFree?: boolean;
71
- }
72
-
73
- export interface DraftHackNotifications {
74
- /**
75
- * @maxLength 1000
76
- */
77
- aiGeneratedText?: string;
78
- /**
79
- * @maxLength 1000
80
- */
81
- humanCuratedText?: string;
82
- }
83
-
84
- export interface DraftHackSegments {
85
- favouriteQuote?: DraftHackSegment;
86
- inANutshell?: DraftHackSegment;
87
- introduction?: DraftHackSegment;
88
- /**
89
- * @maxItems 10
90
- */
91
- insights?: DraftHackInsightSegment[];
92
- conclusion?: DraftHackSegment;
93
- }
94
-
95
- export interface DraftHackCard {
96
- /**
97
- * @maxLength 2000
98
- */
99
- markdown: string;
100
- }
101
-
102
- export interface DraftHackSegment {
103
- /**
104
- * @maxItems 50
105
- * @items.maxLength 150
106
- */
107
- keywords: string[];
108
- paragraphCards: DraftHackCard[][];
109
- /**
110
- * @maxLength 1000
111
- */
112
- textSummary?: string;
113
- }
114
-
115
- export interface DraftHackInsightSegment extends DraftHackSegment {
116
- /**
117
- * @maxLength 150
118
- */
119
- title?: string;
120
- /**
121
- * @maxItems 50
122
- */
123
- actions: DraftHackAction[];
124
- }
125
-
126
- export interface DraftHackAction {
127
- /**
128
- * @maxLength 150
129
- */
130
- title: string;
131
- /**
132
- * @maxLength 1000
133
- */
134
- markdown: string
135
- }
136
-
137
- export interface DraftContributor {
138
- /**
139
- * @maxLength 150
140
- */
141
- name: string;
142
- }
143
-
144
- export interface DraftTopic {
145
- /**
146
- * @maxLength 150
147
- */
148
- name: string;
149
- }
150
-
151
- export interface DraftAffiliate {
152
- /**
153
- * @maxLength 1000
154
- */
155
- url?: string;
156
- /**
157
- * @maxLength 150
158
- */
159
- name?: string;
160
- }
161
-
162
- export interface DraftSourceData {
163
- /**
164
- * @maxLength 150
165
- */
166
- episodeTitle?: string;
167
- /**
168
- * @maxLength 50
169
- */
170
- releaseDate?: string;
171
- }
172
-
173
- export interface DraftHackExternalLink {
174
- /**
175
- * @maxLength 1000
176
- */
177
- url: string;
178
- type: 'Website' | 'Book' | 'Course' | 'Podcast' | 'Video' | 'Other';
179
- }
180
-
181
- // this status is currently used to present the draft in different columns in the airtable used by the content team
182
- export type DraftHackWorkflowStatus = 'publishing' | 'published';
183
- export type DraftHackType = 'book' | 'course' | 'documentary' | 'podcast' | 'original';
184
- export type DraftHackRating = 'mature' | 'appropriate';
1
+ import { SupportedLocale } from '../localisation/supported-locales';
2
+
3
+ export interface DraftHack extends DraftHackContent {
4
+ /** The unique id of the draft hack. */
5
+ id: string;
6
+ /** The locale (language and region) of the draft hack e.g. fr-FR. Mandatory property since 12/01/2023. */
7
+ locale: SupportedLocale;
8
+ /** @deprecated Temporarily added in 12/01/2023. Should not be used under any circumstance as only a handful of drafts will contain this property */
9
+ baseLocaleDraftHackId?: string;
10
+ /** The id of the hack. Mandatory property since Dec 2022. */
11
+ hackId: string;
12
+ /** The id of the hack in its original locale. Mandatory property since 01/02/2023. */
13
+ baseLocaleHackId: string;
14
+
15
+ v: number;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ publishedAt?: string;
19
+ publishedVersion?: number;
20
+ owner?: string;
21
+ /** workflowStatus was added in May 2022 as we move toward UGC. Older drafts have not been backfilled */
22
+ workflowStatus?: DraftHackWorkflowStatus;
23
+ /** added in Nov 2022. Set to true whenever content changes are made to the draft */
24
+ hasUnpublishedChanges?: boolean;
25
+ /** added in March 2023. Must be set whenever content changes are made to the draft */
26
+ contentUpdatedAt?: string;
27
+ /** added in late April 2023. Only set on translations. Set to the value of contentUpdatedAt of the base locale draft that was translated. Can be used to determine if the translated draft is out of sync with the original draft */
28
+ baseLocaleContentUpdatedAt?: string;
29
+ }
30
+
31
+ export interface DraftHackContent {
32
+ /**
33
+ * @maxLength 150
34
+ */
35
+ title: string;
36
+ /**
37
+ * @maxLength 50
38
+ */
39
+ sourceId?: string;
40
+ /**
41
+ * @maxLength 50
42
+ */
43
+ themeId?: string;
44
+ segments: DraftHackSegments;
45
+ /**
46
+ * @maxLength 1000
47
+ */
48
+ coverUrl?: string;
49
+ notifications?: DraftHackNotifications;
50
+ affiliate?: DraftAffiliate;
51
+ /**
52
+ * @maxItems 50
53
+ */
54
+ topics?: DraftTopic[];
55
+ /**
56
+ * @maxItems 10
57
+ */
58
+ contributors?: DraftContributor[];
59
+ sourceData?: DraftSourceData;
60
+ /** For creators only. We will tackle this validation once profiles are introduce*/
61
+ externalLink?: DraftHackExternalLink;
62
+ /** For recording purpose for now, we will use this value further in the future */
63
+ contentRating?: DraftHackRating;
64
+ /**
65
+ * @maxItems 50
66
+ * @items.maxLength 150
67
+ */
68
+ tags?: string[];
69
+ type?: DraftHackType;
70
+ isCopyrightFree?: boolean;
71
+ }
72
+
73
+ export interface DraftHackNotifications {
74
+ /**
75
+ * @maxLength 1000
76
+ */
77
+ aiGeneratedText?: string;
78
+ /**
79
+ * @maxLength 1000
80
+ */
81
+ humanCuratedText?: string;
82
+ }
83
+
84
+ export interface DraftHackSegments {
85
+ favouriteQuote?: DraftHackSegment;
86
+ inANutshell?: DraftHackSegment;
87
+ introduction?: DraftHackSegment;
88
+ /**
89
+ * @maxItems 10
90
+ */
91
+ insights?: DraftHackInsightSegment[];
92
+ conclusion?: DraftHackSegment;
93
+ }
94
+
95
+ export interface DraftHackCard {
96
+ /**
97
+ * @maxLength 2000
98
+ */
99
+ markdown: string;
100
+ }
101
+
102
+ export interface DraftHackSegment {
103
+ /**
104
+ * @maxItems 50
105
+ * @items.maxLength 150
106
+ */
107
+ keywords: string[];
108
+ paragraphCards: DraftHackCard[][];
109
+ /**
110
+ * @maxLength 1000
111
+ */
112
+ textSummary?: string;
113
+ }
114
+
115
+ export interface DraftHackInsightSegment extends DraftHackSegment {
116
+ /**
117
+ * @maxLength 150
118
+ */
119
+ title?: string;
120
+ /**
121
+ * @maxItems 50
122
+ */
123
+ actions: DraftHackAction[];
124
+ }
125
+
126
+ export interface DraftHackAction {
127
+ /**
128
+ * @maxLength 150
129
+ */
130
+ title: string;
131
+ /**
132
+ * @maxLength 1000
133
+ */
134
+ markdown: string
135
+ }
136
+
137
+ export interface DraftContributor {
138
+ /**
139
+ * @maxLength 150
140
+ */
141
+ name: string;
142
+ }
143
+
144
+ export interface DraftTopic {
145
+ /**
146
+ * @maxLength 150
147
+ */
148
+ name: string;
149
+ }
150
+
151
+ export interface DraftAffiliate {
152
+ /**
153
+ * @maxLength 1000
154
+ */
155
+ url?: string;
156
+ /**
157
+ * @maxLength 150
158
+ */
159
+ name?: string;
160
+ }
161
+
162
+ export interface DraftSourceData {
163
+ /**
164
+ * @maxLength 150
165
+ */
166
+ episodeTitle?: string;
167
+ /**
168
+ * @maxLength 50
169
+ */
170
+ releaseDate?: string;
171
+ }
172
+
173
+ export interface DraftHackExternalLink {
174
+ /**
175
+ * @maxLength 1000
176
+ */
177
+ url: string;
178
+ type: 'Website' | 'Book' | 'Course' | 'Podcast' | 'Video' | 'Other';
179
+ }
180
+
181
+ // this status is currently used to present the draft in different columns in the airtable used by the content team
182
+ export type DraftHackWorkflowStatus = 'publishing' | 'published';
183
+ export type DraftHackType = 'book' | 'course' | 'documentary' | 'podcast' | 'original';
184
+ export type DraftHackRating = 'mature' | 'appropriate';
@@ -1,21 +1,21 @@
1
- import { EnrichedHack } from './enriched-hack';
2
-
3
- export interface EnrichedHackCreatedEvent {
4
- id: string;
5
- type: 'EnrichedHackCreated';
6
- payload: EnrichedHack;
7
- }
8
-
9
- export interface EnrichedHackUpdatedEvent {
10
- id: string;
11
- type: 'EnrichedHackUpdated';
12
- payload: EnrichedHack;
13
- }
14
-
15
- export interface EnrichedHackDeletedEvent {
16
- id: string;
17
- type: 'EnrichedHackDeleted';
18
- payload: EnrichedHack;
19
- }
20
-
21
- export type EnrichedHackChangedEvent = EnrichedHackCreatedEvent | EnrichedHackUpdatedEvent | EnrichedHackDeletedEvent;
1
+ import { EnrichedHack } from './enriched-hack';
2
+
3
+ export interface EnrichedHackCreatedEvent {
4
+ id: string;
5
+ type: 'EnrichedHackCreated';
6
+ payload: EnrichedHack;
7
+ }
8
+
9
+ export interface EnrichedHackUpdatedEvent {
10
+ id: string;
11
+ type: 'EnrichedHackUpdated';
12
+ payload: EnrichedHack;
13
+ }
14
+
15
+ export interface EnrichedHackDeletedEvent {
16
+ id: string;
17
+ type: 'EnrichedHackDeleted';
18
+ payload: EnrichedHack;
19
+ }
20
+
21
+ export type EnrichedHackChangedEvent = EnrichedHackCreatedEvent | EnrichedHackUpdatedEvent | EnrichedHackDeletedEvent;
@@ -1,101 +1,101 @@
1
- import { HackAffiliate, HackContributor, HackExternalLink, HackSourceData, HackTopic, HackType } from '../hack/hack';
2
- import { KnowledgeSource } from '../knowledge-source/knowledge-source';
3
- import { Profile } from '../profile/profile';
4
- import { Theme } from '../theme/theme';
5
- import { HackWithVoice } from '../hack/hack-with-voice';
6
- import { ExtractedSubject } from '../hack/extracted-subject';
7
- import { SegmentType, SegmentAction, SegmentSpeech, SegmentSection, SegmentTextCard } from '../segment/segment';
8
-
9
- export interface EnrichedHack {
10
- /** The hack id */
11
- id: string;
12
- /** The hack language e.g. 'fr' if it is French */
13
- language: string;
14
- /** The locale (language and region) of the hack e.g. fr-FR. Use @uptime.app/localisation-contracts */
15
- locale: string;
16
- /** The id of the hack in its original locale. */
17
- baseLocaleHackId: string;
18
- v: number;
19
- hackVersion: number;
20
- createdAt: string;
21
- updatedAt: string;
22
-
23
- /** introduced Oct 2023 **/
24
- draftHackId: string;
25
- draftHackVersion: number;
26
-
27
- //@todo: Deprecate
28
- source?: KnowledgeSource;
29
- owner: string;
30
- acl: string[];
31
- theme: Theme;
32
- title: string;
33
- isHidden?: boolean;
34
- editorialTags?: string[];
35
- coverUrl?: string;
36
- notifications?: EnrichedHackNotifications;
37
- /* currently contains the inANutshell segment markdown */
38
- description: string;
39
- // ...
40
-
41
- segments: HackWithVoice['segments']; // Use the 'HackWithVoice' type
42
- affiliate?: HackAffiliate;
43
- topics: HackTopic[];
44
- contributors?: HackContributor[];
45
- type: HackType;
46
- sourceData?: HackSourceData;
47
- externalLink?: HackExternalLink;
48
- profile: EnrichHackProfile;
49
-
50
- /** added April 2024 */
51
- // TODO make it mandatory after a republish
52
- subjects?: EnrichedHackSubjects;
53
-
54
- // distribution
55
- includeInEmailNotifications: boolean;
56
- includeInPushNotifications: boolean;
57
- includeInRecommendations: boolean;
58
- includeInSearchResults: boolean;
59
- includeInTrending: boolean;
60
- includeInHackOfTheDay: boolean;
61
- includeInWebsite: boolean;
62
-
63
- /**
64
- * Time saved in minutes by consuming the hack rather than the underlying knowledge source.
65
- * calculated using the knowledge source page count / duration
66
- * */
67
- timeSaved?: number;
68
- /**
69
- * An estimation of the time saved in minutes when no reliable information is available on the knowledge source.
70
- */
71
- estimatedTimeSaved?: number;
72
- }
73
-
74
- export interface EnrichedHackNotifications {
75
- aiGeneratedText?: string;
76
- humanCuratedText?: string;
77
- }
78
-
79
- export interface EnrichedHackSubjects {
80
- aiGenerated: ExtractedSubject[];
81
- humanCurated?: ExtractedSubject[];
82
- }
83
-
84
- export interface EnrichedHackSegment {
85
- id: string;
86
- createdAt: string;
87
- updatedAt: string;
88
- title: string;
89
- type: SegmentType;
90
- keywords: string[];
91
- actions: SegmentAction[];
92
- speech: SegmentSpeech[];
93
- sections: SegmentSection[];
94
- storyMode?: {
95
- cards: SegmentTextCard[];
96
- speech: SegmentSpeech[];
97
- },
98
- textSummary?: string;
99
- }
100
-
101
- export type EnrichHackProfile = Profile | { deleted: boolean, uptimeOwned: boolean, avatarUrl: string };
1
+ import { HackAffiliate, HackContributor, HackExternalLink, HackSourceData, HackTopic, HackType } from '../hack/hack';
2
+ import { KnowledgeSource } from '../knowledge-source/knowledge-source';
3
+ import { Profile } from '../profile/profile';
4
+ import { Theme } from '../theme/theme';
5
+ import { HackWithVoice } from '../hack/hack-with-voice';
6
+ import { ExtractedSubject } from '../hack/extracted-subject';
7
+ import { SegmentType, SegmentAction, SegmentSpeech, SegmentSection, SegmentTextCard } from '../segment/segment';
8
+
9
+ export interface EnrichedHack {
10
+ /** The hack id */
11
+ id: string;
12
+ /** The hack language e.g. 'fr' if it is French */
13
+ language: string;
14
+ /** The locale (language and region) of the hack e.g. fr-FR. Use @uptime.app/localisation-contracts */
15
+ locale: string;
16
+ /** The id of the hack in its original locale. */
17
+ baseLocaleHackId: string;
18
+ v: number;
19
+ hackVersion: number;
20
+ createdAt: string;
21
+ updatedAt: string;
22
+
23
+ /** introduced Oct 2023 **/
24
+ draftHackId: string;
25
+ draftHackVersion: number;
26
+
27
+ //@todo: Deprecate
28
+ source?: KnowledgeSource;
29
+ owner: string;
30
+ acl: string[];
31
+ theme: Theme;
32
+ title: string;
33
+ isHidden?: boolean;
34
+ editorialTags?: string[];
35
+ coverUrl?: string;
36
+ notifications?: EnrichedHackNotifications;
37
+ /* currently contains the inANutshell segment markdown */
38
+ description: string;
39
+ // ...
40
+
41
+ segments: HackWithVoice['segments']; // Use the 'HackWithVoice' type
42
+ affiliate?: HackAffiliate;
43
+ topics: HackTopic[];
44
+ contributors?: HackContributor[];
45
+ type: HackType;
46
+ sourceData?: HackSourceData;
47
+ externalLink?: HackExternalLink;
48
+ profile: EnrichHackProfile;
49
+
50
+ /** added April 2024 */
51
+ // TODO make it mandatory after a republish
52
+ subjects?: EnrichedHackSubjects;
53
+
54
+ // distribution
55
+ includeInEmailNotifications: boolean;
56
+ includeInPushNotifications: boolean;
57
+ includeInRecommendations: boolean;
58
+ includeInSearchResults: boolean;
59
+ includeInTrending: boolean;
60
+ includeInHackOfTheDay: boolean;
61
+ includeInWebsite: boolean;
62
+
63
+ /**
64
+ * Time saved in minutes by consuming the hack rather than the underlying knowledge source.
65
+ * calculated using the knowledge source page count / duration
66
+ * */
67
+ timeSaved?: number;
68
+ /**
69
+ * An estimation of the time saved in minutes when no reliable information is available on the knowledge source.
70
+ */
71
+ estimatedTimeSaved?: number;
72
+ }
73
+
74
+ export interface EnrichedHackNotifications {
75
+ aiGeneratedText?: string;
76
+ humanCuratedText?: string;
77
+ }
78
+
79
+ export interface EnrichedHackSubjects {
80
+ aiGenerated: ExtractedSubject[];
81
+ humanCurated?: ExtractedSubject[];
82
+ }
83
+
84
+ export interface EnrichedHackSegment {
85
+ id: string;
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ title: string;
89
+ type: SegmentType;
90
+ keywords: string[];
91
+ actions: SegmentAction[];
92
+ speech: SegmentSpeech[];
93
+ sections: SegmentSection[];
94
+ storyMode?: {
95
+ cards: SegmentTextCard[];
96
+ speech: SegmentSpeech[];
97
+ },
98
+ textSummary?: string;
99
+ }
100
+
101
+ export type EnrichHackProfile = Profile | { deleted: boolean, uptimeOwned: boolean, avatarUrl: string };
@@ -1,5 +1,5 @@
1
-
2
- // defined in @uptime.app/subject-extraction-service but trying to avoid too many dependencies
3
- export interface ExtractedSubject {
4
- name: string;
1
+
2
+ // defined in @uptime.app/subject-extraction-service but trying to avoid too many dependencies
3
+ export interface ExtractedSubject {
4
+ name: string;
5
5
  }
@@ -1,21 +1,21 @@
1
- import { Hack } from './hack';
2
-
3
- export interface HackCreatedEvent {
4
- id: string;
5
- type: 'HackCreated';
6
- payload: Hack;
7
- }
8
-
9
- export interface HackUpdatedEvent {
10
- id: string;
11
- type: 'HackUpdated';
12
- payload: Hack;
13
- }
14
-
15
- export interface HackDeletedEvent {
16
- id: string;
17
- type: 'HackDeleted';
18
- payload: Hack;
19
- }
20
-
21
- export type HackChangedEvent = HackCreatedEvent | HackUpdatedEvent | HackDeletedEvent;
1
+ import { Hack } from './hack';
2
+
3
+ export interface HackCreatedEvent {
4
+ id: string;
5
+ type: 'HackCreated';
6
+ payload: Hack;
7
+ }
8
+
9
+ export interface HackUpdatedEvent {
10
+ id: string;
11
+ type: 'HackUpdated';
12
+ payload: Hack;
13
+ }
14
+
15
+ export interface HackDeletedEvent {
16
+ id: string;
17
+ type: 'HackDeleted';
18
+ payload: Hack;
19
+ }
20
+
21
+ export type HackChangedEvent = HackCreatedEvent | HackUpdatedEvent | HackDeletedEvent;