@opencxh/domain 1.281.0 → 1.286.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.
@@ -590,42 +590,12 @@ export type ServerOp = {
590
590
  cursor?: string;
591
591
  limit?: number;
592
592
  } | {
593
- kind: "folder.list";
594
- channelId: string;
595
- } | {
596
- kind: "folder.messages";
597
- channelId: string;
598
- folderId: string;
599
- cursor?: string;
600
- limit?: number;
601
- } | {
602
- kind: "folder.import";
593
+ kind: "mailbox.import";
603
594
  channelId: string;
604
595
  externalThreadId: string;
605
- folderId?: string;
606
- folderName?: string;
607
- } | {
608
- kind: "folder.move";
609
- channelId: string;
610
- interactionId: string;
611
- folderId: string;
612
- folderName?: string;
613
596
  };
614
- /**
615
- * Folder DTOs — transport shapes for the generic folder capability.
616
- * Deliberately NOT persisted entities: the folder tree and previews are
617
- * fetched live from the provider (TTL-cached client-side), never bulk-stored.
618
- * Providers map their own model onto this (Outlook `mailFolders`, Gmail
619
- * `labels`, IMAP `folders`).
620
- */
621
- export interface FolderNode {
622
- id: string;
623
- name: string;
624
- parentId?: string;
625
- unreadCount?: number;
626
- kind?: "system" | "user";
627
- }
628
- export interface FolderMessagePreview {
597
+ /** One live message preview from a remote mailbox search. Never persisted until imported. */
598
+ export interface MailboxMessagePreview {
629
599
  externalThreadId: string;
630
600
  externalMessageId: string;
631
601
  subject: string;
@@ -638,8 +608,8 @@ export interface FolderMessagePreview {
638
608
  hasAttachments: boolean;
639
609
  unread?: boolean;
640
610
  }
641
- export interface FolderMessagePage {
642
- items: FolderMessagePreview[];
611
+ export interface MailboxMessagePage {
612
+ items: MailboxMessagePreview[];
643
613
  /** Opaque provider cursor (e.g. Graph `@odata.nextLink`). Absent = last page. */
644
614
  nextCursor?: string;
645
615
  }
@@ -654,12 +624,6 @@ export interface MailboxSearchSource {
654
624
  providerId: string;
655
625
  displayName: string;
656
626
  }
657
- /**
658
- * Well-known `ProviderFeature.name` for the folder capability. A provider
659
- * supporting folder.list/messages/import/move sets it true in
660
- * `describe().features`; the client then shows the Folders nav for that channel.
661
- */
662
- export declare const FEATURE_FOLDER_MANAGEMENT = "folder_management";
663
627
  /**
664
628
  * Well-known `ProviderFeature.name` for remote search (`mailbox.search`, e.g.
665
629
  * Outlook Graph `$search` or IMAP SEARCH). The comm-server includes such
@@ -18,7 +18,7 @@ export declare const APP_PERMISSIONS: {
18
18
  readonly "app-store": readonly ["app.publish", "app.read", "app.write", "setting.read", "setting.write"];
19
19
  readonly assist: readonly ["board.read"];
20
20
  readonly automations: readonly ["sync.read", "sync.write", "webhook.read", "webhook.write"];
21
- readonly communication: readonly ["account.read", "account.write", "activity-type.read", "activity.read", "activity.write", "attachment.read", "calendar.read", "calendar.write", "channel.read", "channel.write", "folder.read", "folder.write", "inbox.read", "inbox.write", "interaction.read", "interaction.write", "reminder.read", "template.read", "template.write"];
21
+ readonly communication: readonly ["account.read", "account.write", "activity-type.read", "activity.read", "activity.write", "attachment.read", "calendar.read", "calendar.write", "channel.read", "channel.write", "inbox.read", "inbox.write", "interaction.read", "interaction.write", "reminder.read", "template.read", "template.write"];
22
22
  readonly context: readonly ["attribute.read", "attribute.write", "custom-field.read", "custom-field.write", "kind.read", "kind.write", "memory.read", "memory.write", "reaction.read", "reaction.write", "topic.read", "topic.write"];
23
23
  readonly crm: readonly ["company.read", "company.write", "contact.read", "contact.write"];
24
24
  readonly "eylo-voip": readonly ["account.read", "account.write", "callflow.read", "callflow.write", "channel.read", "channel.write", "contact.read", "contact.write", "device.read", "device.write", "group.read", "group.write", "interaction.read", "interaction.write", "media.read", "media.write", "menu.read", "menu.write", "phone-number.read", "phone-number.write", "recording.read", "recording.write", "sip.read", "temporal-rule.read", "temporal-rule.write", "user.read", "user.write", "vmbox.read", "vmbox.write", "webhook.read", "webhook.write"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.281.0",
3
+ "version": "1.286.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,65 +0,0 @@
1
- export type PushTransport = "webpush" | "apns" | "apns-voip" | "fcm" | "tauri";
2
- export type PushPlatform = "web" | "ios" | "android" | "desktop";
3
- export interface PushSubscription {
4
- id: string;
5
- userId: string;
6
- installationId: string;
7
- transport: PushTransport;
8
- token: string;
9
- keys?: {
10
- p256dh: string;
11
- auth: string;
12
- };
13
- platform: PushPlatform;
14
- appVersion: string;
15
- providerId?: string;
16
- createdAt: number;
17
- lastSeenAt: number;
18
- }
19
- /**
20
- * The platform's own kinds, plus whatever a `notification-source` app declares
21
- * (`"communication:mentioned"`). Open like {@link ExtensionContext}: the closed union kept
22
- * autocomplete but made an app-declared kind unexpressible, and per-kind device preferences
23
- * are exactly what apps must be able to declare.
24
- */
25
- export type PushKind = "wake" | "incoming-call" | "message" | "presence" | "notification" | "custom" | (string & {});
26
- export interface PushDisplay {
27
- title: string;
28
- body?: string;
29
- icon?: string;
30
- tag?: string;
31
- actions?: {
32
- id: string;
33
- title: string;
34
- }[];
35
- url?: string;
36
- }
37
- export interface PushEnvelope<P = unknown> {
38
- providerId: string;
39
- accountId?: string;
40
- kind: PushKind;
41
- display?: PushDisplay;
42
- payload: P;
43
- ts: number;
44
- ttl?: number;
45
- voip?: boolean;
46
- }
47
- export type PushSubscribeInput = Omit<PushSubscription, "id" | "userId" | "installationId" | "createdAt" | "lastSeenAt">;
48
- export interface PushSendRequest<P = unknown> {
49
- to: {
50
- userIds: string[];
51
- } | {
52
- userId: string;
53
- };
54
- installationIds?: string[];
55
- envelope: Omit<PushEnvelope<P>, "ts">;
56
- platforms?: PushPlatform[];
57
- collapseKey?: string;
58
- }
59
- export interface PushSendResult {
60
- delivered: number;
61
- }
62
- export interface IPushChannel {
63
- readonly providerId: string;
64
- handle(env: PushEnvelope): Promise<void>;
65
- }