@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.
Files changed (66) hide show
  1. package/package.json +2 -2
  2. package/src/access-control/collection-access-control.ts +28 -28
  3. package/src/access-control/hack-access-control.ts +29 -29
  4. package/src/app-hack/app-full-hack.ts +9 -9
  5. package/src/app-hack/app-hack-metadata.ts +56 -56
  6. package/src/app-hack/app-restricted-hack.ts +22 -22
  7. package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
  8. package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
  9. package/src/b2b-organisation/b2b-organisation-member.ts +8 -8
  10. package/src/b2b-organisation/b2b-organisation.ts +14 -14
  11. package/src/brand/brand-events.ts +21 -21
  12. package/src/brand/brand.ts +8 -8
  13. package/src/collection/collection-events.ts +21 -21
  14. package/src/collection/collection.ts +58 -58
  15. package/src/collection/enriched-collection-events.ts +18 -18
  16. package/src/collection/enriched-collection.ts +64 -64
  17. package/src/distribution/collection-distribution.ts +17 -17
  18. package/src/distribution/distribution-events.ts +61 -61
  19. package/src/distribution/hack-distribution.ts +18 -18
  20. package/src/draft-hack/draft-hack-events.ts +21 -21
  21. package/src/draft-hack/draft-hack.ts +184 -184
  22. package/src/draft-hack-generation/draft-hack-generation-events.ts +42 -42
  23. package/src/draft-hack-generation/draft-hack-generation.ts +38 -38
  24. package/src/enriched-hack/enriched-hack-events.ts +21 -21
  25. package/src/enriched-hack/enriched-hack.ts +101 -101
  26. package/src/entitlement/user-entitlements-events.ts +20 -20
  27. package/src/entitlement/user-entitlements.ts +17 -17
  28. package/src/hack/extracted-subject.ts +31 -31
  29. package/src/hack/hack-events.ts +21 -21
  30. package/src/hack/hack-with-voice-events.ts +20 -20
  31. package/src/hack/hack-with-voice.ts +33 -33
  32. package/src/hack/hack.ts +114 -114
  33. package/src/hack-metadata/hack-metadata-events.ts +21 -21
  34. package/src/hack-metadata/hack-metadata.ts +17 -17
  35. package/src/index.ts +84 -84
  36. package/src/knowledge-source/knowledge-source-events.ts +21 -21
  37. package/src/knowledge-source/knowledge-source.ts +43 -43
  38. package/src/localisation/live-locales.ts +32 -32
  39. package/src/localisation/locale-language.ts +4 -4
  40. package/src/localisation/supported-languages.ts +11 -11
  41. package/src/localisation/supported-locales.ts +43 -43
  42. package/src/pending-hack/pending-hack-events.ts +20 -20
  43. package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
  44. package/src/pending-hack/pending-hack-with-voice.ts +25 -25
  45. package/src/pending-hack/pending-hack.ts +75 -75
  46. package/src/profile/profile-events.ts +41 -41
  47. package/src/profile/profile.ts +27 -27
  48. package/src/profile/translated-profile.ts +13 -13
  49. package/src/segment/segment-commands.ts +70 -70
  50. package/src/segment/segment-events.ts +42 -42
  51. package/src/segment/segment-with-voice.ts +8 -8
  52. package/src/segment/segment.ts +82 -82
  53. package/src/skin/skin-events.ts +21 -21
  54. package/src/skin/skin.ts +6 -6
  55. package/src/text-to-speech/create-speech-commands.ts +20 -20
  56. package/src/text-to-speech/speech-created-events.ts +10 -10
  57. package/src/text-to-speech/supported-voices.ts +101 -101
  58. package/src/text-to-speech/text-segment.ts +29 -29
  59. package/src/theme/theme-events.ts +21 -21
  60. package/src/theme/theme.ts +68 -68
  61. package/src/trending/trending-events.ts +21 -21
  62. package/src/trending/trending-hacks.ts +8 -8
  63. package/src/user-context/user-context-events.ts +21 -21
  64. package/src/user-context/user-context.ts +16 -16
  65. package/tsconfig.cjs.json +7 -7
  66. package/tsconfig.npm.json +21 -21
