@uptime.app/contracts 1.0.13 → 1.0.15-rc.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 (138) hide show
  1. package/dist/cjs/app-hack/app-full-hack.d.ts +9 -0
  2. package/dist/cjs/app-hack/app-full-hack.d.ts.map +1 -0
  3. package/dist/cjs/app-hack/app-full-hack.js +3 -0
  4. package/dist/cjs/app-hack/app-full-hack.js.map +1 -0
  5. package/dist/cjs/app-hack/app-hack-metadata.d.ts +58 -0
  6. package/dist/cjs/app-hack/app-hack-metadata.d.ts.map +1 -0
  7. package/dist/cjs/app-hack/app-hack-metadata.js +3 -0
  8. package/dist/cjs/app-hack/app-hack-metadata.js.map +1 -0
  9. package/dist/cjs/app-hack/app-restricted-hack.d.ts +21 -0
  10. package/dist/cjs/app-hack/app-restricted-hack.d.ts.map +1 -0
  11. package/dist/cjs/app-hack/app-restricted-hack.js +3 -0
  12. package/dist/cjs/app-hack/app-restricted-hack.js.map +1 -0
  13. package/dist/cjs/collection/collection-events.d.ts +18 -0
  14. package/dist/cjs/collection/collection-events.d.ts.map +1 -0
  15. package/dist/cjs/collection/collection-events.js +3 -0
  16. package/dist/cjs/collection/collection-events.js.map +1 -0
  17. package/dist/cjs/collection/collection.d.ts +48 -0
  18. package/dist/cjs/collection/collection.d.ts.map +1 -0
  19. package/dist/cjs/collection/collection.js +3 -0
  20. package/dist/cjs/collection/collection.js.map +1 -0
  21. package/dist/cjs/collection/enriched-collection-events.d.ts +18 -0
  22. package/dist/cjs/collection/enriched-collection-events.d.ts.map +1 -0
  23. package/dist/cjs/collection/enriched-collection-events.js +3 -0
  24. package/dist/cjs/collection/enriched-collection-events.js.map +1 -0
  25. package/dist/cjs/collection/enriched-collection.d.ts +56 -0
  26. package/dist/cjs/collection/enriched-collection.d.ts.map +1 -0
  27. package/dist/cjs/collection/enriched-collection.js +3 -0
  28. package/dist/cjs/collection/enriched-collection.js.map +1 -0
  29. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts +36 -0
  30. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.d.ts.map +1 -0
  31. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.js +3 -0
  32. package/dist/cjs/draft-hack-generation/draft-hack-generation-events.js.map +1 -0
  33. package/dist/cjs/draft-hack-generation/draft-hack-generation.d.ts +39 -0
  34. package/dist/cjs/draft-hack-generation/draft-hack-generation.d.ts.map +1 -0
  35. package/dist/cjs/draft-hack-generation/draft-hack-generation.js +3 -0
  36. package/dist/cjs/draft-hack-generation/draft-hack-generation.js.map +1 -0
  37. package/dist/cjs/index.d.ts +9 -0
  38. package/dist/cjs/index.d.ts.map +1 -1
  39. package/dist/cjs/index.js +9 -0
  40. package/dist/cjs/index.js.map +1 -1
  41. package/dist/esm/app-hack/app-full-hack.d.ts +9 -0
  42. package/dist/esm/app-hack/app-full-hack.d.ts.map +1 -0
  43. package/dist/esm/app-hack/app-full-hack.js +2 -0
  44. package/dist/esm/app-hack/app-full-hack.js.map +1 -0
  45. package/dist/esm/app-hack/app-hack-metadata.d.ts +58 -0
  46. package/dist/esm/app-hack/app-hack-metadata.d.ts.map +1 -0
  47. package/dist/esm/app-hack/app-hack-metadata.js +2 -0
  48. package/dist/esm/app-hack/app-hack-metadata.js.map +1 -0
  49. package/dist/esm/app-hack/app-restricted-hack.d.ts +21 -0
  50. package/dist/esm/app-hack/app-restricted-hack.d.ts.map +1 -0
  51. package/dist/esm/app-hack/app-restricted-hack.js +2 -0
  52. package/dist/esm/app-hack/app-restricted-hack.js.map +1 -0
  53. package/dist/esm/collection/collection-events.d.ts +18 -0
  54. package/dist/esm/collection/collection-events.d.ts.map +1 -0
  55. package/dist/esm/collection/collection-events.js +2 -0
  56. package/dist/esm/collection/collection-events.js.map +1 -0
  57. package/dist/esm/collection/collection.d.ts +48 -0
  58. package/dist/esm/collection/collection.d.ts.map +1 -0
  59. package/dist/esm/collection/collection.js +2 -0
  60. package/dist/esm/collection/collection.js.map +1 -0
  61. package/dist/esm/collection/enriched-collection-events.d.ts +18 -0
  62. package/dist/esm/collection/enriched-collection-events.d.ts.map +1 -0
  63. package/dist/esm/collection/enriched-collection-events.js +2 -0
  64. package/dist/esm/collection/enriched-collection-events.js.map +1 -0
  65. package/dist/esm/collection/enriched-collection.d.ts +56 -0
  66. package/dist/esm/collection/enriched-collection.d.ts.map +1 -0
  67. package/dist/esm/collection/enriched-collection.js +2 -0
  68. package/dist/esm/collection/enriched-collection.js.map +1 -0
  69. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts +36 -0
  70. package/dist/esm/draft-hack-generation/draft-hack-generation-events.d.ts.map +1 -0
  71. package/dist/esm/draft-hack-generation/draft-hack-generation-events.js +2 -0
  72. package/dist/esm/draft-hack-generation/draft-hack-generation-events.js.map +1 -0
  73. package/dist/esm/draft-hack-generation/draft-hack-generation.d.ts +39 -0
  74. package/dist/esm/draft-hack-generation/draft-hack-generation.d.ts.map +1 -0
  75. package/dist/esm/draft-hack-generation/draft-hack-generation.js +2 -0
  76. package/dist/esm/draft-hack-generation/draft-hack-generation.js.map +1 -0
  77. package/dist/esm/index.d.ts +9 -0
  78. package/dist/esm/index.d.ts.map +1 -1
  79. package/dist/esm/index.js +9 -0
  80. package/dist/esm/index.js.map +1 -1
  81. package/package.json +2 -2
  82. package/src/access-control/collection-access-control.ts +28 -28
  83. package/src/access-control/hack-access-control.ts +29 -29
  84. package/src/app-hack/app-full-hack.ts +9 -0
  85. package/src/app-hack/app-hack-metadata.ts +56 -0
  86. package/src/app-hack/app-restricted-hack.ts +22 -0
  87. package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
  88. package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
  89. package/src/b2b-organisation/b2b-organisation-member.ts +8 -8
  90. package/src/b2b-organisation/b2b-organisation.ts +14 -14
  91. package/src/brand/brand-events.ts +21 -21
  92. package/src/brand/brand.ts +8 -8
  93. package/src/collection/collection-events.ts +21 -0
  94. package/src/collection/collection.ts +58 -0
  95. package/src/collection/enriched-collection-events.ts +18 -0
  96. package/src/collection/enriched-collection.ts +64 -0
  97. package/src/distribution/collection-distribution.ts +17 -17
  98. package/src/distribution/distribution-events.ts +61 -61
  99. package/src/distribution/hack-distribution.ts +18 -18
  100. package/src/draft-hack/draft-hack-events.ts +21 -21
  101. package/src/draft-hack/draft-hack.ts +184 -184
  102. package/src/draft-hack-generation/draft-hack-generation-events.ts +42 -0
  103. package/src/draft-hack-generation/draft-hack-generation.ts +38 -0
  104. package/src/enriched-hack/enriched-hack-events.ts +21 -21
  105. package/src/enriched-hack/enriched-hack.ts +101 -101
  106. package/src/hack/extracted-subject.ts +4 -4
  107. package/src/hack/hack-events.ts +21 -21
  108. package/src/hack/hack-with-voice-events.ts +20 -20
  109. package/src/hack/hack-with-voice.ts +33 -33
  110. package/src/hack/hack.ts +114 -114
  111. package/src/hack-metadata/hack-metadata-events.ts +21 -21
  112. package/src/hack-metadata/hack-metadata.ts +17 -17
  113. package/src/index.ts +73 -61
  114. package/src/knowledge-source/knowledge-source-events.ts +21 -21
  115. package/src/knowledge-source/knowledge-source.ts +43 -43
  116. package/src/localisation/live-locales.ts +32 -32
  117. package/src/localisation/locale-language.ts +4 -4
  118. package/src/localisation/supported-languages.ts +11 -11
  119. package/src/localisation/supported-locales.ts +42 -42
  120. package/src/pending-hack/pending-hack-events.ts +20 -20
  121. package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
  122. package/src/pending-hack/pending-hack-with-voice.ts +25 -25
  123. package/src/pending-hack/pending-hack.ts +75 -75
  124. package/src/profile/profile-events.ts +41 -41
  125. package/src/profile/profile.ts +27 -27
  126. package/src/profile/translated-profile.ts +13 -13
  127. package/src/segment/segment-commands.ts +70 -70
  128. package/src/segment/segment-with-voice.ts +8 -8
  129. package/src/segment/segment.ts +82 -82
  130. package/src/skin/skin-events.ts +21 -21
  131. package/src/skin/skin.ts +6 -6
  132. package/src/text-to-speech/create-speech-commands.ts +20 -20
  133. package/src/text-to-speech/speech-created-events.ts +11 -11
  134. package/src/text-to-speech/text-segment.ts +29 -29
  135. package/src/theme/theme-events.ts +21 -21
  136. package/src/theme/theme.ts +68 -68
  137. package/tsconfig.cjs.json +7 -7
  138. package/tsconfig.npm.json +21 -21
