@lilaquadrat/interfaces 1.46.0 → 1.49.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/lib/cjs/Category.d.ts +8 -0
  3. package/lib/cjs/ChatMessage.d.ts +11 -0
  4. package/lib/cjs/ChatMessageAttachment.d.ts +5 -0
  5. package/lib/cjs/ChatMessageMetadata.d.ts +4 -0
  6. package/lib/cjs/ChatSupportContext.d.ts +27 -0
  7. package/lib/cjs/Content.d.ts +2 -0
  8. package/lib/cjs/Conversation.d.ts +7 -0
  9. package/lib/cjs/ConversationSla.d.ts +9 -0
  10. package/lib/cjs/License.d.ts +17 -0
  11. package/lib/cjs/Me.d.ts +11 -0
  12. package/lib/cjs/Sla.d.ts +8 -0
  13. package/lib/cjs/Storage.d.ts +2 -1
  14. package/lib/cjs/SupportDay.d.ts +5 -0
  15. package/lib/cjs/Upload.d.ts +1 -0
  16. package/lib/cjs/index.d.ts +9 -0
  17. package/lib/esm/Category.d.ts +8 -0
  18. package/lib/esm/Category.js +2 -0
  19. package/lib/esm/Category.js.map +1 -0
  20. package/lib/esm/ChatMessage.d.ts +11 -0
  21. package/lib/esm/ChatMessage.js +2 -0
  22. package/lib/esm/ChatMessage.js.map +1 -0
  23. package/lib/esm/ChatMessageAttachment.d.ts +5 -0
  24. package/lib/esm/ChatMessageAttachment.js +2 -0
  25. package/lib/esm/ChatMessageAttachment.js.map +1 -0
  26. package/lib/esm/ChatMessageMetadata.d.ts +4 -0
  27. package/lib/esm/ChatMessageMetadata.js +2 -0
  28. package/lib/esm/ChatMessageMetadata.js.map +1 -0
  29. package/lib/esm/ChatSupportContext.d.ts +27 -0
  30. package/lib/esm/ChatSupportContext.js +2 -0
  31. package/lib/esm/ChatSupportContext.js.map +1 -0
  32. package/lib/esm/Content.d.ts +2 -0
  33. package/lib/esm/Conversation.d.ts +7 -0
  34. package/lib/esm/ConversationSla.d.ts +9 -0
  35. package/lib/esm/ConversationSla.js +2 -0
  36. package/lib/esm/ConversationSla.js.map +1 -0
  37. package/lib/esm/License.d.ts +17 -0
  38. package/lib/esm/License.js +2 -0
  39. package/lib/esm/License.js.map +1 -0
  40. package/lib/esm/Me.d.ts +11 -0
  41. package/lib/esm/Sla.d.ts +8 -0
  42. package/lib/esm/Sla.js +2 -0
  43. package/lib/esm/Sla.js.map +1 -0
  44. package/lib/esm/Storage.d.ts +2 -1
  45. package/lib/esm/SupportDay.d.ts +5 -0
  46. package/lib/esm/SupportDay.js +2 -0
  47. package/lib/esm/SupportDay.js.map +1 -0
  48. package/lib/esm/Upload.d.ts +1 -0
  49. package/lib/esm/index.d.ts +9 -0
  50. package/package.json +1 -1
  51. package/src/Category.ts +9 -0
  52. package/src/ChatMessage.ts +12 -0
  53. package/src/ChatMessageAttachment.ts +6 -0
  54. package/src/ChatMessageMetadata.ts +5 -0
  55. package/src/ChatSupportContext.ts +27 -0
  56. package/src/Content.ts +2 -0
  57. package/src/Conversation.ts +8 -0
  58. package/src/ConversationSla.ts +10 -0
  59. package/src/License.ts +26 -0
  60. package/src/Me.ts +13 -0
  61. package/src/Sla.ts +9 -0
  62. package/src/Storage.ts +4 -2
  63. package/src/SupportDay.ts +5 -0
  64. 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.49.0](https://github.com/lilaquadrat/interfaces/compare/v1.48.0...v1.49.0) (2026-09-14)
6
+
7
+
8
+ ### Features
9
+
10
+ * **chat:** add conversation message and attachment contracts ([3554030](https://github.com/lilaquadrat/interfaces/commit/35540305e7c99a654af23d0147ce2096e81c0a0d))
11
+
12
+ ## [1.48.0](https://github.com/lilaquadrat/interfaces/compare/v1.47.0...v1.48.0) (2026-08-28)
13
+
14
+
15
+ ### Features
16
+
17
+ * **me:** added lastSeen & connected status ([9256d37](https://github.com/lilaquadrat/interfaces/commit/9256d3765699044a43cf36d7f271966f626d6cea))
18
+
19
+ ## [1.47.0](https://github.com/lilaquadrat/interfaces/compare/v1.46.0...v1.47.0) (2026-08-28)
20
+
21
+
22
+ ### Features
23
+
24
+ * **sla:** add configuration and conversation contracts ([2973218](https://github.com/lilaquadrat/interfaces/commit/2973218714e3fe36c404f6ac09f1679d608cafd4))
25
+
5
26
  ## [1.46.0](https://github.com/lilaquadrat/interfaces/compare/v1.45.0...v1.46.0) (2026-07-27)
6
27
 
7
28
 
@@ -0,0 +1,8 @@
1
+ import { AccessRule } from "./AccessRule";
2
+ export interface Category {
3
+ company: string;
4
+ project: string;
5
+ key: string;
6
+ label: string;
7
+ read: AccessRule[];
8
+ }
@@ -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,5 @@
1
+ import { ObjectIdString } from './ObjectIdString';
2
+ export interface ChatMessageAttachment {
3
+ uploadId: ObjectIdString;
4
+ name: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatSupportContext } from './ChatSupportContext';
2
+ export interface ChatMessageMetadata {
3
+ supportContext?: ChatSupportContext;
4
+ }
@@ -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
+ }
@@ -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,4 +1,6 @@
1
1
  import { ObjectId } from 'mongodb';
2
+ import type { ConversationSla } from './ConversationSla';
3
+ export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
2
4
  export interface Conversation {
3
5
  _id?: ObjectId;
4
6
  name?: string;
@@ -11,5 +13,10 @@ export interface Conversation {
11
13
  lastActivity?: string;
12
14
  /** how the conversation was started. 'support' = backend attaches the support team. */
13
15
  operationMode?: 'default' | 'support';
16
+ supportStatus?: SupportStatus;
17
+ supportStatusUpdatedAt?: string;
18
+ supportStatusVersion?: number;
19
+ /** Current support SLA projection, joined at read time rather than stored on the conversation. */
20
+ sla?: ConversationSla | null;
14
21
  new?: boolean;
15
22
  }
@@ -0,0 +1,9 @@
1
+ import type { SupportStatus } from './Conversation';
2
+ export interface ConversationSla {
3
+ conversation: string;
4
+ status: SupportStatus;
5
+ statusVersion: number;
6
+ startedAt: string;
7
+ endAt: string;
8
+ stoppedAt?: string;
9
+ }
@@ -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/Me.d.ts CHANGED
@@ -8,4 +8,15 @@ export interface Me {
8
8
  settings?: Settings['settings'];
9
9
  termsAccepted?: boolean;
10
10
  emailConfirmed?: boolean;
11
+ /**
12
+ * presence: last moment a websocket of this user was proven alive.
13
+ * written by the chat service only, never through the /me routes.
14
+ */
15
+ lastSeen?: Date | string;
16
+ /**
17
+ * presence: raw "holds at least one live socket" flag. The `online` state exposed to
18
+ * clients is derived from this AND lastSeen freshness, so a crashed process that never
19
+ * cleared the flag still reads as offline.
20
+ */
21
+ connected?: boolean;
11
22
  }
@@ -0,0 +1,8 @@
1
+ import { SupportDay } from './SupportDay';
2
+ export interface Sla {
3
+ company: string;
4
+ providesSupport: boolean;
5
+ responseTimeHours: number;
6
+ timeZone: string;
7
+ supportDays: SupportDay[];
8
+ }
@@ -1,7 +1,7 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { MediaMetadata } from "./MediaMetadata";
3
3
  export interface Storage {
4
- company: string;
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,5 @@
1
+ export interface SupportDay {
2
+ day: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
3
+ startTime: string;
4
+ endTime: string;
5
+ }
@@ -8,6 +8,7 @@ export interface Upload {
8
8
  project?: string;
9
9
  customer?: ObjectIdString | ObjectId;
10
10
  list?: ObjectIdString | ObjectId;
11
+ conversation?: ObjectIdString | ObjectId;
11
12
  user?: string;
12
13
  app: string;
13
14
  assetId?: string;
@@ -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';
@@ -48,6 +53,7 @@ export * from './ContentOptions';
48
53
  export * from './ContentWithPositions';
49
54
  export * from './Contract';
50
55
  export * from './Conversation';
56
+ export * from './ConversationSla';
51
57
  export * from './CookiesModule';
52
58
  export * from './CreateResult';
53
59
  export * from './CustomerAccounts';
@@ -120,6 +126,7 @@ export * from './InvoiceReferences';
120
126
  export * from './InvoiceTaxBreakdown';
121
127
  export * from './InvoiceTotals';
122
128
  export * from './InvoiceWithXml';
129
+ export * from './License';
123
130
  export * from './LimiterBreach';
124
131
  export * from './LimiterPluginOptions';
125
132
  export * from './LimiterTier';
@@ -211,6 +218,7 @@ export * from './ShareClientOptions';
211
218
  export * from './ShopifyProjectSettings';
212
219
  export * from './ShoppingCartModule';
213
220
  export * from './SkipLimitSort';
221
+ export * from './Sla';
214
222
  export * from './Storage';
215
223
  export * from './StorageCopyAction';
216
224
  export * from './StorageFilePaths';
@@ -219,6 +227,7 @@ export * from './Stored';
219
227
  export * from './StoryModule';
220
228
  export * from './Structure';
221
229
  export * from './StudioIframeMessage';
230
+ export * from './SupportDay';
222
231
  export * from './SystemDomain';
223
232
  export * from './TextModule';
224
233
  export * from './Textblock';
@@ -0,0 +1,8 @@
1
+ import { AccessRule } from "./AccessRule";
2
+ export interface Category {
3
+ company: string;
4
+ project: string;
5
+ key: string;
6
+ label: string;
7
+ read: AccessRule[];
8
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Category.js.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChatMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessage.js","sourceRoot":"","sources":["../../src/ChatMessage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ObjectIdString } from './ObjectIdString';
2
+ export interface ChatMessageAttachment {
3
+ uploadId: ObjectIdString;
4
+ name: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChatMessageAttachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageAttachment.js","sourceRoot":"","sources":["../../src/ChatMessageAttachment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { ChatSupportContext } from './ChatSupportContext';
2
+ export interface ChatMessageMetadata {
3
+ supportContext?: ChatSupportContext;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChatMessageMetadata.js.map
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ChatSupportContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatSupportContext.js","sourceRoot":"","sources":["../../src/ChatSupportContext.ts"],"names":[],"mappings":""}
@@ -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,4 +1,6 @@
1
1
  import { ObjectId } from 'mongodb';
2
+ import type { ConversationSla } from './ConversationSla';
3
+ export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
2
4
  export interface Conversation {
3
5
  _id?: ObjectId;
4
6
  name?: string;
@@ -11,5 +13,10 @@ export interface Conversation {
11
13
  lastActivity?: string;
12
14
  /** how the conversation was started. 'support' = backend attaches the support team. */
13
15
  operationMode?: 'default' | 'support';
16
+ supportStatus?: SupportStatus;
17
+ supportStatusUpdatedAt?: string;
18
+ supportStatusVersion?: number;
19
+ /** Current support SLA projection, joined at read time rather than stored on the conversation. */
20
+ sla?: ConversationSla | null;
14
21
  new?: boolean;
15
22
  }
@@ -0,0 +1,9 @@
1
+ import type { SupportStatus } from './Conversation';
2
+ export interface ConversationSla {
3
+ conversation: string;
4
+ status: SupportStatus;
5
+ statusVersion: number;
6
+ startedAt: string;
7
+ endAt: string;
8
+ stoppedAt?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ConversationSla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationSla.js","sourceRoot":"","sources":["../../src/ConversationSla.ts"],"names":[],"mappings":""}
@@ -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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=License.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"License.js","sourceRoot":"","sources":["../../src/License.ts"],"names":[],"mappings":""}
package/lib/esm/Me.d.ts CHANGED
@@ -8,4 +8,15 @@ export interface Me {
8
8
  settings?: Settings['settings'];
9
9
  termsAccepted?: boolean;
10
10
  emailConfirmed?: boolean;
11
+ /**
12
+ * presence: last moment a websocket of this user was proven alive.
13
+ * written by the chat service only, never through the /me routes.
14
+ */
15
+ lastSeen?: Date | string;
16
+ /**
17
+ * presence: raw "holds at least one live socket" flag. The `online` state exposed to
18
+ * clients is derived from this AND lastSeen freshness, so a crashed process that never
19
+ * cleared the flag still reads as offline.
20
+ */
21
+ connected?: boolean;
11
22
  }
@@ -0,0 +1,8 @@
1
+ import { SupportDay } from './SupportDay';
2
+ export interface Sla {
3
+ company: string;
4
+ providesSupport: boolean;
5
+ responseTimeHours: number;
6
+ timeZone: string;
7
+ supportDays: SupportDay[];
8
+ }
package/lib/esm/Sla.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Sla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sla.js","sourceRoot":"","sources":["../../src/Sla.ts"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import { ObjectId } from "mongodb";
2
2
  import { MediaMetadata } from "./MediaMetadata";
3
3
  export interface Storage {
4
- company: string;
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,5 @@
1
+ export interface SupportDay {
2
+ day: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
3
+ startTime: string;
4
+ endTime: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SupportDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SupportDay.js","sourceRoot":"","sources":["../../src/SupportDay.ts"],"names":[],"mappings":""}
@@ -8,6 +8,7 @@ export interface Upload {
8
8
  project?: string;
9
9
  customer?: ObjectIdString | ObjectId;
10
10
  list?: ObjectIdString | ObjectId;
11
+ conversation?: ObjectIdString | ObjectId;
11
12
  user?: string;
12
13
  app: string;
13
14
  assetId?: string;
@@ -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';
@@ -48,6 +53,7 @@ export * from './ContentOptions';
48
53
  export * from './ContentWithPositions';
49
54
  export * from './Contract';
50
55
  export * from './Conversation';
56
+ export * from './ConversationSla';
51
57
  export * from './CookiesModule';
52
58
  export * from './CreateResult';
53
59
  export * from './CustomerAccounts';
@@ -120,6 +126,7 @@ export * from './InvoiceReferences';
120
126
  export * from './InvoiceTaxBreakdown';
121
127
  export * from './InvoiceTotals';
122
128
  export * from './InvoiceWithXml';
129
+ export * from './License';
123
130
  export * from './LimiterBreach';
124
131
  export * from './LimiterPluginOptions';
125
132
  export * from './LimiterTier';
@@ -211,6 +218,7 @@ export * from './ShareClientOptions';
211
218
  export * from './ShopifyProjectSettings';
212
219
  export * from './ShoppingCartModule';
213
220
  export * from './SkipLimitSort';
221
+ export * from './Sla';
214
222
  export * from './Storage';
215
223
  export * from './StorageCopyAction';
216
224
  export * from './StorageFilePaths';
@@ -219,6 +227,7 @@ export * from './Stored';
219
227
  export * from './StoryModule';
220
228
  export * from './Structure';
221
229
  export * from './StudioIframeMessage';
230
+ export * from './SupportDay';
222
231
  export * from './SystemDomain';
223
232
  export * from './TextModule';
224
233
  export * from './Textblock';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.46.0",
3
+ "version": "1.49.0",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
@@ -0,0 +1,9 @@
1
+ import { AccessRule } from "./AccessRule";
2
+
3
+ export interface Category {
4
+ company: string
5
+ project: string
6
+ key: string
7
+ label: string
8
+ read: AccessRule[];
9
+ }
@@ -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,6 @@
1
+ import { ObjectIdString } from './ObjectIdString';
2
+
3
+ export interface ChatMessageAttachment {
4
+ uploadId: ObjectIdString;
5
+ name: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { ChatSupportContext } from './ChatSupportContext';
2
+
3
+ export interface ChatMessageMetadata {
4
+ supportContext?: ChatSupportContext;
5
+ }
@@ -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
  */
@@ -1,4 +1,7 @@
1
1
  import { ObjectId } from 'mongodb';
2
+ import type { ConversationSla } from './ConversationSla';
3
+
4
+ export type SupportStatus = 'awaiting_agent' | 'awaiting_customer' | 'resolved';
2
5
 
3
6
  export interface Conversation {
4
7
  _id?: ObjectId;
@@ -12,5 +15,10 @@ export interface Conversation {
12
15
  lastActivity?: string;
13
16
  /** how the conversation was started. 'support' = backend attaches the support team. */
14
17
  operationMode?: 'default' | 'support';
18
+ supportStatus?: SupportStatus;
19
+ supportStatusUpdatedAt?: string;
20
+ supportStatusVersion?: number;
21
+ /** Current support SLA projection, joined at read time rather than stored on the conversation. */
22
+ sla?: ConversationSla | null;
15
23
  new?: boolean;
16
24
  }
@@ -0,0 +1,10 @@
1
+ import type { SupportStatus } from './Conversation';
2
+
3
+ export interface ConversationSla {
4
+ conversation: string;
5
+ status: SupportStatus;
6
+ statusVersion: number;
7
+ startedAt: string;
8
+ endAt: string;
9
+ stoppedAt?: string;
10
+ }
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/Me.ts CHANGED
@@ -11,4 +11,17 @@ export interface Me {
11
11
  termsAccepted?: boolean
12
12
  emailConfirmed?: boolean
13
13
 
14
+ /**
15
+ * presence: last moment a websocket of this user was proven alive.
16
+ * written by the chat service only, never through the /me routes.
17
+ */
18
+ lastSeen?: Date | string
19
+
20
+ /**
21
+ * presence: raw "holds at least one live socket" flag. The `online` state exposed to
22
+ * clients is derived from this AND lastSeen freshness, so a crashed process that never
23
+ * cleared the flag still reads as offline.
24
+ */
25
+ connected?: boolean
26
+
14
27
  }
package/src/Sla.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { SupportDay } from './SupportDay';
2
+
3
+ export interface Sla {
4
+ company: string;
5
+ providesSupport: boolean;
6
+ responseTimeHours: number;
7
+ timeZone: string;
8
+ supportDays: SupportDay[];
9
+ }
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: string
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,5 @@
1
+ export interface SupportDay {
2
+ day: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
3
+ startTime: string;
4
+ endTime: string;
5
+ }
package/src/Upload.ts CHANGED
@@ -9,6 +9,7 @@ export interface Upload {
9
9
  project?: string;
10
10
  customer?: ObjectIdString | ObjectId;
11
11
  list?: ObjectIdString | ObjectId;
12
+ conversation?: ObjectIdString | ObjectId;
12
13
  user?: string;
13
14
  app: string;
14
15
  assetId?: string;