@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uptime.app/contracts",
3
- "version": "1.0.21-rc.0",
3
+ "version": "1.0.21",
4
4
  "license": "MIT",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "main": "./dist/cjs/index.js",
@@ -13,5 +13,5 @@
13
13
  "devDependencies": {
14
14
  "typescript": "^5.4.3"
15
15
  },
16
- "gitHead": "55bfc2d05305037e38cfab493f73589fd2ec6197"
16
+ "gitHead": "b0c07ab261e2cb647123b285a9380cf36dd6a2ad"
17
17
  }
@@ -1,28 +1,28 @@
1
- export interface CollectionAccessControl {
2
- id: string;
3
- collectionId: string; // PK
4
- v: number;
5
- acl: string[]
6
- createdAt: string;
7
- updatedAt: string;
8
- }
9
-
10
- export interface CollectionAccessControlCreatedEvent {
11
- id: string;
12
- type: 'CollectionAccessControlCreated';
13
- payload: CollectionAccessControl;
14
- }
15
-
16
- export interface CollectionAccessControlUpdatedEvent {
17
- id: string;
18
- type: 'CollectionAccessControlUpdated';
19
- payload: CollectionAccessControl;
20
- }
21
-
22
- export interface CollectionAccessControlDeletedEvent {
23
- id: string;
24
- type: 'CollectionAccessControlDeleted';
25
- payload: CollectionAccessControl;
26
- }
27
-
28
- export type CollectionAccessControlChangedEvent = CollectionAccessControlCreatedEvent | CollectionAccessControlUpdatedEvent | CollectionAccessControlDeletedEvent;
1
+ export interface CollectionAccessControl {
2
+ id: string;
3
+ collectionId: string; // PK
4
+ v: number;
5
+ acl: string[]
6
+ createdAt: string;
7
+ updatedAt: string;
8
+ }
9
+
10
+ export interface CollectionAccessControlCreatedEvent {
11
+ id: string;
12
+ type: 'CollectionAccessControlCreated';
13
+ payload: CollectionAccessControl;
14
+ }
15
+
16
+ export interface CollectionAccessControlUpdatedEvent {
17
+ id: string;
18
+ type: 'CollectionAccessControlUpdated';
19
+ payload: CollectionAccessControl;
20
+ }
21
+
22
+ export interface CollectionAccessControlDeletedEvent {
23
+ id: string;
24
+ type: 'CollectionAccessControlDeleted';
25
+ payload: CollectionAccessControl;
26
+ }
27
+
28
+ export type CollectionAccessControlChangedEvent = CollectionAccessControlCreatedEvent | CollectionAccessControlUpdatedEvent | CollectionAccessControlDeletedEvent;
@@ -1,29 +1,29 @@
1
- export interface HackAccessControl {
2
- id: string;
3
- hackId: string; // PK
4
- // do I need baseLocaleHackId ? don't think I do
5
- v: number;
6
- acl: string[]
7
- createdAt: string;
8
- updatedAt: string;
9
- }
10
-
11
- export interface HackAccessControlCreatedEvent {
12
- id: string;
13
- type: 'HackAccessControlCreated';
14
- payload: HackAccessControl;
15
- }
16
-
17
- export interface HackAccessControlUpdatedEvent {
18
- id: string;
19
- type: 'HackAccessControlUpdated';
20
- payload: HackAccessControl;
21
- }
22
-
23
- export interface HackAccessControlDeletedEvent {
24
- id: string;
25
- type: 'HackAccessControlDeleted';
26
- payload: HackAccessControl;
27
- }
28
-
29
- export type HackAccessControlChangedEvent = HackAccessControlCreatedEvent | HackAccessControlUpdatedEvent | HackAccessControlDeletedEvent;
1
+ export interface HackAccessControl {
2
+ id: string;
3
+ hackId: string; // PK
4
+ // do I need baseLocaleHackId ? don't think I do
5
+ v: number;
6
+ acl: string[]
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ }
10
+
11
+ export interface HackAccessControlCreatedEvent {
12
+ id: string;
13
+ type: 'HackAccessControlCreated';
14
+ payload: HackAccessControl;
15
+ }
16
+
17
+ export interface HackAccessControlUpdatedEvent {
18
+ id: string;
19
+ type: 'HackAccessControlUpdated';
20
+ payload: HackAccessControl;
21
+ }
22
+
23
+ export interface HackAccessControlDeletedEvent {
24
+ id: string;
25
+ type: 'HackAccessControlDeleted';
26
+ payload: HackAccessControl;
27
+ }
28
+
29
+ export type HackAccessControlChangedEvent = HackAccessControlCreatedEvent | HackAccessControlUpdatedEvent | HackAccessControlDeletedEvent;
@@ -1,9 +1,9 @@
1
- import { AppRestrictedHack } from './app-restricted-hack';
2
- import { EnrichedHack } from '../enriched-hack/enriched-hack';
3
-
4
- /**
5
- * Includes all of a hack's content that premium users are allowed to access. Free users should not have access to this object.
6
- */
7
- export interface AppFullHack extends AppRestrictedHack {
8
- segments: EnrichedHack['segments'];
9
- }
1
+ import { AppRestrictedHack } from './app-restricted-hack';
2
+ import { EnrichedHack } from '../enriched-hack/enriched-hack';
3
+
4
+ /**
5
+ * Includes all of a hack's content that premium users are allowed to access. Free users should not have access to this object.
6
+ */
7
+ export interface AppFullHack extends AppRestrictedHack {
8
+ segments: EnrichedHack['segments'];
9
+ }
@@ -1,56 +1,56 @@
1
- import { EnrichedHack } from '../enriched-hack/enriched-hack';
2
-
3
- export interface AppHackMetadata {
4
- id: string;
5
- language: string;
6
- locale: string;
7
- baseLocaleHackId: string;
8
- v: number;
9
- hackVersion: number;
10
- createdAt: string;
11
- updatedAt: string;
12
- owner: string;
13
- acl: string[];
14
- themeId: string;
15
- title: string;
16
- isHidden?: boolean;
17
- editorialTags?: string[];
18
- coverUrl?: string;
19
- description: string;
20
- /** 'public' or 'private' introduced Mar 2024 */
21
- shareScope: string;
22
- segments: {
23
- favouriteQuote: {
24
- id: string;
25
- };
26
- inANutshell: {
27
- id: string;
28
- };
29
- introduction: {
30
- id: string;
31
- };
32
- insights: {id: string}[];
33
- conclusion: {
34
- id: string;
35
- };
36
- overview: {
37
- id: string;
38
- };
39
- shareableOverview: {
40
- id: string;
41
- };
42
- hereAreTheInsights: {
43
- id: string;
44
- };
45
- putInAction?: {
46
- id: string;
47
- };
48
- }
49
- topics: EnrichedHack['topics'];
50
- contributors?: EnrichedHack['contributors'];
51
- type: string;
52
- sourceData?: EnrichedHack['sourceData'];
53
- profile: EnrichedHack['profile'];
54
- timeSaved?: number;
55
- estimatedTimeSaved?: number;
56
- }
1
+ import { EnrichedHack } from '../enriched-hack/enriched-hack';
2
+
3
+ export interface AppHackMetadata {
4
+ id: string;
5
+ language: string;
6
+ locale: string;
7
+ baseLocaleHackId: string;
8
+ v: number;
9
+ hackVersion: number;
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ owner: string;
13
+ acl: string[];
14
+ themeId: string;
15
+ title: string;
16
+ isHidden?: boolean;
17
+ editorialTags?: string[];
18
+ coverUrl?: string;
19
+ description: string;
20
+ /** 'public' or 'private' introduced Mar 2024 */
21
+ shareScope: string;
22
+ segments: {
23
+ favouriteQuote: {
24
+ id: string;
25
+ };
26
+ inANutshell: {
27
+ id: string;
28
+ };
29
+ introduction: {
30
+ id: string;
31
+ };
32
+ insights: {id: string}[];
33
+ conclusion: {
34
+ id: string;
35
+ };
36
+ overview: {
37
+ id: string;
38
+ };
39
+ shareableOverview: {
40
+ id: string;
41
+ };
42
+ hereAreTheInsights: {
43
+ id: string;
44
+ };
45
+ putInAction?: {
46
+ id: string;
47
+ };
48
+ }
49
+ topics: EnrichedHack['topics'];
50
+ contributors?: EnrichedHack['contributors'];
51
+ type: string;
52
+ sourceData?: EnrichedHack['sourceData'];
53
+ profile: EnrichedHack['profile'];
54
+ timeSaved?: number;
55
+ estimatedTimeSaved?: number;
56
+ }
@@ -1,22 +1,22 @@
1
- import { EnrichedHack } from '../enriched-hack/enriched-hack';
2
- import { AppHackMetadata } from './app-hack-metadata';
3
-
4
- /**
5
- * Includes all of a hack's content the free users are allowed to access.
6
- */
7
- export interface AppRestrictedHack extends AppHackMetadata {
8
- segments: AppHackMetadata['segments'] & {
9
- // only allow access to the shareableOverview and overview segment
10
- overview: EnrichedHack['segments']['overview'];
11
- shareableOverview: EnrichedHack['segments']['shareableOverview'];
12
- }
13
- theme: EnrichedHack['theme'];
14
- affiliate?: {
15
- url: string;
16
- name: string;
17
- };
18
- externalLink?: {
19
- url: string;
20
- type: 'Website' | 'Book' | 'Course' | 'Podcast' | 'Video' | 'Other';
21
- };
22
- }
1
+ import { EnrichedHack } from '../enriched-hack/enriched-hack';
2
+ import { AppHackMetadata } from './app-hack-metadata';
3
+
4
+ /**
5
+ * Includes all of a hack's content the free users are allowed to access.
6
+ */
7
+ export interface AppRestrictedHack extends AppHackMetadata {
8
+ segments: AppHackMetadata['segments'] & {
9
+ // only allow access to the shareableOverview and overview segment
10
+ overview: EnrichedHack['segments']['overview'];
11
+ shareableOverview: EnrichedHack['segments']['shareableOverview'];
12
+ }
13
+ theme: EnrichedHack['theme'];
14
+ affiliate?: {
15
+ url: string;
16
+ name: string;
17
+ };
18
+ externalLink?: {
19
+ url: string;
20
+ type: 'Website' | 'Book' | 'Course' | 'Podcast' | 'Video' | 'Other';
21
+ };
22
+ }
@@ -1,21 +1,21 @@
1
- import { B2BOrganisation } from './b2b-organisation';
2
-
3
- export interface B2BOrganisationCreatedEvent {
4
- id: string;
5
- type: 'B2BOrganisationCreated';
6
- payload: B2BOrganisation;
7
- }
8
-
9
- export interface B2BOrganisationUpdatedEvent {
10
- id: string;
11
- type: 'B2BOrganisationUpdated';
12
- payload: B2BOrganisation;
13
- }
14
-
15
- export interface B2BOrganisationDeletedEvent {
16
- id: string;
17
- type: 'B2BOrganisationDeleted';
18
- payload: B2BOrganisation;
19
- }
20
-
21
- export type B2BOrganisationChangedEvent = B2BOrganisationCreatedEvent | B2BOrganisationUpdatedEvent | B2BOrganisationDeletedEvent;
1
+ import { B2BOrganisation } from './b2b-organisation';
2
+
3
+ export interface B2BOrganisationCreatedEvent {
4
+ id: string;
5
+ type: 'B2BOrganisationCreated';
6
+ payload: B2BOrganisation;
7
+ }
8
+
9
+ export interface B2BOrganisationUpdatedEvent {
10
+ id: string;
11
+ type: 'B2BOrganisationUpdated';
12
+ payload: B2BOrganisation;
13
+ }
14
+
15
+ export interface B2BOrganisationDeletedEvent {
16
+ id: string;
17
+ type: 'B2BOrganisationDeleted';
18
+ payload: B2BOrganisation;
19
+ }
20
+
21
+ export type B2BOrganisationChangedEvent = B2BOrganisationCreatedEvent | B2BOrganisationUpdatedEvent | B2BOrganisationDeletedEvent;
@@ -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
  }
@@ -1,21 +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;
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;
@@ -1,58 +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
- }
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
+ }