@@ -1,21 +1,21 @@
1
- import { B2BOrganisationMember } from './b2b-organisation-member';
2
-
3
- export interface B2BOrganisationMemberCreatedEvent {
4
- id: string;
5
- type: 'B2BOrganisationMemberCreated';
6
- payload: B2BOrganisationMember;
7
- }
8
-
9
- export interface B2BOrganisationMemberUpdatedEvent {
10
- id: string;
11
- type: 'B2BOrganisationMemberUpdated';
12
- payload: B2BOrganisationMember;
13
- }
14
-
15
- export interface B2BOrganisationMemberDeletedEvent {
16
- id: string;
17
- type: 'B2BOrganisationMemberDeleted';
18
- payload: B2BOrganisationMember;
19
- }
20
-
21
- export type B2BOrganisationMemberChangedEvent = B2BOrganisationMemberCreatedEvent | B2BOrganisationMemberUpdatedEvent | B2BOrganisationMemberDeletedEvent;
1
+ import { B2BOrganisationMember } from './b2b-organisation-member';
2
+
3
+ export interface B2BOrganisationMemberCreatedEvent {
4
+ id: string;
5
+ type: 'B2BOrganisationMemberCreated';
6
+ payload: B2BOrganisationMember;
7
+ }
8
+
9
+ export interface B2BOrganisationMemberUpdatedEvent {
10
+ id: string;
11
+ type: 'B2BOrganisationMemberUpdated';
12
+ payload: B2BOrganisationMember;
13
+ }
14
+
15
+ export interface B2BOrganisationMemberDeletedEvent {
16
+ id: string;
17
+ type: 'B2BOrganisationMemberDeleted';
18
+ payload: B2BOrganisationMember;
19
+ }
20
+
21
+ export type B2BOrganisationMemberChangedEvent = B2BOrganisationMemberCreatedEvent | B2BOrganisationMemberUpdatedEvent | B2BOrganisationMemberDeletedEvent;
@@ -1,9 +1,9 @@
1
- export interface B2BOrganisationMember {
2
- id: string;
3
- v: number;
4
- createdAt: string;
5
- updatedAt: string;
6
- userId: string;
7
- organisationId: string;
8
- invitationId?: string;
1
+ export interface B2BOrganisationMember {
2
+ id: string;
3
+ v: number;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ userId: string;
7
+ organisationId: string;
8
+ invitationId?: string;
9
9
  }
@@ -1,14 +1,14 @@
1
- export interface B2BOrganisation {
2
- id: string;
3
- v: number;
4
- createdAt: string;
5
- updatedAt: string;
6
- name: string; //unique
7
- owner: string; //unique
8
- code?: string;
9
- provider: string; // for now this will reference what to display in the home screen of the app for users that joined the organisation
10
- displayName: string; // for organisations that might be different but have the same name to be displayed. Ex: HP Ireland & HP US ==> we want the displayName to be HP
11
- codeUsageLimit?: number; // the max amount of times the code to join an organisation can be use
12
- urlPrefix?: string; // the prefix to use for the url of the organisation
13
- brandId?: string;
14
- }
1
+ export interface B2BOrganisation {
2
+ id: string;
3
+ v: number;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+ name: string; //unique
7
+ owner: string; //unique
8
+ code?: string;
9
+ provider: string; // for now this will reference what to display in the home screen of the app for users that joined the organisation
10
+ displayName: string; // for organisations that might be different but have the same name to be displayed. Ex: HP Ireland & HP US ==> we want the displayName to be HP
11
+ codeUsageLimit?: number; // the max amount of times the code to join an organisation can be use
12
+ urlPrefix?: string; // the prefix to use for the url of the organisation
13
+ brandId?: string;
14
+ }
@@ -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
  }
