@smartsoft001-mobilems/models 2.88.0 → 2.90.0
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/README.md +44 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @smartsoft001-mobilems/models
|
|
2
|
+
|
|
3
|
+
Framework-wide entities, interfaces and enums shared by the other `@smartsoft001-mobilems` packages:
|
|
4
|
+
CMS config, pages, files, users and content widgets.
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { Config, Page, MsFile, ArticleWidgetType } from '@smartsoft001-mobilems/models';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Entities
|
|
11
|
+
|
|
12
|
+
| Export | Purpose |
|
|
13
|
+
| ---------------- | ----------------------------------------------------------------- |
|
|
14
|
+
| `Config` | CMS app config (`ITheme`, menu, feature flags) — `IEntity<string>` |
|
|
15
|
+
| `ConfigPageType` | Page-type enum used by the config menu |
|
|
16
|
+
| `ConfigMenuItem` | Union of menu-item shapes |
|
|
17
|
+
| `ITheme` | Theme block of `Config` (colours, fonts, per-area flags) |
|
|
18
|
+
| `Page` | CMS static page — `IEntity<number>` |
|
|
19
|
+
| `PageSlide` | Slide of a CMS page |
|
|
20
|
+
| `MsFile` | Multimedia file — `IEntity<number>` |
|
|
21
|
+
| `MsFileFromFeature` | Enum of file feature sources (image, audio, video, 3d, …) |
|
|
22
|
+
|
|
23
|
+
## User
|
|
24
|
+
|
|
25
|
+
`IUser`, `IUserInfo`, `IUserRegister`, `IUserModify`, `ILoginResponse` — the API-payload shapes.
|
|
26
|
+
|
|
27
|
+
> **Name collision.** [`@smartsoft001-mobilems/angular`](../angular/README.md) declares its own types
|
|
28
|
+
> under all five of these names, with **different** shapes (its `IUserInfo` carries `userID` /
|
|
29
|
+
> `avatar` / `newsletterAcceptance`; this one is `{ username?, email, [key: string]: any }`). They are
|
|
30
|
+
> not interchangeable — use these for API payloads and the angular ones in UI code, and never mix the
|
|
31
|
+
> two in one type position.
|
|
32
|
+
|
|
33
|
+
## Content / articles
|
|
34
|
+
|
|
35
|
+
- `IArticle` — the article shape shared by articles, news and thematic publications
|
|
36
|
+
- `ArticleWidget` (union), `ArticleWidgetType` (enum), `IArticleWidget` (base) and the per-type
|
|
37
|
+
widgets: `IArticleWidgetText`, `IArticleWidgetImage`, `IArticleWidgetMedia`, `IArticleWidgetVideo`,
|
|
38
|
+
`IArticleWidgetAudio`, `IArticleWidgetGalleryImage`, `IArticleWidgetGalleryArticle`,
|
|
39
|
+
`IArticleWidgetGalleryObject`
|
|
40
|
+
- Shared descriptors: `IAuthor`, `ICreator`, `IKeyword`, `ICycle`, `ICopyrights`, `MenuItem`, `ITab`
|
|
41
|
+
|
|
42
|
+
`WidgetComponent` in [`@smartsoft001-mobilems/angular`](../angular/README.md) maps an
|
|
43
|
+
`ArticleWidgetType` to the component that renders it; a new widget type is an `IArticleWidget`
|
|
44
|
+
extension declared here plus an entry in that component's type map.
|