@uptime.app/contracts 1.0.13-rc.0 → 1.0.13-user-context.1

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 (95) hide show
  1. package/dist/cjs/entitlement/user-entitlements-events.d.ts +18 -0
  2. package/dist/cjs/entitlement/user-entitlements-events.d.ts.map +1 -0
  3. package/dist/cjs/entitlement/user-entitlements-events.js +3 -0
  4. package/dist/cjs/entitlement/user-entitlements-events.js.map +1 -0
  5. package/dist/cjs/entitlement/user-entitlements.d.ts +17 -0
  6. package/dist/cjs/entitlement/user-entitlements.d.ts.map +1 -0
  7. package/dist/cjs/entitlement/user-entitlements.js +3 -0
  8. package/dist/cjs/entitlement/user-entitlements.js.map +1 -0
  9. package/dist/cjs/index.d.ts +4 -0
  10. package/dist/cjs/index.d.ts.map +1 -1
  11. package/dist/cjs/index.js +4 -0
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/user-context/user-context-events.d.ts +18 -0
  14. package/dist/cjs/user-context/user-context-events.d.ts.map +1 -0
  15. package/dist/cjs/user-context/user-context-events.js +3 -0
  16. package/dist/cjs/user-context/user-context-events.js.map +1 -0
  17. package/dist/cjs/user-context/user-context.d.ts +17 -0
  18. package/dist/cjs/user-context/user-context.d.ts.map +1 -0
  19. package/dist/cjs/user-context/user-context.js +3 -0
  20. package/dist/cjs/user-context/user-context.js.map +1 -0
  21. package/dist/esm/entitlement/user-entitlements-events.d.ts +18 -0
  22. package/dist/esm/entitlement/user-entitlements-events.d.ts.map +1 -0
  23. package/dist/esm/entitlement/user-entitlements-events.js +2 -0
  24. package/dist/esm/entitlement/user-entitlements-events.js.map +1 -0
  25. package/dist/esm/entitlement/user-entitlements.d.ts +17 -0
  26. package/dist/esm/entitlement/user-entitlements.d.ts.map +1 -0
  27. package/dist/esm/entitlement/user-entitlements.js +2 -0
  28. package/dist/esm/entitlement/user-entitlements.js.map +1 -0
  29. package/dist/esm/index.d.ts +4 -0
  30. package/dist/esm/index.d.ts.map +1 -1
  31. package/dist/esm/index.js +4 -0
  32. package/dist/esm/index.js.map +1 -1
  33. package/dist/esm/user-context/user-context-events.d.ts +18 -0
  34. package/dist/esm/user-context/user-context-events.d.ts.map +1 -0
  35. package/dist/esm/user-context/user-context-events.js +2 -0
  36. package/dist/esm/user-context/user-context-events.js.map +1 -0
  37. package/dist/esm/user-context/user-context.d.ts +17 -0
  38. package/dist/esm/user-context/user-context.d.ts.map +1 -0
  39. package/dist/esm/user-context/user-context.js +2 -0
  40. package/dist/esm/user-context/user-context.js.map +1 -0
  41. package/package.json +2 -2
  42. package/src/access-control/collection-access-control.ts +28 -28
  43. package/src/access-control/hack-access-control.ts +29 -29
  44. package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
  45. package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
  46. package/src/b2b-organisation/b2b-organisation-member.ts +8 -8
  47. package/src/b2b-organisation/b2b-organisation.ts +14 -14
  48. package/src/brand/brand-events.ts +21 -21
  49. package/src/brand/brand.ts +8 -8
  50. package/src/distribution/collection-distribution.ts +17 -17
  51. package/src/distribution/distribution-events.ts +61 -61
  52. package/src/distribution/hack-distribution.ts +18 -18
  53. package/src/draft-hack/draft-hack-events.ts +21 -21
  54. package/src/draft-hack/draft-hack.ts +184 -184
  55. package/src/draft-hack-generation/draft-hack-generation-events.ts +42 -42
  56. package/src/draft-hack-generation/draft-hack-generation.ts +38 -38
  57. package/src/enriched-hack/enriched-hack-events.ts +21 -21
  58. package/src/enriched-hack/enriched-hack.ts +101 -101
  59. package/src/entitlement/user-entitlements-events.ts +21 -0
  60. package/src/entitlement/user-entitlements.ts +18 -0
  61. package/src/hack/extracted-subject.ts +4 -4
  62. package/src/hack/hack-events.ts +21 -21
  63. package/src/hack/hack-with-voice-events.ts +20 -20
  64. package/src/hack/hack-with-voice.ts +33 -33
  65. package/src/hack/hack.ts +114 -114
  66. package/src/hack-metadata/hack-metadata-events.ts +21 -21
  67. package/src/hack-metadata/hack-metadata.ts +17 -17
  68. package/src/index.ts +70 -64
  69. package/src/knowledge-source/knowledge-source-events.ts +21 -21
  70. package/src/knowledge-source/knowledge-source.ts +43 -43
  71. package/src/localisation/live-locales.ts +32 -32
  72. package/src/localisation/locale-language.ts +4 -4
  73. package/src/localisation/supported-languages.ts +11 -11
  74. package/src/localisation/supported-locales.ts +42 -42
  75. package/src/pending-hack/pending-hack-events.ts +20 -20
  76. package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
  77. package/src/pending-hack/pending-hack-with-voice.ts +25 -25
  78. package/src/pending-hack/pending-hack.ts +75 -75
  79. package/src/profile/profile-events.ts +41 -41
  80. package/src/profile/profile.ts +27 -27
  81. package/src/profile/translated-profile.ts +13 -13
  82. package/src/segment/segment-commands.ts +70 -70
  83. package/src/segment/segment-with-voice.ts +8 -8
  84. package/src/segment/segment.ts +82 -82
  85. package/src/skin/skin-events.ts +21 -21
  86. package/src/skin/skin.ts +6 -6
  87. package/src/text-to-speech/create-speech-commands.ts +20 -20
  88. package/src/text-to-speech/speech-created-events.ts +11 -11
  89. package/src/text-to-speech/text-segment.ts +29 -29
  90. package/src/theme/theme-events.ts +21 -21
  91. package/src/theme/theme.ts +68 -68
  92. package/src/user-context/user-context-events.ts +21 -0
  93. package/src/user-context/user-context.ts +17 -0
  94. package/tsconfig.cjs.json +7 -7
  95. package/tsconfig.npm.json +21 -21