@@ -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,42 +1,42 @@
1
- import { GeneratedDraftHackContent } from './draft-hack-generation';
2
-
3
- export interface DraftHackGenerated {
4
- id: string;
5
- type: 'DraftHackGenerated';
6
- payload: {
7
- // the draft hack id
8
- id: string;
9
- // the version
10
- v: number;
11
- reference: string;
12
- draftHackId: string;
13
- draftHackContent: GeneratedDraftHackContent;
14
- }
15
- }
16
-
17
- export interface DraftHackGenerationFailed {
18
- id: string;
19
- type: 'DraftHackGenerationFailed';
20
- payload: {
21
- reference: string;
22
- errorMessage: string;
23
- }
24
- }
25
-
26
- export interface GeneratedDraftHackSavedToGoogleDrive {
27
- id: string;
28
- type: 'GeneratedDraftHackSavedToGoogleDrive';
29
- payload: {
30
- // the draft hack id
31
- id: string;
32
- // the version
33
- v: number;
34
- reference: string;
35
- draftHackId: string;
36
- draftHackContent: GeneratedDraftHackContent;
37
- driveFile: {
38
- id: string;
39
- parentId: string;
40
- }
41
- }
42
- }
1
+ import { GeneratedDraftHackContent } from './draft-hack-generation';
2
+
3
+ export interface DraftHackGenerated {
4
+ id: string;
5
+ type: 'DraftHackGenerated';
6
+ payload: {
7
+ // the draft hack id
8
+ id: string;
9
+ // the version
10
+ v: number;
11
+ reference: string;
12
+ draftHackId: string;
13
+ draftHackContent: GeneratedDraftHackContent;
14
+ }
15
+ }
16
+
17
+ export interface DraftHackGenerationFailed {
18
+ id: string;
19
+ type: 'DraftHackGenerationFailed';
20
+ payload: {
21
+ reference: string;
22
+ errorMessage: string;
23
+ }
24
+ }
25
+
26
+ export interface GeneratedDraftHackSavedToGoogleDrive {
27
+ id: string;
28
+ type: 'GeneratedDraftHackSavedToGoogleDrive';
29
+ payload: {
30
+ // the draft hack id
31
+ id: string;
32
+ // the version
33
+ v: number;
34
+ reference: string;
35
+ draftHackId: string;
36
+ draftHackContent: GeneratedDraftHackContent;
37
+ driveFile: {
38
+ id: string;
39
+ parentId: string;
40
+ }
41
+ }
42
+ }
@@ -1,38 +1,38 @@
1
- export interface GeneratedDraftHackContent {
2
- title: string;
3
- segments: GeneratedDraftHackSegments;
4
- coverUrl?: string;
5
- topics: GeneratedDraftTopic[];
6
- notification: GeneratedDraftHackNotification;
7
- contributors: GeneratedDraftContributor[];
8
- }
9
- export interface GeneratedDraftHackSegments {
10
- favouriteQuote: GeneratedDraftHackSegment;
11
- inANutshell: GeneratedDraftHackSegment;
12
- introduction: GeneratedDraftHackSegment;
13
- insights: GeneratedDraftHackInsightSegment[];
14
- conclusion: GeneratedDraftHackSegment;
15
- }
16
- export interface GeneratedDraftHackSegment {
17
- paragraphCards: GeneratedDraftHackCard[][];
18
- }
19
- export interface GeneratedDraftHackCard {
20
- markdown: string;
21
- }
22
- export interface GeneratedDraftHackInsightSegment extends GeneratedDraftHackSegment {
23
- title: string;
24
- actions: GeneratedDraftHackAction[];
25
- }
26
- export interface GeneratedDraftHackAction {
27
- title: string;
28
- markdown: string;
29
- }
30
- export interface GeneratedDraftTopic {
31
- name: string;
32
- }
33
- export interface GeneratedDraftHackNotification {
34
- aiGeneratedText: string;
35
- }
36
- export interface GeneratedDraftContributor {
37
- name: string;
38
- }
1
+ export interface GeneratedDraftHackContent {
2
+ title: string;
3
+ segments: GeneratedDraftHackSegments;
4
+ coverUrl?: string;
5
+ topics: GeneratedDraftTopic[];
6
+ notification: GeneratedDraftHackNotification;
7
+ contributors: GeneratedDraftContributor[];
8
+ }
9
+ export interface GeneratedDraftHackSegments {
10
+ favouriteQuote: GeneratedDraftHackSegment;
11
+ inANutshell: GeneratedDraftHackSegment;
12
+ introduction: GeneratedDraftHackSegment;
13
+ insights: GeneratedDraftHackInsightSegment[];
14
+ conclusion: GeneratedDraftHackSegment;
15
+ }
16
+ export interface GeneratedDraftHackSegment {
17
+ paragraphCards: GeneratedDraftHackCard[][];
18
+ }
19
+ export interface GeneratedDraftHackCard {
20
+ markdown: string;
21
+ }
22
+ export interface GeneratedDraftHackInsightSegment extends GeneratedDraftHackSegment {
23
+ title: string;
24
+ actions: GeneratedDraftHackAction[];
25
+ }
26
+ export interface GeneratedDraftHackAction {
27
+ title: string;
28
+ markdown: string;
29
+ }
30
+ export interface GeneratedDraftTopic {
31
+ name: string;
32
+ }
33
+ export interface GeneratedDraftHackNotification {
34
+ aiGeneratedText: string;
35
+ }
36
+ export interface GeneratedDraftContributor {
37
+ name: string;
38
+ }
@@ -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;