@uptime.app/contracts 1.0.39 → 1.0.41-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/spark/spark-board-read-model.d.ts +15 -0
- package/dist/cjs/spark/spark-board-read-model.d.ts.map +1 -0
- package/dist/cjs/spark/spark-board-read-model.js +3 -0
- package/dist/cjs/spark/spark-board-read-model.js.map +1 -0
- package/dist/cjs/spark/spark-board.d.ts +12 -0
- package/dist/cjs/spark/spark-board.d.ts.map +1 -0
- package/dist/cjs/spark/spark-board.js +3 -0
- package/dist/cjs/spark/spark-board.js.map +1 -0
- package/dist/cjs/spark/spark-events.d.ts +35 -0
- package/dist/cjs/spark/spark-events.d.ts.map +1 -0
- package/dist/cjs/spark/spark-events.js +3 -0
- package/dist/cjs/spark/spark-events.js.map +1 -0
- package/dist/cjs/spark/spark.d.ts +51 -0
- package/dist/cjs/spark/spark.d.ts.map +1 -0
- package/dist/cjs/spark/spark.js +3 -0
- package/dist/cjs/spark/spark.js.map +1 -0
- package/dist/cjs/text-to-speech/supported-voices.js +4 -4
- package/dist/cjs/text-to-speech/supported-voices.js.map +1 -1
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/spark/spark-board-read-model.d.ts +15 -0
- package/dist/esm/spark/spark-board-read-model.d.ts.map +1 -0
- package/dist/esm/spark/spark-board-read-model.js +2 -0
- package/dist/esm/spark/spark-board-read-model.js.map +1 -0
- package/dist/esm/spark/spark-board.d.ts +12 -0
- package/dist/esm/spark/spark-board.d.ts.map +1 -0
- package/dist/esm/spark/spark-board.js +2 -0
- package/dist/esm/spark/spark-board.js.map +1 -0
- package/dist/esm/spark/spark-events.d.ts +35 -0
- package/dist/esm/spark/spark-events.d.ts.map +1 -0
- package/dist/esm/spark/spark-events.js +2 -0
- package/dist/esm/spark/spark-events.js.map +1 -0
- package/dist/esm/spark/spark.d.ts +51 -0
- package/dist/esm/spark/spark.d.ts.map +1 -0
- package/dist/esm/spark/spark.js +2 -0
- package/dist/esm/spark/spark.js.map +1 -0
- package/dist/esm/text-to-speech/supported-voices.js +4 -4
- package/dist/esm/text-to-speech/supported-voices.js.map +1 -1
- 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 +58 -58
- package/src/app-hack/app-restricted-hack.ts +22 -22
- package/src/b2b-content-access/b2b-content-access.ts +57 -57
- package/src/b2b-organisation/b2b-carousel.ts +34 -34
- package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
- package/src/b2b-organisation/b2b-organisation-invitation.ts +31 -31
- 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 +15 -15
- package/src/brand/brand-events.ts +21 -21
- package/src/brand/brand.ts +19 -19
- package/src/catalogue/catalogue.ts +118 -118
- 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/creator/creator-events.ts +32 -32
- package/src/creator/creator.ts +7 -7
- 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 +189 -189
- package/src/draft-hack-generation/draft-hack-generation-events.ts +42 -42
- package/src/draft-hack-generation/draft-hack-generation.ts +39 -39
- package/src/enriched-hack/enriched-hack-events.ts +21 -21
- package/src/enriched-hack/enriched-hack.ts +103 -103
- package/src/entitlement/user-entitlements-commands.ts +33 -33
- package/src/entitlement/user-entitlements-events.ts +29 -29
- package/src/entitlement/user-entitlements.ts +18 -18
- package/src/hack/extracted-subject.ts +31 -31
- package/src/hack/hack-events.ts +21 -21
- package/src/hack/hack-published.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 +116 -116
- package/src/hack/publish-hack-command.ts +18 -18
- package/src/hack-metadata/hack-metadata-events.ts +21 -21
- package/src/hack-metadata/hack-metadata.ts +17 -17
- package/src/hack-of-the-day/hack-of-the-day-events.ts +21 -21
- package/src/hack-of-the-day/hack-of-the-day.ts +13 -13
- package/src/index.ts +125 -120
- 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 +37 -37
- package/src/localisation/locale-language.ts +4 -4
- package/src/localisation/supported-languages.ts +11 -11
- package/src/localisation/supported-locales.ts +61 -61
- package/src/moderation/hack-moderation-result-events.ts +18 -18
- package/src/moderation/hack-moderation-result.ts +27 -27
- package/src/partner/partner-events.ts +21 -21
- package/src/partner/partner.ts +7 -7
- 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 +77 -77
- 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/referral/referral-events.ts +41 -41
- package/src/referral/referral.ts +76 -76
- package/src/saved/saved-collection-events.ts +19 -19
- package/src/saved/saved-collection.ts +8 -8
- 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/spark/spark-board-read-model.ts +17 -0
- package/src/spark/spark-board.ts +12 -0
- package/src/spark/spark-events.ts +42 -0
- package/src/spark/spark.ts +80 -0
- 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 +151 -151
- 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/translation/translation-events.ts +73 -73
- package/src/translation/translation.ts +25 -25
- package/src/trending/trending-events.ts +21 -21
- package/src/trending/trending-hacks.ts +8 -8
- package/src/user/user-events.ts +27 -27
- package/src/user-context/user-context-events.ts +21 -21
- package/src/user-context/user-context.ts +16 -16
- package/src/user-notification-context/user-notification-context-events.ts +21 -21
- package/src/user-notification-context/user-notification-context.ts +9 -9
- package/tsconfig.cjs.json +7 -7
- package/tsconfig.npm.json +21 -21
|
@@ -1,103 +1,103 @@
|
|
|
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
|
-
/** Added in July 2024. This is the URL of the cover image that is free to use without any copyright. */
|
|
37
|
-
copyrightFreeCoverUrl?: string;
|
|
38
|
-
notifications?: EnrichedHackNotifications;
|
|
39
|
-
/* currently contains the inANutshell segment markdown */
|
|
40
|
-
description: string;
|
|
41
|
-
// ...
|
|
42
|
-
|
|
43
|
-
segments: HackWithVoice['segments']; // Use the 'HackWithVoice' type
|
|
44
|
-
affiliate?: HackAffiliate;
|
|
45
|
-
topics: HackTopic[];
|
|
46
|
-
contributors?: HackContributor[];
|
|
47
|
-
type: HackType;
|
|
48
|
-
sourceData?: HackSourceData;
|
|
49
|
-
externalLink?: HackExternalLink;
|
|
50
|
-
profile: EnrichHackProfile;
|
|
51
|
-
|
|
52
|
-
/** added April 2024 */
|
|
53
|
-
// TODO make it mandatory after a republish
|
|
54
|
-
subjects?: EnrichedHackSubjects;
|
|
55
|
-
|
|
56
|
-
// distribution
|
|
57
|
-
includeInEmailNotifications: boolean;
|
|
58
|
-
includeInPushNotifications: boolean;
|
|
59
|
-
includeInRecommendations: boolean;
|
|
60
|
-
includeInSearchResults: boolean;
|
|
61
|
-
includeInTrending: boolean;
|
|
62
|
-
includeInHackOfTheDay: boolean;
|
|
63
|
-
includeInWebsite: boolean;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Time saved in minutes by consuming the hack rather than the underlying knowledge source.
|
|
67
|
-
* calculated using the knowledge source page count / duration
|
|
68
|
-
* */
|
|
69
|
-
timeSaved?: number;
|
|
70
|
-
/**
|
|
71
|
-
* An estimation of the time saved in minutes when no reliable information is available on the knowledge source.
|
|
72
|
-
*/
|
|
73
|
-
estimatedTimeSaved?: number;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface EnrichedHackNotifications {
|
|
77
|
-
aiGeneratedText?: string;
|
|
78
|
-
humanCuratedText?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface EnrichedHackSubjects {
|
|
82
|
-
aiGenerated: ExtractedSubject[];
|
|
83
|
-
humanCurated?: ExtractedSubject[];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface EnrichedHackSegment {
|
|
87
|
-
id: string;
|
|
88
|
-
createdAt: string;
|
|
89
|
-
updatedAt: string;
|
|
90
|
-
title: string;
|
|
91
|
-
type: SegmentType;
|
|
92
|
-
keywords: string[];
|
|
93
|
-
actions: SegmentAction[];
|
|
94
|
-
speech: SegmentSpeech[];
|
|
95
|
-
sections: SegmentSection[];
|
|
96
|
-
storyMode?: {
|
|
97
|
-
cards: SegmentTextCard[];
|
|
98
|
-
speech: SegmentSpeech[];
|
|
99
|
-
},
|
|
100
|
-
textSummary?: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
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
|
+
/** Added in July 2024. This is the URL of the cover image that is free to use without any copyright. */
|
|
37
|
+
copyrightFreeCoverUrl?: string;
|
|
38
|
+
notifications?: EnrichedHackNotifications;
|
|
39
|
+
/* currently contains the inANutshell segment markdown */
|
|
40
|
+
description: string;
|
|
41
|
+
// ...
|
|
42
|
+
|
|
43
|
+
segments: HackWithVoice['segments']; // Use the 'HackWithVoice' type
|
|
44
|
+
affiliate?: HackAffiliate;
|
|
45
|
+
topics: HackTopic[];
|
|
46
|
+
contributors?: HackContributor[];
|
|
47
|
+
type: HackType;
|
|
48
|
+
sourceData?: HackSourceData;
|
|
49
|
+
externalLink?: HackExternalLink;
|
|
50
|
+
profile: EnrichHackProfile;
|
|
51
|
+
|
|
52
|
+
/** added April 2024 */
|
|
53
|
+
// TODO make it mandatory after a republish
|
|
54
|
+
subjects?: EnrichedHackSubjects;
|
|
55
|
+
|
|
56
|
+
// distribution
|
|
57
|
+
includeInEmailNotifications: boolean;
|
|
58
|
+
includeInPushNotifications: boolean;
|
|
59
|
+
includeInRecommendations: boolean;
|
|
60
|
+
includeInSearchResults: boolean;
|
|
61
|
+
includeInTrending: boolean;
|
|
62
|
+
includeInHackOfTheDay: boolean;
|
|
63
|
+
includeInWebsite: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Time saved in minutes by consuming the hack rather than the underlying knowledge source.
|
|
67
|
+
* calculated using the knowledge source page count / duration
|
|
68
|
+
* */
|
|
69
|
+
timeSaved?: number;
|
|
70
|
+
/**
|
|
71
|
+
* An estimation of the time saved in minutes when no reliable information is available on the knowledge source.
|
|
72
|
+
*/
|
|
73
|
+
estimatedTimeSaved?: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface EnrichedHackNotifications {
|
|
77
|
+
aiGeneratedText?: string;
|
|
78
|
+
humanCuratedText?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface EnrichedHackSubjects {
|
|
82
|
+
aiGenerated: ExtractedSubject[];
|
|
83
|
+
humanCurated?: ExtractedSubject[];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface EnrichedHackSegment {
|
|
87
|
+
id: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
title: string;
|
|
91
|
+
type: SegmentType;
|
|
92
|
+
keywords: string[];
|
|
93
|
+
actions: SegmentAction[];
|
|
94
|
+
speech: SegmentSpeech[];
|
|
95
|
+
sections: SegmentSection[];
|
|
96
|
+
storyMode?: {
|
|
97
|
+
cards: SegmentTextCard[];
|
|
98
|
+
speech: SegmentSpeech[];
|
|
99
|
+
},
|
|
100
|
+
textSummary?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type EnrichHackProfile = Profile | { deleted: boolean, uptimeOwned: boolean, avatarUrl: string };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Entitlement, EntitlementName } from './user-entitlements';
|
|
2
|
-
|
|
3
|
-
export interface IssueUserEntitlementCommand {
|
|
4
|
-
id: string;
|
|
5
|
-
type: 'IssueUserEntitlement',
|
|
6
|
-
payload: IssueUserEntitlementCommandPayload
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface IssueUserEntitlementCommandPayload extends Entitlement {
|
|
10
|
-
id: string;
|
|
11
|
-
v: number;
|
|
12
|
-
userId: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface RemoveUserEntitlementCommand {
|
|
16
|
-
id: string;
|
|
17
|
-
type: 'RemoveUserEntitlement',
|
|
18
|
-
payload: RemoveUserEntitlementCommandPayload
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface RemoveUserEntitlementCommandPayload {
|
|
22
|
-
issuer: string;
|
|
23
|
-
entitlement: EntitlementName | string;
|
|
24
|
-
userId: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface RefreshRevenueCatUserStatusCommand {
|
|
28
|
-
id: string;
|
|
29
|
-
type: 'RefreshRevenueCatUserStatus',
|
|
30
|
-
payload: {
|
|
31
|
-
userId: string;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
1
|
+
import { Entitlement, EntitlementName } from './user-entitlements';
|
|
2
|
+
|
|
3
|
+
export interface IssueUserEntitlementCommand {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'IssueUserEntitlement',
|
|
6
|
+
payload: IssueUserEntitlementCommandPayload
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IssueUserEntitlementCommandPayload extends Entitlement {
|
|
10
|
+
id: string;
|
|
11
|
+
v: number;
|
|
12
|
+
userId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface RemoveUserEntitlementCommand {
|
|
16
|
+
id: string;
|
|
17
|
+
type: 'RemoveUserEntitlement',
|
|
18
|
+
payload: RemoveUserEntitlementCommandPayload
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface RemoveUserEntitlementCommandPayload {
|
|
22
|
+
issuer: string;
|
|
23
|
+
entitlement: EntitlementName | string;
|
|
24
|
+
userId: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface RefreshRevenueCatUserStatusCommand {
|
|
28
|
+
id: string;
|
|
29
|
+
type: 'RefreshRevenueCatUserStatus',
|
|
30
|
+
payload: {
|
|
31
|
+
userId: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
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
|
-
export type UserEntitlementsChangedEvent = UserEntitlementsCreatedEvent | UserEntitlementsUpdatedEvent | UserEntitlementsDeletedEvent;
|
|
22
|
-
|
|
23
|
-
export interface RevenueCatWebhookReceivedEvent {
|
|
24
|
-
id: string;
|
|
25
|
-
type: 'RevenueCatWebhookReceived',
|
|
26
|
-
payload: {
|
|
27
|
-
event: any;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
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
|
+
export type UserEntitlementsChangedEvent = UserEntitlementsCreatedEvent | UserEntitlementsUpdatedEvent | UserEntitlementsDeletedEvent;
|
|
22
|
+
|
|
23
|
+
export interface RevenueCatWebhookReceivedEvent {
|
|
24
|
+
id: string;
|
|
25
|
+
type: 'RevenueCatWebhookReceived',
|
|
26
|
+
payload: {
|
|
27
|
+
event: any;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -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[];
|
|
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[];
|
|
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
|
-
/**
|
|
2
|
-
* HackPublished events were introduce in March 2023 and have not been backfilled. Previously PendingHackDeleted events were used.
|
|
3
|
-
*/
|
|
4
|
-
export interface HackPublishedEvent {
|
|
5
|
-
id: string;
|
|
6
|
-
type: 'HackPublished';
|
|
7
|
-
payload: {
|
|
8
|
-
/** set as the hack id */
|
|
9
|
-
id: string;
|
|
10
|
-
/** set as the hack version */
|
|
11
|
-
v: number;
|
|
12
|
-
draftHackId: string;
|
|
13
|
-
draftHackVersion: number;
|
|
14
|
-
hackId: string;
|
|
15
|
-
hackVersion: number;
|
|
16
|
-
baseLocaleHackId: string;
|
|
17
|
-
// added very shortly after the event was introduced so a handful of historic events may be missing this property
|
|
18
|
-
publishCompletedAt: string
|
|
19
|
-
publishStartedAt: string;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* HackPublished events were introduce in March 2023 and have not been backfilled. Previously PendingHackDeleted events were used.
|
|
3
|
+
*/
|
|
4
|
+
export interface HackPublishedEvent {
|
|
5
|
+
id: string;
|
|
6
|
+
type: 'HackPublished';
|
|
7
|
+
payload: {
|
|
8
|
+
/** set as the hack id */
|
|
9
|
+
id: string;
|
|
10
|
+
/** set as the hack version */
|
|
11
|
+
v: number;
|
|
12
|
+
draftHackId: string;
|
|
13
|
+
draftHackVersion: number;
|
|
14
|
+
hackId: string;
|
|
15
|
+
hackVersion: number;
|
|
16
|
+
baseLocaleHackId: string;
|
|
17
|
+
// added very shortly after the event was introduced so a handful of historic events may be missing this property
|
|
18
|
+
publishCompletedAt: string
|
|
19
|
+
publishStartedAt: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -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
|
+
}
|