@@ -0,0 +1,21 @@
1
+ import { Collection } from './collection';
2
+
3
+ export interface CollectionCreatedEvent {
4
+ id: string;
5
+ type: 'CollectionCreated';
6
+ payload: Collection;
7
+ }
8
+
9
+ export interface CollectionUpdatedEvent {
10
+ id: string;
11
+ type: 'CollectionUpdated';
12
+ payload: Collection;
13
+ }
14
+
15
+ export interface CollectionDeletedEvent {
16
+ id: string;
17
+ type: 'CollectionDeleted';
18
+ payload: Collection;
19
+ }
20
+
21
+ export type CollectionChangedEvent = CollectionCreatedEvent | CollectionUpdatedEvent | CollectionDeletedEvent;
@@ -0,0 +1,58 @@
1
+ export interface Collection {
2
+ id: string;
3
+ v: number;
4
+ createdAt: string;
5
+ updatedAt: string;
6
+
7
+ title: string;
8
+ /** added 21/02/2023 use @uptime.app/localisation-contracts SupportedLocale */
9
+ locale: string;
10
+ /** added 21/02/2023 */
11
+ baseLocaleCollectionId: string;
12
+ /** added May 2023. Only set on collections that are translations */
13
+ baseLocaleCollectionVersion?: number;
14
+ subtitle?: string;
15
+ iconUrl?: string;
16
+ coverUrl?: string;
17
+ backgroundColor?: string;
18
+ description: string;
19
+ isPublished: boolean;
20
+ visibility?: CollectionVisibility;
21
+ tags?: string[];
22
+ rank?: number;
23
+ notificationMessage?: string;
24
+ type: CollectionType;
25
+ backdrop?: BackdropMetadata;
26
+
27
+ /** Added on June 2022. Not all messages on the archive will have this property. */
28
+ collectionHacks: CollectionHack[];
29
+ // concept we are exploring: https://d0.awsstatic.com/whitepapers/Multi_Tenant_SaaS_Storage_Strategies.pdf
30
+ owner?: string;
31
+
32
+ /**
33
+ * @deprecated you should use new 'collectionHacks' property
34
+ */
35
+ hackIds: string[];
36
+ }
37
+
38
+ export type CollectionType = 'collection' | 'backdrop';
39
+
40
+ export interface CollectionVisibility {
41
+ /* ISO date */
42
+ startDate: string;
43
+ /* ISO date */
44
+ endDate: string;
45
+ }
46
+
47
+ export interface CollectionHack {
48
+ hackId: string;
49
+ /**
50
+ * @maxLength 300
51
+ */
52
+ blurb?: string;
53
+ }
54
+
55
+ export interface BackdropMetadata {
56
+ /* e.g. "2022-02-09T10:00:00" */
57
+ backdropDate: string;
58
+ }
@@ -0,0 +1,18 @@
1
+ import { EnrichedCollection } from './enriched-collection';
2
+
3
+ export interface EnrichedCollectionCreatedEvent {
4
+ id: string;
5
+ type: 'EnrichedCollectionCreated';
6
+ payload: EnrichedCollection;
7
+ }
8
+ export interface EnrichedCollectionUpdatedEvent {
9
+ id: string;
10
+ type: 'EnrichedCollectionUpdated';
11
+ payload: EnrichedCollection;
12
+ }
13
+ export interface EnrichedCollectionDeletedEvent {
14
+ id: string;
15
+ type: 'EnrichedCollectionDeleted';
16
+ payload: EnrichedCollection;
17
+ }
18
+ export type EnrichedCollectionChangedEvent = EnrichedCollectionCreatedEvent | EnrichedCollectionUpdatedEvent | EnrichedCollectionDeletedEvent;
@@ -0,0 +1,64 @@
1
+ import { AppHackMetadata } from '../app-hack/app-hack-metadata';
2
+ import { BackdropMetadata } from './collection';
3
+
4
+ export interface EnrichedCollection {
5
+ id: string;
6
+ v: number;
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ locale: string,
10
+ language: string;
11
+ baseLocaleCollectionId: string;
12
+ title: string;
13
+ subtitle?: string;
14
+ coverUrl?: string;
15
+ iconUrl?: string;
16
+ backgroundColor?: string;
17
+ description: string;
18
+ tags: string[];
19
+ rank?: number;
20
+ acl: string[];
21
+ catalogues: string[];
22
+ isPublished: boolean;
23
+ owner?: string;
24
+ hacks: EnrichCollectionHack[];
25
+ backdrop?: BackdropMetadata;
26
+ isBackdrop: boolean;
27
+ profile: EnrichCollectionProfile;
28
+ notificationMessage?: string;
29
+ includeInEmailNotifications: boolean;
30
+ includeInPushNotifications: boolean;
31
+ includeInRecommendations: boolean;
32
+ includeInSearchResults: boolean;
33
+ includeInWebsite: boolean;
34
+ isHidden: boolean;
35
+ visibility?: Visibility;
36
+ }
37
+
38
+ export interface EnrichCollectionHack {
39
+ blurb?: string;
40
+ hack: AppHackMetadata;
41
+ }
42
+
43
+ export interface ExistingProfile {
44
+ id: string;
45
+ name: string;
46
+ avatarUrl: string;
47
+ handle: string;
48
+ }
49
+
50
+ export interface DeletedProfile {
51
+ deleted: boolean;
52
+ uptimeOwned: boolean;
53
+ avatarUrl: string;
54
+ }
55
+
56
+ export interface Visibility {
57
+ /* ISO date */
58
+ startDate: string;
59
+ /* ISO date */
60
+ endDate: string;
61
+ }
62
+
63
+ // matches pattern found in the hack enrichment service where the EnrichedHackProfile may be an actual Profile or it may have been deleted
64
+ export type EnrichCollectionProfile = ExistingProfile | DeletedProfile;
@@ -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;