@uptime.app/contracts 1.0.21-rc.0 → 1.0.21
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/package.json +2 -2
- package/src/access-control/collection-access-control.ts +28 -28
- package/src/access-control/hack-access-control.ts +29 -29
- package/src/app-hack/app-full-hack.ts +9 -9
- package/src/app-hack/app-hack-metadata.ts +56 -56
- package/src/app-hack/app-restricted-hack.ts +22 -22
- package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
- package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
- package/src/b2b-organisation/b2b-organisation-member.ts +8 -8
- package/src/b2b-organisation/b2b-organisation.ts +14 -14
- package/src/brand/brand-events.ts +21 -21
- package/src/brand/brand.ts +8 -8
- package/src/collection/collection-events.ts +21 -21
- package/src/collection/collection.ts +58 -58
- package/src/collection/enriched-collection-events.ts +18 -18
- package/src/collection/enriched-collection.ts +64 -64
- package/src/distribution/collection-distribution.ts +17 -17
- package/src/distribution/distribution-events.ts +61 -61
- package/src/distribution/hack-distribution.ts +18 -18
- package/src/draft-hack/draft-hack-events.ts +21 -21
- package/src/draft-hack/draft-hack.ts +184 -184
- package/src/draft-hack-generation/draft-hack-generation-events.ts +42 -42
- package/src/draft-hack-generation/draft-hack-generation.ts +38 -38
- package/src/enriched-hack/enriched-hack-events.ts +21 -21
- package/src/enriched-hack/enriched-hack.ts +101 -101
- package/src/entitlement/user-entitlements-events.ts +20 -20
- package/src/entitlement/user-entitlements.ts +17 -17
- package/src/hack/extracted-subject.ts +31 -31
- package/src/hack/hack-events.ts +21 -21
- package/src/hack/hack-with-voice-events.ts +20 -20
- package/src/hack/hack-with-voice.ts +33 -33
- package/src/hack/hack.ts +114 -114
- package/src/hack-metadata/hack-metadata-events.ts +21 -21
- package/src/hack-metadata/hack-metadata.ts +17 -17
- package/src/index.ts +84 -84
- package/src/knowledge-source/knowledge-source-events.ts +21 -21
- package/src/knowledge-source/knowledge-source.ts +43 -43
- package/src/localisation/live-locales.ts +32 -32
- package/src/localisation/locale-language.ts +4 -4
- package/src/localisation/supported-languages.ts +11 -11
- package/src/localisation/supported-locales.ts +43 -43
- package/src/pending-hack/pending-hack-events.ts +20 -20
- package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
- package/src/pending-hack/pending-hack-with-voice.ts +25 -25
- package/src/pending-hack/pending-hack.ts +75 -75
- package/src/profile/profile-events.ts +41 -41
- package/src/profile/profile.ts +27 -27
- package/src/profile/translated-profile.ts +13 -13
- package/src/segment/segment-commands.ts +70 -70
- package/src/segment/segment-events.ts +42 -42
- package/src/segment/segment-with-voice.ts +8 -8
- package/src/segment/segment.ts +82 -82
- package/src/skin/skin-events.ts +21 -21
- package/src/skin/skin.ts +6 -6
- package/src/text-to-speech/create-speech-commands.ts +20 -20
- package/src/text-to-speech/speech-created-events.ts +10 -10
- package/src/text-to-speech/supported-voices.ts +101 -101
- package/src/text-to-speech/text-segment.ts +29 -29
- package/src/theme/theme-events.ts +21 -21
- package/src/theme/theme.ts +68 -68
- package/src/trending/trending-events.ts +21 -21
- package/src/trending/trending-hacks.ts +8 -8
- package/src/user-context/user-context-events.ts +21 -21
- package/src/user-context/user-context.ts +16 -16
- package/tsconfig.cjs.json +7 -7
- package/tsconfig.npm.json +21 -21
|
@@ -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,21 +1,21 @@
|
|
|
1
|
-
import { UserEntitlements } from './user-entitlements';
|
|
2
|
-
|
|
3
|
-
export interface UserEntitlementsCreatedEvent {
|
|
4
|
-
id: string;
|
|
5
|
-
type: 'UserEntitlementsCreated';
|
|
6
|
-
payload: UserEntitlements;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface UserEntitlementsUpdatedEvent {
|
|
10
|
-
id: string;
|
|
11
|
-
type: 'UserEntitlementsUpdated';
|
|
12
|
-
payload: UserEntitlements;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface UserEntitlementsDeletedEvent {
|
|
16
|
-
id: string;
|
|
17
|
-
type: 'UserEntitlementsDeleted';
|
|
18
|
-
payload: UserEntitlements;
|
|
19
|
-
}
|
|
20
|
-
|
|
1
|
+
import { UserEntitlements } from './user-entitlements';
|
|
2
|
+
|
|
3
|
+
export interface UserEntitlementsCreatedEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'UserEntitlementsCreated';
|
|
6
|
+
payload: UserEntitlements;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface UserEntitlementsUpdatedEvent {
|
|
10
|
+
id: string;
|
|
11
|
+
type: 'UserEntitlementsUpdated';
|
|
12
|
+
payload: UserEntitlements;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface UserEntitlementsDeletedEvent {
|
|
16
|
+
id: string;
|
|
17
|
+
type: 'UserEntitlementsDeleted';
|
|
18
|
+
payload: UserEntitlements;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
21
|
export type UserEntitlementsChangedEvent = UserEntitlementsCreatedEvent | UserEntitlementsUpdatedEvent | UserEntitlementsDeletedEvent;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export type EntitlementName = 'premium' | 'trial';
|
|
2
|
-
export type EntitlementIssuer = 'Uptime' | 'RevenueCat';
|
|
3
|
-
|
|
4
|
-
export type Entitlement = {
|
|
5
|
-
entitlement: EntitlementName | string;
|
|
6
|
-
issuer: EntitlementIssuer | string;
|
|
7
|
-
expiresAt: string
|
|
8
|
-
issuedAt: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export interface UserEntitlements {
|
|
12
|
-
id: string;
|
|
13
|
-
v: number;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
|
-
userId: string;
|
|
17
|
-
entitlements: Entitlement[];
|
|
1
|
+
export type EntitlementName = 'premium' | 'trial';
|
|
2
|
+
export type EntitlementIssuer = 'Uptime' | 'RevenueCat';
|
|
3
|
+
|
|
4
|
+
export type Entitlement = {
|
|
5
|
+
entitlement: EntitlementName | string;
|
|
6
|
+
issuer: EntitlementIssuer | string;
|
|
7
|
+
expiresAt: string
|
|
8
|
+
issuedAt: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export interface UserEntitlements {
|
|
12
|
+
id: string;
|
|
13
|
+
v: number;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
entitlements: Entitlement[];
|
|
18
18
|
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export interface ExtractedSubject {
|
|
2
|
-
name: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export interface ExtractSubjectsCommandBody {
|
|
6
|
-
id: string;
|
|
7
|
-
v: number;
|
|
8
|
-
reference: string;
|
|
9
|
-
content: string;
|
|
10
|
-
contentType: string; // e.g. 'hack'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ExtractSubjectsCommand {
|
|
14
|
-
id: string;
|
|
15
|
-
type: 'ExtractSubjectsCommand';
|
|
16
|
-
payload: ExtractSubjectsCommandBody;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface SubjectsExtracted {
|
|
20
|
-
id: string;
|
|
21
|
-
type: 'SubjectsExtracted',
|
|
22
|
-
payload: SubjectsExtractedBody
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface SubjectsExtractedBody {
|
|
26
|
-
id: string,
|
|
27
|
-
v: number,
|
|
28
|
-
reference: string,
|
|
29
|
-
contentType: string;
|
|
30
|
-
subjects: ExtractedSubject[]
|
|
31
|
-
}
|
|
1
|
+
export interface ExtractedSubject {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface ExtractSubjectsCommandBody {
|
|
6
|
+
id: string;
|
|
7
|
+
v: number;
|
|
8
|
+
reference: string;
|
|
9
|
+
content: string;
|
|
10
|
+
contentType: string; // e.g. 'hack'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ExtractSubjectsCommand {
|
|
14
|
+
id: string;
|
|
15
|
+
type: 'ExtractSubjectsCommand';
|
|
16
|
+
payload: ExtractSubjectsCommandBody;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface SubjectsExtracted {
|
|
20
|
+
id: string;
|
|
21
|
+
type: 'SubjectsExtracted',
|
|
22
|
+
payload: SubjectsExtractedBody
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SubjectsExtractedBody {
|
|
26
|
+
id: string,
|
|
27
|
+
v: number,
|
|
28
|
+
reference: string,
|
|
29
|
+
contentType: string;
|
|
30
|
+
subjects: ExtractedSubject[]
|
|
31
|
+
}
|
package/src/hack/hack-events.ts
CHANGED
|
@@ -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;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { HackWithVoice } from './hack-with-voice';
|
|
2
|
-
|
|
3
|
-
export interface HackWithVoiceCreatedEvent {
|
|
4
|
-
id: string;
|
|
5
|
-
type: 'HackWithVoiceCreated';
|
|
6
|
-
payload: HackWithVoice;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface HackWithVoiceUpdatedEvent {
|
|
10
|
-
id: string;
|
|
11
|
-
type: 'HackWithVoiceUpdated';
|
|
12
|
-
payload: HackWithVoice;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface HackWithVoiceDeletedEvent {
|
|
16
|
-
id: string;
|
|
17
|
-
type: 'HackWithVoiceDeleted';
|
|
18
|
-
payload: HackWithVoice;
|
|
19
|
-
}
|
|
20
|
-
|
|
1
|
+
import { HackWithVoice } from './hack-with-voice';
|
|
2
|
+
|
|
3
|
+
export interface HackWithVoiceCreatedEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'HackWithVoiceCreated';
|
|
6
|
+
payload: HackWithVoice;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface HackWithVoiceUpdatedEvent {
|
|
10
|
+
id: string;
|
|
11
|
+
type: 'HackWithVoiceUpdated';
|
|
12
|
+
payload: HackWithVoice;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface HackWithVoiceDeletedEvent {
|
|
16
|
+
id: string;
|
|
17
|
+
type: 'HackWithVoiceDeleted';
|
|
18
|
+
payload: HackWithVoice;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
21
|
export type HackWithVoiceChangedEvent = HackWithVoiceCreatedEvent | HackWithVoiceUpdatedEvent | HackWithVoiceDeletedEvent;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Segment } from '../segment/segment';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* HackWithVoice contains the Hack segments a a few basic Hack fields, it does not contain other Hack information.
|
|
5
|
-
* This decision was made due to the complexity of editorialTags and updating them.
|
|
6
|
-
*/
|
|
7
|
-
export interface HackWithVoice {
|
|
8
|
-
/** NOT the id of the hack. Use hackId. The id cannot be the hackId as otherwise id would be duplicated for each voice which would break message replay */
|
|
9
|
-
id: string;
|
|
10
|
-
/** The id of the hack */
|
|
11
|
-
hackId: string;
|
|
12
|
-
baseLocaleHackId: string;
|
|
13
|
-
/** The id of voice used to generate the audio */
|
|
14
|
-
voiceId: string;
|
|
15
|
-
/** True if this is the default voice */
|
|
16
|
-
isDefaultVoice: boolean;
|
|
17
|
-
v: number;
|
|
18
|
-
createdAt: string;
|
|
19
|
-
updatedAt: string;
|
|
20
|
-
|
|
21
|
-
segments: {
|
|
22
|
-
favouriteQuote: Segment;
|
|
23
|
-
inANutshell: Segment;
|
|
24
|
-
introduction: Segment;
|
|
25
|
-
insights: Segment[];
|
|
26
|
-
conclusion: Segment;
|
|
27
|
-
// composite segments
|
|
28
|
-
overview: Segment;
|
|
29
|
-
shareableOverview: Segment;
|
|
30
|
-
hereAreTheInsights: Segment;
|
|
31
|
-
putInAction?: Segment;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
import { Segment } from '../segment/segment';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HackWithVoice contains the Hack segments a a few basic Hack fields, it does not contain other Hack information.
|
|
5
|
+
* This decision was made due to the complexity of editorialTags and updating them.
|
|
6
|
+
*/
|
|
7
|
+
export interface HackWithVoice {
|
|
8
|
+
/** NOT the id of the hack. Use hackId. The id cannot be the hackId as otherwise id would be duplicated for each voice which would break message replay */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The id of the hack */
|
|
11
|
+
hackId: string;
|
|
12
|
+
baseLocaleHackId: string;
|
|
13
|
+
/** The id of voice used to generate the audio */
|
|
14
|
+
voiceId: string;
|
|
15
|
+
/** True if this is the default voice */
|
|
16
|
+
isDefaultVoice: boolean;
|
|
17
|
+
v: number;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
|
|
21
|
+
segments: {
|
|
22
|
+
favouriteQuote: Segment;
|
|
23
|
+
inANutshell: Segment;
|
|
24
|
+
introduction: Segment;
|
|
25
|
+
insights: Segment[];
|
|
26
|
+
conclusion: Segment;
|
|
27
|
+
// composite segments
|
|
28
|
+
overview: Segment;
|
|
29
|
+
shareableOverview: Segment;
|
|
30
|
+
hereAreTheInsights: Segment;
|
|
31
|
+
putInAction?: Segment;
|
|
32
|
+
}
|
|
33
|
+
}
|