@uptime.app/contracts 1.0.4-rc.2 → 1.0.4

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.
@@ -1,82 +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
- }
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
+ }
@@ -1,20 +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
- }
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
+ }
@@ -1,11 +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
- }
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
+ }
@@ -1,29 +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
- }
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
+ }