@tolinax/ayoune-interfaces 2026.54.0 → 2026.57.2
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 +132 -132
- package/data/modelsAndRights.d.ts +71 -0
- package/interfaces/IComment.d.ts +10 -0
- package/interfaces/IPageBlock.d.ts +1 -1
- package/interfaces/IWebsite.d.ts +2 -0
- package/interfaces/IWikiPage.d.ts +34 -21
- package/interfaces/blocks/IAdmonitionBlock.d.ts +20 -0
- package/interfaces/blocks/IAdmonitionBlock.js +7 -0
- package/interfaces/blocks/IApiReferenceBlock.d.ts +18 -0
- package/interfaces/blocks/IApiReferenceBlock.js +6 -0
- package/interfaces/blocks/ICodeBlock.d.ts +18 -0
- package/interfaces/blocks/ICodeBlock.js +6 -0
- package/interfaces/blocks/IMermaidBlock.d.ts +18 -0
- package/interfaces/blocks/IMermaidBlock.js +7 -0
- package/interfaces/blocks/IPanelBlock.d.ts +18 -0
- package/interfaces/blocks/IPanelBlock.js +6 -0
- package/interfaces/blocks/IPlaygroundBlock.d.ts +25 -0
- package/interfaces/blocks/IPlaygroundBlock.js +6 -0
- package/interfaces/blocks/ITableBlock.d.ts +19 -0
- package/interfaces/blocks/ITableBlock.js +6 -0
- package/interfaces/blocks/ITocBlock.d.ts +18 -0
- package/interfaces/blocks/ITocBlock.js +6 -0
- package/interfaces/blocks/index.d.ts +13 -0
- package/interfaces/blocks/index.js +29 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/index.js +1 -0
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
# aYOUne Interfaces
|
|
2
|
-
|
|
3
|
-
A comprehensive TypeScript interfaces library for the aYOUne platform - a modular business as a Service platform.
|
|
4
|
-
|
|
5
|
-
[](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces)
|
|
6
|
-
[](https://opensource.org/license/lgpl-3-0)
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
This library provides TypeScript type definitions and data exports for the aYOUne platform, which includes modules for:
|
|
11
|
-
|
|
12
|
-
- **AI** - Artificial Intelligence services
|
|
13
|
-
- **CRM** - Customer Relationship Management
|
|
14
|
-
- **CMS** - Content Management System
|
|
15
|
-
- **Marketing** - Marketing automation and campaigns
|
|
16
|
-
- **Automation** - Business process automation
|
|
17
|
-
- **PM** - Project Management
|
|
18
|
-
- **E-commerce** - Online store management
|
|
19
|
-
- And many more specialized modules
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install @tolinax/ayoune-interfaces
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
### Importing Interfaces
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
import { IAPI, ITicket, IaYOUneUser } from '@tolinax/ayoune-interfaces';
|
|
33
|
-
|
|
34
|
-
// Use interfaces for type safety
|
|
35
|
-
const api: IAPI = {
|
|
36
|
-
_customerID: "customer123",
|
|
37
|
-
_clientID: [],
|
|
38
|
-
_subID: [],
|
|
39
|
-
_user: "user456",
|
|
40
|
-
name: "My API",
|
|
41
|
-
callback_url: "https://example.com/callback",
|
|
42
|
-
access_token: "token123",
|
|
43
|
-
access_token_key: "key456",
|
|
44
|
-
active: true,
|
|
45
|
-
scopes: [{ key: "read" }],
|
|
46
|
-
limit: false,
|
|
47
|
-
rateLimit: 1000
|
|
48
|
-
};
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Importing Data and Enums
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { aYOUneServices, aYOUneModules, aMN } from '@tolinax/ayoune-interfaces';
|
|
55
|
-
|
|
56
|
-
// Access service definitions
|
|
57
|
-
console.log(aYOUneServices); // Array of all aYOUne services with hosts
|
|
58
|
-
|
|
59
|
-
// Access module definitions
|
|
60
|
-
console.log(aYOUneModules); // Array of platform modules
|
|
61
|
-
|
|
62
|
-
// Use model names enum
|
|
63
|
-
const collectionName = aMN.AIConversations; // "AIConversations"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## API Reference
|
|
67
|
-
|
|
68
|
-
### Core Interfaces
|
|
69
|
-
|
|
70
|
-
All interfaces extend `IDefaultFields` which provides common MongoDB document fields:
|
|
71
|
-
|
|
72
|
-
- `_id`: ObjectId
|
|
73
|
-
- `created`: Date
|
|
74
|
-
- `updated`: Date
|
|
75
|
-
- Other standard database fields
|
|
76
|
-
|
|
77
|
-
### Data Exports
|
|
78
|
-
|
|
79
|
-
#### Services (`aYOUneServices`)
|
|
80
|
-
Array of service definitions with:
|
|
81
|
-
- `label`: Human-readable service name
|
|
82
|
-
- `module`: Associated platform module
|
|
83
|
-
- `host`: Service hostname
|
|
84
|
-
|
|
85
|
-
#### Modules (`aYOUneModules`)
|
|
86
|
-
Array of platform modules with:
|
|
87
|
-
- `label`: Module display name
|
|
88
|
-
- `module`: Module identifier
|
|
89
|
-
- `host`: Module hostname
|
|
90
|
-
|
|
91
|
-
#### Model Names (`aMN`)
|
|
92
|
-
Enum containing all MongoDB collection names used across the platform.
|
|
93
|
-
|
|
94
|
-
## Development
|
|
95
|
-
|
|
96
|
-
### Building
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
npm run build
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Release
|
|
103
|
-
|
|
104
|
-
This project uses conventional commits and automated releases:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
npm run release
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Platform Architecture
|
|
111
|
-
|
|
112
|
-
The aYOUne platform consists of multiple specialized services:
|
|
113
|
-
|
|
114
|
-
- **Global Services**: Middleware, Datatables, Barcodes, Scripts
|
|
115
|
-
- **AI Services**: Text/Image/Video Generation, Text-to-Speech
|
|
116
|
-
- **CMS Services**: Media, Content Snippets, Dynamic Content
|
|
117
|
-
- **Business Services**: CRM, PM, Marketing, Automation
|
|
118
|
-
- **Analytics**: Statistics, Monitoring, Reporting
|
|
119
|
-
- **E-commerce**: Sales, Purchase, Accounting
|
|
120
|
-
|
|
121
|
-
Each service is independently deployable and communicates through well-defined interfaces provided by this library.
|
|
122
|
-
|
|
123
|
-
## Contributing
|
|
124
|
-
|
|
125
|
-
1. Follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
|
|
126
|
-
2. All interfaces should extend `IDefaultFields` when appropriate
|
|
127
|
-
3. Use consistent naming: interfaces start with `I`, data exports use descriptive names
|
|
128
|
-
4. Update CHANGELOG.md entries are generated automatically
|
|
129
|
-
|
|
130
|
-
## License
|
|
131
|
-
|
|
132
|
-
LGPL-3.0 © tolinax
|
|
1
|
+
# aYOUne Interfaces
|
|
2
|
+
|
|
3
|
+
A comprehensive TypeScript interfaces library for the aYOUne platform - a modular business as a Service platform.
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/@tolinax%2Fayoune-interfaces)
|
|
6
|
+
[](https://opensource.org/license/lgpl-3-0)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This library provides TypeScript type definitions and data exports for the aYOUne platform, which includes modules for:
|
|
11
|
+
|
|
12
|
+
- **AI** - Artificial Intelligence services
|
|
13
|
+
- **CRM** - Customer Relationship Management
|
|
14
|
+
- **CMS** - Content Management System
|
|
15
|
+
- **Marketing** - Marketing automation and campaigns
|
|
16
|
+
- **Automation** - Business process automation
|
|
17
|
+
- **PM** - Project Management
|
|
18
|
+
- **E-commerce** - Online store management
|
|
19
|
+
- And many more specialized modules
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @tolinax/ayoune-interfaces
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Importing Interfaces
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { IAPI, ITicket, IaYOUneUser } from '@tolinax/ayoune-interfaces';
|
|
33
|
+
|
|
34
|
+
// Use interfaces for type safety
|
|
35
|
+
const api: IAPI = {
|
|
36
|
+
_customerID: "customer123",
|
|
37
|
+
_clientID: [],
|
|
38
|
+
_subID: [],
|
|
39
|
+
_user: "user456",
|
|
40
|
+
name: "My API",
|
|
41
|
+
callback_url: "https://example.com/callback",
|
|
42
|
+
access_token: "token123",
|
|
43
|
+
access_token_key: "key456",
|
|
44
|
+
active: true,
|
|
45
|
+
scopes: [{ key: "read" }],
|
|
46
|
+
limit: false,
|
|
47
|
+
rateLimit: 1000
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Importing Data and Enums
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { aYOUneServices, aYOUneModules, aMN } from '@tolinax/ayoune-interfaces';
|
|
55
|
+
|
|
56
|
+
// Access service definitions
|
|
57
|
+
console.log(aYOUneServices); // Array of all aYOUne services with hosts
|
|
58
|
+
|
|
59
|
+
// Access module definitions
|
|
60
|
+
console.log(aYOUneModules); // Array of platform modules
|
|
61
|
+
|
|
62
|
+
// Use model names enum
|
|
63
|
+
const collectionName = aMN.AIConversations; // "AIConversations"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## API Reference
|
|
67
|
+
|
|
68
|
+
### Core Interfaces
|
|
69
|
+
|
|
70
|
+
All interfaces extend `IDefaultFields` which provides common MongoDB document fields:
|
|
71
|
+
|
|
72
|
+
- `_id`: ObjectId
|
|
73
|
+
- `created`: Date
|
|
74
|
+
- `updated`: Date
|
|
75
|
+
- Other standard database fields
|
|
76
|
+
|
|
77
|
+
### Data Exports
|
|
78
|
+
|
|
79
|
+
#### Services (`aYOUneServices`)
|
|
80
|
+
Array of service definitions with:
|
|
81
|
+
- `label`: Human-readable service name
|
|
82
|
+
- `module`: Associated platform module
|
|
83
|
+
- `host`: Service hostname
|
|
84
|
+
|
|
85
|
+
#### Modules (`aYOUneModules`)
|
|
86
|
+
Array of platform modules with:
|
|
87
|
+
- `label`: Module display name
|
|
88
|
+
- `module`: Module identifier
|
|
89
|
+
- `host`: Module hostname
|
|
90
|
+
|
|
91
|
+
#### Model Names (`aMN`)
|
|
92
|
+
Enum containing all MongoDB collection names used across the platform.
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
### Building
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run build
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Release
|
|
103
|
+
|
|
104
|
+
This project uses conventional commits and automated releases:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm run release
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Platform Architecture
|
|
111
|
+
|
|
112
|
+
The aYOUne platform consists of multiple specialized services:
|
|
113
|
+
|
|
114
|
+
- **Global Services**: Middleware, Datatables, Barcodes, Scripts
|
|
115
|
+
- **AI Services**: Text/Image/Video Generation, Text-to-Speech
|
|
116
|
+
- **CMS Services**: Media, Content Snippets, Dynamic Content
|
|
117
|
+
- **Business Services**: CRM, PM, Marketing, Automation
|
|
118
|
+
- **Analytics**: Statistics, Monitoring, Reporting
|
|
119
|
+
- **E-commerce**: Sales, Purchase, Accounting
|
|
120
|
+
|
|
121
|
+
Each service is independently deployable and communicates through well-defined interfaces provided by this library.
|
|
122
|
+
|
|
123
|
+
## Contributing
|
|
124
|
+
|
|
125
|
+
1. Follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.)
|
|
126
|
+
2. All interfaces should extend `IDefaultFields` when appropriate
|
|
127
|
+
3. Use consistent naming: interfaces start with `I`, data exports use descriptive names
|
|
128
|
+
4. Update CHANGELOG.md entries are generated automatically
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
LGPL-3.0 © tolinax
|
|
@@ -15,6 +15,74 @@ interface IModelAction {
|
|
|
15
15
|
dangerous?: boolean;
|
|
16
16
|
confirmation?: string;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Unified sub-document types known to the codegen. Each maps to one of
|
|
20
|
+
* the shared Schemas under `platform/models/src/models/sub_schemas/`
|
|
21
|
+
* (CommentsSchema, ReactionsSchema, VotesSchema, SharesSchema, …).
|
|
22
|
+
*
|
|
23
|
+
* The codegen emits REST routes + a notification-emit hook per type:
|
|
24
|
+
* comment → POST/GET/DELETE /:id/comments[/:cid/replies], emits `commented`
|
|
25
|
+
* reaction → POST/DELETE /:id/comments/:cid/reactions, emits `reacted`
|
|
26
|
+
* vote → POST/DELETE /:id/comments/:cid/votes, emits `voted`
|
|
27
|
+
* share → POST/DELETE /:id/shares, emits `shared`
|
|
28
|
+
* attachment→ POST/GET/DELETE /:id/attachments, emits `attached`
|
|
29
|
+
*/
|
|
30
|
+
export type SubdocumentType = "comment" | "reaction" | "vote" | "share" | "attachment";
|
|
31
|
+
export interface ISubdocumentConfig {
|
|
32
|
+
/** Path segment on the entity route, e.g. "comments". */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Which unified sub-schema backs this subdoc. */
|
|
35
|
+
type: SubdocumentType;
|
|
36
|
+
/**
|
|
37
|
+
* Whether mutations on this subdoc should emit a notification via
|
|
38
|
+
* POST /notifications/send. Default `true` for `comment`, `false` for
|
|
39
|
+
* `reaction` and `vote` (too noisy for in-app bell). Explicit here
|
|
40
|
+
* because every case has defenders.
|
|
41
|
+
*/
|
|
42
|
+
notify?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Right required for mutations. Defaults to the parent entity's
|
|
45
|
+
* `{right}.{name}` (e.g. pm.tasks.comments). Read uses `{right}`.
|
|
46
|
+
*/
|
|
47
|
+
right?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Non-CRUD actions beyond the defaults (`new/edit/delete`). The codegen
|
|
51
|
+
* writes `POST /{entity}/:id/actions/{name}` for each entry, wires a
|
|
52
|
+
* rights check and an optional notification emit. Consumed by:
|
|
53
|
+
* - admin-v2 SDUI (row-action buttons)
|
|
54
|
+
* - OpenAPI spec (operationId `ayoune.{ns}.{capability}.actions.{name}`)
|
|
55
|
+
* - AI agent tools (each action becomes a callable function)
|
|
56
|
+
*/
|
|
57
|
+
export interface IEntityAction {
|
|
58
|
+
/** URL segment, e.g. "complete", "assign", "approve". */
|
|
59
|
+
name: string;
|
|
60
|
+
/** HTTP verb. Default: POST. */
|
|
61
|
+
verb?: "POST" | "PUT" | "DELETE";
|
|
62
|
+
/** Right required. Default: `{entity.right}.{action.name}`. */
|
|
63
|
+
right?: string;
|
|
64
|
+
/**
|
|
65
|
+
* If set, the handler emits a POST to /notifications/send after success
|
|
66
|
+
* with `{entityType: entity.plural, eventType: emits}`. Skip to disable.
|
|
67
|
+
*/
|
|
68
|
+
emits?: string;
|
|
69
|
+
/**
|
|
70
|
+
* JSON-schema-ish shape for the request body. Used by OpenAPI codegen,
|
|
71
|
+
* the admin-v2 runner dialog, and the AI-agent tool definition.
|
|
72
|
+
*/
|
|
73
|
+
paramSchema?: Record<string, any>;
|
|
74
|
+
/** i18n label key for SDUI buttons; falls back to humanized `name`. */
|
|
75
|
+
labelKey?: string;
|
|
76
|
+
/** Material icon name for SDUI. */
|
|
77
|
+
icon?: string;
|
|
78
|
+
/** When the action is destructive and should require confirmation. */
|
|
79
|
+
dangerous?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether this action runs on a single row, many rows (bulk), or both.
|
|
82
|
+
* Default: "single". Bulk actions receive `{ids: string[]}` in the body.
|
|
83
|
+
*/
|
|
84
|
+
availability?: "single" | "many" | "both";
|
|
85
|
+
}
|
|
18
86
|
/**
|
|
19
87
|
* Operations exposable to the Custom Functions `ay.db.*` sandbox SDK.
|
|
20
88
|
*
|
|
@@ -70,6 +138,9 @@ export interface IModelAndRight {
|
|
|
70
138
|
availableInSDK?: boolean;
|
|
71
139
|
sdkOperations?: SDKOperation[];
|
|
72
140
|
allowStreaming?: boolean;
|
|
141
|
+
events?: string[];
|
|
142
|
+
subdocuments?: ISubdocumentConfig[];
|
|
143
|
+
entityActions?: IEntityAction[];
|
|
73
144
|
}
|
|
74
145
|
declare const modelsAndRights: IModelAndRight[];
|
|
75
146
|
export default modelsAndRights;
|
package/interfaces/IComment.d.ts
CHANGED
|
@@ -4,6 +4,16 @@ import { IReaction } from "./IReaction";
|
|
|
4
4
|
export interface IComment extends IDefaultFields {
|
|
5
5
|
_user?: ObjectId;
|
|
6
6
|
_consumerID?: ObjectId;
|
|
7
|
+
/**
|
|
8
|
+
* Flat reply-threading. When set, this comment is a reply to the
|
|
9
|
+
* comment with matching `_id` on the same parent entity. Undefined
|
|
10
|
+
* means root-level. Arbitrary depth is allowed; the client rebuilds
|
|
11
|
+
* the tree (or a $graphLookup does it server-side). Public-web
|
|
12
|
+
* surfaces (WikiPages, knowledge base pages) rely on this for
|
|
13
|
+
* consumer-authored discussions; internal surfaces (Tasks, Projects)
|
|
14
|
+
* can use it for threaded replies when natural.
|
|
15
|
+
*/
|
|
16
|
+
_parentId?: ObjectId;
|
|
7
17
|
comment: string;
|
|
8
18
|
internal?: boolean;
|
|
9
19
|
origin?: string;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Each block has a type, content map, settings for layout/style,
|
|
6
6
|
* optional translations per locale, and optional widget embedding config.
|
|
7
7
|
*/
|
|
8
|
-
export type PageBlockType = 'hero' | 'text' | 'image' | 'gallery' | 'video' | 'cta' | 'form' | 'widget' | 'columns' | 'testimonial' | 'pricing' | 'faq' | 'contact' | 'map' | 'social' | 'html' | 'divider' | 'spacer' | 'header' | 'footer' | 'navigation' | 'countdown' | 'stats' | 'logos' | 'features' | 'team' | 'blog-list' | 'product-list';
|
|
8
|
+
export type PageBlockType = 'hero' | 'text' | 'image' | 'gallery' | 'video' | 'cta' | 'form' | 'widget' | 'columns' | 'testimonial' | 'pricing' | 'faq' | 'contact' | 'map' | 'social' | 'html' | 'divider' | 'spacer' | 'header' | 'footer' | 'navigation' | 'countdown' | 'stats' | 'logos' | 'features' | 'team' | 'blog-list' | 'product-list' | 'table' | 'code' | 'admonition' | 'mermaid' | 'toc' | 'panel' | 'api-reference' | 'playground';
|
|
9
9
|
export interface IPageBlockSpacing {
|
|
10
10
|
top?: number;
|
|
11
11
|
right?: number;
|
package/interfaces/IWebsite.d.ts
CHANGED
|
@@ -196,6 +196,8 @@ export interface IWebsite extends IDefaultFields {
|
|
|
196
196
|
helpCenter?: boolean;
|
|
197
197
|
/** Enable developer portal (API docs, SDK reference, webhooks) */
|
|
198
198
|
developerPortal?: boolean;
|
|
199
|
+
/** Enable Confluence-style product documentation at /:locale/docs/* (Self-Documentation, Kap. 1.62) */
|
|
200
|
+
docs?: boolean;
|
|
199
201
|
/** Enable consumer portal (authenticated area: invoices, tickets, etc.) */
|
|
200
202
|
consumerPortal?: boolean;
|
|
201
203
|
/** Enable public roadmap + feature requests + changelog pages (dogfooding) */
|
|
@@ -2,6 +2,20 @@ import { IDefaultFields } from "./IDefaultFields";
|
|
|
2
2
|
import { ITxtStats } from "./ITxtStats";
|
|
3
3
|
import { ITTS } from "./ITTS";
|
|
4
4
|
import { ISEOAttributes } from "./ISEOAttributes";
|
|
5
|
+
import { IPageBlock } from "./IPageBlock";
|
|
6
|
+
import { IComment } from "./IComment";
|
|
7
|
+
import { IVote } from "./IVote";
|
|
8
|
+
/** Entry in a page's auto-generated table of contents. */
|
|
9
|
+
export interface IWikiPageTocEntry {
|
|
10
|
+
/** Heading level (1 = H1, 2 = H2, ...). */
|
|
11
|
+
level: number;
|
|
12
|
+
/** URL anchor slug (matches the <h*> id attribute). */
|
|
13
|
+
slug: string;
|
|
14
|
+
/** Heading text (plain). */
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
/** Content authoring format — determines how render-pipeline processes the page body. */
|
|
18
|
+
export type WikiPageContentFormat = 'markdown' | 'blocks' | 'html';
|
|
5
19
|
export interface IWikiPage extends IDefaultFields {
|
|
6
20
|
_customerID?: ObjectId;
|
|
7
21
|
_clientID?: ObjectId[];
|
|
@@ -23,11 +37,27 @@ export interface IWikiPage extends IDefaultFields {
|
|
|
23
37
|
kbslug?: string;
|
|
24
38
|
wikiworld?: string;
|
|
25
39
|
supportPortalLink?: string;
|
|
40
|
+
/** Consumer-app deep link (ayoune.com). Populated by jobWorkerPermalinks post 2026-04-22. */
|
|
41
|
+
consumerAppLink?: string;
|
|
26
42
|
ytvideoid?: string;
|
|
27
43
|
content?: string;
|
|
28
44
|
contentHTML?: string;
|
|
29
45
|
excerpt?: string;
|
|
30
46
|
excerptHTML?: string;
|
|
47
|
+
/** Block-based authoring (alternative to markdown `content`). Phase 1a of Self-Documentation. */
|
|
48
|
+
blocks?: IPageBlock[];
|
|
49
|
+
/** Which authoring format the page uses. Default: 'markdown'. */
|
|
50
|
+
contentFormat?: WikiPageContentFormat;
|
|
51
|
+
/** Last time the render pipeline populated contentHTML/excerptHTML/toc. */
|
|
52
|
+
renderedAt?: Date;
|
|
53
|
+
/** Hash of content|blocks for idempotent render-skip. */
|
|
54
|
+
renderHash?: string;
|
|
55
|
+
/** Locales in which this (kbslug, slug) is currently available (aggregated across sibling docs). */
|
|
56
|
+
availableLocales?: string[];
|
|
57
|
+
/** Auto-generated table of contents from H1-H3 headings at publish time. */
|
|
58
|
+
toc?: IWikiPageTocEntry[];
|
|
59
|
+
/** Curated cross-links to other WikiPages (in addition to inline `wiki:` links). */
|
|
60
|
+
relatedPages?: ObjectId[];
|
|
31
61
|
teamaccess?: any[];
|
|
32
62
|
useraccess?: any[];
|
|
33
63
|
globalaccess?: any[];
|
|
@@ -40,29 +70,12 @@ export interface IWikiPage extends IDefaultFields {
|
|
|
40
70
|
name?: string;
|
|
41
71
|
}[];
|
|
42
72
|
keywords?: any[];
|
|
43
|
-
comments
|
|
44
|
-
|
|
45
|
-
comment: string;
|
|
46
|
-
createdAt?: Date;
|
|
47
|
-
comments?: {
|
|
48
|
-
_consumerID?: ObjectId;
|
|
49
|
-
comment: string;
|
|
50
|
-
createdAt?: Date;
|
|
51
|
-
}[];
|
|
52
|
-
}[];
|
|
73
|
+
/** Consumer- und User-authored comments. Flat reply-threading via IComment._parentId. */
|
|
74
|
+
comments?: IComment[];
|
|
53
75
|
views?: number;
|
|
54
76
|
shares?: number;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
usermail: string;
|
|
58
|
-
createdAt?: Date;
|
|
59
|
-
}[];
|
|
60
|
-
downVotes?: {
|
|
61
|
-
comment: string;
|
|
62
|
-
_consumerID: ObjectId;
|
|
63
|
-
usermail: string;
|
|
64
|
-
created?: Date;
|
|
65
|
-
}[];
|
|
77
|
+
/** Consumer up/down votes on the page itself (distinct from votes on individual comments, which live inside IComment.votes). */
|
|
78
|
+
votes?: IVote[];
|
|
66
79
|
textBlocks?: any[];
|
|
67
80
|
wikiPages?: any[];
|
|
68
81
|
videoId?: ObjectId;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IAdmonitionBlock — Callout box for info/warning/tip/danger/success hints.
|
|
3
|
+
* Renders as styled `<div class="admonition admonition-{variant}">`.
|
|
4
|
+
* In markdown authoring, corresponds to `::: info`, `::: warning`, etc. (markdown-it-container).
|
|
5
|
+
*/
|
|
6
|
+
export type AdmonitionVariant = 'info' | 'warning' | 'tip' | 'danger' | 'success' | 'note';
|
|
7
|
+
export interface IAdmonitionBlockContent {
|
|
8
|
+
/** Admonition type — drives color + default icon. */
|
|
9
|
+
variant: AdmonitionVariant;
|
|
10
|
+
/** Optional title shown at top of the admonition. */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Body markdown (inline + block elements supported). */
|
|
13
|
+
body: string;
|
|
14
|
+
/** Lucide / Material icon name — overrides variant default. */
|
|
15
|
+
icon?: string;
|
|
16
|
+
/** Whether the admonition is collapsible. */
|
|
17
|
+
collapsible?: boolean;
|
|
18
|
+
/** If collapsible: start collapsed. */
|
|
19
|
+
defaultOpen?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IAdmonitionBlock — Callout box for info/warning/tip/danger/success hints.
|
|
4
|
+
* Renders as styled `<div class="admonition admonition-{variant}">`.
|
|
5
|
+
* In markdown authoring, corresponds to `::: info`, `::: warning`, etc. (markdown-it-container).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IApiReferenceBlock — Embed of a live API entity reference from api-registry.json.
|
|
3
|
+
* Renders a table of REST paths, required rights, and (optionally) fields.
|
|
4
|
+
*/
|
|
5
|
+
export interface IApiReferenceBlockContent {
|
|
6
|
+
/** Module slug (e.g. 'crm', 'cms', 'hub'). */
|
|
7
|
+
module: string;
|
|
8
|
+
/** Optional specific entity within the module (e.g. 'Consumers'). If omitted, renders the full module index. */
|
|
9
|
+
entity?: string;
|
|
10
|
+
/** Show the CRUD-path table (GET /list, POST /, etc.). Default: true. */
|
|
11
|
+
showCrudTable?: boolean;
|
|
12
|
+
/** Show the field-list from the entity schema. Default: false (opt-in). */
|
|
13
|
+
showFields?: boolean;
|
|
14
|
+
/** Show per-route rights. Default: true. */
|
|
15
|
+
showRights?: boolean;
|
|
16
|
+
/** Deep-link target (opens the full entwickler-portal page). */
|
|
17
|
+
linkToDeveloperPortal?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ICodeBlock — Syntax-highlighted code block with optional line numbers + filename.
|
|
3
|
+
* Rendered server-side via highlight.js at publish time.
|
|
4
|
+
*/
|
|
5
|
+
export interface ICodeBlockContent {
|
|
6
|
+
/** Code content (preserves original whitespace). */
|
|
7
|
+
code: string;
|
|
8
|
+
/** Language identifier for syntax highlighting (e.g. 'ts', 'bash', 'json'). */
|
|
9
|
+
language: string;
|
|
10
|
+
/** Show line numbers in gutter. */
|
|
11
|
+
showLineNumbers?: boolean;
|
|
12
|
+
/** Optional filename shown as a header above the block. */
|
|
13
|
+
filename?: string;
|
|
14
|
+
/** Highlight specific line numbers (1-based). */
|
|
15
|
+
highlightLines?: number[];
|
|
16
|
+
/** Wrap long lines (false = horizontal scroll). */
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMermaidBlock — Mermaid-JS diagram block.
|
|
3
|
+
* Source diagramCode is authored in the editor; renderedSvg is populated
|
|
4
|
+
* server-side at publish time so the consumer-app stays zero-JS.
|
|
5
|
+
*/
|
|
6
|
+
export type MermaidDiagramType = 'flowchart' | 'sequence' | 'class' | 'state' | 'gantt' | 'pie' | 'mindmap' | 'erd' | 'journey' | 'gitgraph' | 'c4' | 'unknown';
|
|
7
|
+
export interface IMermaidBlockContent {
|
|
8
|
+
/** Mermaid source (e.g. "graph TD\nA --> B"). */
|
|
9
|
+
diagramCode: string;
|
|
10
|
+
/** Auto-detected diagram type for rendering hints. */
|
|
11
|
+
diagramType?: MermaidDiagramType;
|
|
12
|
+
/** Server-rendered SVG markup (inlined into contentHTML at publish). */
|
|
13
|
+
renderedSvg?: string;
|
|
14
|
+
/** Theme preset: default | dark | forest | neutral. */
|
|
15
|
+
theme?: 'default' | 'dark' | 'forest' | 'neutral';
|
|
16
|
+
/** Optional caption below the diagram. */
|
|
17
|
+
caption?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IMermaidBlock — Mermaid-JS diagram block.
|
|
4
|
+
* Source diagramCode is authored in the editor; renderedSvg is populated
|
|
5
|
+
* server-side at publish time so the consumer-app stays zero-JS.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IPanelBlock — Collapsible panel/accordion block.
|
|
3
|
+
* Renders as `<details><summary>title</summary>body</details>` (zero-JS).
|
|
4
|
+
*/
|
|
5
|
+
export interface IPanelBlockContent {
|
|
6
|
+
/** Panel title (shown in summary). */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Panel body (markdown/HTML). */
|
|
9
|
+
body: string;
|
|
10
|
+
/** Whether the panel can be collapsed. Default: true. */
|
|
11
|
+
collapsible?: boolean;
|
|
12
|
+
/** Whether the panel starts open. Default: true. */
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
/** Optional icon in the summary bar. */
|
|
15
|
+
icon?: string;
|
|
16
|
+
/** Background color variant. */
|
|
17
|
+
variant?: 'default' | 'muted' | 'accent';
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IPlaygroundBlock — Interactive "Try it now" REST-API snippet.
|
|
3
|
+
* In the consumer-app, renders a form that sends a real request to the target API.
|
|
4
|
+
*/
|
|
5
|
+
export type PlaygroundHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
6
|
+
export interface IPlaygroundBlockContent {
|
|
7
|
+
/** HTTP method. */
|
|
8
|
+
method: PlaygroundHttpMethod;
|
|
9
|
+
/** Request path (e.g. '/consumers/:id'). May contain `:paramName` placeholders. */
|
|
10
|
+
path: string;
|
|
11
|
+
/** Module that owns the endpoint (used to resolve the host: `{module}-api.ayoune.app`). */
|
|
12
|
+
module: string;
|
|
13
|
+
/** Optional entity name for schema-aware Body-Editor hints. */
|
|
14
|
+
entity?: string;
|
|
15
|
+
/** Pre-filled request body (JSON). */
|
|
16
|
+
sampleBody?: any;
|
|
17
|
+
/** Expected sample response — shown before the user sends. */
|
|
18
|
+
sampleResponse?: any;
|
|
19
|
+
/** Whether to require a JWT before the "Send" button activates. Default: true. */
|
|
20
|
+
requireAuth?: boolean;
|
|
21
|
+
/** Title shown above the playground. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Explanation text above the form. */
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ITableBlock — Confluence-style table block for WikiPages + WebPages.
|
|
3
|
+
* Renders via markdown-it table plugin (or custom block renderer).
|
|
4
|
+
*/
|
|
5
|
+
export type TableCellAlignment = 'left' | 'center' | 'right';
|
|
6
|
+
export interface ITableBlockContent {
|
|
7
|
+
/** Column headers */
|
|
8
|
+
headers: string[];
|
|
9
|
+
/** Rows as arrays of cell strings. Cells may contain inline markdown. */
|
|
10
|
+
rows: string[][];
|
|
11
|
+
/** Per-column alignment (length = headers.length). Default: 'left'. */
|
|
12
|
+
alignment?: TableCellAlignment[];
|
|
13
|
+
/** Optional caption displayed above/below the table */
|
|
14
|
+
caption?: string;
|
|
15
|
+
/** Show striped rows */
|
|
16
|
+
striped?: boolean;
|
|
17
|
+
/** Show outer border */
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ITocBlock — Auto-generated Table-of-Contents block.
|
|
3
|
+
* Populated server-side from the page's H1-H6 headings at publish time.
|
|
4
|
+
*/
|
|
5
|
+
export interface ITocBlockContent {
|
|
6
|
+
/** Minimum heading depth to include (1 = H1, 2 = H2, ...). Default: 2. */
|
|
7
|
+
minDepth?: number;
|
|
8
|
+
/** Maximum heading depth. Default: 3. */
|
|
9
|
+
maxDepth?: number;
|
|
10
|
+
/** Scope of the TOC. */
|
|
11
|
+
scope: 'page' | 'space';
|
|
12
|
+
/** Title shown above the TOC (e.g. "On this page"). */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Whether to render as numbered list (ordered). */
|
|
15
|
+
numbered?: boolean;
|
|
16
|
+
/** Whether to collapse the TOC by default. */
|
|
17
|
+
collapsible?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confluence-style Block-Type Content interfaces for WikiPages + WebPages.
|
|
3
|
+
* Each interface defines the shape of `IPageBlock.content` for a specific block type.
|
|
4
|
+
* Added 2026-04-22 as part of the Self-Documentation initiative (Kap. 1.62).
|
|
5
|
+
*/
|
|
6
|
+
export * from './ITableBlock';
|
|
7
|
+
export * from './ICodeBlock';
|
|
8
|
+
export * from './IAdmonitionBlock';
|
|
9
|
+
export * from './IMermaidBlock';
|
|
10
|
+
export * from './ITocBlock';
|
|
11
|
+
export * from './IPanelBlock';
|
|
12
|
+
export * from './IApiReferenceBlock';
|
|
13
|
+
export * from './IPlaygroundBlock';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Confluence-style Block-Type Content interfaces for WikiPages + WebPages.
|
|
4
|
+
* Each interface defines the shape of `IPageBlock.content` for a specific block type.
|
|
5
|
+
* Added 2026-04-22 as part of the Self-Documentation initiative (Kap. 1.62).
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./ITableBlock"), exports);
|
|
23
|
+
__exportStar(require("./ICodeBlock"), exports);
|
|
24
|
+
__exportStar(require("./IAdmonitionBlock"), exports);
|
|
25
|
+
__exportStar(require("./IMermaidBlock"), exports);
|
|
26
|
+
__exportStar(require("./ITocBlock"), exports);
|
|
27
|
+
__exportStar(require("./IPanelBlock"), exports);
|
|
28
|
+
__exportStar(require("./IApiReferenceBlock"), exports);
|
|
29
|
+
__exportStar(require("./IPlaygroundBlock"), exports);
|
package/interfaces/index.d.ts
CHANGED
|
@@ -705,6 +705,7 @@ export * from "./IWebsite";
|
|
|
705
705
|
export * from "./IWebsiteMenu";
|
|
706
706
|
export * from "./IWebsiteTemplate";
|
|
707
707
|
export * from "./IPageBlock";
|
|
708
|
+
export * from "./blocks";
|
|
708
709
|
export * from "./IWhatsappLog";
|
|
709
710
|
export * from "./IWidget";
|
|
710
711
|
export * from "./IWidgetEmbedSite";
|
package/interfaces/index.js
CHANGED
|
@@ -721,6 +721,7 @@ __exportStar(require("./IWebsite"), exports);
|
|
|
721
721
|
__exportStar(require("./IWebsiteMenu"), exports);
|
|
722
722
|
__exportStar(require("./IWebsiteTemplate"), exports);
|
|
723
723
|
__exportStar(require("./IPageBlock"), exports);
|
|
724
|
+
__exportStar(require("./blocks"), exports);
|
|
724
725
|
__exportStar(require("./IWhatsappLog"), exports);
|
|
725
726
|
__exportStar(require("./IWidget"), exports);
|
|
726
727
|
__exportStar(require("./IWidgetEmbedSite"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolinax/ayoune-interfaces",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.57.2",
|
|
4
4
|
"description": "Houses TypeScript interfaces for aYOUne",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"copy-readme": "cpx README.md dist",
|
|
11
11
|
"prerelease": "npm run build",
|
|
12
12
|
"release": "release-it --ci",
|
|
13
|
-
"postrelease": "npm run release-package",
|
|
14
13
|
"prerelease-package": "npm run copy-package && npm run copy-readme",
|
|
15
14
|
"release-package": "cd dist && npm publish",
|
|
16
15
|
"test": "echo \"Error: no test specified\" && exit 1"
|