oceanbus 0.3.4 → 0.4.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/README.md +10 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/roster/auto-discovery.d.ts +18 -0
- package/dist/roster/auto-discovery.d.ts.map +1 -0
- package/dist/roster/auto-discovery.js +109 -0
- package/dist/roster/auto-discovery.js.map +1 -0
- package/dist/roster/index.d.ts +44 -0
- package/dist/roster/index.d.ts.map +1 -0
- package/dist/roster/index.js +280 -0
- package/dist/roster/index.js.map +1 -0
- package/dist/roster/indexes.d.ts +6 -0
- package/dist/roster/indexes.d.ts.map +1 -0
- package/dist/roster/indexes.js +72 -0
- package/dist/roster/indexes.js.map +1 -0
- package/dist/roster/search.d.ts +34 -0
- package/dist/roster/search.d.ts.map +1 -0
- package/dist/roster/search.js +282 -0
- package/dist/roster/search.js.map +1 -0
- package/dist/roster/store.d.ts +14 -0
- package/dist/roster/store.d.ts.map +1 -0
- package/dist/roster/store.js +154 -0
- package/dist/roster/store.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/roster.d.ts +123 -0
- package/dist/types/roster.d.ts.map +1 -0
- package/dist/types/roster.js +4 -0
- package/dist/types/roster.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,uCAAqB;AACrB,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,uCAAqB;AACrB,2CAAyB;AACzB,2CAAyB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export interface AgentRef {
|
|
2
|
+
agentId: string;
|
|
3
|
+
openId: string;
|
|
4
|
+
purpose: string;
|
|
5
|
+
isDefault: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Per-app data stored under contacts[].apps[appName] */
|
|
8
|
+
export type AppData = Record<string, unknown>;
|
|
9
|
+
export type ContactSource = 'manual' | 'yellow-pages' | 'auto-discovery' | 'chat';
|
|
10
|
+
export type ContactStatus = 'active' | 'pending' | 'archived';
|
|
11
|
+
/** Rich source tracking — tells us WHERE the contact came from and WHEN. */
|
|
12
|
+
export interface Provenance {
|
|
13
|
+
account: ContactSource;
|
|
14
|
+
sourceId: string | null;
|
|
15
|
+
firstSeenAt: string;
|
|
16
|
+
lastVerifiedAt: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Contact {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
agents: AgentRef[];
|
|
22
|
+
tags: string[];
|
|
23
|
+
aliases: string[];
|
|
24
|
+
notes: string;
|
|
25
|
+
lastContactAt: string;
|
|
26
|
+
source: ContactSource;
|
|
27
|
+
provenance?: Provenance;
|
|
28
|
+
status: ContactStatus;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
apps: Record<string, AppData>;
|
|
32
|
+
}
|
|
33
|
+
export interface NewContact {
|
|
34
|
+
name: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
agents?: AgentRef[];
|
|
37
|
+
aliases?: string[];
|
|
38
|
+
tags?: string[];
|
|
39
|
+
notes?: string;
|
|
40
|
+
source: ContactSource;
|
|
41
|
+
status?: ContactStatus;
|
|
42
|
+
}
|
|
43
|
+
export interface ContactPatch {
|
|
44
|
+
name?: string;
|
|
45
|
+
agents?: AgentRef[];
|
|
46
|
+
aliases?: string[];
|
|
47
|
+
tags?: string[];
|
|
48
|
+
notes?: string;
|
|
49
|
+
source?: ContactSource;
|
|
50
|
+
status?: ContactStatus;
|
|
51
|
+
lastContactAt?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface UserIdentity {
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
purpose: string;
|
|
57
|
+
agents: AgentRef[];
|
|
58
|
+
}
|
|
59
|
+
export interface PendingEntry {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
mentionCount: number;
|
|
63
|
+
firstSeenAt: string;
|
|
64
|
+
lastSeenAt: string;
|
|
65
|
+
contexts: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface AutoDiscoveryConfig {
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
minMentions: number;
|
|
70
|
+
sources: string[];
|
|
71
|
+
ignoreList: string[];
|
|
72
|
+
pending: PendingEntry[];
|
|
73
|
+
}
|
|
74
|
+
export interface RosterIndexes {
|
|
75
|
+
byTag: Record<string, string[]>;
|
|
76
|
+
byAgentId: Record<string, string>;
|
|
77
|
+
byOpenId: Record<string, string>;
|
|
78
|
+
}
|
|
79
|
+
export interface MatchEntry {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
matchField: 'id' | 'name' | 'alias' | 'tag' | 'note';
|
|
83
|
+
highlight: string;
|
|
84
|
+
tags: string[];
|
|
85
|
+
notes: string;
|
|
86
|
+
agents: AgentRef[];
|
|
87
|
+
source: ContactSource;
|
|
88
|
+
}
|
|
89
|
+
export interface SearchResult {
|
|
90
|
+
query: string;
|
|
91
|
+
exact: MatchEntry[];
|
|
92
|
+
fuzzy: MatchEntry[];
|
|
93
|
+
byTag: MatchEntry[];
|
|
94
|
+
byNote: MatchEntry[];
|
|
95
|
+
}
|
|
96
|
+
export type DuplicateReason = 'same_openid' | 'same_agentId' | 'name_similarity';
|
|
97
|
+
export interface DuplicateHint {
|
|
98
|
+
contactA: string;
|
|
99
|
+
contactB: string;
|
|
100
|
+
reason: DuplicateReason;
|
|
101
|
+
detail: string;
|
|
102
|
+
confidence: number;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
}
|
|
105
|
+
export interface RosterFilter {
|
|
106
|
+
tags?: string[];
|
|
107
|
+
source?: string;
|
|
108
|
+
status?: string;
|
|
109
|
+
sortBy?: 'name' | 'lastContactAt' | 'createdAt';
|
|
110
|
+
order?: 'asc' | 'desc';
|
|
111
|
+
limit?: number;
|
|
112
|
+
offset?: number;
|
|
113
|
+
}
|
|
114
|
+
export interface RosterData {
|
|
115
|
+
version: number;
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
contacts: Contact[];
|
|
118
|
+
identities: UserIdentity[];
|
|
119
|
+
autoDiscovery: AutoDiscoveryConfig;
|
|
120
|
+
indexes: RosterIndexes;
|
|
121
|
+
duplicateHints: DuplicateHint[];
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=roster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roster.d.ts","sourceRoot":"","sources":["../../src/types/roster.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