@uptime.app/contracts 1.0.2 → 1.0.4-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/hack/extracted-subject.d.ts +4 -0
- package/dist/cjs/hack/extracted-subject.d.ts.map +1 -0
- package/dist/cjs/hack/extracted-subject.js +3 -0
- package/dist/cjs/hack/extracted-subject.js.map +1 -0
- package/dist/cjs/hack/hack-events.d.ts +18 -0
- package/dist/cjs/hack/hack-events.d.ts.map +1 -0
- package/dist/cjs/hack/hack-events.js +3 -0
- package/dist/cjs/hack/hack-events.js.map +1 -0
- package/dist/cjs/hack/hack-with-voice-events.d.ts +18 -0
- package/dist/cjs/hack/hack-with-voice-events.d.ts.map +1 -0
- package/dist/cjs/hack/hack-with-voice-events.js +3 -0
- package/dist/cjs/hack/hack-with-voice-events.js.map +1 -0
- package/dist/cjs/hack/hack-with-voice.d.ts +31 -0
- package/dist/cjs/hack/hack-with-voice.d.ts.map +1 -0
- package/dist/cjs/hack/hack-with-voice.js +3 -0
- package/dist/cjs/hack/hack-with-voice.js.map +1 -0
- package/dist/cjs/hack/hack.d.ts +101 -0
- package/dist/cjs/hack/hack.d.ts.map +1 -0
- package/dist/{esm → cjs/hack}/hack.js.map +1 -1
- package/dist/cjs/index.d.ts +19 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +19 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/localisation/live-locales.d.ts +8 -0
- package/dist/cjs/localisation/live-locales.d.ts.map +1 -0
- package/dist/cjs/localisation/live-locales.js +37 -0
- package/dist/cjs/localisation/live-locales.js.map +1 -0
- package/dist/cjs/localisation/locale-language.d.ts +2 -0
- package/dist/cjs/localisation/locale-language.d.ts.map +1 -0
- package/dist/cjs/localisation/locale-language.js +10 -0
- package/dist/cjs/localisation/locale-language.js.map +1 -0
- package/dist/cjs/localisation/supported-languages.d.ts +4 -0
- package/dist/cjs/localisation/supported-languages.d.ts.map +1 -0
- package/dist/cjs/localisation/supported-languages.js +13 -0
- package/dist/cjs/localisation/supported-languages.js.map +1 -0
- package/dist/cjs/localisation/supported-locales.d.ts +38 -0
- package/dist/cjs/localisation/supported-locales.d.ts.map +1 -0
- package/dist/cjs/localisation/supported-locales.js +45 -0
- package/dist/cjs/localisation/supported-locales.js.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-events.d.ts +18 -0
- package/dist/cjs/pending-hack/pending-hack-events.d.ts.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-events.js +3 -0
- package/dist/cjs/pending-hack/pending-hack-events.js.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice-events.d.ts +18 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice-events.d.ts.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice-events.js +3 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice-events.js.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice.d.ts +22 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice.d.ts.map +1 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice.js +3 -0
- package/dist/cjs/pending-hack/pending-hack-with-voice.js.map +1 -0
- package/dist/cjs/pending-hack/pending-hack.d.ts +70 -0
- package/dist/cjs/pending-hack/pending-hack.d.ts.map +1 -0
- package/dist/cjs/pending-hack/pending-hack.js +3 -0
- package/dist/cjs/pending-hack/pending-hack.js.map +1 -0
- package/dist/cjs/segment/segment-commands.d.ts +62 -0
- package/dist/cjs/segment/segment-commands.d.ts.map +1 -0
- package/dist/cjs/segment/segment-commands.js +3 -0
- package/dist/cjs/segment/segment-commands.js.map +1 -0
- package/dist/cjs/segment/segment-with-voice.d.ts +5 -0
- package/dist/cjs/segment/segment-with-voice.d.ts.map +1 -0
- package/dist/cjs/segment/segment-with-voice.js +3 -0
- package/dist/cjs/segment/segment-with-voice.js.map +1 -0
- package/dist/cjs/segment/segment.d.ts +70 -0
- package/dist/cjs/segment/segment.d.ts.map +1 -0
- package/dist/cjs/segment/segment.js +3 -0
- package/dist/cjs/segment/segment.js.map +1 -0
- package/dist/cjs/text-to-speech/create-speech-commands.d.ts +19 -0
- package/dist/cjs/text-to-speech/create-speech-commands.d.ts.map +1 -0
- package/dist/cjs/text-to-speech/create-speech-commands.js +3 -0
- package/dist/cjs/text-to-speech/create-speech-commands.js.map +1 -0
- package/dist/cjs/text-to-speech/speech-created-events.d.ts +11 -0
- package/dist/cjs/text-to-speech/speech-created-events.d.ts.map +1 -0
- package/dist/cjs/text-to-speech/speech-created-events.js +3 -0
- package/dist/cjs/text-to-speech/speech-created-events.js.map +1 -0
- package/dist/cjs/text-to-speech/text-segment.d.ts +25 -0
- package/dist/cjs/text-to-speech/text-segment.d.ts.map +1 -0
- package/dist/cjs/text-to-speech/text-segment.js +8 -0
- package/dist/cjs/text-to-speech/text-segment.js.map +1 -0
- package/dist/esm/hack/extracted-subject.d.ts +4 -0
- package/dist/esm/hack/extracted-subject.d.ts.map +1 -0
- package/dist/esm/hack/extracted-subject.js +2 -0
- package/dist/esm/hack/extracted-subject.js.map +1 -0
- package/dist/esm/hack/hack-events.d.ts +18 -0
- package/dist/esm/hack/hack-events.d.ts.map +1 -0
- package/dist/esm/hack/hack-events.js +2 -0
- package/dist/esm/hack/hack-events.js.map +1 -0
- package/dist/esm/hack/hack-with-voice-events.d.ts +18 -0
- package/dist/esm/hack/hack-with-voice-events.d.ts.map +1 -0
- package/dist/esm/hack/hack-with-voice-events.js +2 -0
- package/dist/esm/hack/hack-with-voice-events.js.map +1 -0
- package/dist/esm/hack/hack-with-voice.d.ts +31 -0
- package/dist/esm/hack/hack-with-voice.d.ts.map +1 -0
- package/dist/esm/hack/hack-with-voice.js +2 -0
- package/dist/esm/hack/hack-with-voice.js.map +1 -0
- package/dist/esm/hack/hack.d.ts +101 -0
- package/dist/esm/hack/hack.d.ts.map +1 -0
- package/dist/{cjs → esm/hack}/hack.js.map +1 -1
- package/dist/esm/index.d.ts +19 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +19 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/localisation/live-locales.d.ts +8 -0
- package/dist/esm/localisation/live-locales.d.ts.map +1 -0
- package/dist/esm/localisation/live-locales.js +31 -0
- package/dist/esm/localisation/live-locales.js.map +1 -0
- package/dist/esm/localisation/locale-language.d.ts +2 -0
- package/dist/esm/localisation/locale-language.d.ts.map +1 -0
- package/dist/esm/localisation/locale-language.js +6 -0
- package/dist/esm/localisation/locale-language.js.map +1 -0
- package/dist/esm/localisation/supported-languages.d.ts +4 -0
- package/dist/esm/localisation/supported-languages.d.ts.map +1 -0
- package/dist/esm/localisation/supported-languages.js +9 -0
- package/dist/esm/localisation/supported-languages.js.map +1 -0
- package/dist/esm/localisation/supported-locales.d.ts +38 -0
- package/dist/esm/localisation/supported-locales.d.ts.map +1 -0
- package/dist/esm/localisation/supported-locales.js +41 -0
- package/dist/esm/localisation/supported-locales.js.map +1 -0
- package/dist/esm/pending-hack/pending-hack-events.d.ts +18 -0
- package/dist/esm/pending-hack/pending-hack-events.d.ts.map +1 -0
- package/dist/esm/pending-hack/pending-hack-events.js +2 -0
- package/dist/esm/pending-hack/pending-hack-events.js.map +1 -0
- package/dist/esm/pending-hack/pending-hack-with-voice-events.d.ts +18 -0
- package/dist/esm/pending-hack/pending-hack-with-voice-events.d.ts.map +1 -0
- package/dist/esm/pending-hack/pending-hack-with-voice-events.js +2 -0
- package/dist/esm/pending-hack/pending-hack-with-voice-events.js.map +1 -0
- package/dist/esm/pending-hack/pending-hack-with-voice.d.ts +22 -0
- package/dist/esm/pending-hack/pending-hack-with-voice.d.ts.map +1 -0
- package/dist/esm/pending-hack/pending-hack-with-voice.js +2 -0
- package/dist/esm/pending-hack/pending-hack-with-voice.js.map +1 -0
- package/dist/esm/pending-hack/pending-hack.d.ts +70 -0
- package/dist/esm/pending-hack/pending-hack.d.ts.map +1 -0
- package/dist/esm/pending-hack/pending-hack.js +2 -0
- package/dist/esm/pending-hack/pending-hack.js.map +1 -0
- package/dist/esm/segment/segment-commands.d.ts +62 -0
- package/dist/esm/segment/segment-commands.d.ts.map +1 -0
- package/dist/esm/segment/segment-commands.js +2 -0
- package/dist/esm/segment/segment-commands.js.map +1 -0
- package/dist/esm/segment/segment-with-voice.d.ts +5 -0
- package/dist/esm/segment/segment-with-voice.d.ts.map +1 -0
- package/dist/esm/segment/segment-with-voice.js +2 -0
- package/dist/esm/segment/segment-with-voice.js.map +1 -0
- package/dist/esm/segment/segment.d.ts +70 -0
- package/dist/esm/segment/segment.d.ts.map +1 -0
- package/dist/esm/segment/segment.js +2 -0
- package/dist/esm/segment/segment.js.map +1 -0
- package/dist/esm/text-to-speech/create-speech-commands.d.ts +19 -0
- package/dist/esm/text-to-speech/create-speech-commands.d.ts.map +1 -0
- package/dist/esm/text-to-speech/create-speech-commands.js +2 -0
- package/dist/esm/text-to-speech/create-speech-commands.js.map +1 -0
- package/dist/esm/text-to-speech/speech-created-events.d.ts +11 -0
- package/dist/esm/text-to-speech/speech-created-events.d.ts.map +1 -0
- package/dist/esm/text-to-speech/speech-created-events.js +2 -0
- package/dist/esm/text-to-speech/speech-created-events.js.map +1 -0
- package/dist/esm/text-to-speech/text-segment.d.ts +25 -0
- package/dist/esm/text-to-speech/text-segment.d.ts.map +1 -0
- package/dist/esm/text-to-speech/text-segment.js +5 -0
- package/dist/esm/text-to-speech/text-segment.js.map +1 -0
- package/package.json +2 -2
- package/src/hack/extracted-subject.ts +5 -0
- package/src/hack/hack-events.ts +21 -0
- package/src/hack/hack-with-voice-events.ts +21 -0
- package/src/hack/hack-with-voice.ts +33 -0
- package/src/hack/hack.ts +114 -0
- package/src/hack-metadata/hack-metadata.ts +17 -0
- package/src/index.ts +23 -1
- package/src/localisation/live-locales.ts +33 -0
- package/src/localisation/locale-language.ts +4 -0
- package/src/localisation/supported-languages.ts +11 -0
- package/src/localisation/supported-locales.ts +42 -0
- package/src/pending-hack/pending-hack-events.ts +21 -0
- package/src/pending-hack/pending-hack-with-voice-events.ts +21 -0
- package/src/pending-hack/pending-hack-with-voice.ts +25 -0
- package/src/pending-hack/pending-hack.ts +75 -0
- package/src/segment/segment-commands.ts +70 -0
- package/src/segment/segment-with-voice.ts +8 -0
- package/src/segment/segment.ts +82 -0
- package/src/text-to-speech/create-speech-commands.ts +20 -0
- package/src/text-to-speech/speech-created-events.ts +11 -0
- package/src/text-to-speech/text-segment.ts +29 -0
- package/tsconfig.cjs.json +7 -7
- package/tsconfig.npm.json +21 -21
- package/dist/cjs/hack.d.ts +0 -8
- package/dist/cjs/hack.d.ts.map +0 -1
- package/dist/esm/hack.d.ts +0 -8
- package/dist/esm/hack.d.ts.map +0 -1
- package/src/hack.ts +0 -7
- /package/dist/cjs/{hack.js → hack/hack.js} +0 -0
- /package/dist/esm/{hack.js → hack/hack.js} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export interface SegmentVoice {
|
|
2
|
+
id: string;
|
|
3
|
+
language: string;
|
|
4
|
+
name: string;
|
|
5
|
+
countryCode: string;
|
|
6
|
+
speechProvider: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Segment {
|
|
10
|
+
id: string;
|
|
11
|
+
v: number;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
hackId: string;
|
|
15
|
+
type: SegmentType;
|
|
16
|
+
title: string;
|
|
17
|
+
sections: SegmentSection[];
|
|
18
|
+
keywords: string[];
|
|
19
|
+
actions: SegmentAction[];
|
|
20
|
+
speech: SegmentSpeech[];
|
|
21
|
+
textSummary?: string;
|
|
22
|
+
lastUpdatedFromPendingSegmentId?: string;
|
|
23
|
+
hackType: string;
|
|
24
|
+
/** use @uptime.app/text-to-speech-contracts */
|
|
25
|
+
locale: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type SegmentType =
|
|
29
|
+
'overview' | 'favourite-quote' | 'in-a-nutshell' |
|
|
30
|
+
'introduction' | 'here-are-the-insights' |
|
|
31
|
+
'insight-one' | 'insight-two' | 'insight-three' |
|
|
32
|
+
'put-in-action' | 'conclusion' |
|
|
33
|
+
'shareable-overview' | 'download-app-to-see-more';
|
|
34
|
+
|
|
35
|
+
export type CardType = 'hack-cover' | 'action';
|
|
36
|
+
|
|
37
|
+
export interface SegmentAction {
|
|
38
|
+
title: string;
|
|
39
|
+
cards: SegmentTextCard[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface SegmentTextCard {
|
|
43
|
+
id: string;
|
|
44
|
+
markdown: string;
|
|
45
|
+
segmentType: SegmentType;
|
|
46
|
+
cardType?: CardType;
|
|
47
|
+
isTitle?: boolean;
|
|
48
|
+
speech?: TextCardSpeech[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SegmentSection {
|
|
52
|
+
heading?: string;
|
|
53
|
+
cards: SegmentTextCard[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface SegmentSpeech {
|
|
57
|
+
voice: SegmentVoice;
|
|
58
|
+
withHeading: {
|
|
59
|
+
url: string;
|
|
60
|
+
lengthSeconds: number;
|
|
61
|
+
};
|
|
62
|
+
withoutHeading: {
|
|
63
|
+
url: string;
|
|
64
|
+
lengthSeconds: number;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface TextCardSpeech {
|
|
69
|
+
voiceId: string;
|
|
70
|
+
withHeading: {
|
|
71
|
+
timestamps: {
|
|
72
|
+
startsAt: number;
|
|
73
|
+
endsAt: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
withoutHeading: {
|
|
77
|
+
timestamps: {
|
|
78
|
+
startsAt: number;
|
|
79
|
+
endsAt: number;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TextSegment, Voice } from './text-segment';
|
|
2
|
+
|
|
3
|
+
export interface CreateSpeechFromTextCommand {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'CreateSpeechFromText';
|
|
6
|
+
payload: {
|
|
7
|
+
locale: string;
|
|
8
|
+
textSegments: TextSegment[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CreateSpeechWithVoiceCommand {
|
|
13
|
+
id: string;
|
|
14
|
+
type: 'CreateSpeechWithVoice';
|
|
15
|
+
payload: {
|
|
16
|
+
locale: string;
|
|
17
|
+
textSegments: TextSegment[];
|
|
18
|
+
voice: Voice;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextSegmentWithSpeech } from './text-segment';
|
|
2
|
+
import { SupportedLocale } from '../localisation/supported-locales';
|
|
3
|
+
|
|
4
|
+
export interface SpeechFromTextCreatedEvent {
|
|
5
|
+
id: string;
|
|
6
|
+
type: 'SpeechFromTextCreated';
|
|
7
|
+
payload: {
|
|
8
|
+
locale: SupportedLocale;
|
|
9
|
+
textSegments: TextSegmentWithSpeech[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface TextSegment {
|
|
2
|
+
parentId: string;
|
|
3
|
+
textSegmentId: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TextSegmentWithSpeech extends TextSegment {
|
|
8
|
+
speech: Speech[];
|
|
9
|
+
/* The speech-friendly version of the "content" field. Trimmed, enrichment links removed, words replaced based on custom dictionary, etc. */
|
|
10
|
+
spokenContent: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Speech {
|
|
14
|
+
voice: Voice;
|
|
15
|
+
url: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Voice {
|
|
19
|
+
id: string;
|
|
20
|
+
language: string;
|
|
21
|
+
name: string;
|
|
22
|
+
countryCode: string;
|
|
23
|
+
/** use SupportedSpeechProvider */
|
|
24
|
+
speechProvider: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum SupportedSpeechProvider {
|
|
28
|
+
MicrosoftAzure = 'microsoft-azure'
|
|
29
|
+
}
|
package/tsconfig.cjs.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.npm.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"outDir": "./dist/cjs"
|
|
6
|
-
},
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.npm.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"outDir": "./dist/cjs"
|
|
6
|
+
},
|
|
7
|
+
}
|
package/tsconfig.npm.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"build": true,
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"module": "ES2020",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"emitDeclarationOnly": false,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"outDir": "./dist/esm",
|
|
11
|
-
"noEmit": false,
|
|
12
|
-
"strict": true,
|
|
13
|
-
"noImplicitAny": true,
|
|
14
|
-
"strictNullChecks": true,
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"src/index.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"build": true,
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"module": "ES2020",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"emitDeclarationOnly": false,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"outDir": "./dist/esm",
|
|
11
|
+
"noEmit": false,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"noImplicitAny": true,
|
|
14
|
+
"strictNullChecks": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"src/index.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
package/dist/cjs/hack.d.ts
DELETED
package/dist/cjs/hack.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hack.d.ts","sourceRoot":"","sources":["../../src/hack.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/esm/hack.d.ts
DELETED
package/dist/esm/hack.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hack.d.ts","sourceRoot":"","sources":["../../src/hack.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB"}
|
package/src/hack.ts
DELETED
|
File without changes
|
|
File without changes
|