@@ -1,21 +1,21 @@
1
- import { Brand } from './brand';
2
-
3
- export interface BrandCreatedEvent {
4
- id: string;
5
- type: 'BrandCreated';
6
- payload: Brand;
7
- }
8
-
9
- export interface BrandUpdatedEvent {
10
- id: string;
11
- type: 'BrandUpdated';
12
- payload: Brand;
13
- }
14
-
15
- export interface BrandDeletedEvent {
16
- id: string;
17
- type: 'BrandDeleted';
18
- payload: Brand;
19
- }
20
-
21
- export type BrandChangedEvent = BrandCreatedEvent | BrandUpdatedEvent | BrandDeletedEvent;
1
+ import { Brand } from './brand';
2
+
3
+ export interface BrandCreatedEvent {
4
+ id: string;
5
+ type: 'BrandCreated';
6
+ payload: Brand;
7
+ }
8
+
9
+ export interface BrandUpdatedEvent {
10
+ id: string;
11
+ type: 'BrandUpdated';
12
+ payload: Brand;
13
+ }
14
+
15
+ export interface BrandDeletedEvent {
16
+ id: string;
17
+ type: 'BrandDeleted';
18
+ payload: Brand;
19
+ }
20
+
21
+ export type BrandChangedEvent = BrandCreatedEvent | BrandUpdatedEvent | BrandDeletedEvent;
@@ -1,9 +1,9 @@
1
-
2
- export interface Brand {
3
- id: string;
4
- v: number;
5
- createdAt: string;
6
- updatedAt: string;
7
- name: string;
8
- skinId?: string;
1
+
2
+ export interface Brand {
3
+ id: string;
4
+ v: number;
5
+ createdAt: string;
6
+ updatedAt: string;
7
+ name: string;
8
+ skinId?: string;
9
9
  }
@@ -1,17 +1,17 @@
1
- export interface CollectionDistribution extends CollectionDistributionProperties {
2
- id: string;
3
- v: number;
4
- createdAt: string;
5
- updatedAt: string;
6
- collectionId: string;
7
- baseLocaleCollectionId: string;
8
- }
9
-
10
- export interface CollectionDistributionProperties {
11
- includeInEmailNotifications: boolean;
12
- includeInPushNotifications: boolean;
13
- includeInRecommendations: boolean;
14
- includeInSearchResults: boolean;
15
- includeInWebsite: boolean;
16
- isHidden: boolean;
17
- }
1
+ export interface CollectionDistribution extends CollectionDistributionProperties {
2
+ id: string;
3
+ v: number;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ collectionId: string;
7
+ baseLocaleCollectionId: string;
8
+ }
9
+
10
+ export interface CollectionDistributionProperties {
11
+ includeInEmailNotifications: boolean;
12
+ includeInPushNotifications: boolean;
13
+ includeInRecommendations: boolean;
14
+ includeInSearchResults: boolean;
15
+ includeInWebsite: boolean;
16
+ isHidden: boolean;
17
+ }
@@ -1,61 +1,61 @@
1
- import { HackDistribution } from './hack-distribution';
2
- import { CollectionDistribution } from './collection-distribution';
3
-
4
- export interface HackDistributionCreatedEvent {
5
- id: string;
6
- type: 'HackDistributionCreated';
7
- payload: HackDistribution;
8
- }
9
-
10
- export interface HackDistributionUpdatedEvent {
11
- id: string;
12
- type: 'HackDistributionUpdated';
13
- payload: HackDistribution;
14
- }
15
-
16
- export interface HackDistributionDeletedEvent {
17
- id: string;
18
- type: 'HackDistributionDeleted';
19
- payload: HackDistribution;
20
- }
21
-
22
- export interface CollectionDistributionCreatedEvent {
23
- id: string;
24
- type: 'CollectionDistributionCreated';
25
- payload: CollectionDistribution;
26
- }
27
-
28
- export interface CollectionDistributionUpdatedEvent {
29
- id: string;
30
- type: 'CollectionDistributionUpdated';
31
- payload: CollectionDistribution;
32
- }
33
-
34
- export interface CollectionDistributionDeletedEvent {
35
- id: string;
36
- type: 'CollectionDistributionDeleted';
37
- payload: CollectionDistribution;
38
- }
39
-
40
- export type HackDistributionChangedEvent = HackDistributionCreatedEvent | HackDistributionUpdatedEvent | HackDistributionDeletedEvent;
41
- export type CollectionDistributionChangedEvent = CollectionDistributionCreatedEvent | CollectionDistributionUpdatedEvent | CollectionDistributionDeletedEvent;
42
-
43
- export interface CheckPrivateHackDistributionEvent {
44
- id: string;
45
- type: 'CheckPrivateHackDistribution'
46
- payload: {
47
- id: string;
48
- v: number;
49
- hackId: string;
50
- }
51
- }
52
-
53
- export interface CheckPrivateCollectionDistributionEvent {
54
- id: string;
55
- type: 'CheckPrivateCollectionDistribution'
56
- payload: {
57
- id: string;
58
- v: number;
59
- collectionId: string;
60
- }
61
- }
1
+ import { HackDistribution } from './hack-distribution';
2
+ import { CollectionDistribution } from './collection-distribution';
3
+
4
+ export interface HackDistributionCreatedEvent {
5
+ id: string;
6
+ type: 'HackDistributionCreated';
7
+ payload: HackDistribution;
8
+ }
9
+
10
+ export interface HackDistributionUpdatedEvent {
11
+ id: string;
12
+ type: 'HackDistributionUpdated';
13
+ payload: HackDistribution;
14
+ }
15
+
16
+ export interface HackDistributionDeletedEvent {
17
+ id: string;
18
+ type: 'HackDistributionDeleted';
19
+ payload: HackDistribution;
20
+ }
21
+
22
+ export interface CollectionDistributionCreatedEvent {
23
+ id: string;
24
+ type: 'CollectionDistributionCreated';
25
+ payload: CollectionDistribution;
26
+ }
27
+
28
+ export interface CollectionDistributionUpdatedEvent {
29
+ id: string;
30
+ type: 'CollectionDistributionUpdated';
31
+ payload: CollectionDistribution;
32
+ }
33
+
34
+ export interface CollectionDistributionDeletedEvent {
35
+ id: string;
36
+ type: 'CollectionDistributionDeleted';
37
+ payload: CollectionDistribution;
38
+ }
39
+
40
+ export type HackDistributionChangedEvent = HackDistributionCreatedEvent | HackDistributionUpdatedEvent | HackDistributionDeletedEvent;
41
+ export type CollectionDistributionChangedEvent = CollectionDistributionCreatedEvent | CollectionDistributionUpdatedEvent | CollectionDistributionDeletedEvent;
42
+
43
+ export interface CheckPrivateHackDistributionEvent {
44
+ id: string;
45
+ type: 'CheckPrivateHackDistribution'
46
+ payload: {
47
+ id: string;
48
+ v: number;
49
+ hackId: string;
50
+ }
51
+ }
52
+
53
+ export interface CheckPrivateCollectionDistributionEvent {
54
+ id: string;
55
+ type: 'CheckPrivateCollectionDistribution'
56
+ payload: {
57
+ id: string;
58
+ v: number;
59
+ collectionId: string;
60
+ }
61
+ }
@@ -1,19 +1,19 @@
1
- export interface HackDistribution extends HackDistributionProperties {
2
- id: string;
3
- v: number;
4
- createdAt: string;
5
- updatedAt: string;
6
- hackId: string;
7
- baseLocaleHackId: string; // added 09/03/23 to allow syncing across hacks with the same baseLocaleHackId
8
- }
9
-
10
- export interface HackDistributionProperties {
11
- includeInEmailNotifications: boolean;
12
- includeInPushNotifications: boolean;
13
- includeInRecommendations: boolean;
14
- includeInSearchResults: boolean;
15
- includeInTrending: boolean;
16
- includeInHackOfTheDay: boolean;
17
- includeInWebsite: boolean;
18
- isHidden: boolean; // added 17/11/22, to replace Hack property with the same name
1
+ export interface HackDistribution extends HackDistributionProperties {
2
+ id: string;
3
+ v: number;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ hackId: string;
7
+ baseLocaleHackId: string; // added 09/03/23 to allow syncing across hacks with the same baseLocaleHackId
8
+ }
9
+
10
+ export interface HackDistributionProperties {
11
+ includeInEmailNotifications: boolean;
12
+ includeInPushNotifications: boolean;
13
+ includeInRecommendations: boolean;
14
+ includeInSearchResults: boolean;
15
+ includeInTrending: boolean;
16
+ includeInHackOfTheDay: boolean;
17
+ includeInWebsite: boolean;
18
+ isHidden: boolean; // added 17/11/22, to replace Hack property with the same name
19
19
  }
@@ -1,21 +1,21 @@
1
- import { DraftHack } from './draft-hack';
2
-
3
- export interface DraftHackCreatedEvent {
4
- id: string;
5
- type: 'DraftHackCreated';
6
- payload: DraftHack;
7
- }
8
-
9
- export interface DraftHackUpdatedEvent {
10
- id: string;
11
- type: 'DraftHackUpdated';
12
- payload: DraftHack;
13
- }
14
-
15
- export interface DraftHackDeletedEvent {
16
- id: string;
17
- type: 'DraftHackDeleted';
18
- payload: DraftHack;
19
- }
20
-
21
- export type DraftHackChangedEvent = DraftHackCreatedEvent | DraftHackUpdatedEvent | DraftHackDeletedEvent;
1
+ import { DraftHack } from './draft-hack';
2
+
3
+ export interface DraftHackCreatedEvent {
4
+ id: string;
5
+ type: 'DraftHackCreated';
6
+ payload: DraftHack;
7
+ }
8
+
9
+ export interface DraftHackUpdatedEvent {
10
+ id: string;
11
+ type: 'DraftHackUpdated';
12
+ payload: DraftHack;
13
+ }
14
+
15
+ export interface DraftHackDeletedEvent {
16
+ id: string;
17
+ type: 'DraftHackDeleted';
18
+ payload: DraftHack;
19
+ }
20
+
21
+ export type DraftHackChangedEvent = DraftHackCreatedEvent | DraftHackUpdatedEvent | DraftHackDeletedEvent;
@@ -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';