@lilaquadrat/interfaces 1.48.0 → 1.50.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.
- package/CHANGELOG.md +21 -0
- package/lib/cjs/Category.d.ts +8 -0
- package/lib/cjs/ChatMessage.d.ts +11 -0
- package/lib/cjs/ChatMessageAttachment.d.ts +5 -0
- package/lib/cjs/ChatMessageMetadata.d.ts +4 -0
- package/lib/cjs/ChatSupportContext.d.ts +27 -0
- package/lib/cjs/Content.d.ts +2 -0
- package/lib/cjs/Conversation.d.ts +7 -0
- package/lib/cjs/License.d.ts +17 -0
- package/lib/cjs/Storage.d.ts +2 -1
- package/lib/cjs/SupportAvailability.d.ts +13 -0
- package/lib/cjs/Upload.d.ts +1 -0
- package/lib/cjs/index.d.ts +7 -0
- package/lib/esm/Category.d.ts +8 -0
- package/lib/esm/Category.js +2 -0
- package/lib/esm/Category.js.map +1 -0
- package/lib/esm/ChatMessage.d.ts +11 -0
- package/lib/esm/ChatMessage.js +2 -0
- package/lib/esm/ChatMessage.js.map +1 -0
- package/lib/esm/ChatMessageAttachment.d.ts +5 -0
- package/lib/esm/ChatMessageAttachment.js +2 -0
- package/lib/esm/ChatMessageAttachment.js.map +1 -0
- package/lib/esm/ChatMessageMetadata.d.ts +4 -0
- package/lib/esm/ChatMessageMetadata.js +2 -0
- package/lib/esm/ChatMessageMetadata.js.map +1 -0
- package/lib/esm/ChatSupportContext.d.ts +27 -0
- package/lib/esm/ChatSupportContext.js +2 -0
- package/lib/esm/ChatSupportContext.js.map +1 -0
- package/lib/esm/Content.d.ts +2 -0
- package/lib/esm/Conversation.d.ts +7 -0
- package/lib/esm/License.d.ts +17 -0
- package/lib/esm/License.js +2 -0
- package/lib/esm/License.js.map +1 -0
- package/lib/esm/Storage.d.ts +2 -1
- package/lib/esm/SupportAvailability.d.ts +13 -0
- package/lib/esm/SupportAvailability.js +2 -0
- package/lib/esm/SupportAvailability.js.map +1 -0
- package/lib/esm/Upload.d.ts +1 -0
- package/lib/esm/index.d.ts +7 -0
- package/package.json +1 -1
- package/src/Category.ts +9 -0
- package/src/ChatMessage.ts +12 -0
- package/src/ChatMessageAttachment.ts +6 -0
- package/src/ChatMessageMetadata.ts +5 -0
- package/src/ChatSupportContext.ts +27 -0
- package/src/Content.ts +2 -0
- package/src/Conversation.ts +7 -0
- package/src/License.ts +26 -0
- package/src/Storage.ts +4 -2
- package/src/SupportAvailability.ts +14 -0
- package/src/Upload.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.50.1](https://github.com/lilaquadrat/interfaces/compare/v1.50.0...v1.50.1) (2026-09-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **SupportAvailability:** added missing file ([4e5864e](https://github.com/lilaquadrat/interfaces/commit/4e5864ee38e0312a834a7d48cbae18af56670f35))
|
|
11
|
+
|
|
12
|
+
## [1.50.0](https://github.com/lilaquadrat/interfaces/compare/v1.49.0...v1.50.0) (2026-09-25)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **conversations:** added supportAvailability ([340f1e3](https://github.com/lilaquadrat/interfaces/commit/340f1e3e0b6fbc9f3526845a8492e86fef103ce1))
|
|
18
|
+
|
|
19
|
+
## [1.49.0](https://github.com/lilaquadrat/interfaces/compare/v1.48.0...v1.49.0) (2026-09-14)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **chat:** add conversation message and attachment contracts ([3554030](https://github.com/lilaquadrat/interfaces/commit/35540305e7c99a654af23d0147ce2096e81c0a0d))
|
|
25
|
+
|
|
5
26
|
## [1.48.0](https://github.com/lilaquadrat/interfaces/compare/v1.47.0...v1.48.0) (2026-08-28)
|
|
6
27
|
|
|
7
28
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectIdString } from './ObjectIdString';
|
|
2
|
+
import { ChatMessageAttachment } from './ChatMessageAttachment';
|
|
3
|
+
import { ChatMessageMetadata } from './ChatMessageMetadata';
|
|
4
|
+
export interface ChatMessage {
|
|
5
|
+
type: 'message:add';
|
|
6
|
+
conversation: ObjectIdString;
|
|
7
|
+
message: string;
|
|
8
|
+
clientMessageId?: string;
|
|
9
|
+
metadata?: ChatMessageMetadata;
|
|
10
|
+
attachments?: ChatMessageAttachment[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ChatSupportContext {
|
|
2
|
+
company?: string;
|
|
3
|
+
project?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
pageTitle?: string;
|
|
6
|
+
appVersion?: string;
|
|
7
|
+
browser?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
};
|
|
11
|
+
os?: {
|
|
12
|
+
name?: string;
|
|
13
|
+
version?: string;
|
|
14
|
+
};
|
|
15
|
+
screen?: {
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
pixelRatio?: number;
|
|
19
|
+
};
|
|
20
|
+
viewport?: {
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
locale?: string;
|
|
25
|
+
timezone?: string;
|
|
26
|
+
userAgent?: string;
|
|
27
|
+
}
|
package/lib/cjs/Content.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
1
2
|
import { ChildData } from "./ChildData";
|
|
2
3
|
import { CompatibleModule } from "./CompatibleModule";
|
|
3
4
|
import { GenericData } from "./GenericData";
|
|
@@ -8,6 +9,7 @@ export interface Content {
|
|
|
8
9
|
project: string;
|
|
9
10
|
modules: CompatibleModule[];
|
|
10
11
|
tags?: string[];
|
|
12
|
+
categories?: ObjectId[];
|
|
11
13
|
/**
|
|
12
14
|
* a description of the content which will be used as context for AI text generation
|
|
13
15
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ObjectId } from 'mongodb';
|
|
2
2
|
import type { ConversationSla } from './ConversationSla';
|
|
3
|
+
import type { SupportAvailability } from './SupportAvailability';
|
|
3
4
|
export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
|
|
4
5
|
export interface Conversation {
|
|
5
6
|
_id?: ObjectId;
|
|
@@ -18,5 +19,11 @@ export interface Conversation {
|
|
|
18
19
|
supportStatusVersion?: number;
|
|
19
20
|
/** Current support SLA projection, joined at read time rather than stored on the conversation. */
|
|
20
21
|
sla?: ConversationSla | null;
|
|
22
|
+
/**
|
|
23
|
+
* Customer-facing support-hours summary (derived from the Sla config + server time), attached
|
|
24
|
+
* at read time for support conversations. Absent for non-support conversations and when no
|
|
25
|
+
* Sla configuration exists. Never carries the raw Sla fields.
|
|
26
|
+
*/
|
|
27
|
+
supportAvailability?: SupportAvailability | null;
|
|
21
28
|
new?: boolean;
|
|
22
29
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface License {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
monthlyCost: number;
|
|
6
|
+
oneTimeCost?: number;
|
|
7
|
+
minimumContractMonths: number;
|
|
8
|
+
cancellationPeriodDays: number;
|
|
9
|
+
includesSupport: boolean;
|
|
10
|
+
supportSla?: string;
|
|
11
|
+
active: boolean;
|
|
12
|
+
autoExtend: boolean;
|
|
13
|
+
/** app ids that are included in this license */
|
|
14
|
+
includedApps: string[];
|
|
15
|
+
/** per-app usage limits, e.g. { editor: { pages: 10 }, media: { storageMb: 500 } } */
|
|
16
|
+
limits?: Record<string, Record<string, number>>;
|
|
17
|
+
}
|
package/lib/cjs/Storage.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObjectId } from "mongodb";
|
|
2
2
|
import { MediaMetadata } from "./MediaMetadata";
|
|
3
3
|
export interface Storage {
|
|
4
|
-
company
|
|
4
|
+
company?: string;
|
|
5
5
|
project?: string;
|
|
6
6
|
/**
|
|
7
7
|
* this document can be bound to a specific customer
|
|
@@ -11,6 +11,7 @@ export interface Storage {
|
|
|
11
11
|
* this document can be bound to a specific list and customer
|
|
12
12
|
*/
|
|
13
13
|
list?: ObjectId;
|
|
14
|
+
conversation?: ObjectId;
|
|
14
15
|
filename: string;
|
|
15
16
|
prefix?: string;
|
|
16
17
|
path?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SupportDay } from './SupportDay';
|
|
2
|
+
/**
|
|
3
|
+
* Customer-facing support-hours schedule.
|
|
4
|
+
*
|
|
5
|
+
* Only the derived schedule is exposed (`supportDays`, `timeZone`, `responseTimeHours`), never the
|
|
6
|
+
* raw Sla config. Whether support is open right now is derived by the client from the schedule
|
|
7
|
+
* and its own clock.
|
|
8
|
+
*/
|
|
9
|
+
export interface SupportAvailability {
|
|
10
|
+
responseTimeHours: number;
|
|
11
|
+
timeZone: string;
|
|
12
|
+
supportDays: SupportDay[];
|
|
13
|
+
}
|
package/lib/cjs/Upload.d.ts
CHANGED
package/lib/cjs/index.d.ts
CHANGED
|
@@ -24,11 +24,16 @@ export * from './CallResponse';
|
|
|
24
24
|
export * from './CallToActionModule';
|
|
25
25
|
export * from './Cart';
|
|
26
26
|
export * from './CartItem';
|
|
27
|
+
export * from './Category';
|
|
27
28
|
export * from './CategoryStructure';
|
|
28
29
|
export * from './CategoryStructureWithRequired';
|
|
29
30
|
export * from './Certificate';
|
|
30
31
|
export * from './CertificateAction';
|
|
31
32
|
export * from './CertificateActionResult';
|
|
33
|
+
export * from './ChatMessage';
|
|
34
|
+
export * from './ChatMessageAttachment';
|
|
35
|
+
export * from './ChatMessageMetadata';
|
|
36
|
+
export * from './ChatSupportContext';
|
|
32
37
|
export * from './ChildData';
|
|
33
38
|
export * from './Command';
|
|
34
39
|
export * from './CommandNginx';
|
|
@@ -121,6 +126,7 @@ export * from './InvoiceReferences';
|
|
|
121
126
|
export * from './InvoiceTaxBreakdown';
|
|
122
127
|
export * from './InvoiceTotals';
|
|
123
128
|
export * from './InvoiceWithXml';
|
|
129
|
+
export * from './License';
|
|
124
130
|
export * from './LimiterBreach';
|
|
125
131
|
export * from './LimiterPluginOptions';
|
|
126
132
|
export * from './LimiterTier';
|
|
@@ -221,6 +227,7 @@ export * from './Stored';
|
|
|
221
227
|
export * from './StoryModule';
|
|
222
228
|
export * from './Structure';
|
|
223
229
|
export * from './StudioIframeMessage';
|
|
230
|
+
export * from './SupportAvailability';
|
|
224
231
|
export * from './SupportDay';
|
|
225
232
|
export * from './SystemDomain';
|
|
226
233
|
export * from './TextModule';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Category.js","sourceRoot":"","sources":["../../src/Category.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectIdString } from './ObjectIdString';
|
|
2
|
+
import { ChatMessageAttachment } from './ChatMessageAttachment';
|
|
3
|
+
import { ChatMessageMetadata } from './ChatMessageMetadata';
|
|
4
|
+
export interface ChatMessage {
|
|
5
|
+
type: 'message:add';
|
|
6
|
+
conversation: ObjectIdString;
|
|
7
|
+
message: string;
|
|
8
|
+
clientMessageId?: string;
|
|
9
|
+
metadata?: ChatMessageMetadata;
|
|
10
|
+
attachments?: ChatMessageAttachment[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatMessage.js","sourceRoot":"","sources":["../../src/ChatMessage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatMessageAttachment.js","sourceRoot":"","sources":["../../src/ChatMessageAttachment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatMessageMetadata.js","sourceRoot":"","sources":["../../src/ChatMessageMetadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ChatSupportContext {
|
|
2
|
+
company?: string;
|
|
3
|
+
project?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
pageTitle?: string;
|
|
6
|
+
appVersion?: string;
|
|
7
|
+
browser?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
};
|
|
11
|
+
os?: {
|
|
12
|
+
name?: string;
|
|
13
|
+
version?: string;
|
|
14
|
+
};
|
|
15
|
+
screen?: {
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
pixelRatio?: number;
|
|
19
|
+
};
|
|
20
|
+
viewport?: {
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
locale?: string;
|
|
25
|
+
timezone?: string;
|
|
26
|
+
userAgent?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatSupportContext.js","sourceRoot":"","sources":["../../src/ChatSupportContext.ts"],"names":[],"mappings":""}
|
package/lib/esm/Content.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb";
|
|
1
2
|
import { ChildData } from "./ChildData";
|
|
2
3
|
import { CompatibleModule } from "./CompatibleModule";
|
|
3
4
|
import { GenericData } from "./GenericData";
|
|
@@ -8,6 +9,7 @@ export interface Content {
|
|
|
8
9
|
project: string;
|
|
9
10
|
modules: CompatibleModule[];
|
|
10
11
|
tags?: string[];
|
|
12
|
+
categories?: ObjectId[];
|
|
11
13
|
/**
|
|
12
14
|
* a description of the content which will be used as context for AI text generation
|
|
13
15
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ObjectId } from 'mongodb';
|
|
2
2
|
import type { ConversationSla } from './ConversationSla';
|
|
3
|
+
import type { SupportAvailability } from './SupportAvailability';
|
|
3
4
|
export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
|
|
4
5
|
export interface Conversation {
|
|
5
6
|
_id?: ObjectId;
|
|
@@ -18,5 +19,11 @@ export interface Conversation {
|
|
|
18
19
|
supportStatusVersion?: number;
|
|
19
20
|
/** Current support SLA projection, joined at read time rather than stored on the conversation. */
|
|
20
21
|
sla?: ConversationSla | null;
|
|
22
|
+
/**
|
|
23
|
+
* Customer-facing support-hours summary (derived from the Sla config + server time), attached
|
|
24
|
+
* at read time for support conversations. Absent for non-support conversations and when no
|
|
25
|
+
* Sla configuration exists. Never carries the raw Sla fields.
|
|
26
|
+
*/
|
|
27
|
+
supportAvailability?: SupportAvailability | null;
|
|
21
28
|
new?: boolean;
|
|
22
29
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface License {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
monthlyCost: number;
|
|
6
|
+
oneTimeCost?: number;
|
|
7
|
+
minimumContractMonths: number;
|
|
8
|
+
cancellationPeriodDays: number;
|
|
9
|
+
includesSupport: boolean;
|
|
10
|
+
supportSla?: string;
|
|
11
|
+
active: boolean;
|
|
12
|
+
autoExtend: boolean;
|
|
13
|
+
/** app ids that are included in this license */
|
|
14
|
+
includedApps: string[];
|
|
15
|
+
/** per-app usage limits, e.g. { editor: { pages: 10 }, media: { storageMb: 500 } } */
|
|
16
|
+
limits?: Record<string, Record<string, number>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"License.js","sourceRoot":"","sources":["../../src/License.ts"],"names":[],"mappings":""}
|
package/lib/esm/Storage.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObjectId } from "mongodb";
|
|
2
2
|
import { MediaMetadata } from "./MediaMetadata";
|
|
3
3
|
export interface Storage {
|
|
4
|
-
company
|
|
4
|
+
company?: string;
|
|
5
5
|
project?: string;
|
|
6
6
|
/**
|
|
7
7
|
* this document can be bound to a specific customer
|
|
@@ -11,6 +11,7 @@ export interface Storage {
|
|
|
11
11
|
* this document can be bound to a specific list and customer
|
|
12
12
|
*/
|
|
13
13
|
list?: ObjectId;
|
|
14
|
+
conversation?: ObjectId;
|
|
14
15
|
filename: string;
|
|
15
16
|
prefix?: string;
|
|
16
17
|
path?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SupportDay } from './SupportDay';
|
|
2
|
+
/**
|
|
3
|
+
* Customer-facing support-hours schedule.
|
|
4
|
+
*
|
|
5
|
+
* Only the derived schedule is exposed (`supportDays`, `timeZone`, `responseTimeHours`), never the
|
|
6
|
+
* raw Sla config. Whether support is open right now is derived by the client from the schedule
|
|
7
|
+
* and its own clock.
|
|
8
|
+
*/
|
|
9
|
+
export interface SupportAvailability {
|
|
10
|
+
responseTimeHours: number;
|
|
11
|
+
timeZone: string;
|
|
12
|
+
supportDays: SupportDay[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupportAvailability.js","sourceRoot":"","sources":["../../src/SupportAvailability.ts"],"names":[],"mappings":""}
|
package/lib/esm/Upload.d.ts
CHANGED
package/lib/esm/index.d.ts
CHANGED
|
@@ -24,11 +24,16 @@ export * from './CallResponse';
|
|
|
24
24
|
export * from './CallToActionModule';
|
|
25
25
|
export * from './Cart';
|
|
26
26
|
export * from './CartItem';
|
|
27
|
+
export * from './Category';
|
|
27
28
|
export * from './CategoryStructure';
|
|
28
29
|
export * from './CategoryStructureWithRequired';
|
|
29
30
|
export * from './Certificate';
|
|
30
31
|
export * from './CertificateAction';
|
|
31
32
|
export * from './CertificateActionResult';
|
|
33
|
+
export * from './ChatMessage';
|
|
34
|
+
export * from './ChatMessageAttachment';
|
|
35
|
+
export * from './ChatMessageMetadata';
|
|
36
|
+
export * from './ChatSupportContext';
|
|
32
37
|
export * from './ChildData';
|
|
33
38
|
export * from './Command';
|
|
34
39
|
export * from './CommandNginx';
|
|
@@ -121,6 +126,7 @@ export * from './InvoiceReferences';
|
|
|
121
126
|
export * from './InvoiceTaxBreakdown';
|
|
122
127
|
export * from './InvoiceTotals';
|
|
123
128
|
export * from './InvoiceWithXml';
|
|
129
|
+
export * from './License';
|
|
124
130
|
export * from './LimiterBreach';
|
|
125
131
|
export * from './LimiterPluginOptions';
|
|
126
132
|
export * from './LimiterTier';
|
|
@@ -221,6 +227,7 @@ export * from './Stored';
|
|
|
221
227
|
export * from './StoryModule';
|
|
222
228
|
export * from './Structure';
|
|
223
229
|
export * from './StudioIframeMessage';
|
|
230
|
+
export * from './SupportAvailability';
|
|
224
231
|
export * from './SupportDay';
|
|
225
232
|
export * from './SystemDomain';
|
|
226
233
|
export * from './TextModule';
|
package/package.json
CHANGED
package/src/Category.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjectIdString } from './ObjectIdString';
|
|
2
|
+
import { ChatMessageAttachment } from './ChatMessageAttachment';
|
|
3
|
+
import { ChatMessageMetadata } from './ChatMessageMetadata';
|
|
4
|
+
|
|
5
|
+
export interface ChatMessage {
|
|
6
|
+
type: 'message:add';
|
|
7
|
+
conversation: ObjectIdString;
|
|
8
|
+
message: string;
|
|
9
|
+
clientMessageId?: string;
|
|
10
|
+
metadata?: ChatMessageMetadata;
|
|
11
|
+
attachments?: ChatMessageAttachment[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ChatSupportContext {
|
|
2
|
+
company?: string;
|
|
3
|
+
project?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
pageTitle?: string;
|
|
6
|
+
appVersion?: string;
|
|
7
|
+
browser?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
version?: string;
|
|
10
|
+
};
|
|
11
|
+
os?: {
|
|
12
|
+
name?: string;
|
|
13
|
+
version?: string;
|
|
14
|
+
};
|
|
15
|
+
screen?: {
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
pixelRatio?: number;
|
|
19
|
+
};
|
|
20
|
+
viewport?: {
|
|
21
|
+
width?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
};
|
|
24
|
+
locale?: string;
|
|
25
|
+
timezone?: string;
|
|
26
|
+
userAgent?: string;
|
|
27
|
+
}
|
package/src/Content.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ObjectId } from "mongodb"
|
|
1
2
|
import { ChildData } from "./ChildData"
|
|
2
3
|
import { CompatibleModule } from "./CompatibleModule"
|
|
3
4
|
import { GenericData } from "./GenericData"
|
|
@@ -9,6 +10,7 @@ export interface Content {
|
|
|
9
10
|
project: string
|
|
10
11
|
modules: CompatibleModule[]
|
|
11
12
|
tags?: string[]
|
|
13
|
+
categories?: ObjectId[]
|
|
12
14
|
/**
|
|
13
15
|
* a description of the content which will be used as context for AI text generation
|
|
14
16
|
*/
|
package/src/Conversation.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ObjectId } from 'mongodb';
|
|
2
2
|
import type { ConversationSla } from './ConversationSla';
|
|
3
|
+
import type { SupportAvailability } from './SupportAvailability';
|
|
3
4
|
|
|
4
5
|
export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
|
|
5
6
|
|
|
@@ -20,5 +21,11 @@ export interface Conversation {
|
|
|
20
21
|
supportStatusVersion?: number;
|
|
21
22
|
/** Current support SLA projection, joined at read time rather than stored on the conversation. */
|
|
22
23
|
sla?: ConversationSla | null;
|
|
24
|
+
/**
|
|
25
|
+
* Customer-facing support-hours summary (derived from the Sla config + server time), attached
|
|
26
|
+
* at read time for support conversations. Absent for non-support conversations and when no
|
|
27
|
+
* Sla configuration exists. Never carries the raw Sla fields.
|
|
28
|
+
*/
|
|
29
|
+
supportAvailability?: SupportAvailability | null;
|
|
23
30
|
new?: boolean;
|
|
24
31
|
}
|
package/src/License.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface License {
|
|
2
|
+
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
|
|
6
|
+
description?: string;
|
|
7
|
+
|
|
8
|
+
monthlyCost: number;
|
|
9
|
+
oneTimeCost?: number;
|
|
10
|
+
|
|
11
|
+
minimumContractMonths: number;
|
|
12
|
+
cancellationPeriodDays: number;
|
|
13
|
+
|
|
14
|
+
includesSupport: boolean;
|
|
15
|
+
supportSla?: string;
|
|
16
|
+
|
|
17
|
+
active: boolean;
|
|
18
|
+
autoExtend: boolean;
|
|
19
|
+
|
|
20
|
+
/** app ids that are included in this license */
|
|
21
|
+
includedApps: string[];
|
|
22
|
+
|
|
23
|
+
/** per-app usage limits, e.g. { editor: { pages: 10 }, media: { storageMb: 500 } } */
|
|
24
|
+
limits?: Record<string, Record<string, number>>;
|
|
25
|
+
|
|
26
|
+
}
|
package/src/Storage.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ObjectId } from "mongodb";
|
|
|
2
2
|
import { MediaMetadata } from "./MediaMetadata";
|
|
3
3
|
|
|
4
4
|
export interface Storage {
|
|
5
|
-
company
|
|
5
|
+
company?: string
|
|
6
6
|
project?: string
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -14,6 +14,8 @@ export interface Storage {
|
|
|
14
14
|
*/
|
|
15
15
|
list?: ObjectId
|
|
16
16
|
|
|
17
|
+
conversation?: ObjectId
|
|
18
|
+
|
|
17
19
|
filename: string
|
|
18
20
|
prefix?: string
|
|
19
21
|
|
|
@@ -32,4 +34,4 @@ export interface Storage {
|
|
|
32
34
|
* binds the storage document to a structure asset definition
|
|
33
35
|
*/
|
|
34
36
|
assetId?: string
|
|
35
|
-
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SupportDay } from './SupportDay';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Customer-facing support-hours schedule.
|
|
5
|
+
*
|
|
6
|
+
* Only the derived schedule is exposed (`supportDays`, `timeZone`, `responseTimeHours`), never the
|
|
7
|
+
* raw Sla config. Whether support is open right now is derived by the client from the schedule
|
|
8
|
+
* and its own clock.
|
|
9
|
+
*/
|
|
10
|
+
export interface SupportAvailability {
|
|
11
|
+
responseTimeHours: number;
|
|
12
|
+
timeZone: string;
|
|
13
|
+
supportDays: SupportDay[];
|
|
14
|
+
}
|