@opencxh/domain 1.83.0 → 1.84.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.
@@ -1,3 +1,4 @@
1
+ import { OwnerScope } from '../contact/types';
1
2
  export interface PredefinedPrompt {
2
3
  name: string;
3
4
  prompt: string;
@@ -5,6 +6,12 @@ export interface PredefinedPrompt {
5
6
  export interface AIProfile<T extends Record<string, any> = Record<string, any>> {
6
7
  id: string;
7
8
  organizationId: string;
9
+ /**
10
+ * Who may use this profile. Company-wide (`org`) or bound to a `team`; profiles
11
+ * are never personal. Optional only during the migration window - the server
12
+ * defaults new profiles to `org` and backfills existing ones.
13
+ */
14
+ ownerScope?: OwnerScope;
8
15
  name: string;
9
16
  description?: string;
10
17
  accountId: string;
@@ -4,6 +4,15 @@ export interface ContactSearchQuery {
4
4
  text?: string;
5
5
  scope?: OwnerScope[];
6
6
  limit?: number;
7
+ /**
8
+ * Channels whose identities the search should cover. The composer passes the
9
+ * one acting channel; the intent starter passes every channel the user can
10
+ * act as. Providers search each identity they own among these and merge —
11
+ * e.g. Microsoft searches the relevant people of every shared mailbox in the
12
+ * list. Order matters: providers may cap the fan-out, so pass most-relevant
13
+ * first.
14
+ */
15
+ channelIds?: string[];
7
16
  }
8
17
  export interface ContactProvider {
9
18
  id: string;
@@ -5,6 +5,13 @@ export interface Session {
5
5
  providerId: string;
6
6
  direction: 'inbound' | 'outbound';
7
7
  remoteIdentity: string;
8
+ /**
9
+ * Number of remote participants, when the provider can report it. Used by
10
+ * transcript labeling: with more than one remote party the audio is a single
11
+ * mixed stream, so `remoteIdentity` can't be trusted to name the speaker and
12
+ * the label falls back to a generic one. Absent/1 = single remote party.
13
+ */
14
+ remoteParticipantCount?: number;
8
15
  state: SessionState;
9
16
  startTime?: number;
10
17
  hasVideo: boolean;
@@ -1,10 +1,26 @@
1
+ import { OwnerScope } from '../entities/contact/types';
2
+ /**
3
+ * A virtual folder: a named, scoped root that binds to a storage backend
4
+ * (a StorageAccount on a storage provider) at a base path. Its `ownerScope`
5
+ * decides who can see and use it (personal / team / org). Files live inside it.
6
+ *
7
+ * Kept named `VirtualMount` for continuity with existing consumers (ui-kit
8
+ * StorageInput, platform-api); surfaced to users as a "folder".
9
+ */
1
10
  export interface VirtualMount {
2
11
  id: string;
12
+ organizationId?: string;
3
13
  name: string;
14
+ /** Storage provider id (e.g. base64("s3:storage")). */
4
15
  providerId: string;
16
+ /** StorageAccount id backing this folder. Falls back to the provider default when omitted. */
17
+ accountId?: string;
5
18
  basePath: string;
6
- policyId: string;
19
+ /** Who may see and use this folder. */
20
+ ownerScope: OwnerScope;
7
21
  metadata?: Record<string, any>;
22
+ createdAt?: number;
23
+ updatedAt?: number;
8
24
  }
9
25
  export interface FilePointer {
10
26
  id: string;
@@ -19,15 +35,19 @@ export interface FilePointer {
19
35
  createdAt?: number;
20
36
  tags?: string[];
21
37
  }
22
- export type FileAction = 'file:Read' | 'file:Write' | 'file:Delete' | 'file:List' | 'file:Share';
23
- export interface FilePolicyStatement {
24
- effect: 'Allow' | 'Deny';
25
- principal: string[];
26
- action: FileAction[];
27
- resource: string[];
28
- }
29
- export interface FilePolicy {
38
+ /**
39
+ * A linked storage backend account (credentials to an S3 bucket, an FTP host, …).
40
+ * Backed by the canonical ManagedAccount store, mirroring the AI app's account
41
+ * pattern. Secrets never reach the UI — this is the public view.
42
+ */
43
+ export interface StorageAccount {
30
44
  id: string;
31
- name: string;
32
- statements: FilePolicyStatement[];
45
+ organizationId: string;
46
+ /** Account-provider id, e.g. base64("s3:account"). */
47
+ providerId: string;
48
+ displayName: string;
49
+ /** Whether this is the org's default account for its provider. */
50
+ isDefault?: boolean;
51
+ /** Provider-specific, non-secret fields (region, bucket, basePath, …). */
52
+ metadata?: Record<string, any>;
33
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.83.0",
3
+ "version": "1.84.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",