@plus45/types 1.3.1 → 1.3.3
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.
package/dist/index.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ import { SpotlightSearchResults } from "./search/spotlight_search";
|
|
|
21
21
|
import { Organization } from "./types/organizations/organization";
|
|
22
22
|
import { OrganizationMember, OrganizationRoles } from "./types/organizations/organization_member";
|
|
23
23
|
import { OrganizationInvitation } from "./types/organizations/invitations";
|
|
24
|
-
import { Page, PageBuilderComponent, PageTitleBlock, TitleBodyBlockData } from "./types/page_builder/page_builder";
|
|
25
|
-
export { type User, type UserSessionInfo, type AccessToken, type PublicUser, type Exercise, type CompletedExercise, type LastExerciseValue, type ExerciseDataPoint, type Workout, type WorkoutExecution, type Schedule, type AssignedSchedule, type Organization, type OrganizationMember, type OrganizationInvitation, OrganizationRoles, Post, BatchPost, PostMedia, AuthenticationActionData, ResetPasswordAuthenticationData, WeekLayout, TimeAverage, ExerciseType, ExerciseUnit, ScheduleDay, ScheduleRecurrence, AuthType, SpotlightSearchResults, WeightUnits, DistanceUnits, TimeUnits, Page, PageBuilderComponent, TitleBodyBlockData, PageTitleBlock };
|
|
24
|
+
import { ImageTextBlock, Page, PageBuilderComponent, PageTitleBlock, TitleBodyBlockData } from "./types/page_builder/page_builder";
|
|
25
|
+
export { type User, type UserSessionInfo, type AccessToken, type PublicUser, type Exercise, type CompletedExercise, type LastExerciseValue, type ExerciseDataPoint, type Workout, type WorkoutExecution, type Schedule, type AssignedSchedule, type Organization, type OrganizationMember, type OrganizationInvitation, OrganizationRoles, Post, BatchPost, PostMedia, AuthenticationActionData, ResetPasswordAuthenticationData, WeekLayout, TimeAverage, ExerciseType, ExerciseUnit, ScheduleDay, ScheduleRecurrence, AuthType, SpotlightSearchResults, WeightUnits, DistanceUnits, TimeUnits, Page, PageBuilderComponent, TitleBodyBlockData, PageTitleBlock, ImageTextBlock };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a single media that has been uploaded by an organizationmember.
|
|
3
|
+
*/
|
|
4
|
+
export interface OrganizationMedia {
|
|
5
|
+
id: string;
|
|
6
|
+
key: string;
|
|
7
|
+
/**
|
|
8
|
+
* In DB, this is just the key. In frontend, this should be a hydrated URL.
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
file_name: string | null;
|
|
12
|
+
content_type: string | null;
|
|
13
|
+
size_bytes: number | null;
|
|
14
|
+
created_at: string;
|
|
15
|
+
uploaded_by: string | null;
|
|
16
|
+
}
|
|
@@ -13,25 +13,29 @@ type Alignable = {
|
|
|
13
13
|
*/
|
|
14
14
|
export type Page = {
|
|
15
15
|
id: string;
|
|
16
|
+
/** FK → organizations.id */
|
|
17
|
+
organization_id: string;
|
|
16
18
|
/** URL slug: /o/:orgKey/:slug */
|
|
17
19
|
slug: string;
|
|
18
|
-
/** Display name (
|
|
19
|
-
title?: string;
|
|
20
|
-
/** SEO */
|
|
20
|
+
/** Display name (editor / nav use) */
|
|
21
|
+
title?: string | null;
|
|
22
|
+
/** SEO metadata */
|
|
21
23
|
seo: {
|
|
22
24
|
title?: string;
|
|
23
25
|
description?: string;
|
|
24
26
|
noIndex?: boolean;
|
|
25
27
|
};
|
|
26
|
-
/**
|
|
28
|
+
/** Published page content */
|
|
27
29
|
components: PageBuilderComponent[];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
/** Draft (unpublished) content */
|
|
31
|
+
draft_components?: PageBuilderComponent[] | null;
|
|
32
|
+
/** Publishing state */
|
|
30
33
|
published: boolean;
|
|
31
|
-
|
|
34
|
+
published_at?: string | null;
|
|
32
35
|
/** Metadata */
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
updated_at: string;
|
|
37
|
+
/** Page schema version */
|
|
38
|
+
schema_version: 1;
|
|
35
39
|
};
|
|
36
40
|
/**
|
|
37
41
|
* Renders a simple block with a title and body text.
|
|
@@ -49,10 +53,16 @@ export type PageTitleBlock = Alignable & InherentPageBuilderProperties & {
|
|
|
49
53
|
title: string;
|
|
50
54
|
subtitle?: string;
|
|
51
55
|
};
|
|
56
|
+
export type ImageTextBlock = Alignable & InherentPageBuilderProperties & {
|
|
57
|
+
type: "image_text";
|
|
58
|
+
title: string;
|
|
59
|
+
subtitle?: string;
|
|
60
|
+
image_url?: string;
|
|
61
|
+
};
|
|
52
62
|
/**
|
|
53
63
|
* A component that can be utilized by the Page Builder to render components.
|
|
54
64
|
* A PageBuilderComponent object merely stores the data used by the object.
|
|
55
65
|
* Rendering is up to the frontend.
|
|
56
66
|
*/
|
|
57
|
-
export type PageBuilderComponent = TitleBodyBlockData | PageTitleBlock;
|
|
67
|
+
export type PageBuilderComponent = TitleBodyBlockData | PageTitleBlock | ImageTextBlock;
|
|
58
68
|
export {};
|